Skip to content
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

Add run_command benchcomp visualization #2542

Merged
merged 8 commits into from
Jun 26, 2023

Conversation

karkhaz
Copy link
Contributor

@karkhaz karkhaz commented Jun 20, 2023

This allows users to write their own custom visualization script to run after running the benchmarks. Prior to this commit, visualizations had to be checked into the Kani repository.

When run_command is specified as a visualization, benchcomp runs the specified command and passes the result of the run as a JSON file on stdin. The command can then process the result however it likes.

This resolves #2518.

Testing:

  • How is this change tested?

2 new regression tests

  • Is this a refactor change?

no

Checklist

  • Each commit message has a non-empty body, explaining why the change was made
  • Methods or procedures are documented
  • Regression or unit tests are included, or existing tests cover the modified code
  • My PR is restricted to a single feature or bugfix

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

This allows users to write their own custom visualization script to run
after running the benchmarks. Prior to this commit, visualizations had
to be checked into the Kani repository.

When `run_command` is specified as a visualization, benchcomp runs the
specified command and passes the result of the run as a JSON file on
stdin. The command can then process the result however it likes.

This resolves model-checking#2518.
@karkhaz karkhaz requested a review from a team as a code owner June 20, 2023 15:56
@karkhaz
Copy link
Contributor Author

karkhaz commented Jun 20, 2023

(Note that the doc text for run_command will automatically get rendered into the visualizations section of the Kani book.)

@karkhaz karkhaz self-assigned this Jun 20, 2023
@celinval
Copy link
Contributor

(Note that the doc text for run_command will automatically get rendered into the visualizations section of the Kani book.)

That's a neat idea. Do you have an example from your repo on how that would look like?

@karkhaz
Copy link
Contributor Author

karkhaz commented Jun 21, 2023

That's a neat idea. Do you have an example from your repo on how that would look like?

In this file (the same file as in this PR, you can also just expand the diff downwards) there are three classes. Each of them has a doc text, and those three doc texts are what get rendered into the three visualization documentations in the kani book

@celinval
Copy link
Contributor

celinval commented Jun 22, 2023

That's a neat idea. Do you have an example from your repo on how that would look like?

In this file (the same file as in this PR, you can also just expand the diff downwards) there are three classes. Each of them has a doc text, and those three doc texts are what get rendered into the three visualization documentations in the kani book

I was wondering if you have the link to the rendered version that includes your PR changes. You can enable the documentation to be built in your fork, so it is easy to review documentation changes. For example, here is the link for my fork's documentation: https://celinval.github.io/kani-dev/

The only thing is that those changes have to be made to your fork's main branch.

@karkhaz
Copy link
Contributor Author

karkhaz commented Jun 26, 2023

You can enable the documentation to be built in your fork

Awesome, thank you! I'll do that from now on. Here's how it looks:

https://karkhaz.github.io/kani/benchcomp-conf.html#run_command

@karkhaz karkhaz enabled auto-merge (squash) June 26, 2023 17:24
@karkhaz karkhaz merged commit d4a624f into model-checking:main Jun 26, 2023
13 checks passed
@karkhaz karkhaz deleted the kk-exec-viz branch June 26, 2023 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Allow visualization to be invoked as executable
3 participants