-
Notifications
You must be signed in to change notification settings - Fork 3
better KMIR show & new kmir info to get the de-refed type #648
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
automergerpr-permission-manager
merged 12 commits into
master
from
steven/pr-type-fixes-and-info-from-master
Aug 11, 2025
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
c4c90ca
feat: add custom KMIRPrettyPrinter for improved ListItem formatting
Stevengre 800d7d7
feat: add utility functions for kmir operations
Stevengre 10052a3
docs: update README with comprehensive kmir show command documentation
Stevengre 12de141
refactor: remove unused utils.py file
Stevengre 0fb2cf8
Fix SMIR type resolution and add info command
Stevengre 8fea552
Enhance README and implement kmir info command
Stevengre c9dd742
make format & make check
Stevengre 7de6d6f
fix
Stevengre 69087bf
feat: enhance kmir show command with advanced filtering and formattin…
Stevengre 65028de
warning 2 info
Stevengre a841eb4
chore: update stable-mir-json subproject to dirty state
Stevengre 5061128
make format & check
Stevengre File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from __future__ import annotations | ||
|
||
import logging | ||
from typing import TYPE_CHECKING | ||
|
||
from pyk.kast.pretty import PrettyPrinter, indent | ||
|
||
_LOGGER: logging.Logger = logging.getLogger(__name__) | ||
|
||
if TYPE_CHECKING: | ||
from pyk.kast.outer import KDefinition | ||
|
||
|
||
class KMIRPrettyPrinter(PrettyPrinter): | ||
""" | ||
Custom Pretty Printer for improved ListItem display formatting. | ||
Formats ListItem elements with line breaks for better readability. | ||
""" | ||
|
||
def __init__(self, definition: KDefinition) -> None: | ||
""" | ||
Initialize KMIR Pretty Printer | ||
|
||
Args: | ||
definition: K definition | ||
""" | ||
super().__init__(definition) | ||
self.symbol_table['ListItem'] = lambda *args: 'ListItem (' + (indent(', '.join(args))).strip() + ')\n' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These options are not currently implemented (would be in
options.py
) ...Were you planning to extend the PR with them ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are not available? let me check. Because I use cherry-pick to get this branch, it may lost something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I missed this commit. These options should be able to use now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These cells will be omitted by default: