From c163ebf20b2728515479e1f43d2beaa4ecf46944 Mon Sep 17 00:00:00 2001 From: Andrew Reynolds Date: Thu, 15 Nov 2018 16:40:37 -0600 Subject: [PATCH] Expand definitions prior to model core computation (#2707) --- src/smt/smt_engine.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/smt/smt_engine.cpp b/src/smt/smt_engine.cpp index cb7766c2d..f3a6c0c9e 100644 --- a/src/smt/smt_engine.cpp +++ b/src/smt/smt_engine.cpp @@ -4306,7 +4306,16 @@ Model* SmtEngine::getModel() { // If we enabled model cores, we compute a model core for m based on our // assertions using the model core builder utility std::vector easserts = getAssertions(); - ModelCoreBuilder::setModelCore(easserts, m, options::modelCoresMode()); + // must expand definitions + std::vector eassertsProc; + std::unordered_map cache; + for (unsigned i = 0, nasserts = easserts.size(); i < nasserts; i++) + { + Node ea = Node::fromExpr(easserts[i]); + Node eae = d_private->expandDefinitions(ea, cache); + eassertsProc.push_back(eae.toExpr()); + } + ModelCoreBuilder::setModelCore(eassertsProc, m, options::modelCoresMode()); } m->d_inputName = d_filename; return m; -- 2.30.2