-
Notifications
You must be signed in to change notification settings - Fork 150
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
Rewrites stop #916
Comments
I am working on a smaller example. The way I am using |
Baltoli
pushed a commit
that referenced
this issue
Apr 9, 2024
Closes runtimeverification/pyk#885. Overhauls the way command line argument parsing and parameter passing is done. When building a pyk-based command-line tool, for each subcommand of the tool, extend `class Command` . This subclass should contain all information about what arguments are accepted by that command (through providing its own arguments or inheriting from other `Options` classes), the default values of those arguments, the name of the command, and the help string for the command, as static fields. The values of those options for a specific invocation of that command are stored as non-static fields of a `Command`. The `Command` subclass contains the code that runs when that command is called in `exec()`. In addition, default values of arguments inherited from other `Options` classes can be overridden in the subclass. The `CLI` class manages the tool's CLI options. It is constructed by passing in the name of every command subclass to be included in the tool. It can then build the whole `ArgumentParser` for the tool and process the arguments to instantiate a new `*Command` of the correct type and with the correct arguments. Advantages: - All information about a subcommand is consolidated into one place - Default values specified in only one place - Commands only have to be listed once, when instantiating `CLI` - Setting up an argument parser with all subcommands is done automatically. - Routing of requested command to its associated execution function is done automatically. --------- Co-authored-by: devops <[email protected]> Co-authored-by: Tamás Tóth <[email protected]>
Baltoli
pushed a commit
that referenced
this issue
Apr 9, 2024
Closes runtimeverification/pyk#885. Overhauls the way command line argument parsing and parameter passing is done. When building a pyk-based command-line tool, for each subcommand of the tool, extend `class Command` . This subclass should contain all information about what arguments are accepted by that command (through providing its own arguments or inheriting from other `Options` classes), the default values of those arguments, the name of the command, and the help string for the command, as static fields. The values of those options for a specific invocation of that command are stored as non-static fields of a `Command`. The `Command` subclass contains the code that runs when that command is called in `exec()`. In addition, default values of arguments inherited from other `Options` classes can be overridden in the subclass. The `CLI` class manages the tool's CLI options. It is constructed by passing in the name of every command subclass to be included in the tool. It can then build the whole `ArgumentParser` for the tool and process the arguments to instantiate a new `*Command` of the correct type and with the correct arguments. Advantages: - All information about a subcommand is consolidated into one place - Default values specified in only one place - Commands only have to be listed once, when instantiating `CLI` - Setting up an argument parser with all subcommands is done automatically. - Routing of requested command to its associated execution function is done automatically. --------- Co-authored-by: devops <[email protected]> Co-authored-by: Tamás Tóth <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem: Only one rewrite rule is applied. The rewrites stops after this first rule. Any hint?
Here is the K file:
A program
test-program.src
in this language:The text was updated successfully, but these errors were encountered: