summaryrefslogtreecommitdiff
path: root/src/preprocessing/passes/real_to_int.cpp
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2020-03-10 10:00:07 -0500
committerGitHub <noreply@github.com>2020-03-10 10:00:07 -0500
commitf57c7cb845c7d1f8730e1b3ecfa4d1c030b980ac (patch)
tree770ae2193e6f536f94e2f8a55ec9c360013c9db7 /src/preprocessing/passes/real_to_int.cpp
parente2758b664c43de299d0ba80537f09ccdda026119 (diff)
Fix real as int for incremental (#3979)
Fixes #3956 and fixes #3969.
Diffstat (limited to 'src/preprocessing/passes/real_to_int.cpp')
-rw-r--r--src/preprocessing/passes/real_to_int.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/preprocessing/passes/real_to_int.cpp b/src/preprocessing/passes/real_to_int.cpp
index dba7ccbe3..cc98726c6 100644
--- a/src/preprocessing/passes/real_to_int.cpp
+++ b/src/preprocessing/passes/real_to_int.cpp
@@ -171,8 +171,11 @@ Node RealToInt::realToIntInternal(TNode n, NodeMap& cache, std::vector<Node>& va
nm->integerType(),
"Variable introduced in realToIntInternal pass");
var_eq.push_back(n.eqNode(ret));
- TheoryModel* m = d_preprocContext->getTheoryEngine()->getModel();
- m->addSubstitution(n, ret);
+ // ensure that the original variable is defined to be the returned
+ // one, which is important for models and for incremental solving.
+ std::vector<Expr> args;
+ smt::currentSmtEngine()->defineFunction(
+ n.toExpr(), args, ret.toExpr());
}
}
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback