summaryrefslogtreecommitdiff
path: root/src/theory
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2013-06-05 11:23:56 -0500
committerAndrew Reynolds <andrew.j.reynolds@gmail.com>2013-06-05 11:24:05 -0500
commit6edae99ca2d1af88ebe82256132d0d058913a13c (patch)
treec6d38cfffdb03fb0adb00625ea9696cceb5a2663 /src/theory
parent9dccea264f0b0ecd7edb21c392c1fc0c6741198d (diff)
Fix bug in --fmf-fmc for producing models of functions not appearing in quantified formulas.
Diffstat (limited to 'src/theory')
-rw-r--r--src/theory/model.cpp2
-rw-r--r--src/theory/quantifiers/first_order_model.cpp4
-rwxr-xr-xsrc/theory/quantifiers/full_model_check.cpp2
3 files changed, 6 insertions, 2 deletions
diff --git a/src/theory/model.cpp b/src/theory/model.cpp
index 544ee6c85..08be41171 100644
--- a/src/theory/model.cpp
+++ b/src/theory/model.cpp
@@ -431,6 +431,7 @@ void TheoryEngineModelBuilder::checkTerms(TNode n, TheoryModel* tm, NodeSet& cac
void TheoryEngineModelBuilder::buildModel(Model* m, bool fullModel)
{
+ Trace("model-builder") << "TheoryEngineModelBuilder: buildModel, fullModel = " << fullModel << std::endl;
TheoryModel* tm = (TheoryModel*)m;
// buildModel with fullModel = true should only be called once in any context
@@ -719,6 +720,7 @@ void TheoryEngineModelBuilder::buildModel(Model* m, bool fullModel)
}
if (!fullModel) {
+ Trace("model-builder") << "Make sure ECs have reps..." << std::endl;
// Make sure every EC has a rep
for (itMap = assertedReps.begin(); itMap != assertedReps.end(); ++itMap ) {
tm->d_reps[itMap->first] = itMap->second;
diff --git a/src/theory/quantifiers/first_order_model.cpp b/src/theory/quantifiers/first_order_model.cpp
index 4b101de49..b775ea1b0 100644
--- a/src/theory/quantifiers/first_order_model.cpp
+++ b/src/theory/quantifiers/first_order_model.cpp
@@ -602,12 +602,14 @@ Node FirstOrderModelFmc::getModelBasisTerm(TypeNode tn) {
}
Node FirstOrderModelFmc::getFunctionValue(Node op, const char* argPrefix ) {
+ Trace("fmc-model") << "Get function value for " << op << std::endl;
TypeNode type = op.getType();
std::vector< Node > vars;
for( size_t i=0; i<type.getNumChildren()-1; i++ ){
std::stringstream ss;
ss << argPrefix << (i+1);
- vars.push_back( NodeManager::currentNM()->mkBoundVar( ss.str(), type[i] ) );
+ Node b = NodeManager::currentNM()->mkBoundVar( ss.str(), type[i] );
+ vars.push_back( b );
}
Node boundVarList = NodeManager::currentNM()->mkNode(kind::BOUND_VAR_LIST, vars);
Node curr;
diff --git a/src/theory/quantifiers/full_model_check.cpp b/src/theory/quantifiers/full_model_check.cpp
index b16115749..2033797d5 100755
--- a/src/theory/quantifiers/full_model_check.cpp
+++ b/src/theory/quantifiers/full_model_check.cpp
@@ -201,7 +201,7 @@ void FullModelChecker::processBuildModel(TheoryModel* m, bool fullModel){
FirstOrderModelFmc * fm = ((FirstOrderModelFmc*)m)->asFirstOrderModelFmc();
if( fullModel ){
//make function values
- for( std::map< Node, std::vector< Node > >::iterator it = m->d_uf_terms.begin(); it != m->d_uf_terms.end(); ++it ){
+ for( std::map<Node, Def * >::iterator it = fm->d_models.begin(); it != fm->d_models.end(); ++it ){
m->d_uf_models[ it->first ] = getFunctionValue( fm, it->first, "$x" );
}
TheoryEngineModelBuilder::processBuildModel( m, fullModel );
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback