Skip to content

Making chopper available via command line#886

Merged
marcoeilers merged 5 commits intomasterfrom
meilers_command_line_select
Sep 23, 2025
Merged

Making chopper available via command line#886
marcoeilers merged 5 commits intomasterfrom
meilers_command_line_select

Conversation

@marcoeilers
Copy link
Contributor

The Chopper is great but currently not available via the command line. This PR changes that.
It adds a new option --select=name1,name2,name3 that allows users to select some subset of the members of the selected program to be verified, and then uses the Chopper to generate a Viper program containing only these methods and their necessary dependencies.

It also removes the older command line option --methods=name that tried to do something similar but only filtered methods and did not take into account dependencies (and that I've never seen anyone actually use).

This change requires making the Chopper aware of termination plugin dependencies; the code for doing this is taken from @jcp19's PR https://github.com/viperproject/silver/pull/832/files.

@marcoeilers marcoeilers requested a review from jcp19 September 11, 2025 07:46
@jcp19
Copy link
Contributor

jcp19 commented Sep 17, 2025

While I originally went with this design, I decided against this option, as it introduces a change of the API that is, in my view, unnecessary. Instead, I extended the trait with a new algorithm to compute the edges in the PluginAwareChopper

@marcoeilers
Copy link
Contributor Author

Ah right, I forgot about that.
Then I think we should move the PluginAwareChopper code to silver so it can be used from the command line as well. So I'll just copy that code over I guess.

Copy link
Contributor

@jcp19 jcp19 left a comment

Choose a reason for hiding this comment

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

LGTM

Co-authored-by: João Pereira <joaopereira.19@gmail.com>
@marcoeilers marcoeilers enabled auto-merge (squash) September 23, 2025 09:04
@marcoeilers marcoeilers merged commit ffd042d into master Sep 23, 2025
5 checks passed
@marcoeilers marcoeilers deleted the meilers_command_line_select branch September 23, 2025 09:24
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.

2 participants