@@ -17,18 +17,19 @@ Author: Daniel Kroening, kroening@kroening.com
1717
1818class exprt ;
1919
20+ // / An interface for a decision procedure for satisfiability problems.
2021class decision_proceduret
2122{
2223public:
2324 // / For a Boolean expression \p expr, add the constraint 'expr' if \p value
2425 // / is `true`, otherwise add 'not expr'
25- virtual void set_to (const exprt &expr , bool value) = 0;
26+ virtual void set_to (const exprt &, bool value) = 0;
2627
2728 // / For a Boolean expression \p expr, add the constraint 'expr'
28- void set_to_true (const exprt &expr );
29+ void set_to_true (const exprt &);
2930
3031 // / For a Boolean expression \p expr, add the constraint 'not expr'
31- void set_to_false (const exprt &expr );
32+ void set_to_false (const exprt &);
3233
3334 // / Generate a handle, which is an expression that
3435 // / has the same value as the argument in any model
@@ -37,7 +38,7 @@ class decision_proceduret
3738 // / \ref set_to.
3839 // / The returned expression may be the expression itself or a more compact
3940 // / but solver-specific representation.
40- virtual exprt handle (const exprt &expr ) = 0;
41+ virtual exprt handle (const exprt &) = 0;
4142
4243 // / Result of running the decision procedure
4344 enum class resultt
@@ -48,12 +49,18 @@ class decision_proceduret
4849 };
4950
5051 // / Run the decision procedure to solve the problem
52+ // / This corresponds to SMT-LIB's check-sat.
5153 resultt operator ()();
5254
55+ // / Run the decision procedure to solve the problem under
56+ // / the given assumption.
57+ // / This corresponds to SMT-LIB's check-sat-assuming.
58+ resultt operator ()(const exprt &assumption);
59+
5360 // / Return \p expr with variables replaced by values from satisfying
5461 // / assignment if available.
5562 // / Return `nil` if not available
56- virtual exprt get (const exprt &expr ) const = 0;
63+ virtual exprt get (const exprt &) const = 0;
5764
5865 // / Print satisfying assignment to \p out
5966 virtual void print_assignment (std::ostream &out) const = 0;
@@ -67,8 +74,8 @@ class decision_proceduret
6774 virtual ~decision_proceduret ();
6875
6976protected:
70- // / Run the decision procedure to solve the problem
71- virtual resultt dec_solve () = 0;
77+ // / Implementation of the decision procedure.
78+ virtual resultt dec_solve (const exprt &assumption ) = 0;
7279};
7380
7481// / Add Boolean constraint \p src to decision procedure \p dest
0 commit comments