Skip to content
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

Correcting command line argument for '--max_time' #373

Merged
merged 3 commits into from
Aug 7, 2022

Conversation

aytey
Copy link
Member

@aytey aytey commented Jul 30, 2020

It seems that the max_conflicts and max_time option had the same short name:

./stp -g 10
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::program_options::ambiguous_option> >'
  what():  option '-g' is ambiguous and matches '--max_num_confl', and '--max_time'
Aborted (core dumped)

This PR changes that to make sure the have different short names.

The larger changes are due to git-clang-format.

Signed-off-by: Andrew V. Jones andrew.jones@vector.com

Signed-off-by: Andrew V. Jones <andrew.jones@vector.com>
@rgov
Copy link
Member

rgov commented Jul 30, 2020

Do -g and -k match the options for any other solver? Would be nice to know what CVC4 or whatever uses. They don't make a lot of sense to me and it makes the command line a bit hard to read if you cannot guess what the abbreviations stand for.

@aytey
Copy link
Member Author

aytey commented Jul 30, 2020

I'm genuinely fine to remove these short options all together (I'm pretty sure I added them; at least I did the timeout one!).

To answer your question:

  • CVC4 uses --tlimit=MS and --rlimit=N (rlimit for conflicts)

  • Z3 uses -T and -t (hard vs. soft, respectively) ... however STP already has a -t for "print quick statistics"

@rgov
Copy link
Member

rgov commented Jul 31, 2020

First, I'm for deprecating -t for statistics and encouraging the use of --stats. Then if we want to reclaim -t with a timeout argument, it won't be horrible to update any old workflows that use the flag without an argument.

Then --tlimit and --rlimit sound good to me (not sure what r stands for), with perhaps -T or -t aliasing to --tlimit according to which one matches Z3's behavior best.

My goal isn't to replicate the entire interface (though that might be nice, as Clang replicated GCC's interface) but just make it a little more readable to people coming from other solvers.

@TrevorHansen TrevorHansen mentioned this pull request Aug 2, 2022
@TrevorHansen TrevorHansen added this to the STP 2.4 milestone Aug 5, 2022
oops. I'm using the web interface for the first time and getting all confused.
@TrevorHansen
Copy link
Member

Sorry for the slow merge. This looks good.

@TrevorHansen TrevorHansen reopened this Aug 7, 2022
@TrevorHansen TrevorHansen merged commit cf96ac6 into stp:master Aug 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants