Repository navigation
Fix -t so the time bound is applied to the stopwatch - #8
Open
alan23273850 wants to merge 1 commit into
Open
alan23273850 wants to merge 1 commit into
alan23273850 wants to merge 1 commit into
Conversation
Parsing -t only updated config_.time_bound_seconds while countSSAT/countSAT poll stopwatch_, which was initialized to the 100000s default before argv was parsed. Call setTimeBound after -t, skip the seconds token, and re-apply the config bound at the start of solve(). Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #7
Summary
-t [s]wroteconfig_.time_bound_secondsbut never updatedstopwatch_, which is the objectcountSSAT()/countSAT()actually poll.Solverconstructor (default 100000s) beforeargvwas parsed, so-thad no effect.setTimeBound()after parsing-t, skip the seconds token with++i, and re-apply the config bound at the start ofsolve().Test plan
./SharpSSATstill prints-t [s]in the usage text./SharpSSAT -s -t 2 <small.sdimacs>printsTIMEOUT !at ~2s if the instance does not finish earlier (optional; only if a long-enough instance is handy)./SharpSSAT -s -k -p -t 2147483647 <file.sdimacs>does not stop at 100000s solely because of the default boundMade with Cursor