Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Stevendeo committed Nov 27, 2023
1 parent 3ae190b commit d14ddf7
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 31 deletions.
2 changes: 1 addition & 1 deletion src/lib/frontend/d_state_option.ml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ module SatSolver = (val msatsolver)

let msteps =
let on_update _ sat st = Steps.set_steps_bound sat; st in
(create_opt ~on_update "steps_bound" O.get_steps_bound)
(create_opt_only_start_mode ~on_update "steps_bound" O.get_steps_bound)

module Steps = (val msteps)

Expand Down
29 changes: 25 additions & 4 deletions tests/dune.inc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 0 additions & 26 deletions tests/smtlib/testfile-steps-bound.dolmen.smt2

This file was deleted.

1 change: 1 addition & 0 deletions tests/smtlib/testfile-steps-bound1.dolmen.err.expected
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(error "Invalid action during mode Util.Assert: Set option steps_bound")
7 changes: 7 additions & 0 deletions tests/smtlib/testfile-steps-bound1.dolmen.err.smt2
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
(set-logic ALL)

(declare-const x Int)
(assert (= (* x x) 3))
(set-option :steps-bound 2)
; Should fail because this option cannot be set after set-logic
(check-sat)
17 changes: 17 additions & 0 deletions tests/smtlib/testfile-steps-bound2.dolmen.smt2
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
(set-option :steps-bound 2)
(set-logic ALL)

(declare-const x Int)
(assert (= (* x x) 3))
; Should answer 'unknown'
(check-sat)
(get-info :reason-unknown)

(reset)

(set-option :steps-bound 100)
(set-logic ALL)
(declare-const x Int)
(assert (= (* x x) 3))
; Should answer 'unsat'
(check-sat)

0 comments on commit d14ddf7

Please sign in to comment.