@@ -29,22 +29,9 @@ void incremental_solvert::new_context()
29
29
#endif
30
30
31
31
#else
32
-
33
- literalt activation_literal=
34
- solver->convert (
35
- symbol_exprt (
36
- " goto_symex::\\ act$" +
37
- std::to_string (activation_literal_counter++), bool_typet ()));
38
-
32
+ solver->push ();
39
33
#ifdef DEBUG_OUTPUT
40
- debug () << " new context: " << activation_literal<< eom;
41
- #endif
42
-
43
- activation_literals.push_back (activation_literal);
44
- solver->set_assumptions (activation_literals);
45
-
46
- #if 0
47
- return !activation_literals.back(); // not to be used anymore
34
+ debug () << " new context" << eom;
48
35
#endif
49
36
#endif
50
37
}
@@ -62,45 +49,10 @@ void incremental_solvert::pop_context()
62
49
63
50
#else
64
51
65
- assert (!activation_literals.empty ());
66
- literalt activation_literal=activation_literals.back ();
67
- activation_literals.pop_back ();
68
- #ifndef DEBUG_FORMULA
69
- solver->set_to_false (literal_exprt (activation_literal));
70
- #else
71
- formula.push_back (!activation_literal);
72
- #endif
73
-
52
+ solver->pop ();
74
53
#ifdef DEBUG_OUTPUT
75
- debug () << " pop context: " << activation_literal << eom;
54
+ debug () << " pop context" << eom;
76
55
#endif
77
-
78
- solver->set_assumptions (activation_literals);
79
- #endif
80
- }
81
-
82
- void incremental_solvert::make_context_permanent ()
83
- {
84
- #ifdef NON_INCREMENTAL
85
- assert (contexts.size ()>=2 );
86
- contextst::iterator c_it=contexts.end (); c_it--; c_it--;
87
- c_it->insert (c_it->end (), contexts.back ().begin (), contexts.back ().end ());
88
- contexts.pop_back ();
89
- #else
90
- assert (!activation_literals.empty ());
91
- literalt activation_literal=activation_literals.back ();
92
- activation_literals.pop_back ();
93
- #ifndef DEBUG_FORMULA
94
- solver->set_to_true (literal_exprt (activation_literal));
95
- #else
96
- formula.push_back (activation_literal);
97
- #endif
98
-
99
- #ifdef DEBUG_OUTPUT
100
- debug () << " make context permanent: " << activation_literal<< eom;
101
- #endif
102
-
103
- solver->set_assumptions (activation_literals);
104
56
#endif
105
57
}
106
58
0 commit comments