3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-24 09:35:32 +00:00

add facility to add lemmas

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2017-06-12 19:44:02 -07:00
parent af6ebbcd92
commit ce592d7716
16 changed files with 111 additions and 21 deletions

View file

@ -179,6 +179,12 @@ public:
m_solver2->assert_expr(t, a);
}
virtual void assert_lemma(expr* t) {
m_solver1->assert_lemma(t);
if (m_solver2_initialized)
m_solver2->assert_lemma(t);
}
virtual void push() {
switch_inc_mode();
m_solver1->push();

View file

@ -90,6 +90,12 @@ public:
*/
virtual void assert_expr(expr * t, expr * a) = 0;
/**
\brief Add a lemma to the assertion stack. A lemma is assumed to be a consequence of already
asserted formulas. The solver is free to ignore lemmas.
*/
virtual void assert_lemma(expr * t) = 0;
/**
\brief Create a backtracking point.
*/

View file

@ -55,6 +55,7 @@ public:
virtual void set_produce_models(bool f) { m_produce_models = f; }
virtual void assert_expr(expr * t);
virtual void assert_lemma(expr * t);
virtual void push_core();
virtual void pop_core(unsigned n);
@ -115,6 +116,9 @@ void tactic2solver::assert_expr(expr * t) {
m_result = 0;
}
void tactic2solver::assert_lemma(expr * t) {
}
void tactic2solver::push_core() {
m_scopes.push_back(m_assertions.size());
m_result = 0;