Skip to content

Improvements to printing using new infrastructure #593

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
merged 9 commits into from
May 21, 2025

Conversation

ehildenb
Copy link
Member

@ehildenb ehildenb commented May 21, 2025

These are some improvements to printing that we can implement now that we have merged changes upstream runtimeverification/k#4808.

  • Improves the printing of spans in the TUI viewer to actually print the file name and line that it's referring to.
  • Passes the entire DisplayOpts to the KMIRAPRNodePrinter, because why not?
  • Omits printing the <currentBody> cell by default in TUI and shower, but enables turning it back on with --no-omit-current-body option to both.
  • Saves off the SMIRInfo in the proof_dir when we have it available in prove-rs, so that it can be used for printing sourcemap information in the show/view commands (like current function name and span).

@ehildenb ehildenb self-assigned this May 21, 2025
@ehildenb ehildenb marked this pull request as ready for review May 21, 2025 02:48
@ehildenb ehildenb requested a review from jberthold May 21, 2025 02:48
Copy link
Member

@jberthold jberthold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 💰 This will be quite helpful!

Comment on lines +234 to +240
display_args.add_argument(
'--no-omit-current-body',
dest='omit_current_body',
default=True,
action='store_false',
help='Display the <currentBody> cell completely.',
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can modify this (in a later PR) to carry a list of omitted field names (default [ currentBody ], can be emptied for full printing or any field can be added). The use site in __main__ would just pass the list (with angle-brackets added) to CTermShow.

No need to do this now, though.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could be possible, but making it a list wouldn't be the way. Using the CTermShow.let(...) method would be the way, which makes it so instances of CTermShow are immutable. But it would be nice to be able to dynamically control which cells are omitted...

@jberthold jberthold merged commit e4085f5 into master May 21, 2025
6 checks passed
@jberthold jberthold deleted the print-improvements branch May 21, 2025 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants