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 flag
$ kompile -hh
...
--profile-rule-parsing
Generate time in milliseconds to parse each rule in the semantics.
I got the following confusing error message:
$ kompile -v --profile-rule-parsing test.k --main-module TEST
Parse command line options = 0,014s
[Error] Critical: You have to provide exactly one main file in order to do
outer parsing.
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:
The last is optional, but it’s something to consider. Currently kompile works as Usage: kompile [options] <file>, in this case, the --profile-rule-parsing consumed the K file instead of kompile. This could be avoided if we swap the order to kompile <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 thejcommnader library here: https://github.com/runtimeverification/k/blob/master/kernel/src/main/java/org/kframework/kompile/KompileUsageFormatter.java"
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-parsingas 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:
-hhor-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 semanticsas suggested by @radumereuta.The last is optional, but it’s something to consider. Currently
kompileworks asUsage: kompile [options] <file>, in this case, the--profile-rule-parsingconsumed 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
jcommnaderlibrary here: https://github.com/runtimeverification/k/blob/master/kernel/src/main/java/org/kframework/kompile/KompileUsageFormatter.java"