-
Notifications
You must be signed in to change notification settings - Fork 153
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
[K-Bug] Missing file argument in kompile's flag #3619
Comments
Find where the message is constructed in this file: https://github.com/runtimeverification/k/blob/master/kernel/src/main/java/org/kframework/kompile/KompileUsageFormatter.java |
I've edited the table from #3417 (thanks for it @radumereuta).
I have some doubts about the name of the parameter (choosing between one or another) and what should be passed as a parameter (the items with ❓). Any help defining them is very welcome! |
If you can't find a way to annotate the parameters with the value description, then you can simply modify the existing description with some message: Now about your suggestions: |
@radumereuta, for kast, we have these:
I'm unsure about |
Here is the same table for
|
Follow up of #3619 and #3638! This PR enhances the usability of `kast --help` and `kast --help-hidden` by providing flag descriptors to help the user understand when an argument needs to be provided to the flag. Ex.: Before ``` kast --help Usage: kast [options] <file> Options: --color Use colors in output. Default is on. Possible Values: [OFF, ON, EXTENDED] ``` Now: ``` Usage: kast [options] <file> Options: --color <mode> Use colors in output. Default: ON Possible Values: [OFF, ON, EXTENDED] ``` Among others, this PR introduces the following arguments to the respective parameters: <!DOCTYPE html> parameter | argument -- | -- --color | \<mode> --expression, -e | \<expression> --input, -i | \<mode> --module, -m | \<module> --output, -o | \<mode> --output-file | \<file> --output-flatten | \<KLabels> --output-omit | \<KLabels> --output-tokast | \<KLabels> --output-tokenize | \<KLabels> --sort, -s | \<sort> --steps | \<steps> --definition | \<path> --directory, -d | \<path>
Follow up of #3619, #3638, and #3642! This PR enhances the usability of `kprove --help` and `kprove --help-hidden` by providing flag descriptors to help the user understand when an argument needs to be provided to the flag. Ex.: Before ``` Usage: kprove [options] <file> Options: --branching-allowed Number of branching events allowed before a forcible stop. Default: 2147483647 ``` Now: ``` Usage: kprove [options] <file> Options: --branching-allowed <value> Number of branching events allowed before a forcible stop. Default: 2147483647 ``` Among others, this PR introduces the following arguments to the respective parameters: parameter | argument -- | -- --branching-allowed | \<number> --claims | \<labels> --color | \<mode> --debug-script | \<file> --default-claim-type | \<type> --definition | \<path> --depth | \<number> --emit-json-spec | \<file> --exclude | \<labels> --output, -o | \<mode> --output-file | \<file> --output-flatten | \<KLabels> --output-omit | \<KLabels> --output-tokast | \<KLabels> --output-tokenize | \<KLabels> --spec-module, -sm | \<name> --trusted | \<labels> --haskell-backend-command | \<command> --haskell-backend-home | \<directory> --smt-timeout | \<milliseconds>
What component is the issue in?
Front-End
Which command
What K Version?
v6.0.83-0-gc2ad66e022
Operating System
MacOS (Apple Silicon/AMD)
Steps to Reproduce
When I tried to use
--profile-rule-parsing
as it's defined on our hidden-help flagI got the following confusing error message:
After talking with @radumereuta at #3611 (comment) I saw the this flag actually expects a new file to write the time taken to parse each rule.
Expected Results
I would expect 3 things here:
-hh
or-h
.--profile-rule-parsing <file>
and probably contain a more helpful description likeStore in this file time taken in ms to parse each rule in the semantics
as suggested by @radumereuta.The last is optional, but it’s something to consider. Currently
kompile
works asUsage: kompile [options] <file>
, in this case, the--profile-rule-parsing
consumed the K file instead ofkompile
. This could be avoided if we swap the order tokompile <file> [options]
, and then it will be easier to identify when we don’t pass input to kompile and when we don’t pass input for a kompile’s flag. Although, I admit that’s counterintuitive considering other compiler’s CLI design.PS.: Also from @radumereuta:
"The output for the help command is handled automatically by the
jcommnader
library here: https://github.com/runtimeverification/k/blob/master/kernel/src/main/java/org/kframework/kompile/KompileUsageFormatter.java"The text was updated successfully, but these errors were encountered: