-
Notifications
You must be signed in to change notification settings - Fork 10
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
CLI Refactoring #264
Comments
That's quite tough. Some inspiration: clingo options
|
As discussed yesterday, I took a look at candidate libraries for argument parsing. There's a list here. I took a closer look at two more modern libraries: JCommanderpicocli
You may use this link to GitHub Compare to get a rough overview of activity of the three candidates mentioned so far. IdeasTODO... Note: I'll edit here as I find out more... |
I quickly skimmed the getting started guides for both JCommander and picocli - both look really promising to me, and I like the annotation-based approach a lot! Something came to my mind though - If we were to use one of these and annotate our Can you think of a way to decouple that? Or am I overengineering it? (Or would it really be that bad for the API module to depend on e.g. picocli..?) |
There are many ways to decouple that. You could for example have |
I just had to look up the options for Z3. Wanted to post it here so you get a feel of how they structure their parameters: Z3 options
|
Another note: I used Picocli for ATLAS, which can be compiled to an x86_64 ELF binary via GraalVM Native Image. Since native images would also be interesting for Alpha, I'd like to recommend Picocli. |
Alpha's command line interface has been growing organically for quite some time. Right now, we have a lot of different flags and options that are partly related and - in some cases - influence each other in a rather intransparent fashion.
In order to make the CLI a bit more approachable, it would be useful to group related options by category, e.g.
One way to achieve this from a programming point of view would be switching to a more powerful argument parsing library - one I can think of right now is argparse4j, which supports subcommands which could be used for grouping of options.
This task is divided into two basic steps:
The text was updated successfully, but these errors were encountered: