summaryrefslogtreecommitdiff
path: root/src/theory/quantifiers/full_model_check.cpp
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2013-05-09 21:39:03 -0500
committerAndrew Reynolds <andrew.j.reynolds@gmail.com>2013-05-09 21:39:03 -0500
commit20cde072ebef5eddfc1562bebdd9438c77a22c8e (patch)
treeddb2b5e0d5fe8d4e37d05af6c947298d030fd91d /src/theory/quantifiers/full_model_check.cpp
parent83ecbc2357ffbb7d0772804c360302ca1daa2400 (diff)
Add simplification option --fo-prop-quant. Add model support for new model-checking procedure. Add run script for casc24-fnt.
Diffstat (limited to 'src/theory/quantifiers/full_model_check.cpp')
-rwxr-xr-xsrc/theory/quantifiers/full_model_check.cpp35
1 files changed, 34 insertions, 1 deletions
diff --git a/src/theory/quantifiers/full_model_check.cpp b/src/theory/quantifiers/full_model_check.cpp
index efd193fc5..4ce9dba21 100755
--- a/src/theory/quantifiers/full_model_check.cpp
+++ b/src/theory/quantifiers/full_model_check.cpp
@@ -507,7 +507,7 @@ int FullModelChecker::exhaustiveInstantiate(FirstOrderModel * fm, Node f, int ef
}
}
}else{
- //TODO
+ Trace("fmc-exh") << "Exhaustive instantiate " << f << std::endl;
Trace("fmc-exh") << "Definition was : " << std::endl;
d_quant_models[f].debugPrint("fmc-exh", Node::null(), this);
Trace("fmc-exh") << std::endl;
@@ -941,3 +941,36 @@ bool FullModelChecker::isActive() {
bool FullModelChecker::useSimpleModels() {
return options::fmfFullModelCheckSimple();
}
+
+Node FullModelChecker::getFunctionValue(FirstOrderModel * fm, Node op, const char* argPrefix ) {
+ 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 boundVarList = NodeManager::currentNM()->mkNode(kind::BOUND_VAR_LIST, vars);
+ Node curr;
+ for( int i=(d_models[op]->d_cond.size()-1); i>=0; i--) {
+ Node v = fm->getRepresentative( d_models[op]->d_value[i] );
+ if( curr.isNull() ){
+ curr = v;
+ }else{
+ //make the condition
+ Node cond = d_models[op]->d_cond[i];
+ std::vector< Node > children;
+ for( unsigned j=0; j<cond.getNumChildren(); j++) {
+ if (!isStar(cond[j])){
+ Node c = fm->getRepresentative( cond[j] );
+ children.push_back( NodeManager::currentNM()->mkNode( EQUAL, vars[j], c ) );
+ }
+ }
+ Assert( !children.empty() );
+ Node cc = children.size()==1 ? children[0] : NodeManager::currentNM()->mkNode( AND, children );
+ curr = NodeManager::currentNM()->mkNode( ITE, cc, v, curr );
+ }
+ }
+ curr = Rewriter::rewrite( curr );
+ return NodeManager::currentNM()->mkNode(kind::LAMBDA, boundVarList, curr);
+} \ No newline at end of file
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback