File tree 3 files changed +17
-0
lines changed 3 files changed +17
-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 6
6
7
7
\*******************************************************************/
8
8
9
+ #include " literal_expr.h"
9
10
#include " prop_conv.h"
11
+
10
12
#include < algorithm>
11
13
14
+ exprt prop_convt::handle (const exprt &expr)
15
+ {
16
+ return literal_exprt (convert (expr));
17
+ }
18
+
12
19
// / determine whether a variable is in the final conflict
13
20
bool prop_convt::is_in_conflict (literalt) const
14
21
{
Original file line number Diff line number Diff line change @@ -22,6 +22,9 @@ class prop_convt:public decision_proceduret
22
22
23
23
using decision_proceduret::operator ();
24
24
25
+ // handle
26
+ exprt handle (const exprt &expr) override ;
27
+
25
28
// incremental solving
26
29
virtual void set_frozen (literalt a);
27
30
virtual void set_frozen (const bvt &);
You can’t perform that action at this time.
0 commit comments