File tree 3 files changed +22
-0
lines changed
3 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -34,8 +34,14 @@ class decision_proceduret
34
34
void set_to_false (const exprt &expr);
35
35
36
36
// / Convert a Boolean expression and return the corresponding literal
37
+ // / This will go away, use handle(expr) instead
37
38
virtual literalt convert (const exprt &expr) = 0;
38
39
40
+ // / Generate a handle for an expression; this offers an efficient way
41
+ // / to refer to the expression in subsequent calls to \ref get or
42
+ // / \ref set_to
43
+ virtual exprt handle (const exprt &expr) = 0;
44
+
39
45
// / Result of running the decision procedure
40
46
enum class resultt
41
47
{
@@ -54,6 +60,7 @@ class decision_proceduret
54
60
55
61
// / Return value of literal \p l from satisfying assignment.
56
62
// / Return tvt::UNKNOWN if not available
63
+ // / This will go away, use get instead.
57
64
virtual tvt l_get (literalt l) const = 0;
58
65
59
66
// / Print satisfying assignment to \p out
Original file line number Diff line number Diff line change 7
7
\*******************************************************************/
8
8
9
9
#include " prop_conv.h"
10
+
11
+ #include " literal_expr.h"
12
+
10
13
#include < algorithm>
11
14
15
+ exprt prop_convt::handle (const exprt &expr)
16
+ {
17
+ return literal_exprt (convert (expr));
18
+ }
19
+
12
20
// / determine whether a variable is in the final conflict
13
21
bool prop_convt::is_in_conflict (literalt) const
14
22
{
Original file line number Diff line number Diff line change @@ -22,6 +22,13 @@ class prop_convt:public decision_proceduret
22
22
23
23
using decision_proceduret::operator ();
24
24
25
+ // / returns a 'handle', which is an expression that
26
+ // / has the same value as the argument in any model
27
+ // / that is generated.
28
+ // / This may be the expression itself or a more compact
29
+ // / but solver-specific representation.
30
+ exprt handle (const exprt &expr) override ;
31
+
25
32
// incremental solving
26
33
virtual void set_frozen (literalt a);
27
34
virtual void set_frozen (const bvt &);
You can’t perform that action at this time.
0 commit comments