CinRC / IRDC-CCSK

Java implementation of distributed reversible computation verification
https://spots.augusta.edu/caubert/cinrc/
GNU General Public License v3.0
4 stars 2 forks source link

Make --help flag independent of process #51

Closed aubertc closed 1 year ago

aubertc commented 1 year ago

As of now, calling the program with the --help flag and without process makes the program crash:

java -jar target/RCCS-2.*-with-dependencies.jar --help
me.gmx.parser.CCSParserException: Unrecognized character(s): --
        at me.gmx.parser.CCSParser.parseLine(CCSParser.java:75)
        at me.gmx.RCCS.main(RCCS.java:76)

Of course, calling it with an actual process works:.

caubert@travail:~/travail/git/IRDC-CCSK$ java -jar target/RCCS-2.*-with-dependencies.jar --help "a"
Incorrect arguments! Please use the form `java -jar RCCS.jar <flags> "a.b|c.a"
--debug  -  Prints debug info
--enumerate  -  Prints enumeration tree of given process
--help  -  Print this help message
--validate  -  Validate all given processes inside the file inputted after this flag
--uC  -  [broken] Should each channel's identity be dictated by it's unique ID
--dL  -  Labels are visibly differentiated by integers
--hide-keys  -  CCSK keys are hidden
--kM  -  [broken] Should a label's identity be determined by its unique ID?
--sA  -  Alternative display mode for summation processes. Reversible summations are not annotated
--sC  -  Alternative display mode for summation processes. Reversible summations are hidden after execution
--eN  -  Labels explicitly require a trailing process. Labels will no longer have an implicit null process attached.
--hP  -  Parenthesis surrounding complex processes will be omitted
--dN  -  Null processes will be displayed explicitly
--iU  -  Unrecognized characters in process are ignored
--kL  -  Keys will be visibly similar to the label they represent
--gui  -  Start program with GUI

--- Examples ---java -jar RCCS.jar "a.b + 'a.c"java -jar RCCS.jar "(a.c|'a.c\{a}) + 'a|c.b"java -jar RCCS.jar --enumerate "(a.b+'a.c)|(b.'a+'a.'b)"

Even if it complains that the form is not correct (even though it is).

aubertc commented 1 year ago

I still have an error message ("Incorrect arguments! Please use the form `java -jar IRDC.jar "a.b|c.a""). Have you tested this?

java -jar IRDC-2.2.2.6-jar-with-dependencies.jar --help
Incorrect arguments! Please use the form `java -jar IRDC.jar <flags> "a.b|c.a"
--debug  -  Prints debug info
--enumerate  -  Prints enumeration tree of given process
--help  -  Print this help message
--validate  -  Validate all given processes inside the file inputted after this flag
--uC  -  [broken] Should each channel's identity be dictated by it's unique ID
--dL  -  Labels are visibly differentiated by integers
--hide-keys  -  CCSK keys are hidden
--kM  -  [broken] Should a label's identity be determined by its unique ID?
--sA  -  Alternative display mode for summation processes. Reversible summations are not annotated
--sC  -  Alternative display mode for summation processes. Reversible summations are hidden after execution
--require-explicit-null  -  Labels explicitly require a trailing process. Labels will no longer have an implicit null process attached.
--hP  -  Parenthesis surrounding complex processes will be omitted
--dN  -  Null processes will be displayed explicitly
--iU  -  Unrecognized characters in process are ignored
--kL  -  Keys will be visibly similar to the label they represent
--gui  -  Start program with GUI

--- Examples ---java -jar IRDC.jar "a.b + 'a.c"java -jar IRDC.jar "(a.c|'a.c\{a}) + 'a|c.b"java -jar IRDC.jar --enumerate "(a.b+'a.c)|(b.'a+'a.'b)"
peterbro1 commented 1 year ago

The message that gets displayed is the correct one. Perhaps it is misleading to write about improper arguments, but the --help command simply displays the flags and examples. I can remove the improper argument message though

aubertc commented 1 year ago

Well, the "Incorrect arguments! " certainly sounds wrong.

aubertc commented 1 year ago

Thanks for taking care of it!