From 95028e5424d08d2c921e6bb77320685e7161e736 Mon Sep 17 00:00:00 2001 From: ajreynol Date: Mon, 16 Jun 2014 18:05:36 +0200 Subject: More proof support for CASC : include skolemization --- src/theory/quantifiers/term_database.h | 4 +-- src/theory/quantifiers/theory_quantifiers.cpp | 13 ++------- src/theory/quantifiers/theory_quantifiers.h | 2 -- src/theory/quantifiers_engine.cpp | 39 ++++++++++++++++++++++++--- src/theory/quantifiers_engine.h | 4 ++- 5 files changed, 42 insertions(+), 20 deletions(-) (limited to 'src/theory') diff --git a/src/theory/quantifiers/term_database.h b/src/theory/quantifiers/term_database.h index e82fcd00d..383278f82 100644 --- a/src/theory/quantifiers/term_database.h +++ b/src/theory/quantifiers/term_database.h @@ -199,11 +199,11 @@ public: static void getBoundVars( Node n, std::vector< Node >& bvs); //for skolem private: - /** map from universal quantifiers to the list of skolem constants */ - std::map< Node, std::vector< Node > > d_skolem_constants; /** map from universal quantifiers to their skolemized body */ std::map< Node, Node > d_skolem_body; public: + /** map from universal quantifiers to the list of skolem constants */ + std::map< Node, std::vector< Node > > d_skolem_constants; /** make the skolemized body f[e/x] */ static Node mkSkolemizedBody( Node f, Node n, std::vector< TypeNode >& fvTypes, std::vector< TNode >& fvs, std::vector< Node >& sk ); diff --git a/src/theory/quantifiers/theory_quantifiers.cpp b/src/theory/quantifiers/theory_quantifiers.cpp index 8335a084a..5d016fd06 100644 --- a/src/theory/quantifiers/theory_quantifiers.cpp +++ b/src/theory/quantifiers/theory_quantifiers.cpp @@ -150,23 +150,14 @@ Node TheoryQuantifiers::getNextDecisionRequest(){ void TheoryQuantifiers::assertUniversal( Node n ){ Assert( n.getKind()==FORALL ); if( options::recurseCbqi() || !TermDb::hasInstConstAttr(n) ){ - getQuantifiersEngine()->registerQuantifier( n ); - getQuantifiersEngine()->assertNode( n ); + getQuantifiersEngine()->assertQuantifier( n, true ); } } void TheoryQuantifiers::assertExistential( Node n ){ Assert( n.getKind()== NOT && n[0].getKind()==FORALL ); if( !options::cbqi() || options::recurseCbqi() || !TermDb::hasInstConstAttr(n[0]) ){ - if( d_skolemized.find( n )==d_skolemized.end() ){ - Node body = getQuantifiersEngine()->getTermDatabase()->getSkolemizedBody( n[0] ); - NodeBuilder<> nb(kind::OR); - nb << n[0] << body.notNode(); - Node lem = nb; - Trace("quantifiers-sk") << "Skolemize lemma : " << lem << std::endl; - d_out->lemma( lem, false, true ); - d_skolemized[n] = true; - } + getQuantifiersEngine()->assertQuantifier( n[0], false ); } } diff --git a/src/theory/quantifiers/theory_quantifiers.h b/src/theory/quantifiers/theory_quantifiers.h index 84b65cacd..5ce2e1a11 100644 --- a/src/theory/quantifiers/theory_quantifiers.h +++ b/src/theory/quantifiers/theory_quantifiers.h @@ -41,8 +41,6 @@ class InstantiationEngine; class TheoryQuantifiers : public Theory { private: typedef context::CDHashMap< Node, bool, NodeHashFunction > BoolMap; - /** quantifiers that have been skolemized */ - std::map< Node, bool > d_skolemized; /** number of instantiations */ int d_numInstantiations; int d_baseDecLevel; diff --git a/src/theory/quantifiers_engine.cpp b/src/theory/quantifiers_engine.cpp index 66d8f9326..083137148 100644 --- a/src/theory/quantifiers_engine.cpp +++ b/src/theory/quantifiers_engine.cpp @@ -265,10 +265,31 @@ void QuantifiersEngine::registerPattern( std::vector & pattern) { } } -void QuantifiersEngine::assertNode( Node f ){ - d_model->assertQuantifier( f ); - for( int i=0; i<(int)d_modules.size(); i++ ){ - d_modules[i]->assertNode( f ); +void QuantifiersEngine::assertQuantifier( Node f, bool pol ){ + if( !pol ){ + //do skolemization + if( d_skolemized.find( f )==d_skolemized.end() ){ + Node body = d_term_db->getSkolemizedBody( f ); + NodeBuilder<> nb(kind::OR); + nb << f << body.notNode(); + Node lem = nb; + if( Trace.isOn("quantifiers-sk") ){ + Node slem = Rewriter::rewrite( lem ); + Trace("quantifiers-sk") << "Skolemize lemma : " << slem << std::endl; + } + getOutputChannel().lemma( lem, false, true ); + d_skolemized[f] = true; + } + } + //assert to modules TODO : handle !pol + if( pol ){ + //register the quantifier + registerQuantifier( f ); + //assert it to each module + d_model->assertQuantifier( f ); + for( int i=0; i<(int)d_modules.size(); i++ ){ + d_modules[i]->assertNode( f ); + } } } @@ -629,6 +650,16 @@ void QuantifiersEngine::getPhaseReqTerms( Node f, std::vector< Node >& nodes ){ } void QuantifiersEngine::printInstantiations( std::ostream& out ) { + for( std::map< Node, bool >::iterator it = d_skolemized.begin(); it != d_skolemized.end(); ++it ){ + out << "Skolem constants of " << it->first << " : " << std::endl; + out << " ( "; + for( unsigned i=0; id_skolem_constants[it->first].size(); i++ ){ + if( i>0 ){ out << ", "; } + out << d_term_db->d_skolem_constants[it->first][i]; + } + out << " )" << std::endl; + out << std::endl; + } if( options::incrementalSolving() ){ for( std::map< Node, inst::CDInstMatchTrie* >::iterator it = d_c_inst_match_trie.begin(); it != d_c_inst_match_trie.end(); ++it ){ out << "Instantiations of " << it->first << " : " << std::endl; diff --git a/src/theory/quantifiers_engine.h b/src/theory/quantifiers_engine.h index 999a716ba..19f8c55fb 100644 --- a/src/theory/quantifiers_engine.h +++ b/src/theory/quantifiers_engine.h @@ -125,6 +125,8 @@ private: /** list of all instantiations produced for each quantifier */ std::map< Node, inst::InstMatchTrie > d_inst_match_trie; std::map< Node, inst::CDInstMatchTrie* > d_c_inst_match_trie; + /** quantifiers that have been skolemized */ + std::map< Node, bool > d_skolemized; /** term database */ quantifiers::TermDb* d_term_db; /** all triggers will be stored in this trie */ @@ -179,7 +181,7 @@ public: /** register quantifier */ void registerPattern( std::vector & pattern); /** assert universal quantifier */ - void assertNode( Node f ); + void assertQuantifier( Node q, bool pol ); /** propagate */ void propagate( Theory::Effort level ); /** get next decision request */ -- cgit v1.2.3 From fddd187f540cee675368813c0c1d51711a02fdc0 Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Wed, 30 Apr 2014 12:51:02 -0400 Subject: Minor fixes, spelling etc. --- .mailmap | 2 ++ src/theory/bv/theory_bv.h | 4 ++-- src/theory/quantifiers/options | 6 +++--- src/theory/valuation.h | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) (limited to 'src/theory') diff --git a/.mailmap b/.mailmap index 1560f0272..7cf2a12f0 100644 --- a/.mailmap +++ b/.mailmap @@ -5,6 +5,8 @@ Dejan Jovanovic Francois Bobot Liana Hadarean Andrew Reynolds +Andrew Reynolds +Andrew Reynolds Cesare Tinelli Christopher L. Conway Clark Barrett diff --git a/src/theory/bv/theory_bv.h b/src/theory/bv/theory_bv.h index 26ed8c296..683f002cf 100644 --- a/src/theory/bv/theory_bv.h +++ b/src/theory/bv/theory_bv.h @@ -105,7 +105,7 @@ private: /** - * Return the uinterpreted function symbol corresponding to division-by-zero + * Return the uninterpreted function symbol corresponding to division-by-zero * for this particular bit-width * @param k should be UREM or UDIV * @param width @@ -121,7 +121,7 @@ private: NodeSet d_staticLearnCache; /** - * Maps from bit-vector width to divison-by-zero uninterpreted + * Maps from bit-vector width to division-by-zero uninterpreted * function symbols. */ __gnu_cxx::hash_map d_BVDivByZero; diff --git a/src/theory/quantifiers/options b/src/theory/quantifiers/options index f8f1744ed..1cdf5e8bd 100644 --- a/src/theory/quantifiers/options +++ b/src/theory/quantifiers/options @@ -72,10 +72,10 @@ option instWhenMode --inst-when=MODE CVC4::theory::quantifiers::InstWhenMode :de when to apply instantiation option instMaxLevel --inst-max-level=N int :default -1 maximum inst level of terms used to instantiate quantified formulas with (-1 == no limit, default) - + option eagerInstQuant --eager-inst-quant bool :default false apply quantifier instantiation eagerly - + option fullSaturateQuant --full-saturate-quant bool :default false when all other quantifier instantiation strategies fail, instantiate with ground terms from relevant domain, then arbitrary ground terms before answering unknown @@ -105,7 +105,7 @@ option mbqiMode --mbqi=MODE CVC4::theory::quantifiers::MbqiMode :read-write :def option fmfOneInstPerRound --mbqi-one-inst-per-round bool :default false only add one instantiation per quantifier per round for mbqi option fmfOneQuantPerRound --mbqi-one-quant-per-round bool :default false - only add instantiations for one quantifier per round for mbqi + only add instantiations for one quantifier per round for mbqi option fmfInstEngine --fmf-inst-engine bool :default false use instantiation engine in conjunction with finite model finding diff --git a/src/theory/valuation.h b/src/theory/valuation.h index 2462896c7..a9d276f42 100644 --- a/src/theory/valuation.h +++ b/src/theory/valuation.h @@ -66,7 +66,7 @@ public: d_engine(engine) { } - /* + /** * Return true if n has an associated SAT literal */ bool isSatLiteral(TNode n) const; -- cgit v1.2.3 From a1e8244953533e9644e59d8d6fb1b914a51b671c Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Mon, 16 Jun 2014 15:19:39 -0400 Subject: dos2unix-convert some sources. --- src/theory/quantifiers/ambqi_builder.cpp | 1872 ++++----- src/theory/quantifiers/ambqi_builder.h | 204 +- src/theory/quantifiers/qinterval_builder.cpp | 2222 +++++------ src/theory/quantifiers/qinterval_builder.h | 308 +- src/theory/quantifiers/quant_conflict_find.cpp | 5058 ++++++++++++------------ src/theory/quantifiers/quant_conflict_find.h | 594 +-- src/theory/strings/regexp_operation.cpp | 3038 +++++++------- src/theory/strings/regexp_operation.h | 200 +- src/util/regexp.cpp | 318 +- 9 files changed, 6907 insertions(+), 6907 deletions(-) (limited to 'src/theory') diff --git a/src/theory/quantifiers/ambqi_builder.cpp b/src/theory/quantifiers/ambqi_builder.cpp index e86a96a8f..374d161e9 100755 --- a/src/theory/quantifiers/ambqi_builder.cpp +++ b/src/theory/quantifiers/ambqi_builder.cpp @@ -1,936 +1,936 @@ -/********************* */ -/*! \file ambqi_builder.cpp - ** \verbatim - ** Original author: Andrew Reynolds - ** Major contributors: none - ** Minor contributors (to current version): none - ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa - ** See the file COPYING in the top-level source directory for licensing - ** information.\endverbatim - ** - ** \brief Implementation of abstract MBQI builder - **/ - - -#include "theory/quantifiers/ambqi_builder.h" -#include "theory/quantifiers/term_database.h" -#include "theory/quantifiers/options.h" - -using namespace std; -using namespace CVC4; -using namespace CVC4::kind; -using namespace CVC4::context; -using namespace CVC4::theory; -using namespace CVC4::theory::quantifiers; - -void AbsDef::construct_func( FirstOrderModelAbs * m, std::vector< TNode >& fapps, unsigned depth ) { - d_def.clear(); - Assert( !fapps.empty() ); - if( depth==fapps[0].getNumChildren() ){ - //if( fapps.size()>1 ){ - // for( unsigned i=0; i " << m->getRepresentativeId( fapps[i] ) << std::endl; - // } - //} - //get representative in model for this term - d_value = m->getRepresentativeId( fapps[0] ); - Assert( d_value!=val_none ); - }else{ - TypeNode tn = fapps[0][depth].getType(); - std::map< unsigned, std::vector< TNode > > fapp_child; - - //partition based on evaluations of fapps[1][depth]....fapps[n][depth] - for( unsigned i=0; igetRepresentativeId( fapps[i][depth] ); - Assert( r < 32 ); - fapp_child[r].push_back( fapps[i] ); - } - - //do completion - std::map< unsigned, unsigned > fapp_child_index; - unsigned def = m->d_domain[ tn ]; - unsigned minSize = fapp_child.begin()->second.size(); - unsigned minSizeIndex = fapp_child.begin()->first; - for( std::map< unsigned, std::vector< TNode > >::iterator it = fapp_child.begin(); it != fapp_child.end(); ++it ){ - fapp_child_index[it->first] = ( 1 << it->first ); - def = def & ~( 1 << it->first ); - if( it->second.size()second.size(); - minSizeIndex = it->first; - } - } - fapp_child_index[minSizeIndex] |= def; - d_default = fapp_child_index[minSizeIndex]; - - //construct children - for( std::map< unsigned, std::vector< TNode > >::iterator it = fapp_child.begin(); it != fapp_child.end(); ++it ){ - Trace("abs-model-debug") << "Construct " << it->first << " : " << fapp_child_index[it->first] << " : "; - debugPrintUInt( "abs-model-debug", m->d_rep_set.d_type_reps[tn].size(), fapp_child_index[it->first] ); - Trace("abs-model-debug") << " : " << it->second.size() << " terms." << std::endl; - d_def[fapp_child_index[it->first]].construct_func( m, it->second, depth+1 ); - } - } -} - -void AbsDef::simplify( FirstOrderModelAbs * m, TNode q, TNode n, unsigned depth ) { - if( d_value==val_none && !d_def.empty() ){ - //process the default - std::map< unsigned, AbsDef >::iterator defd = d_def.find( d_default ); - Assert( defd!=d_def.end() ); - unsigned newDef = d_default; - std::vector< unsigned > to_erase; - defd->second.simplify( m, q, n, depth+1 ); - int defVal = defd->second.d_value; - bool isConstant = ( defVal!=val_none ); - //process each child - for( std::map< unsigned, AbsDef >::iterator it = d_def.begin(); it != d_def.end(); ++it ){ - if( it->first!=d_default ){ - it->second.simplify( m, q, n, depth+1 ); - if( it->second.d_value==defVal && it->second.d_value!=val_none ){ - newDef = newDef | it->first; - to_erase.push_back( it->first ); - }else{ - isConstant = false; - } - } - } - if( !to_erase.empty() ){ - //erase old default - int defVal = defd->second.d_value; - d_def.erase( d_default ); - //set new default - d_default = newDef; - d_def[d_default].construct_def_entry( m, q, n, defVal, depth+1 ); - //erase redundant entries - for( unsigned i=0; id_rep_set.getNumRepresentatives( tn ); - Assert( dSize<32 ); - for( std::map< unsigned, AbsDef >::const_iterator it = d_def.begin(); it != d_def.end(); ++it ){ - for( unsigned i=0; ifirst ); - if( it->first==d_default ){ - Trace(c) << "*"; - } - if( it->second.d_value!=val_none ){ - Trace(c) << " -> V[" << it->second.d_value << "]"; - } - Trace(c) << std::endl; - it->second.debugPrint( c, m, f, depth+1 ); - } - } - } -} - -bool AbsDef::addInstantiations( FirstOrderModelAbs * m, QuantifiersEngine * qe, TNode q, std::vector< Node >& terms, int& inst, unsigned depth ) { - if( inst==0 || !options::fmfOneInstPerRound() ){ - if( d_value==1 ){ - //instantiations are all true : ignore this - return true; - }else{ - if( depth==q[0].getNumChildren() ){ - if( qe->addInstantiation( q, terms ) ){ - Trace("ambqi-inst-debug") << "-> Added instantiation." << std::endl; - inst++; - return true; - }else{ - Trace("ambqi-inst-debug") << "-> Failed to add instantiation." << std::endl; - //we are incomplete - return false; - } - }else{ - bool osuccess = true; - TypeNode tn = m->getVariable( q, depth ).getType(); - for( std::map< unsigned, AbsDef >::iterator it = d_def.begin(); it != d_def.end(); ++it ){ - //get witness term - unsigned index = 0; - bool success; - do { - success = false; - index = getId( it->first, index ); - if( index<32 ){ - Assert( indexd_rep_set.d_type_reps[tn].size() ); - terms[m->d_var_order[q][depth]] = m->d_rep_set.d_type_reps[tn][index]; - //terms[depth] = m->d_rep_set.d_type_reps[tn][index]; - if( !it->second.addInstantiations( m, qe, q, terms, inst, depth+1 ) && inst==0 ){ - //if we are incomplete, and have not yet added an instantiation, keep trying - index++; - Trace("ambqi-inst-debug") << "At depth " << depth << ", failed branch, no instantiations and incomplete, increment index : " << index << std::endl; - }else{ - success = true; - } - } - }while( !success && index<32 ); - //mark if we are incomplete - osuccess = osuccess && success; - } - return osuccess; - } - } - }else{ - return true; - } -} - -void AbsDef::construct_entry( std::vector< unsigned >& entry, std::vector< bool >& entry_def, int v, unsigned depth ) { - if( depth==entry.size() ){ - d_value = v; - }else{ - d_def[entry[depth]].construct_entry( entry, entry_def, v, depth+1 ); - if( entry_def[depth] ){ - d_default = entry[depth]; - } - } -} - -void AbsDef::get_defs( unsigned u, std::vector< AbsDef * >& defs ) { - for( std::map< unsigned, AbsDef >::iterator it = d_def.begin(); it != d_def.end(); ++it ){ - if( ( u & it->first )!=0 ){ - Assert( (u & it->first)==u ); - defs.push_back( &it->second ); - } - } -} - -void AbsDef::construct_normalize( FirstOrderModelAbs * m, TNode q, std::vector< AbsDef * >& defs, unsigned depth ) { - if( depth==q[0].getNumChildren() ){ - Assert( defs.size()==1 ); - d_value = defs[0]->d_value; - }else{ - TypeNode tn = m->getVariable( q, depth ).getType(); - unsigned def = m->d_domain[tn]; - for( unsigned i=0; i::iterator itd = defs[i]->d_def.begin(); itd != defs[i]->d_def.end(); ++itd ){ - if( isSimple( itd->first ) && ( def & itd->first )!=0 ){ - def &= ~( itd->first ); - //process this value - std::vector< AbsDef * > cdefs; - for( unsigned j=0; jget_defs( itd->first, cdefs ); - } - d_def[itd->first].construct_normalize( m, q, cdefs, depth+1 ); - if( def==0 ){ - d_default = itd->first; - break; - } - } - } - if( def==0 ){ - break; - } - } - if( def!=0 ){ - d_default = def; - //process the default - std::vector< AbsDef * > cdefs; - for( unsigned j=0; jget_defs( d_default, cdefs ); - } - d_def[d_default].construct_normalize( m, q, cdefs, depth+1 ); - } - } -} - -void AbsDef::construct_def_entry( FirstOrderModelAbs * m, TNode q, TNode n, int v, unsigned depth ) { - d_value = v; - if( depthgetVariable( q, depth ).getType(); - unsigned dom = m->d_domain[tn] ; - d_def[dom].construct_def_entry( m, q, n, v, depth+1 ); - d_default = dom; - } -} - -void AbsDef::apply_ucompose( FirstOrderModelAbs * m, TNode q, - std::vector< unsigned >& entry, std::vector< bool >& entry_def, - std::vector< int >& terms, std::map< unsigned, int >& vchildren, - AbsDef * a, unsigned depth ) { - if( depth==terms.size() ){ - if( Trace.isOn("ambqi-check-debug2") ){ - Trace("ambqi-check-debug2") << "Add entry ( "; - for( unsigned i=0; id_rep_set.d_type_reps[m->getVariable( q, i ).getType()].size(); - debugPrintUInt( "ambqi-check-debug2", dSize, entry[i] ); - Trace("ambqi-check-debug2") << " "; - } - Trace("ambqi-check-debug2") << ")" << std::endl; - } - a->construct_entry( entry, entry_def, d_value ); - }else{ - unsigned id; - if( terms[depth]==val_none ){ - //a variable - std::map< unsigned, int >::iterator itv = vchildren.find( depth ); - Assert( itv!=vchildren.end() ); - unsigned prev_v = entry[itv->second]; - bool prev_vd = entry_def[itv->second]; - for( std::map< unsigned, AbsDef >::iterator it = d_def.begin(); it != d_def.end(); ++it ){ - entry[itv->second] = it->first & prev_v; - entry_def[itv->second] = ( it->first==d_default ) && prev_vd; - if( entry[itv->second]!=0 ){ - it->second.apply_ucompose( m, q, entry, entry_def, terms, vchildren, a, depth+1 ); - } - } - entry[itv->second] = prev_v; - entry_def[itv->second] = prev_vd; - }else{ - id = (unsigned)terms[depth]; - Assert( id<32 ); - unsigned fid = 1 << id; - std::map< unsigned, AbsDef >::iterator it = d_def.find( fid ); - if( it!=d_def.end() ){ - it->second.apply_ucompose( m, q, entry, entry_def, terms, vchildren, a, depth+1 ); - }else{ - d_def[d_default].apply_ucompose( m, q, entry, entry_def, terms, vchildren, a, depth+1 ); - } - } - } -} - -void AbsDef::construct_var_eq( FirstOrderModelAbs * m, TNode q, unsigned v1, unsigned v2, int curr, int currv, unsigned depth ) { - if( depth==q[0].getNumChildren() ){ - Assert( currv!=val_none ); - d_value = currv; - }else{ - TypeNode tn = m->getVariable( q, depth ).getType(); - unsigned dom = m->d_domain[tn]; - int vindex = depth==v1 ? 0 : ( depth==v2 ? 1 : val_none ); - if( vindex==val_none ){ - d_def[dom].construct_var_eq( m, q, v1, v2, curr, currv, depth+1 ); - d_default = dom; - }else{ - Assert( currv==val_none ); - if( curr==val_none ){ - unsigned numReps = m->d_rep_set.getNumRepresentatives( tn ); - Assert( numReps < 32 ); - for( unsigned i=0; igetVariable( q, depth ).getType(); - if( v==depth ){ - unsigned numReps = m->d_rep_set.d_type_reps[tn].size(); - Assert( numReps>0 && numReps < 32 ); - for( unsigned i=0; id_domain[tn]; - d_def[dom].construct_var( m, q, v, currv, depth+1 ); - d_default = dom; - } - } -} - -void AbsDef::construct_compose( FirstOrderModelAbs * m, TNode q, TNode n, AbsDef * f, - std::map< unsigned, AbsDef * >& children, - std::map< unsigned, int >& bchildren, std::map< unsigned, int >& vchildren, - std::vector< unsigned >& entry, std::vector< bool >& entry_def ) { - if( n.getKind()==OR || n.getKind()==AND ){ - // short circuiting - for( std::map< unsigned, AbsDef * >::iterator it = children.begin(); it != children.end(); ++it ){ - if( ( it->second->d_value==0 && n.getKind()==AND ) || - ( it->second->d_value==1 && n.getKind()==OR ) ){ - //std::cout << "Short circuit " << it->second->d_value << " " << entry.size() << "/" << q[0].getNumChildren() << std::endl; - unsigned count = q[0].getNumChildren() - entry.size(); - for( unsigned i=0; id_domain[m->getVariable( q, entry.size() ).getType()] ); - entry_def.push_back( true ); - } - construct_entry( entry, entry_def, it->second->d_value ); - for( unsigned i=0; i values; - values.resize( n.getNumChildren(), val_none ); - for( std::map< unsigned, AbsDef * >::iterator it = children.begin(); it != children.end(); ++it ){ - values[it->first] = it->second->d_value; - } - for( std::map< unsigned, int >::iterator it = bchildren.begin(); it != bchildren.end(); ++it ){ - values[it->first] = it->second; - } - //look up value(s) - f->apply_ucompose( m, q, entry, entry_def, values, vchildren, this ); - }else{ - bool incomplete = false; - //we are composing with an interpreted function - std::vector< TNode > values; - values.resize( n.getNumChildren(), TNode::null() ); - for( std::map< unsigned, AbsDef * >::iterator it = children.begin(); it != children.end(); ++it ){ - Trace("ambqi-check-debug2") << "composite : " << it->first << " : " << it->second->d_value; - if( it->second->d_value>=0 ){ - if( it->second->d_value>=(int)m->d_rep_set.d_type_reps[n[it->first].getType()].size() ){ - std::cout << it->second->d_value << " " << n[it->first] << " " << n[it->first].getType() << " " << m->d_rep_set.d_type_reps[n[it->first].getType()].size() << std::endl; - } - Assert( it->second->d_value<(int)m->d_rep_set.d_type_reps[n[it->first].getType()].size() ); - values[it->first] = m->d_rep_set.d_type_reps[n[it->first].getType()][it->second->d_value]; - }else{ - incomplete = true; - } - Trace("ambqi-check-debug2") << " ->> " << values[it->first] << std::endl; - } - for( std::map< unsigned, int >::iterator it = bchildren.begin(); it != bchildren.end(); ++it ){ - Trace("ambqi-check-debug2") << " basic : " << it->first << " : " << it->second; - if( it->second>=0 ){ - Assert( it->second<(int)m->d_rep_set.d_type_reps[n[it->first].getType()].size() ); - values[it->first] = m->d_rep_set.d_type_reps[n[it->first].getType()][it->second]; - }else{ - incomplete = true; - } - Trace("ambqi-check-debug2") << " ->> " << values[it->first] << std::endl; - } - Assert( vchildren.empty() ); - if( incomplete ){ - Trace("ajr-temp") << "Construct incomplete entry." << std::endl; - - //if a child is unknown, we must return unknown - construct_entry( entry, entry_def, val_unk ); - }else{ - if( Trace.isOn("ambqi-check-debug2") ){ - for( unsigned i=0; imkNode( n.getKind(), values ); - vv = Rewriter::rewrite( vv ); - int v = m->getRepresentativeId( vv ); - construct_entry( entry, entry_def, v ); - } - } - }else{ - //take product of arguments - TypeNode tn = m->getVariable( q, entry.size() ).getType(); - Assert( m->isValidType( tn ) ); - unsigned def = m->d_domain[tn]; - if( Trace.isOn("ambqi-check-debug2") ){ - for( unsigned i=0; i::iterator it = children.begin(); it != children.end(); ++it ){ - Assert( it->second!=NULL ); - //process each child - for( std::map< unsigned, AbsDef >::iterator itd = it->second->d_def.begin(); itd != it->second->d_def.end(); ++itd ){ - if( itd->first!=it->second->d_default && ( def & itd->first )!=0 ){ - def &= ~( itd->first ); - //process this value - std::map< unsigned, AbsDef * > cchildren; - for( std::map< unsigned, AbsDef * >::iterator it2 = children.begin(); it2 != children.end(); ++it2 ){ - Assert( it2->second!=NULL ); - std::map< unsigned, AbsDef >::iterator itdf = it2->second->d_def.find( itd->first ); - if( itdf!=it2->second->d_def.end() ){ - cchildren[it2->first] = &itdf->second; - }else{ - Assert( it2->second->getDefault()!=NULL ); - cchildren[it2->first] = it2->second->getDefault(); - } - } - if( Trace.isOn("ambqi-check-debug2") ){ - for( unsigned i=0; id_rep_set.d_type_reps[tn].size(), itd->first ); - Trace("ambqi-check-debug2") << " " << children.size() << " " << cchildren.size() << std::endl; - } - entry.push_back( itd->first ); - entry_def.push_back( def==0 ); - construct_compose( m, q, n, f, cchildren, bchildren, vchildren, entry, entry_def ); - entry_def.pop_back(); - entry.pop_back(); - if( def==0 ){ - break; - } - } - } - if( def==0 ){ - break; - } - } - if( def!=0 ){ - if( Trace.isOn("ambqi-check-debug2") ){ - for( unsigned i=0; i cdchildren; - for( std::map< unsigned, AbsDef * >::iterator it = children.begin(); it != children.end(); ++it ){ - Assert( it->second->getDefault()!=NULL ); - cdchildren[it->first] = it->second->getDefault(); - } - if( Trace.isOn("ambqi-check-debug2") ){ - for( unsigned i=0; id_rep_set.getNumRepresentatives( tn ), def ); - Trace("ambqi-check-debug2") << " " << children.size() << " " << cdchildren.size() << std::endl; - } - entry.push_back( def ); - entry_def.push_back( true ); - construct_compose( m, q, n, f, cdchildren, bchildren, vchildren, entry, entry_def ); - entry_def.pop_back(); - entry.pop_back(); - } - } -} - -bool AbsDef::construct( FirstOrderModelAbs * m, TNode q, TNode n, AbsDef * f, - std::map< unsigned, AbsDef * >& children, - std::map< unsigned, int >& bchildren, std::map< unsigned, int >& vchildren, - int varChCount ) { - if( Trace.isOn("ambqi-check-debug3") ){ - for( unsigned i=0; i::iterator it = bchildren.begin(); it !=bchildren.end(); ++it ){ - if( ( it->second==0 && n.getKind()==AND ) || - ( it->second==1 && n.getKind()==OR ) ){ - construct_def_entry( m, q, q[0], it->second ); - return true; - } - } - } - Trace("ambqi-check-debug2") << "Construct compose..." << std::endl; - std::vector< unsigned > entry; - std::vector< bool > entry_def; - if( f && varChCount>0 ){ - AbsDef unorm; - unorm.construct_compose( m, q, n, f, children, bchildren, vchildren, entry, entry_def ); - //normalize - std::vector< AbsDef* > defs; - defs.push_back( &unorm ); - construct_normalize( m, q, defs ); - }else{ - construct_compose( m, q, n, f, children, bchildren, vchildren, entry, entry_def ); - } - Assert( is_normalized() ); - //if( !is_normalized() ){ - // std::cout << "NON NORMALIZED DEFINITION" << std::endl; - // exit( 10 ); - //} - return true; - }else if( varChCount==1 && n.getKind()==EQUAL ){ - Trace("ambqi-check-debug2") << "Expand variable child..." << std::endl; - //expand the variable based on its finite domain - AbsDef a; - a.construct_var( m, q, vchildren.begin()->second, val_none ); - children[vchildren.begin()->first] = &a; - vchildren.clear(); - std::vector< unsigned > entry; - std::vector< bool > entry_def; - Trace("ambqi-check-debug2") << "Construct compose with variable..." << std::endl; - construct_compose( m, q, n, f, children, bchildren, vchildren, entry, entry_def ); - return true; - }else if( varChCount==2 && n.getKind()==EQUAL ){ - Trace("ambqi-check-debug2") << "Construct variable equality..." << std::endl; - //efficient expansion of the equality - construct_var_eq( m, q, vchildren[0], vchildren[1], val_none, val_none ); - return true; - }else{ - return false; - } -} - -void AbsDef::negate() { - for( std::map< unsigned, AbsDef >::iterator it = d_def.begin(); it != d_def.end(); ++it ){ - it->second.negate(); - } - if( d_value==0 ){ - d_value = 1; - }else if( d_value==1 ){ - d_value = 0; - } -} - -Node AbsDef::getFunctionValue( FirstOrderModelAbs * m, TNode op, std::vector< Node >& vars, unsigned depth ) { - if( depth==vars.size() ){ - TypeNode tn = op.getType(); - if( tn.getNumChildren()>0 ){ - tn = tn[tn.getNumChildren() - 1]; - } - if( d_value>=0 ){ - Assert( d_value<(int)m->d_rep_set.d_type_reps[tn].size() ); - if( tn.isBoolean() ){ - return NodeManager::currentNM()->mkConst( d_value==1 ); - }else{ - return m->d_rep_set.d_type_reps[tn][d_value]; - } - }else{ - return Node::null(); - } - }else{ - TypeNode tn = vars[depth].getType(); - Node curr; - curr = d_def[d_default].getFunctionValue( m, op, vars, depth+1 ); - for( std::map< unsigned, AbsDef >::iterator it = d_def.begin(); it != d_def.end(); ++it ){ - if( it->first!=d_default ){ - unsigned id = getId( it->first ); - Assert( idd_rep_set.d_type_reps[tn].size() ); - TNode n = m->d_rep_set.d_type_reps[tn][id]; - Node fv = it->second.getFunctionValue( m, op, vars, depth+1 ); - if( !curr.isNull() && !fv.isNull() ){ - curr = NodeManager::currentNM()->mkNode( ITE, vars[depth].eqNode( n ), fv, curr ); - }else{ - curr = Node::null(); - } - } - } - return curr; - } -} - -bool AbsDef::isSimple( unsigned n ) { - return (n & (n - 1))==0; -} - -unsigned AbsDef::getId( unsigned n, unsigned start, unsigned end ) { - Assert( n!=0 ); - while( (n & ( 1 << start )) == 0 ){ - start++; - if( start==end ){ - return start; - } - } - return start; -} - -Node AbsDef::evaluate( FirstOrderModelAbs * m, TypeNode retTyp, std::vector< Node >& args ) { - std::vector< unsigned > iargs; - for( unsigned i=0; igetRepresentativeId( args[i] ); - iargs.push_back( v ); - } - return evaluate( m, retTyp, iargs, 0 ); -} - -Node AbsDef::evaluate( FirstOrderModelAbs * m, TypeNode retTyp, std::vector< unsigned >& iargs, unsigned depth ) { - if( d_value!=val_none ){ - if( d_value==val_unk ){ - return Node::null(); - }else{ - Assert( d_value>=0 && d_value<(int)m->d_rep_set.d_type_reps[retTyp].size() ); - return m->d_rep_set.d_type_reps[retTyp][d_value]; - } - }else{ - std::map< unsigned, AbsDef >::iterator it = d_def.find( iargs[depth] ); - if( it==d_def.end() ){ - return d_def[d_default].evaluate( m, retTyp, iargs, depth+1 ); - }else{ - return it->second.evaluate( m, retTyp, iargs, depth+1 ); - } - } -} - -bool AbsDef::is_normalized() { - for( std::map< unsigned, AbsDef >::iterator it1 = d_def.begin(); it1 != d_def.end(); ++it1 ){ - if( !it1->second.is_normalized() ){ - return false; - } - for( std::map< unsigned, AbsDef >::iterator it2 = d_def.begin(); it2 != d_def.end(); ++it2 ){ - if( it1->first!=it2->first && (( it1->first & it2->first )!=0) ){ - return false; - } - } - } - return true; -} - -AbsMbqiBuilder::AbsMbqiBuilder( context::Context* c, QuantifiersEngine* qe ) : -QModelBuilder( c, qe ){ - d_true = NodeManager::currentNM()->mkConst( true ); - d_false = NodeManager::currentNM()->mkConst( false ); -} - - -//------------------------model construction---------------------------- - -void AbsMbqiBuilder::processBuildModel(TheoryModel* m, bool fullModel) { - Trace("ambqi-debug") << "process build model " << fullModel << std::endl; - FirstOrderModel* f = (FirstOrderModel*)m; - FirstOrderModelAbs* fm = f->asFirstOrderModelAbs(); - if( fullModel ){ - Trace("ambqi-model") << "Construct model representation..." << std::endl; - //make function values - for( std::map::iterator it = fm->d_models.begin(); it != fm->d_models.end(); ++it ) { - if( it->first.getType().getNumChildren()>1 ){ - Trace("ambqi-model") << "Construct for " << it->first << "..." << std::endl; - m->d_uf_models[ it->first ] = fm->getFunctionValue( it->first, "$x" ); - } - } - TheoryEngineModelBuilder::processBuildModel( m, fullModel ); - //mark that the model has been set - fm->markModelSet(); - //debug the model - debugModel( fm ); - }else{ - fm->initialize( d_considerAxioms ); - //process representatives - fm->d_rep_id.clear(); - fm->d_domain.clear(); - - //initialize boolean sort - TypeNode b = d_true.getType(); - fm->d_rep_set.d_type_reps[b].clear(); - fm->d_rep_set.d_type_reps[b].push_back( d_false ); - fm->d_rep_set.d_type_reps[b].push_back( d_true ); - fm->d_rep_id[d_false] = 0; - fm->d_rep_id[d_true] = 1; - - //initialize unintpreted sorts - Trace("ambqi-model") << std::endl << "Making representatives..." << std::endl; - for( std::map< TypeNode, std::vector< Node > >::iterator it = fm->d_rep_set.d_type_reps.begin(); - it != fm->d_rep_set.d_type_reps.end(); ++it ){ - if( it->first.isSort() ){ - Assert( !it->second.empty() ); - //set the domain - fm->d_domain[it->first] = 0; - Trace("ambqi-model") << "Representatives for " << it->first << " : " << std::endl; - for( unsigned i=0; isecond.size(); i++ ){ - if( i<32 ){ - fm->d_domain[it->first] |= ( 1 << i ); - } - Trace("ambqi-model") << i << " : " << it->second[i] << std::endl; - fm->d_rep_id[it->second[i]] = i; - } - if( it->second.size()>=32 ){ - fm->d_domain.erase( it->first ); - } - } - } - - Trace("ambqi-model") << std::endl << "Making function definitions..." << std::endl; - //construct the models for functions - for( std::map::iterator it = fm->d_models.begin(); it != fm->d_models.end(); ++it ) { - Node f = it->first; - Trace("ambqi-model-debug") << "Building Model for " << f << std::endl; - //reset the model - it->second->clear(); - //get all (non-redundant) f-applications - std::vector< TNode > fapps; - Trace("ambqi-model-debug") << "Initial terms: " << std::endl; - for( size_t i=0; id_uf_terms[f].size(); i++ ){ - Node n = fm->d_uf_terms[f][i]; - if( !n.getAttribute(NoMatchAttribute()) ){ - Trace("ambqi-model-debug") << " " << n << " -> " << fm->getRepresentativeId( n ) << std::endl; - fapps.push_back( n ); - } - } - if( fapps.empty() ){ - //choose arbitrary value - Node mbt = d_qe->getTermDatabase()->getModelBasisOpTerm(f); - Trace("ambqi-model-debug") << "Initial terms empty, add " << mbt << std::endl; - fapps.push_back( mbt ); - } - bool fValid = true; - for( unsigned i=0; id_domain.find( fapps[0][i].getType() )==fm->d_domain.end() ){ - Trace("ambqi-model") << "Interpretation of " << f << " is not valid."; - Trace("ambqi-model") << " (domain for " << fapps[0][i].getType() << " is too large)." << std::endl; - fValid = false; - break; - } - } - fm->d_models_valid[f] = fValid; - if( fValid ){ - //construct the ambqi model - it->second->construct_func( fm, fapps ); - Trace("ambqi-model-debug") << "Interpretation of " << f << " : " << std::endl; - it->second->debugPrint("ambqi-model-debug", fm, fapps[0] ); - Trace("ambqi-model-debug") << "Simplifying " << f << "..." << std::endl; - it->second->simplify( fm, TNode::null(), fapps[0] ); - Trace("ambqi-model") << "(Simplified) interpretation of " << f << " : " << std::endl; - it->second->debugPrint("ambqi-model", fm, fapps[0] ); - -/* - if( Debug.isOn("ambqi-model-debug") ){ - for( size_t i=0; id_uf_terms[f].size(); i++ ){ - Node e = it->second->evaluate_n( fm, fm->d_uf_terms[f][i] ); - Debug("ambqi-model-debug") << fm->d_uf_terms[f][i] << " evaluates to " << e << std::endl; - Assert( fm->areEqual( e, fm->d_uf_terms[f][i] ) ); - } - } -*/ - } - } - } -} - - -//--------------------model checking--------------------------------------- - -//do exhaustive instantiation -bool AbsMbqiBuilder::doExhaustiveInstantiation( FirstOrderModel * fm, Node q, int effort ) { - Trace("ambqi-check") << "Exhaustive instantiation " << q << " " << effort << std::endl; - if (effort==0) { - FirstOrderModelAbs * fma = fm->asFirstOrderModelAbs(); - bool quantValid = true; - for( unsigned i=0; iisValidType( q[0][i].getType() ) ){ - quantValid = false; - Trace("ambqi-inst") << "Interpretation of " << q << " is not valid because of type " << q[0][i].getType() << std::endl; - break; - } - } - if( quantValid ){ - Trace("ambqi-check") << "Compute interpretation..." << std::endl; - AbsDef ad; - doCheck( fma, q, ad, q[1] ); - //now process entries - Trace("ambqi-inst-debug") << "...Current : " << d_addedLemmas << std::endl; - Trace("ambqi-inst") << "Interpretation of " << q << " is : " << std::endl; - ad.debugPrint( "ambqi-inst", fma, q[0] ); - Trace("ambqi-inst") << std::endl; - Trace("ambqi-check") << "Add instantiations..." << std::endl; - int lem = 0; - quantValid = ad.addInstantiations( fma, d_qe, q, lem ); - Trace("ambqi-inst") << "...Added " << lem << " lemmas." << std::endl; - if( lem>0 ){ - //if we were incomplete but added at least one lemma, we are ok - quantValid = true; - } - d_addedLemmas += lem; - Trace("ambqi-inst-debug") << "...Total : " << d_addedLemmas << std::endl; - } - return quantValid; - } - return true; -} - -bool AbsMbqiBuilder::doCheck( FirstOrderModelAbs * m, TNode q, AbsDef & ad, TNode n ) { - Assert( n.getKind()!=FORALL ); - if( n.getKind()==NOT && n[0].getKind()!=FORALL ){ - doCheck( m, q, ad, n[0] ); - ad.negate(); - return true; - }else{ - std::map< unsigned, AbsDef > children; - std::map< unsigned, int > bchildren; - std::map< unsigned, int > vchildren; - int varChCount = 0; - for( unsigned i=0; id_var_index[q][ m->getVariableId( q, n[i] ) ]; - //vchildren[i] = m->getVariableId( q, n[i] ); - }else if( m->hasTerm( n[i] ) ){ - bchildren[i] = m->getRepresentativeId( n[i] ); - }else{ - if( !doCheck( m, q, children[i], n[i] ) ){ - bchildren[i] = AbsDef::val_unk; - children.erase( i ); - } - } - } - //convert to pointers - std::map< unsigned, AbsDef * > pchildren; - for( std::map< unsigned, AbsDef >::iterator it = children.begin(); it != children.end(); ++it ){ - pchildren[it->first] = &it->second; - } - //construct the interpretation - Trace("ambqi-check-debug") << "Compute Interpretation of " << n << " " << n.getKind() << std::endl; - if( n.getKind() == APPLY_UF || n.getKind() == VARIABLE || n.getKind() == SKOLEM ){ - Node op; - if( n.getKind() == APPLY_UF ){ - op = n.getOperator(); - }else{ - op = n; - } - //uninterpreted compose - if( m->d_models_valid[op] ){ - ad.construct( m, q, n, m->d_models[op], pchildren, bchildren, vchildren, varChCount ); - }else{ - Trace("ambqi-check-debug") << "** Cannot produce interpretation for " << n << " (no function model)" << std::endl; - return false; - } - }else if( !ad.construct( m, q, n, NULL, pchildren, bchildren, vchildren, varChCount ) ){ - Trace("ambqi-check-debug") << "** Cannot produce interpretation for " << n << " (variables are children of interpreted symbol)" << std::endl; - return false; - } - Trace("ambqi-check-try") << "Interpretation for " << n << " is : " << std::endl; - ad.debugPrint("ambqi-check-try", m, q[0] ); - ad.simplify( m, q, q[0] ); - Trace("ambqi-check-debug") << "(Simplified) Interpretation for " << n << " is : " << std::endl; - ad.debugPrint("ambqi-check-debug", m, q[0] ); - Trace("ambqi-check-debug") << std::endl; - return true; - } -} +/********************* */ +/*! \file ambqi_builder.cpp + ** \verbatim + ** Original author: Andrew Reynolds + ** Major contributors: none + ** Minor contributors (to current version): none + ** This file is part of the CVC4 project. + ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** See the file COPYING in the top-level source directory for licensing + ** information.\endverbatim + ** + ** \brief Implementation of abstract MBQI builder + **/ + + +#include "theory/quantifiers/ambqi_builder.h" +#include "theory/quantifiers/term_database.h" +#include "theory/quantifiers/options.h" + +using namespace std; +using namespace CVC4; +using namespace CVC4::kind; +using namespace CVC4::context; +using namespace CVC4::theory; +using namespace CVC4::theory::quantifiers; + +void AbsDef::construct_func( FirstOrderModelAbs * m, std::vector< TNode >& fapps, unsigned depth ) { + d_def.clear(); + Assert( !fapps.empty() ); + if( depth==fapps[0].getNumChildren() ){ + //if( fapps.size()>1 ){ + // for( unsigned i=0; i " << m->getRepresentativeId( fapps[i] ) << std::endl; + // } + //} + //get representative in model for this term + d_value = m->getRepresentativeId( fapps[0] ); + Assert( d_value!=val_none ); + }else{ + TypeNode tn = fapps[0][depth].getType(); + std::map< unsigned, std::vector< TNode > > fapp_child; + + //partition based on evaluations of fapps[1][depth]....fapps[n][depth] + for( unsigned i=0; igetRepresentativeId( fapps[i][depth] ); + Assert( r < 32 ); + fapp_child[r].push_back( fapps[i] ); + } + + //do completion + std::map< unsigned, unsigned > fapp_child_index; + unsigned def = m->d_domain[ tn ]; + unsigned minSize = fapp_child.begin()->second.size(); + unsigned minSizeIndex = fapp_child.begin()->first; + for( std::map< unsigned, std::vector< TNode > >::iterator it = fapp_child.begin(); it != fapp_child.end(); ++it ){ + fapp_child_index[it->first] = ( 1 << it->first ); + def = def & ~( 1 << it->first ); + if( it->second.size()second.size(); + minSizeIndex = it->first; + } + } + fapp_child_index[minSizeIndex] |= def; + d_default = fapp_child_index[minSizeIndex]; + + //construct children + for( std::map< unsigned, std::vector< TNode > >::iterator it = fapp_child.begin(); it != fapp_child.end(); ++it ){ + Trace("abs-model-debug") << "Construct " << it->first << " : " << fapp_child_index[it->first] << " : "; + debugPrintUInt( "abs-model-debug", m->d_rep_set.d_type_reps[tn].size(), fapp_child_index[it->first] ); + Trace("abs-model-debug") << " : " << it->second.size() << " terms." << std::endl; + d_def[fapp_child_index[it->first]].construct_func( m, it->second, depth+1 ); + } + } +} + +void AbsDef::simplify( FirstOrderModelAbs * m, TNode q, TNode n, unsigned depth ) { + if( d_value==val_none && !d_def.empty() ){ + //process the default + std::map< unsigned, AbsDef >::iterator defd = d_def.find( d_default ); + Assert( defd!=d_def.end() ); + unsigned newDef = d_default; + std::vector< unsigned > to_erase; + defd->second.simplify( m, q, n, depth+1 ); + int defVal = defd->second.d_value; + bool isConstant = ( defVal!=val_none ); + //process each child + for( std::map< unsigned, AbsDef >::iterator it = d_def.begin(); it != d_def.end(); ++it ){ + if( it->first!=d_default ){ + it->second.simplify( m, q, n, depth+1 ); + if( it->second.d_value==defVal && it->second.d_value!=val_none ){ + newDef = newDef | it->first; + to_erase.push_back( it->first ); + }else{ + isConstant = false; + } + } + } + if( !to_erase.empty() ){ + //erase old default + int defVal = defd->second.d_value; + d_def.erase( d_default ); + //set new default + d_default = newDef; + d_def[d_default].construct_def_entry( m, q, n, defVal, depth+1 ); + //erase redundant entries + for( unsigned i=0; id_rep_set.getNumRepresentatives( tn ); + Assert( dSize<32 ); + for( std::map< unsigned, AbsDef >::const_iterator it = d_def.begin(); it != d_def.end(); ++it ){ + for( unsigned i=0; ifirst ); + if( it->first==d_default ){ + Trace(c) << "*"; + } + if( it->second.d_value!=val_none ){ + Trace(c) << " -> V[" << it->second.d_value << "]"; + } + Trace(c) << std::endl; + it->second.debugPrint( c, m, f, depth+1 ); + } + } + } +} + +bool AbsDef::addInstantiations( FirstOrderModelAbs * m, QuantifiersEngine * qe, TNode q, std::vector< Node >& terms, int& inst, unsigned depth ) { + if( inst==0 || !options::fmfOneInstPerRound() ){ + if( d_value==1 ){ + //instantiations are all true : ignore this + return true; + }else{ + if( depth==q[0].getNumChildren() ){ + if( qe->addInstantiation( q, terms ) ){ + Trace("ambqi-inst-debug") << "-> Added instantiation." << std::endl; + inst++; + return true; + }else{ + Trace("ambqi-inst-debug") << "-> Failed to add instantiation." << std::endl; + //we are incomplete + return false; + } + }else{ + bool osuccess = true; + TypeNode tn = m->getVariable( q, depth ).getType(); + for( std::map< unsigned, AbsDef >::iterator it = d_def.begin(); it != d_def.end(); ++it ){ + //get witness term + unsigned index = 0; + bool success; + do { + success = false; + index = getId( it->first, index ); + if( index<32 ){ + Assert( indexd_rep_set.d_type_reps[tn].size() ); + terms[m->d_var_order[q][depth]] = m->d_rep_set.d_type_reps[tn][index]; + //terms[depth] = m->d_rep_set.d_type_reps[tn][index]; + if( !it->second.addInstantiations( m, qe, q, terms, inst, depth+1 ) && inst==0 ){ + //if we are incomplete, and have not yet added an instantiation, keep trying + index++; + Trace("ambqi-inst-debug") << "At depth " << depth << ", failed branch, no instantiations and incomplete, increment index : " << index << std::endl; + }else{ + success = true; + } + } + }while( !success && index<32 ); + //mark if we are incomplete + osuccess = osuccess && success; + } + return osuccess; + } + } + }else{ + return true; + } +} + +void AbsDef::construct_entry( std::vector< unsigned >& entry, std::vector< bool >& entry_def, int v, unsigned depth ) { + if( depth==entry.size() ){ + d_value = v; + }else{ + d_def[entry[depth]].construct_entry( entry, entry_def, v, depth+1 ); + if( entry_def[depth] ){ + d_default = entry[depth]; + } + } +} + +void AbsDef::get_defs( unsigned u, std::vector< AbsDef * >& defs ) { + for( std::map< unsigned, AbsDef >::iterator it = d_def.begin(); it != d_def.end(); ++it ){ + if( ( u & it->first )!=0 ){ + Assert( (u & it->first)==u ); + defs.push_back( &it->second ); + } + } +} + +void AbsDef::construct_normalize( FirstOrderModelAbs * m, TNode q, std::vector< AbsDef * >& defs, unsigned depth ) { + if( depth==q[0].getNumChildren() ){ + Assert( defs.size()==1 ); + d_value = defs[0]->d_value; + }else{ + TypeNode tn = m->getVariable( q, depth ).getType(); + unsigned def = m->d_domain[tn]; + for( unsigned i=0; i::iterator itd = defs[i]->d_def.begin(); itd != defs[i]->d_def.end(); ++itd ){ + if( isSimple( itd->first ) && ( def & itd->first )!=0 ){ + def &= ~( itd->first ); + //process this value + std::vector< AbsDef * > cdefs; + for( unsigned j=0; jget_defs( itd->first, cdefs ); + } + d_def[itd->first].construct_normalize( m, q, cdefs, depth+1 ); + if( def==0 ){ + d_default = itd->first; + break; + } + } + } + if( def==0 ){ + break; + } + } + if( def!=0 ){ + d_default = def; + //process the default + std::vector< AbsDef * > cdefs; + for( unsigned j=0; jget_defs( d_default, cdefs ); + } + d_def[d_default].construct_normalize( m, q, cdefs, depth+1 ); + } + } +} + +void AbsDef::construct_def_entry( FirstOrderModelAbs * m, TNode q, TNode n, int v, unsigned depth ) { + d_value = v; + if( depthgetVariable( q, depth ).getType(); + unsigned dom = m->d_domain[tn] ; + d_def[dom].construct_def_entry( m, q, n, v, depth+1 ); + d_default = dom; + } +} + +void AbsDef::apply_ucompose( FirstOrderModelAbs * m, TNode q, + std::vector< unsigned >& entry, std::vector< bool >& entry_def, + std::vector< int >& terms, std::map< unsigned, int >& vchildren, + AbsDef * a, unsigned depth ) { + if( depth==terms.size() ){ + if( Trace.isOn("ambqi-check-debug2") ){ + Trace("ambqi-check-debug2") << "Add entry ( "; + for( unsigned i=0; id_rep_set.d_type_reps[m->getVariable( q, i ).getType()].size(); + debugPrintUInt( "ambqi-check-debug2", dSize, entry[i] ); + Trace("ambqi-check-debug2") << " "; + } + Trace("ambqi-check-debug2") << ")" << std::endl; + } + a->construct_entry( entry, entry_def, d_value ); + }else{ + unsigned id; + if( terms[depth]==val_none ){ + //a variable + std::map< unsigned, int >::iterator itv = vchildren.find( depth ); + Assert( itv!=vchildren.end() ); + unsigned prev_v = entry[itv->second]; + bool prev_vd = entry_def[itv->second]; + for( std::map< unsigned, AbsDef >::iterator it = d_def.begin(); it != d_def.end(); ++it ){ + entry[itv->second] = it->first & prev_v; + entry_def[itv->second] = ( it->first==d_default ) && prev_vd; + if( entry[itv->second]!=0 ){ + it->second.apply_ucompose( m, q, entry, entry_def, terms, vchildren, a, depth+1 ); + } + } + entry[itv->second] = prev_v; + entry_def[itv->second] = prev_vd; + }else{ + id = (unsigned)terms[depth]; + Assert( id<32 ); + unsigned fid = 1 << id; + std::map< unsigned, AbsDef >::iterator it = d_def.find( fid ); + if( it!=d_def.end() ){ + it->second.apply_ucompose( m, q, entry, entry_def, terms, vchildren, a, depth+1 ); + }else{ + d_def[d_default].apply_ucompose( m, q, entry, entry_def, terms, vchildren, a, depth+1 ); + } + } + } +} + +void AbsDef::construct_var_eq( FirstOrderModelAbs * m, TNode q, unsigned v1, unsigned v2, int curr, int currv, unsigned depth ) { + if( depth==q[0].getNumChildren() ){ + Assert( currv!=val_none ); + d_value = currv; + }else{ + TypeNode tn = m->getVariable( q, depth ).getType(); + unsigned dom = m->d_domain[tn]; + int vindex = depth==v1 ? 0 : ( depth==v2 ? 1 : val_none ); + if( vindex==val_none ){ + d_def[dom].construct_var_eq( m, q, v1, v2, curr, currv, depth+1 ); + d_default = dom; + }else{ + Assert( currv==val_none ); + if( curr==val_none ){ + unsigned numReps = m->d_rep_set.getNumRepresentatives( tn ); + Assert( numReps < 32 ); + for( unsigned i=0; igetVariable( q, depth ).getType(); + if( v==depth ){ + unsigned numReps = m->d_rep_set.d_type_reps[tn].size(); + Assert( numReps>0 && numReps < 32 ); + for( unsigned i=0; id_domain[tn]; + d_def[dom].construct_var( m, q, v, currv, depth+1 ); + d_default = dom; + } + } +} + +void AbsDef::construct_compose( FirstOrderModelAbs * m, TNode q, TNode n, AbsDef * f, + std::map< unsigned, AbsDef * >& children, + std::map< unsigned, int >& bchildren, std::map< unsigned, int >& vchildren, + std::vector< unsigned >& entry, std::vector< bool >& entry_def ) { + if( n.getKind()==OR || n.getKind()==AND ){ + // short circuiting + for( std::map< unsigned, AbsDef * >::iterator it = children.begin(); it != children.end(); ++it ){ + if( ( it->second->d_value==0 && n.getKind()==AND ) || + ( it->second->d_value==1 && n.getKind()==OR ) ){ + //std::cout << "Short circuit " << it->second->d_value << " " << entry.size() << "/" << q[0].getNumChildren() << std::endl; + unsigned count = q[0].getNumChildren() - entry.size(); + for( unsigned i=0; id_domain[m->getVariable( q, entry.size() ).getType()] ); + entry_def.push_back( true ); + } + construct_entry( entry, entry_def, it->second->d_value ); + for( unsigned i=0; i values; + values.resize( n.getNumChildren(), val_none ); + for( std::map< unsigned, AbsDef * >::iterator it = children.begin(); it != children.end(); ++it ){ + values[it->first] = it->second->d_value; + } + for( std::map< unsigned, int >::iterator it = bchildren.begin(); it != bchildren.end(); ++it ){ + values[it->first] = it->second; + } + //look up value(s) + f->apply_ucompose( m, q, entry, entry_def, values, vchildren, this ); + }else{ + bool incomplete = false; + //we are composing with an interpreted function + std::vector< TNode > values; + values.resize( n.getNumChildren(), TNode::null() ); + for( std::map< unsigned, AbsDef * >::iterator it = children.begin(); it != children.end(); ++it ){ + Trace("ambqi-check-debug2") << "composite : " << it->first << " : " << it->second->d_value; + if( it->second->d_value>=0 ){ + if( it->second->d_value>=(int)m->d_rep_set.d_type_reps[n[it->first].getType()].size() ){ + std::cout << it->second->d_value << " " << n[it->first] << " " << n[it->first].getType() << " " << m->d_rep_set.d_type_reps[n[it->first].getType()].size() << std::endl; + } + Assert( it->second->d_value<(int)m->d_rep_set.d_type_reps[n[it->first].getType()].size() ); + values[it->first] = m->d_rep_set.d_type_reps[n[it->first].getType()][it->second->d_value]; + }else{ + incomplete = true; + } + Trace("ambqi-check-debug2") << " ->> " << values[it->first] << std::endl; + } + for( std::map< unsigned, int >::iterator it = bchildren.begin(); it != bchildren.end(); ++it ){ + Trace("ambqi-check-debug2") << " basic : " << it->first << " : " << it->second; + if( it->second>=0 ){ + Assert( it->second<(int)m->d_rep_set.d_type_reps[n[it->first].getType()].size() ); + values[it->first] = m->d_rep_set.d_type_reps[n[it->first].getType()][it->second]; + }else{ + incomplete = true; + } + Trace("ambqi-check-debug2") << " ->> " << values[it->first] << std::endl; + } + Assert( vchildren.empty() ); + if( incomplete ){ + Trace("ajr-temp") << "Construct incomplete entry." << std::endl; + + //if a child is unknown, we must return unknown + construct_entry( entry, entry_def, val_unk ); + }else{ + if( Trace.isOn("ambqi-check-debug2") ){ + for( unsigned i=0; imkNode( n.getKind(), values ); + vv = Rewriter::rewrite( vv ); + int v = m->getRepresentativeId( vv ); + construct_entry( entry, entry_def, v ); + } + } + }else{ + //take product of arguments + TypeNode tn = m->getVariable( q, entry.size() ).getType(); + Assert( m->isValidType( tn ) ); + unsigned def = m->d_domain[tn]; + if( Trace.isOn("ambqi-check-debug2") ){ + for( unsigned i=0; i::iterator it = children.begin(); it != children.end(); ++it ){ + Assert( it->second!=NULL ); + //process each child + for( std::map< unsigned, AbsDef >::iterator itd = it->second->d_def.begin(); itd != it->second->d_def.end(); ++itd ){ + if( itd->first!=it->second->d_default && ( def & itd->first )!=0 ){ + def &= ~( itd->first ); + //process this value + std::map< unsigned, AbsDef * > cchildren; + for( std::map< unsigned, AbsDef * >::iterator it2 = children.begin(); it2 != children.end(); ++it2 ){ + Assert( it2->second!=NULL ); + std::map< unsigned, AbsDef >::iterator itdf = it2->second->d_def.find( itd->first ); + if( itdf!=it2->second->d_def.end() ){ + cchildren[it2->first] = &itdf->second; + }else{ + Assert( it2->second->getDefault()!=NULL ); + cchildren[it2->first] = it2->second->getDefault(); + } + } + if( Trace.isOn("ambqi-check-debug2") ){ + for( unsigned i=0; id_rep_set.d_type_reps[tn].size(), itd->first ); + Trace("ambqi-check-debug2") << " " << children.size() << " " << cchildren.size() << std::endl; + } + entry.push_back( itd->first ); + entry_def.push_back( def==0 ); + construct_compose( m, q, n, f, cchildren, bchildren, vchildren, entry, entry_def ); + entry_def.pop_back(); + entry.pop_back(); + if( def==0 ){ + break; + } + } + } + if( def==0 ){ + break; + } + } + if( def!=0 ){ + if( Trace.isOn("ambqi-check-debug2") ){ + for( unsigned i=0; i cdchildren; + for( std::map< unsigned, AbsDef * >::iterator it = children.begin(); it != children.end(); ++it ){ + Assert( it->second->getDefault()!=NULL ); + cdchildren[it->first] = it->second->getDefault(); + } + if( Trace.isOn("ambqi-check-debug2") ){ + for( unsigned i=0; id_rep_set.getNumRepresentatives( tn ), def ); + Trace("ambqi-check-debug2") << " " << children.size() << " " << cdchildren.size() << std::endl; + } + entry.push_back( def ); + entry_def.push_back( true ); + construct_compose( m, q, n, f, cdchildren, bchildren, vchildren, entry, entry_def ); + entry_def.pop_back(); + entry.pop_back(); + } + } +} + +bool AbsDef::construct( FirstOrderModelAbs * m, TNode q, TNode n, AbsDef * f, + std::map< unsigned, AbsDef * >& children, + std::map< unsigned, int >& bchildren, std::map< unsigned, int >& vchildren, + int varChCount ) { + if( Trace.isOn("ambqi-check-debug3") ){ + for( unsigned i=0; i::iterator it = bchildren.begin(); it !=bchildren.end(); ++it ){ + if( ( it->second==0 && n.getKind()==AND ) || + ( it->second==1 && n.getKind()==OR ) ){ + construct_def_entry( m, q, q[0], it->second ); + return true; + } + } + } + Trace("ambqi-check-debug2") << "Construct compose..." << std::endl; + std::vector< unsigned > entry; + std::vector< bool > entry_def; + if( f && varChCount>0 ){ + AbsDef unorm; + unorm.construct_compose( m, q, n, f, children, bchildren, vchildren, entry, entry_def ); + //normalize + std::vector< AbsDef* > defs; + defs.push_back( &unorm ); + construct_normalize( m, q, defs ); + }else{ + construct_compose( m, q, n, f, children, bchildren, vchildren, entry, entry_def ); + } + Assert( is_normalized() ); + //if( !is_normalized() ){ + // std::cout << "NON NORMALIZED DEFINITION" << std::endl; + // exit( 10 ); + //} + return true; + }else if( varChCount==1 && n.getKind()==EQUAL ){ + Trace("ambqi-check-debug2") << "Expand variable child..." << std::endl; + //expand the variable based on its finite domain + AbsDef a; + a.construct_var( m, q, vchildren.begin()->second, val_none ); + children[vchildren.begin()->first] = &a; + vchildren.clear(); + std::vector< unsigned > entry; + std::vector< bool > entry_def; + Trace("ambqi-check-debug2") << "Construct compose with variable..." << std::endl; + construct_compose( m, q, n, f, children, bchildren, vchildren, entry, entry_def ); + return true; + }else if( varChCount==2 && n.getKind()==EQUAL ){ + Trace("ambqi-check-debug2") << "Construct variable equality..." << std::endl; + //efficient expansion of the equality + construct_var_eq( m, q, vchildren[0], vchildren[1], val_none, val_none ); + return true; + }else{ + return false; + } +} + +void AbsDef::negate() { + for( std::map< unsigned, AbsDef >::iterator it = d_def.begin(); it != d_def.end(); ++it ){ + it->second.negate(); + } + if( d_value==0 ){ + d_value = 1; + }else if( d_value==1 ){ + d_value = 0; + } +} + +Node AbsDef::getFunctionValue( FirstOrderModelAbs * m, TNode op, std::vector< Node >& vars, unsigned depth ) { + if( depth==vars.size() ){ + TypeNode tn = op.getType(); + if( tn.getNumChildren()>0 ){ + tn = tn[tn.getNumChildren() - 1]; + } + if( d_value>=0 ){ + Assert( d_value<(int)m->d_rep_set.d_type_reps[tn].size() ); + if( tn.isBoolean() ){ + return NodeManager::currentNM()->mkConst( d_value==1 ); + }else{ + return m->d_rep_set.d_type_reps[tn][d_value]; + } + }else{ + return Node::null(); + } + }else{ + TypeNode tn = vars[depth].getType(); + Node curr; + curr = d_def[d_default].getFunctionValue( m, op, vars, depth+1 ); + for( std::map< unsigned, AbsDef >::iterator it = d_def.begin(); it != d_def.end(); ++it ){ + if( it->first!=d_default ){ + unsigned id = getId( it->first ); + Assert( idd_rep_set.d_type_reps[tn].size() ); + TNode n = m->d_rep_set.d_type_reps[tn][id]; + Node fv = it->second.getFunctionValue( m, op, vars, depth+1 ); + if( !curr.isNull() && !fv.isNull() ){ + curr = NodeManager::currentNM()->mkNode( ITE, vars[depth].eqNode( n ), fv, curr ); + }else{ + curr = Node::null(); + } + } + } + return curr; + } +} + +bool AbsDef::isSimple( unsigned n ) { + return (n & (n - 1))==0; +} + +unsigned AbsDef::getId( unsigned n, unsigned start, unsigned end ) { + Assert( n!=0 ); + while( (n & ( 1 << start )) == 0 ){ + start++; + if( start==end ){ + return start; + } + } + return start; +} + +Node AbsDef::evaluate( FirstOrderModelAbs * m, TypeNode retTyp, std::vector< Node >& args ) { + std::vector< unsigned > iargs; + for( unsigned i=0; igetRepresentativeId( args[i] ); + iargs.push_back( v ); + } + return evaluate( m, retTyp, iargs, 0 ); +} + +Node AbsDef::evaluate( FirstOrderModelAbs * m, TypeNode retTyp, std::vector< unsigned >& iargs, unsigned depth ) { + if( d_value!=val_none ){ + if( d_value==val_unk ){ + return Node::null(); + }else{ + Assert( d_value>=0 && d_value<(int)m->d_rep_set.d_type_reps[retTyp].size() ); + return m->d_rep_set.d_type_reps[retTyp][d_value]; + } + }else{ + std::map< unsigned, AbsDef >::iterator it = d_def.find( iargs[depth] ); + if( it==d_def.end() ){ + return d_def[d_default].evaluate( m, retTyp, iargs, depth+1 ); + }else{ + return it->second.evaluate( m, retTyp, iargs, depth+1 ); + } + } +} + +bool AbsDef::is_normalized() { + for( std::map< unsigned, AbsDef >::iterator it1 = d_def.begin(); it1 != d_def.end(); ++it1 ){ + if( !it1->second.is_normalized() ){ + return false; + } + for( std::map< unsigned, AbsDef >::iterator it2 = d_def.begin(); it2 != d_def.end(); ++it2 ){ + if( it1->first!=it2->first && (( it1->first & it2->first )!=0) ){ + return false; + } + } + } + return true; +} + +AbsMbqiBuilder::AbsMbqiBuilder( context::Context* c, QuantifiersEngine* qe ) : +QModelBuilder( c, qe ){ + d_true = NodeManager::currentNM()->mkConst( true ); + d_false = NodeManager::currentNM()->mkConst( false ); +} + + +//------------------------model construction---------------------------- + +void AbsMbqiBuilder::processBuildModel(TheoryModel* m, bool fullModel) { + Trace("ambqi-debug") << "process build model " << fullModel << std::endl; + FirstOrderModel* f = (FirstOrderModel*)m; + FirstOrderModelAbs* fm = f->asFirstOrderModelAbs(); + if( fullModel ){ + Trace("ambqi-model") << "Construct model representation..." << std::endl; + //make function values + for( std::map::iterator it = fm->d_models.begin(); it != fm->d_models.end(); ++it ) { + if( it->first.getType().getNumChildren()>1 ){ + Trace("ambqi-model") << "Construct for " << it->first << "..." << std::endl; + m->d_uf_models[ it->first ] = fm->getFunctionValue( it->first, "$x" ); + } + } + TheoryEngineModelBuilder::processBuildModel( m, fullModel ); + //mark that the model has been set + fm->markModelSet(); + //debug the model + debugModel( fm ); + }else{ + fm->initialize( d_considerAxioms ); + //process representatives + fm->d_rep_id.clear(); + fm->d_domain.clear(); + + //initialize boolean sort + TypeNode b = d_true.getType(); + fm->d_rep_set.d_type_reps[b].clear(); + fm->d_rep_set.d_type_reps[b].push_back( d_false ); + fm->d_rep_set.d_type_reps[b].push_back( d_true ); + fm->d_rep_id[d_false] = 0; + fm->d_rep_id[d_true] = 1; + + //initialize unintpreted sorts + Trace("ambqi-model") << std::endl << "Making representatives..." << std::endl; + for( std::map< TypeNode, std::vector< Node > >::iterator it = fm->d_rep_set.d_type_reps.begin(); + it != fm->d_rep_set.d_type_reps.end(); ++it ){ + if( it->first.isSort() ){ + Assert( !it->second.empty() ); + //set the domain + fm->d_domain[it->first] = 0; + Trace("ambqi-model") << "Representatives for " << it->first << " : " << std::endl; + for( unsigned i=0; isecond.size(); i++ ){ + if( i<32 ){ + fm->d_domain[it->first] |= ( 1 << i ); + } + Trace("ambqi-model") << i << " : " << it->second[i] << std::endl; + fm->d_rep_id[it->second[i]] = i; + } + if( it->second.size()>=32 ){ + fm->d_domain.erase( it->first ); + } + } + } + + Trace("ambqi-model") << std::endl << "Making function definitions..." << std::endl; + //construct the models for functions + for( std::map::iterator it = fm->d_models.begin(); it != fm->d_models.end(); ++it ) { + Node f = it->first; + Trace("ambqi-model-debug") << "Building Model for " << f << std::endl; + //reset the model + it->second->clear(); + //get all (non-redundant) f-applications + std::vector< TNode > fapps; + Trace("ambqi-model-debug") << "Initial terms: " << std::endl; + for( size_t i=0; id_uf_terms[f].size(); i++ ){ + Node n = fm->d_uf_terms[f][i]; + if( !n.getAttribute(NoMatchAttribute()) ){ + Trace("ambqi-model-debug") << " " << n << " -> " << fm->getRepresentativeId( n ) << std::endl; + fapps.push_back( n ); + } + } + if( fapps.empty() ){ + //choose arbitrary value + Node mbt = d_qe->getTermDatabase()->getModelBasisOpTerm(f); + Trace("ambqi-model-debug") << "Initial terms empty, add " << mbt << std::endl; + fapps.push_back( mbt ); + } + bool fValid = true; + for( unsigned i=0; id_domain.find( fapps[0][i].getType() )==fm->d_domain.end() ){ + Trace("ambqi-model") << "Interpretation of " << f << " is not valid."; + Trace("ambqi-model") << " (domain for " << fapps[0][i].getType() << " is too large)." << std::endl; + fValid = false; + break; + } + } + fm->d_models_valid[f] = fValid; + if( fValid ){ + //construct the ambqi model + it->second->construct_func( fm, fapps ); + Trace("ambqi-model-debug") << "Interpretation of " << f << " : " << std::endl; + it->second->debugPrint("ambqi-model-debug", fm, fapps[0] ); + Trace("ambqi-model-debug") << "Simplifying " << f << "..." << std::endl; + it->second->simplify( fm, TNode::null(), fapps[0] ); + Trace("ambqi-model") << "(Simplified) interpretation of " << f << " : " << std::endl; + it->second->debugPrint("ambqi-model", fm, fapps[0] ); + +/* + if( Debug.isOn("ambqi-model-debug") ){ + for( size_t i=0; id_uf_terms[f].size(); i++ ){ + Node e = it->second->evaluate_n( fm, fm->d_uf_terms[f][i] ); + Debug("ambqi-model-debug") << fm->d_uf_terms[f][i] << " evaluates to " << e << std::endl; + Assert( fm->areEqual( e, fm->d_uf_terms[f][i] ) ); + } + } +*/ + } + } + } +} + + +//--------------------model checking--------------------------------------- + +//do exhaustive instantiation +bool AbsMbqiBuilder::doExhaustiveInstantiation( FirstOrderModel * fm, Node q, int effort ) { + Trace("ambqi-check") << "Exhaustive instantiation " << q << " " << effort << std::endl; + if (effort==0) { + FirstOrderModelAbs * fma = fm->asFirstOrderModelAbs(); + bool quantValid = true; + for( unsigned i=0; iisValidType( q[0][i].getType() ) ){ + quantValid = false; + Trace("ambqi-inst") << "Interpretation of " << q << " is not valid because of type " << q[0][i].getType() << std::endl; + break; + } + } + if( quantValid ){ + Trace("ambqi-check") << "Compute interpretation..." << std::endl; + AbsDef ad; + doCheck( fma, q, ad, q[1] ); + //now process entries + Trace("ambqi-inst-debug") << "...Current : " << d_addedLemmas << std::endl; + Trace("ambqi-inst") << "Interpretation of " << q << " is : " << std::endl; + ad.debugPrint( "ambqi-inst", fma, q[0] ); + Trace("ambqi-inst") << std::endl; + Trace("ambqi-check") << "Add instantiations..." << std::endl; + int lem = 0; + quantValid = ad.addInstantiations( fma, d_qe, q, lem ); + Trace("ambqi-inst") << "...Added " << lem << " lemmas." << std::endl; + if( lem>0 ){ + //if we were incomplete but added at least one lemma, we are ok + quantValid = true; + } + d_addedLemmas += lem; + Trace("ambqi-inst-debug") << "...Total : " << d_addedLemmas << std::endl; + } + return quantValid; + } + return true; +} + +bool AbsMbqiBuilder::doCheck( FirstOrderModelAbs * m, TNode q, AbsDef & ad, TNode n ) { + Assert( n.getKind()!=FORALL ); + if( n.getKind()==NOT && n[0].getKind()!=FORALL ){ + doCheck( m, q, ad, n[0] ); + ad.negate(); + return true; + }else{ + std::map< unsigned, AbsDef > children; + std::map< unsigned, int > bchildren; + std::map< unsigned, int > vchildren; + int varChCount = 0; + for( unsigned i=0; id_var_index[q][ m->getVariableId( q, n[i] ) ]; + //vchildren[i] = m->getVariableId( q, n[i] ); + }else if( m->hasTerm( n[i] ) ){ + bchildren[i] = m->getRepresentativeId( n[i] ); + }else{ + if( !doCheck( m, q, children[i], n[i] ) ){ + bchildren[i] = AbsDef::val_unk; + children.erase( i ); + } + } + } + //convert to pointers + std::map< unsigned, AbsDef * > pchildren; + for( std::map< unsigned, AbsDef >::iterator it = children.begin(); it != children.end(); ++it ){ + pchildren[it->first] = &it->second; + } + //construct the interpretation + Trace("ambqi-check-debug") << "Compute Interpretation of " << n << " " << n.getKind() << std::endl; + if( n.getKind() == APPLY_UF || n.getKind() == VARIABLE || n.getKind() == SKOLEM ){ + Node op; + if( n.getKind() == APPLY_UF ){ + op = n.getOperator(); + }else{ + op = n; + } + //uninterpreted compose + if( m->d_models_valid[op] ){ + ad.construct( m, q, n, m->d_models[op], pchildren, bchildren, vchildren, varChCount ); + }else{ + Trace("ambqi-check-debug") << "** Cannot produce interpretation for " << n << " (no function model)" << std::endl; + return false; + } + }else if( !ad.construct( m, q, n, NULL, pchildren, bchildren, vchildren, varChCount ) ){ + Trace("ambqi-check-debug") << "** Cannot produce interpretation for " << n << " (variables are children of interpreted symbol)" << std::endl; + return false; + } + Trace("ambqi-check-try") << "Interpretation for " << n << " is : " << std::endl; + ad.debugPrint("ambqi-check-try", m, q[0] ); + ad.simplify( m, q, q[0] ); + Trace("ambqi-check-debug") << "(Simplified) Interpretation for " << n << " is : " << std::endl; + ad.debugPrint("ambqi-check-debug", m, q[0] ); + Trace("ambqi-check-debug") << std::endl; + return true; + } +} diff --git a/src/theory/quantifiers/ambqi_builder.h b/src/theory/quantifiers/ambqi_builder.h index 349073cb4..d586d9c8f 100755 --- a/src/theory/quantifiers/ambqi_builder.h +++ b/src/theory/quantifiers/ambqi_builder.h @@ -1,102 +1,102 @@ -/********************* */ -/*! \file ambqi_builder.h - ** \verbatim - ** Original author: Andrew Reynolds - ** Major contributors: none - ** Minor contributors (to current version): none - ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa - ** See the file COPYING in the top-level source directory for licensing - ** information.\endverbatim - ** - ** \brief Abstract MBQI model builder class - **/ - -#include "cvc4_private.h" - -#ifndef ABSTRACT_MBQI_BUILDER -#define ABSTRACT_MBQI_BUILDER - -#include "theory/quantifiers/model_builder.h" -#include "theory/quantifiers/first_order_model.h" - -namespace CVC4 { -namespace theory { -namespace quantifiers { - -class FirstOrderModelAbs; - -//representiation of function and term interpretations -class AbsDef -{ -private: - bool addInstantiations( FirstOrderModelAbs * m, QuantifiersEngine * qe, TNode q, std::vector< Node >& terms, int& inst, unsigned depth ); - void construct_compose( FirstOrderModelAbs * m, TNode q, TNode n, AbsDef * f, - std::map< unsigned, AbsDef * >& children, - std::map< unsigned, int >& bchildren, std::map< unsigned, int >& vchildren, - std::vector< unsigned >& entry, std::vector< bool >& entry_def ); - void construct_entry( std::vector< unsigned >& entry, std::vector< bool >& entry_def, int v, unsigned depth = 0 ); - void construct_def_entry( FirstOrderModelAbs * m, TNode q, TNode n, int v, unsigned depth = 0 ); - void apply_ucompose( FirstOrderModelAbs * m, TNode q, - std::vector< unsigned >& entry, std::vector< bool >& entry_def, std::vector< int >& terms, - std::map< unsigned, int >& vchildren, AbsDef * a, unsigned depth = 0 ); - void construct_var_eq( FirstOrderModelAbs * m, TNode q, unsigned v1, unsigned v2, int curr, int currv, unsigned depth = 0 ); - void construct_var( FirstOrderModelAbs * m, TNode q, unsigned v, int currv, unsigned depth = 0 ); - void get_defs( unsigned u, std::vector< AbsDef * >& defs ); - void construct_normalize( FirstOrderModelAbs * m, TNode q, std::vector< AbsDef * >& defs, unsigned depth = 0 ); -public: - enum { - val_none = -1, - val_unk = -2, - }; - AbsDef() : d_default( 0 ), d_value( -1 ){} - std::map< unsigned, AbsDef > d_def; - unsigned d_default; - int d_value; - - void clear() { d_def.clear(); d_default = 0; d_value = -1; } - AbsDef * getDefault() { return &d_def[d_default]; } - void construct_func( FirstOrderModelAbs * m, std::vector< TNode >& fapps, unsigned depth = 0 ); - void debugPrintUInt( const char * c, unsigned dSize, unsigned u ) const; - void debugPrint( const char * c, FirstOrderModelAbs * m, TNode f, unsigned depth = 0 ) const; - void simplify( FirstOrderModelAbs * m, TNode q, TNode n, unsigned depth = 0 ); - int addInstantiations( FirstOrderModelAbs * m, QuantifiersEngine * qe, Node q, int& inst ){ - std::vector< Node > terms; - terms.resize( q[0].getNumChildren() ); - return addInstantiations( m, qe, q, terms, inst, 0 ); - } - bool construct( FirstOrderModelAbs * m, TNode q, TNode n, AbsDef * f, - std::map< unsigned, AbsDef * >& children, - std::map< unsigned, int >& bchildren, - std::map< unsigned, int >& vchildren, - int varChCount ); - void negate(); - Node getFunctionValue( FirstOrderModelAbs * m, TNode op, std::vector< Node >& vars, unsigned depth = 0 ); - static bool isSimple( unsigned n ); - static unsigned getId( unsigned n, unsigned start=0, unsigned end=32 ); - Node evaluate( FirstOrderModelAbs * m, TypeNode retType, std::vector< Node >& args ); - Node evaluate( FirstOrderModelAbs * m, TypeNode retType, std::vector< unsigned >& iargs, unsigned depth = 0 ); - //for debugging - bool is_normalized(); -}; - -class AbsMbqiBuilder : public QModelBuilder -{ - friend class AbsDef; -private: - Node d_true; - Node d_false; - bool doCheck( FirstOrderModelAbs * m, TNode q, AbsDef & ad, TNode n ); -public: - AbsMbqiBuilder( context::Context* c, QuantifiersEngine* qe ); - //process build model - void processBuildModel(TheoryModel* m, bool fullModel); - //do exhaustive instantiation - bool doExhaustiveInstantiation( FirstOrderModel * fm, Node q, int effort ); -}; - -} -} -} - -#endif +/********************* */ +/*! \file ambqi_builder.h + ** \verbatim + ** Original author: Andrew Reynolds + ** Major contributors: none + ** Minor contributors (to current version): none + ** This file is part of the CVC4 project. + ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** See the file COPYING in the top-level source directory for licensing + ** information.\endverbatim + ** + ** \brief Abstract MBQI model builder class + **/ + +#include "cvc4_private.h" + +#ifndef ABSTRACT_MBQI_BUILDER +#define ABSTRACT_MBQI_BUILDER + +#include "theory/quantifiers/model_builder.h" +#include "theory/quantifiers/first_order_model.h" + +namespace CVC4 { +namespace theory { +namespace quantifiers { + +class FirstOrderModelAbs; + +//representiation of function and term interpretations +class AbsDef +{ +private: + bool addInstantiations( FirstOrderModelAbs * m, QuantifiersEngine * qe, TNode q, std::vector< Node >& terms, int& inst, unsigned depth ); + void construct_compose( FirstOrderModelAbs * m, TNode q, TNode n, AbsDef * f, + std::map< unsigned, AbsDef * >& children, + std::map< unsigned, int >& bchildren, std::map< unsigned, int >& vchildren, + std::vector< unsigned >& entry, std::vector< bool >& entry_def ); + void construct_entry( std::vector< unsigned >& entry, std::vector< bool >& entry_def, int v, unsigned depth = 0 ); + void construct_def_entry( FirstOrderModelAbs * m, TNode q, TNode n, int v, unsigned depth = 0 ); + void apply_ucompose( FirstOrderModelAbs * m, TNode q, + std::vector< unsigned >& entry, std::vector< bool >& entry_def, std::vector< int >& terms, + std::map< unsigned, int >& vchildren, AbsDef * a, unsigned depth = 0 ); + void construct_var_eq( FirstOrderModelAbs * m, TNode q, unsigned v1, unsigned v2, int curr, int currv, unsigned depth = 0 ); + void construct_var( FirstOrderModelAbs * m, TNode q, unsigned v, int currv, unsigned depth = 0 ); + void get_defs( unsigned u, std::vector< AbsDef * >& defs ); + void construct_normalize( FirstOrderModelAbs * m, TNode q, std::vector< AbsDef * >& defs, unsigned depth = 0 ); +public: + enum { + val_none = -1, + val_unk = -2, + }; + AbsDef() : d_default( 0 ), d_value( -1 ){} + std::map< unsigned, AbsDef > d_def; + unsigned d_default; + int d_value; + + void clear() { d_def.clear(); d_default = 0; d_value = -1; } + AbsDef * getDefault() { return &d_def[d_default]; } + void construct_func( FirstOrderModelAbs * m, std::vector< TNode >& fapps, unsigned depth = 0 ); + void debugPrintUInt( const char * c, unsigned dSize, unsigned u ) const; + void debugPrint( const char * c, FirstOrderModelAbs * m, TNode f, unsigned depth = 0 ) const; + void simplify( FirstOrderModelAbs * m, TNode q, TNode n, unsigned depth = 0 ); + int addInstantiations( FirstOrderModelAbs * m, QuantifiersEngine * qe, Node q, int& inst ){ + std::vector< Node > terms; + terms.resize( q[0].getNumChildren() ); + return addInstantiations( m, qe, q, terms, inst, 0 ); + } + bool construct( FirstOrderModelAbs * m, TNode q, TNode n, AbsDef * f, + std::map< unsigned, AbsDef * >& children, + std::map< unsigned, int >& bchildren, + std::map< unsigned, int >& vchildren, + int varChCount ); + void negate(); + Node getFunctionValue( FirstOrderModelAbs * m, TNode op, std::vector< Node >& vars, unsigned depth = 0 ); + static bool isSimple( unsigned n ); + static unsigned getId( unsigned n, unsigned start=0, unsigned end=32 ); + Node evaluate( FirstOrderModelAbs * m, TypeNode retType, std::vector< Node >& args ); + Node evaluate( FirstOrderModelAbs * m, TypeNode retType, std::vector< unsigned >& iargs, unsigned depth = 0 ); + //for debugging + bool is_normalized(); +}; + +class AbsMbqiBuilder : public QModelBuilder +{ + friend class AbsDef; +private: + Node d_true; + Node d_false; + bool doCheck( FirstOrderModelAbs * m, TNode q, AbsDef & ad, TNode n ); +public: + AbsMbqiBuilder( context::Context* c, QuantifiersEngine* qe ); + //process build model + void processBuildModel(TheoryModel* m, bool fullModel); + //do exhaustive instantiation + bool doExhaustiveInstantiation( FirstOrderModel * fm, Node q, int effort ); +}; + +} +} +} + +#endif diff --git a/src/theory/quantifiers/qinterval_builder.cpp b/src/theory/quantifiers/qinterval_builder.cpp index 285834e96..bd8f23db6 100755 --- a/src/theory/quantifiers/qinterval_builder.cpp +++ b/src/theory/quantifiers/qinterval_builder.cpp @@ -1,1111 +1,1111 @@ -/********************* */ -/*! \file qinterval_builder.cpp - ** \verbatim - ** Original author: Andrew Reynolds - ** Major contributors: none - ** Minor contributors (to current version): none - ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa - ** See the file COPYING in the top-level source directory for licensing - ** information.\endverbatim - ** - ** \brief Implementation of qinterval builder - **/ - - -#include "theory/quantifiers/qinterval_builder.h" -#include "theory/quantifiers/term_database.h" - - -using namespace std; -using namespace CVC4; -using namespace CVC4::kind; -using namespace CVC4::context; -using namespace CVC4::theory; -using namespace CVC4::theory::quantifiers; - -//lower bound is exclusive -//upper bound is inclusive - -struct QIntSort -{ - FirstOrderModelQInt * m; - bool operator() (Node i, Node j) { - return m->isLessThan( i, j ); - } -}; - -void QIntDef::init_vec( FirstOrderModelQInt * m, Node q, std::vector< Node >& l, std::vector< Node >& u ) { - for( unsigned i=0; igetOrderedNumVars( q ); i++ ){ - l.push_back( Node::null() ); - u.push_back( m->getMaximum( m->getOrderedVarType( q, i ) ) ); - } -} - -void QIntDef::debugPrint( const char * c, FirstOrderModelQInt * m, Node q, std::vector< Node >& l, std::vector< Node >& u ) -{ - Trace(c) << "( "; - for( unsigned i=0; i0 ) Trace(c) << ", "; - //Trace(c) << l[i] << "..." << u[i]; - int lindex = l[i].isNull() ? 0 : m->getRepId( l[i] ) + 1; - int uindex = m->getRepId( u[i] ); - Trace(c) << lindex << "..." << uindex; - } - Trace(c) << " )"; -} - - -int QIntDef::getEvIndex( FirstOrderModelQInt * m, Node n, bool exc ) { - if( n.isNull() ){ - Assert( exc ); - return 0; - }else{ - int min = 0; - int max = (int)(d_def_order.size()-1); - while( min!=max ){ - int index = (min+max)/2; - Assert( index>=0 && index<(int)d_def_order.size() ); - if( n==d_def_order[index] ){ - max = index; - min = index; - }else if( m->isLessThan( n, d_def_order[index] ) ){ - max = index; - }else{ - min = index+1; - } - } - if( n==d_def_order[min] && exc ){ - min++; - } - Assert( min>=0 && min<(int)d_def_order.size() ); - if( ( min!=0 && !m->isLessThan( d_def_order[min-1], n ) && ( !exc || d_def_order[min-1]!=n ) ) || - ( ( exc || d_def_order[min]!=n ) && !m->isLessThan( n, d_def_order[min] ) ) ){ - Debug("qint-error") << "ERR size : " << d_def_order.size() << ", exc : " << exc << std::endl; - for( unsigned i=0; igetRepId( d_def_order[i] ) << std::endl; - } - Debug("qint-error") << " : " << n << " " << min << " " << m->getRepId( n ) << std::endl; - } - - Assert( min==0 || m->isLessThan( d_def_order[min-1], n ) || ( exc && d_def_order[min-1]==n ) ); - Assert( ( !exc && n==d_def_order[min] ) || m->isLessThan( n, d_def_order[min] ) ); - return min; - } -} - -void QIntDef::addEntry( FirstOrderModelQInt * m, Node q, std::vector< Node >& l, std::vector< Node >& u, - Node v, unsigned depth ) { - if( depth==0 ){ - Trace("qint-compose-debug") << "Add entry "; - debugPrint( "qint-compose-debug", m, q, l, u ); - Trace("qint-compose-debug") << " -> " << v << "..." << std::endl; - } - //Assert( false ); - if( depth==u.size() ){ - Assert( d_def_order.empty() ); - Assert( v.isNull() || v.isConst() || ( v.getType().isSort() && m->getRepId( v )!=-1 ) ); - d_def_order.push_back( v ); - }else{ - /* - if( !d_def_order.empty() && - ( l[depth].isNull() || m->isLessThan( l[depth], d_def_order[d_def_order.size()-1] ) ) ){ - int startEvIndex = getEvIndex( m, l[depth], true ); - int endEvIndex; - if( m->isLessThan( u[depth], d_def_order[d_def_order.size()-1] ) ){ - endEvIndex = getEvIndex( m, u[depth] ); - }else{ - endEvIndex = d_def_order.size()-1; - } - Trace("qint-compose-debug2") << this << " adding for bounds " << l[depth] << "..." << u[depth] << std::endl; - for( int i=startEvIndex; i<=endEvIndex; i++ ){ - Trace("qint-compose-debug2") << this << " add entry " << d_def_order[i] << std::endl; - d_def[d_def_order[i]].addEntry( m, q, l, u, v, depth+1 ); - } - } - if( !d_def_order.empty() && - d_def.find(u[depth])==d_def.end() && - !m->isLessThan( d_def_order[d_def_order.size()-1], u[depth] ) ){ - Trace("qint-compose-debug2") << "Bad : depth : " << depth << std::endl; - } - Assert( d_def_order.empty() || - d_def.find(u[depth])!=d_def.end() || - m->isLessThan( d_def_order[d_def_order.size()-1], u[depth] ) ); - - if( d_def_order.empty() || m->isLessThan( d_def_order[d_def_order.size()-1], u[depth] ) ){ - Trace("qint-compose-debug2") << this << " add entry new : " << u[depth] << std::endl; - d_def_order.push_back( u[depth] ); - d_def[u[depth]].addEntry( m, q, l, u, v, depth+1 ); - } - */ - //%%%%%% - bool success = true; - int nnum = m->getVarOrder( q )->getNextNum( depth ); - Node pl; - Node pu; - if( nnum!=-1 ){ - Trace("qint-compose-debug2") << "...adding entry #" << depth << " is #" << nnum << std::endl; - //Assert( l[nnum].isNull() || l[nnum]==l[depth] || m->isLessThan( l[nnum], l[depth] ) ); - //Assert( u[nnum]==u[depth] || m->isLessThan( u[depth], u[nnum] ) ); - pl = l[nnum]; - pu = u[nnum]; - if( !m->doMeet( l[nnum], u[nnum], l[depth], u[depth], l[nnum], u[nnum] ) ){ - success = false; - } - } - //%%%%%% - if( success ){ - Node r = u[depth]; - if( d_def.find( r )!=d_def.end() ){ - d_def[r].addEntry( m, q, l, u, v, depth+1 ); - }else{ - if( !d_def_order.empty() && - !m->isLessThan( d_def_order[d_def_order.size()-1], u[depth] ) ){ - Trace("qint-compose-debug2") << "Bad : depth : " << depth << " "; - Trace("qint-compose-debug2") << d_def_order[d_def_order.size()-1] << " " << u[depth] << std::endl; - } - Assert( d_def_order.empty() || m->isLessThan( d_def_order[d_def_order.size()-1], r ) ); - d_def_order.push_back( r ); - d_def[r].addEntry( m, q, l, u, v, depth+1 ); - } - } - if( nnum!=-1 ){ - l[nnum] = pl; - u[nnum] = pu; - } - } -} - -Node QIntDef::simplify_r( FirstOrderModelQInt * m, Node q, std::vector< Node >& il, std::vector< Node >& iu, - unsigned depth ) { - if( d_def.empty() ){ - if( d_def_order.size()!=0 ){ - Debug("qint-error") << "Simplify, size = " << d_def_order.size() << std::endl; - } - Assert( d_def_order.size()==1 ); - return d_def_order[0]; - }else{ - Assert( !d_def_order.empty() ); - std::vector< Node > newDefs; - Node curr; - for( unsigned i=0; i0 ){ - if( n==curr && !n.isNull() ){ - d_def.erase( d_def_order[i-1] ); - }else{ - newDefs.push_back( d_def_order[i-1] ); - } - } - curr = n; - } - newDefs.push_back( d_def_order[d_def_order.size()-1] ); - d_def_order.clear(); - d_def_order.insert( d_def_order.end(), newDefs.begin(), newDefs.end() ); - return d_def_order.size()==1 ? curr : Node::null(); - } -} - -Node QIntDef::simplify( FirstOrderModelQInt * m, Node q ) { - std::vector< Node > l; - std::vector< Node > u; - if( !q.isNull() ){ - //init_vec( m, q, l, u ); - } - return simplify_r( m, q, l, u, 0 ); -} - -bool QIntDef::isTotal_r( FirstOrderModelQInt * m, Node q, std::vector< Node >& l, std::vector< Node >& u, - unsigned depth ) { - if( d_def_order.empty() ){ - return false; - }else if( d_def.empty() ){ - return true; - }else{ - //get the current maximum - Node mx; - if( !q.isNull() ){ - int pnum = m->getVarOrder( q )->getPrevNum( depth ); - if( pnum!=-1 ){ - mx = u[pnum]; - } - } - if( mx.isNull() ){ - mx = m->getMaximum( d_def_order[d_def_order.size()-1].getType() ); - } - //if not current maximum - if( d_def_order[d_def_order.size()-1]!=mx ){ - return false; - }else{ - Node pu = u[depth]; - for( unsigned i=0; i l; - std::vector< Node > u; - if( !q.isNull() ){ - init_vec( m, q, l, u ); - } - return isTotal_r( m, q, l, u, 0 ); -} - -void QIntDef::construct_compose_r( FirstOrderModelQInt * m, Node q, - std::vector< Node >& l, std::vector< Node >& u, - Node n, QIntDef * f, - std::vector< Node >& args, - std::map< unsigned, QIntDef >& children, - std::map< unsigned, Node >& bchildren, - QIntVarNumIndex& vindex, unsigned depth ) { - //check for short circuit - if( !f ){ - if( !args.empty() ){ - if( ( n.getKind()==OR && args[args.size()-1]==m->d_true ) || - ( n.getKind()==AND && args[args.size()-1]==m->d_false ) ){ - addEntry( m, q, l, u, args[args.size()-1] ); - return; - } - } - } - - for( unsigned i=0; i0 ) Trace("qint-compose") << ", "; - //Trace("qint-compose") << l[i] << "..." << u[i]; - int lindex = l[i].isNull() ? 0 : m->getRepId( l[i] ) + 1; - int uindex = m->getRepId( u[i] ); - Trace( "qint-compose" ) << lindex << "..." << uindex; - } - Trace("qint-compose") << " )..."; - - //finished? - if( ( f && f->d_def.empty() ) || args.size()==n.getNumChildren() ){ - if( f ){ - Assert( f->d_def_order.size()==1 ); - Trace("qint-compose") << "UVALUE(" << f->d_def_order[0] << ")" << std::endl; - addEntry( m, q, l, u, f->d_def_order[0] ); - }else{ - Node nn; - bool nnSet = false; - for( unsigned i=0; imkConst( args[0]==args[1] ); - }else{ - //apply the operator to args - nn = NodeManager::currentNM()->mkNode( n.getKind(), args ); - nn = Rewriter::rewrite( nn ); - } - } - Trace("qint-compose") << "IVALUE(" << nn << ")" << std::endl; - addEntry( m, q, l, u, nn ); - Trace("qint-compose-debug2") << "...added entry." << std::endl; - } - }else{ - //if a non-simple child - if( children.find( depth )!=children.end() ){ - //*************************** - Trace("qint-compose") << "compound child, recurse" << std::endl; - std::vector< int > currIndex; - std::vector< int > endIndex; - std::vector< Node > prevL; - std::vector< Node > prevU; - std::vector< QIntDef * > visited; - do{ - Assert( currIndex.size()==visited.size() ); - - //populate the vectors - while( visited.size()getOrderedNumVars( q ) ){ - unsigned i = visited.size(); - QIntDef * qq = visited.empty() ? &children[depth] : visited[i-1]->getChild( currIndex[i-1] ); - visited.push_back( qq ); - Node qq_mx = qq->getMaximum(); - Trace("qint-compose-debug2") << "...Get ev indices " << i << " " << l[i] << " " << u[i] << std::endl; - currIndex.push_back( qq->getEvIndex( m, l[i], true ) ); - Trace("qint-compose-debug2") << "...Done get curr index " << currIndex[currIndex.size()-1] << std::endl; - if( m->isLessThan( qq_mx, u[i] ) ){ - endIndex.push_back( qq->getNumChildren()-1 ); - }else{ - endIndex.push_back( qq->getEvIndex( m, u[i] ) ); - } - Trace("qint-compose-debug2") << "...Done get end index " << endIndex[endIndex.size()-1] << std::endl; - prevL.push_back( l[i] ); - prevU.push_back( u[i] ); - if( !m->doMeet( prevL[i], prevU[i], - qq->getLower( currIndex[i] ), qq->getUpper( currIndex[i] ), l[i], u[i] ) ){ - Assert( false ); - } - } - for( unsigned i=0; igetChild( currIndex[activeIndex] ); - if( f ){ - int fIndex = f->getEvIndex( m, qa->getValue() ); - construct_compose_r( m, q, l, u, n, f->getChild( fIndex ), args, children, bchildren, vindex, depth+1 ); - }else{ - args.push_back( qa->getValue() ); - construct_compose_r( m, q, l, u, n, f, args, children, bchildren, vindex, depth+1 ); - args.pop_back(); - } - - //increment the index (if possible) - while( activeIndex>=0 && currIndex[activeIndex]==endIndex[activeIndex] ){ - currIndex.pop_back(); - endIndex.pop_back(); - l[activeIndex] = prevL[activeIndex]; - u[activeIndex] = prevU[activeIndex]; - prevL.pop_back(); - prevU.pop_back(); - visited.pop_back(); - activeIndex--; - } - if( activeIndex>=0 ){ - for( unsigned i=0; idoMeet( prevL[activeIndex], prevU[activeIndex], - visited[activeIndex]->getLower( currIndex[activeIndex] ), - visited[activeIndex]->getUpper( currIndex[activeIndex] ), - l[activeIndex], u[activeIndex] ) ){ - Assert( false ); - } - } - }while( !visited.empty() ); - //*************************** - }else{ - Assert( bchildren.find( depth )!=bchildren.end() ); - Node v = bchildren[depth]; - if( f ){ - if( v.getKind()==BOUND_VARIABLE ){ - int vn = vindex.d_var_num[depth]; - Trace("qint-compose") << "variable #" << vn << ", recurse" << std::endl; - //int vn = m->getOrderedVarOccurId( q, n, depth ); - Trace("qint-compose-debug") << "-process " << v << ", which is var #" << vn << std::endl; - Node lprev = l[vn]; - Node uprev = u[vn]; - //restrict to last variable in order - int pnum = m->getVarOrder( q )->getPrevNum( vn ); - if( pnum!=-1 ){ - Trace("qint-compose-debug") << "-restrict to var #" << pnum << " " << l[pnum] << " " << u[pnum] << std::endl; - l[vn] = l[pnum]; - u[vn] = u[pnum]; - } - int startIndex = f->getEvIndex( m, l[vn], true ); - int endIndex = f->getEvIndex( m, u[vn] ); - Trace("qint-compose-debug") << "--will process " << startIndex << " " << endIndex << std::endl; - for( int i=startIndex; i<=endIndex; i++ ){ - if( m->doMeet( lprev, uprev, f->getLower( i ), f->getUpper( i ), l[vn], u[vn] ) ){ - construct_compose_r( m, q, l, u, n, f->getChild( i ), args, children, bchildren, vindex, depth+1 ); - }else{ - Assert( false ); - } - } - l[vn] = lprev; - u[vn] = uprev; - }else{ - Trace("qint-compose") << "value, recurse" << std::endl; - //simple - int ei = f->getEvIndex( m, v ); - construct_compose_r( m, q, l, u, n, f->getChild( ei ), args, children, bchildren, vindex, depth+1 ); - } - }else{ - Trace("qint-compose") << "value, recurse" << std::endl; - args.push_back( v ); - construct_compose_r( m, q, l, u, n, f, args, children, bchildren, vindex, depth+1 ); - args.pop_back(); - } - } - } -} - - -void QIntDef::construct_enum_r( FirstOrderModelQInt * m, Node q, unsigned vn, unsigned depth, Node v ) { - if( depth==m->getOrderedNumVars( q ) ){ - Assert( !v.isNull() ); - d_def_order.push_back( v ); - }else{ - TypeNode tn = m->getOrderedVarType( q, depth ); - //int vnum = m->getVarOrder( q )->getVar( depth )== - if( depth==vn ){ - for( unsigned i=0; id_rep_set.d_type_reps[tn].size(); i++ ){ - Node vv = m->d_rep_set.d_type_reps[tn][i]; - d_def_order.push_back( vv ); - d_def[vv].construct_enum_r( m, q, vn, depth+1, vv ); - } - }else if( m->getVarOrder( q )->getVar( depth )==m->getVarOrder( q )->getVar( vn ) && depth>vn ){ - d_def_order.push_back( v ); - d_def[v].construct_enum_r( m, q, vn, depth+1, v ); - }else{ - Node mx = m->getMaximum( tn ); - d_def_order.push_back( mx ); - d_def[mx].construct_enum_r( m, q, vn, depth+1, v ); - } - } -} - -bool QIntDef::construct_enum( FirstOrderModelQInt * m, Node q, unsigned vn ) { - TypeNode tn = m->getOrderedVarType( q, vn ); - if( tn.isSort() ){ - construct_enum_r( m, q, vn, 0, Node::null() ); - return true; - }else{ - return false; - } -} - -bool QIntDef::construct_compose( FirstOrderModelQInt * m, Node q, Node n, QIntDef * f, - std::map< unsigned, QIntDef >& children, - std::map< unsigned, Node >& bchildren, int varChCount, - QIntVarNumIndex& vindex ) { - Trace("qint-compose") << "Do " << (f ? "uninterpreted" : "interpreted"); - Trace("qint-compose") << " compose, var count = " << varChCount << "..." << std::endl; - std::vector< Node > l; - std::vector< Node > u; - init_vec( m, q, l, u ); - if( varChCount==0 || f ){ - //standard (no variable child) interpreted compose, or uninterpreted compose - std::vector< Node > args; - construct_compose_r( m, q, l, u, n, f, args, children, bchildren, vindex, 0 ); - }else{ - //special cases - bool success = false; - int varIndex = ( bchildren.find( 0 )!=bchildren.end() && bchildren[0].getKind()==BOUND_VARIABLE ) ? 0 : 1; - if( varChCount>1 ){ - if( n.getKind()==EQUAL ){ - //make it an enumeration - unsigned vn = vindex.d_var_num[0]; - if( children[0].construct_enum( m, q, vn ) ){ - bchildren.erase( 0 ); - varIndex = 1; - success = true; - } - } - }else{ - success = n.getKind()==EQUAL; - } - if( success ){ - int oIndex = varIndex==0 ? 1 : 0; - Node v = bchildren[varIndex]; - unsigned vn = vindex.d_var_num[varIndex]; - if( children.find( oIndex )==children.end() ){ - Assert( bchildren.find( oIndex )!=bchildren.end() ); - Node at = bchildren[oIndex]; - Trace("qint-icompose") << "Basic child, " << at << " with var " << v << std::endl; - Node prev = m->getPrev( bchildren[oIndex].getType(), bchildren[oIndex] ); - Node above = u[vn]; - if( !prev.isNull() ){ - u[vn] = prev; - addEntry( m, q, l, u, NodeManager::currentNM()->mkConst( false ) ); - } - l[vn] = prev; - u[vn] = at; - addEntry( m, q, l, u, NodeManager::currentNM()->mkConst( true ) ); - if( at!=above ){ - l[vn] = at; - u[vn] = above; - addEntry( m, q, l, u, NodeManager::currentNM()->mkConst( false ) ); - } - }else{ - QIntDef * qid = &children[oIndex]; - qid->debugPrint("qint-icompose", m, q ); - Trace("qint-icompose") << " against variable..." << v << ", which is var #" << vn << std::endl; - - TypeNode tn = v.getType(); - QIntDefIter qdi( m, q, qid ); - while( !qdi.isFinished() ){ - std::vector< Node > us; - qdi.getUppers( us ); - std::vector< Node > ls; - qdi.getLowers( ls ); - qdi.debugPrint( "qint-icompose" ); - - Node n_below = ls[vn]; - Node n_prev = m->getPrev( tn, qdi.getValue() ); - Node n_at = qdi.getValue(); - Node n_above = us[vn]; - Trace("qint-icompose") << n_below << " < " << n_prev << " < " << n_at << " < " << n_above << std::endl; - if( n.getKind()==EQUAL ){ - bool atLtAbove = m->isLessThan( n_at, n_above ); - Node currL = n_below; - if( n_at==n_above || atLtAbove ){ - //add for value (at-1) - if( !n_prev.isNull() && ( n_below.isNull() || m->isLessThan( n_below, n_prev ) ) ){ - ls[vn] = currL; - us[vn] = n_prev; - currL = n_prev; - Trace("qint-icompose") << "-add entry(-) at " << ls[vn] << "..." << us[vn] << std::endl; - addEntry( m, q, ls, us, NodeManager::currentNM()->mkConst( false ) ); - } - //add for value (at) - if( ( n_below.isNull() || m->isLessThan( n_below, n_at ) ) && atLtAbove ){ - ls[vn] = currL; - us[vn] = n_at; - currL = n_at; - Trace("qint-icompose") << "-add entry(=) at " << ls[vn] << "..." << us[vn] << std::endl; - addEntry( m, q, ls, us, NodeManager::currentNM()->mkConst( true ) ); - } - } - ls[vn] = currL; - us[vn] = n_above; - Trace("qint-icompose") << "-add entry(+) at " << ls[vn] << "..." << us[vn] << std::endl; - addEntry( m, q, ls, us, NodeManager::currentNM()->mkConst( n_at==n_above ) ); - }else{ - return false; - } - qdi.increment(); - - Trace("qint-icompose-debug") << "Now : " << std::endl; - debugPrint("qint-icompose-debug", m, q ); - Trace("qint-icompose-debug") << std::endl; - } - } - - Trace("qint-icompose") << "Result : " << std::endl; - debugPrint("qint-icompose", m, q ); - Trace("qint-icompose") << std::endl; - - }else{ - return false; - } - } - Trace("qint-compose") << "Done i-compose" << std::endl; - return true; -} - - -void QIntDef::construct( FirstOrderModelQInt * m, std::vector< Node >& fapps, unsigned depth ) { - d_def.clear(); - d_def_order.clear(); - Assert( !fapps.empty() ); - if( depth==fapps[0].getNumChildren() ){ - //get representative in model for this term - Assert( fapps.size()>=1 ); - Node r = m->getUsedRepresentative( fapps[0] ); - d_def_order.push_back( r ); - }else{ - std::map< Node, std::vector< Node > > fapp_child; - //partition based on evaluations of fapps[1][depth]....fapps[n][depth] - for( unsigned i=0; igetUsedRepresentative( fapps[i][depth] ); - fapp_child[r].push_back( fapps[i] ); - } - //sort by QIntSort - for( std::map< Node, std::vector< Node > >::iterator it = fapp_child.begin(); it != fapp_child.end(); ++it ){ - d_def_order.push_back( it->first ); - } - QIntSort qis; - qis.m = m; - std::sort( d_def_order.begin(), d_def_order.end(), qis ); - //construct children - for( unsigned i=0; igetMaximum( d_def_order[i].getType() ); - } - Debug("qint-model-debug2") << "Construct for " << n << ", terms = " << fapp_child[n].size() << std::endl; - d_def[d_def_order[i]].construct( m, fapp_child[n], depth+1 ); - } - } -} - -Node QIntDef::getFunctionValue( FirstOrderModelQInt * m, std::vector< Node >& vars, unsigned depth ) { - if( d_def.empty() ){ - Assert( d_def_order.size()==1 ); - //must convert to actual domain constant - if( d_def_order[0].getType().isSort() ){ - return m->d_rep_set.d_type_reps[ d_def_order[0].getType() ][ m->getRepId( d_def_order[0] ) ]; - }else{ - return m->getUsedRepresentative( d_def_order[0] ); - } - }else{ - TypeNode tn = vars[depth].getType(); - Node curr; - int rep_id = m->d_rep_set.getNumRepresentatives( tn ); - for( int i=(int)(d_def_order.size()-1); i>=0; i-- ){ - int curr_rep_id = i==0 ? 0 : m->getRepId( d_def_order[i-1] )+1; - Node ccurr = d_def[d_def_order[i]].getFunctionValue( m, vars, depth+1 ); - if( curr.isNull() ){ - curr = ccurr; - }else{ - std::vector< Node > c; - Assert( curr_rep_idd_rep_set.d_type_reps[tn][j] ) ); - } - Node cond = c.size()==1 ? c[0] : NodeManager::currentNM()->mkNode( OR, c ); - curr = NodeManager::currentNM()->mkNode( ITE, cond, ccurr, curr ); - } - rep_id = curr_rep_id; - } - return curr; - } -} - -Node QIntDef::evaluate_r( FirstOrderModelQInt * m, std::vector< Node >& reps, unsigned depth ) { - if( depth==reps.size() ){ - Assert( d_def_order.size()==1 ); - return d_def_order[0]; - }else{ - if( d_def.find( reps[depth] )!=d_def.end() ){ - return d_def[reps[depth]].evaluate_r( m, reps, depth+1 ); - }else{ - int ei = getEvIndex( m, reps[depth] ); - return d_def[d_def_order[ei]].evaluate_r( m, reps, depth+1 ); - } - } -} -Node QIntDef::evaluate_n_r( FirstOrderModelQInt * m, Node n, unsigned depth ) { - if( depth==n.getNumChildren() ){ - Assert( d_def_order.size()==1 ); - return d_def_order[0]; - }else{ - Node r = m->getUsedRepresentative( n[depth] ); - if( d_def.find( r )!=d_def.end() ){ - return d_def[r].evaluate_n_r( m, n, depth+1 ); - }else{ - int ei = getEvIndex( m, r ); - return d_def[d_def_order[ei]].evaluate_n_r( m, n, depth+1 ); - } - } -} - - - -QIntDef * QIntDef::getChild( unsigned i ) { - Assert( i l; - std::vector< Node > u; - getLowers( l ); - getUppers( u ); - QIntDef::debugPrint( c, d_fm, d_q, l, u ); - Trace( c ) << " -> " << getValue() << std::endl; -} - -void QIntDefIter::resetIndex( QIntDef * qid ){ - //std::cout << "check : " << qid << " " << qid->d_def_order.size() << " " << qid->d_def.size() << std::endl; - if( !qid->d_def.empty() ){ - //std::cout << "add to visited " << qid << std::endl; - d_index.push_back( 0 ); - d_index_visited.push_back( qid ); - resetIndex( qid->getChild( 0 ) ); - } -} - -bool QIntDefIter::increment( int index ) { - if( !isFinished() ){ - index = index==-1 ? (int)(d_index.size()-1) : index; - while( (int)(d_index.size()-1)>index ){ - //std::cout << "remove from visit 1 " << std::endl; - d_index.pop_back(); - d_index_visited.pop_back(); - } - while( index>=0 && d_index[index]>=(int)(d_index_visited[index]->d_def_order.size()-1) ){ - //std::cout << "remove from visit " << d_index_visited[ d_index_visited.size()-1 ] << std::endl; - d_index.pop_back(); - d_index_visited.pop_back(); - index--; - } - if( index>=0 ){ - //std::cout << "increment at index = " << index << std::endl; - d_index[index]++; - resetIndex( d_index_visited[index]->getChild( d_index[index] ) ); - return true; - }else{ - d_index.clear(); - return false; - } - }else{ - return false; - } -} - -Node QIntDefIter::getLower( int index ) { - if( d_index[index]==0 && !d_q.isNull() ){ - int pnum = d_fm->getVarOrder( d_q )->getPrevNum( index ); - if( pnum!=-1 ){ - return getLower( pnum ); - } - } - return d_index_visited[index]->getLower( d_index[index] ); -} - -Node QIntDefIter::getUpper( int index ) { - return d_index_visited[index]->getUpper( d_index[index] ); -} - -void QIntDefIter::getLowers( std::vector< Node >& reps ) { - for( unsigned i=0; igetVarOrder( d_q )->getPrevNum( i ); - if( pnum!=-1 ){ - added = true; - reps.push_back( reps[pnum] ); - } - } - if( !added ){ - reps.push_back( getLower( i ) ); - } - } -} - -void QIntDefIter::getUppers( std::vector< Node >& reps ) { - for( unsigned i=0; igetChild( d_index[d_index.size()-1] )->getValue(); -} - - -//------------------------variable ordering---------------------------- - -QuantVarOrder::QuantVarOrder( Node q ) : d_q( q ) { - d_var_count = 0; - initialize( q[1], 0, d_var_occur ); -} - -int QuantVarOrder::initialize( Node n, int minVarIndex, QIntVarNumIndex& vindex ) { - if( n.getKind()!=FORALL ){ - //std::vector< Node > vars; - //std::vector< int > args; - int procVarOn = n.getKind()==APPLY_UF ? 0 : 1; - for( int r=0; r<=procVarOn; r++ ){ - for( unsigned i=0; i=minVarIndex ){ - occ_index = d_var_to_num[n[i]][j]; - } - } - if( occ_index==-1 ){ - //need to assign new - d_num_to_var[d_var_count] = n[i]; - if( !d_var_to_num[n[i]].empty() ){ - int v = d_var_to_num[n[i]][ d_var_to_num[n[i]].size()-1 ]; - d_num_to_prev_num[ d_var_count ] = v; - d_num_to_next_num[ v ] = d_var_count; - } - d_var_num_index[ d_var_count ] = d_var_to_num[n[i]].size(); - d_var_to_num[n[i]].push_back( d_var_count ); - occ_index = d_var_count; - d_var_count++; - } - vindex.d_var_num[i] = occ_index; - minVarIndex = occ_index; - }else if( r==0 ){ - minVarIndex = initialize( n[i], minVarIndex, vindex.d_var_index[i] ); - } - } - } - } - return minVarIndex; -} - -bool QuantVarOrder::getInstantiation( FirstOrderModelQInt * m, std::vector< Node >& l, std::vector< Node >& u, - std::vector< Node >& inst ) { - Debug("qint-var-order-debug2") << "Get for " << d_q << " " << l.size() << " " << u.size() << std::endl; - for( unsigned i=0; igetMaximum( d_q[0][i].getType() ); - for( unsigned j=0; jdoMeet( l[index], u[index], cl, cu, ll, uu ) ){ - Debug("qint-var-order-debug2") << "FAILED" << std::endl; - return false; - } - Debug("qint-var-order-debug2") << "Result : " << ll << " " << uu << std::endl; - } - Debug("qint-var-order-debug2") << "Got " << uu << std::endl; - inst.push_back( uu ); - } - return true; -} - -void QuantVarOrder::debugPrint( const char * c ) { - Trace( c ) << "Variable order for " << d_q << " is : " << std::endl; - debugPrint( c, d_q[1], d_var_occur ); - Trace( c ) << std::endl; - for( unsigned i=0; i0 ) Trace( c ) << ","; - Trace( c ) << " "; - if( n[i].getKind()==BOUND_VARIABLE ){ - Trace(c) << "VAR[" << vindex.d_var_num[i] << "]"; - }else{ - debugPrint( c, n[i], vindex.d_var_index[i] ); - } - if( i==n.getNumChildren()-1 ) Trace( c ) << " "; - } - Trace(c) << ")"; - } -} - -QIntervalBuilder::QIntervalBuilder( context::Context* c, QuantifiersEngine* qe ) : -QModelBuilder( c, qe ){ - d_true = NodeManager::currentNM()->mkConst( true ); -} - - -//------------------------model construction---------------------------- - -void QIntervalBuilder::processBuildModel(TheoryModel* m, bool fullModel) { - Trace("fmf-qint-debug") << "process build model " << fullModel << std::endl; - FirstOrderModel* f = (FirstOrderModel*)m; - FirstOrderModelQInt* fm = f->asFirstOrderModelQInt(); - if( fullModel ){ - Trace("qint-model") << "Construct model representation..." << std::endl; - //make function values - for( std::map::iterator it = fm->d_models.begin(); it != fm->d_models.end(); ++it ) { - if( it->first.getType().getNumChildren()>1 ){ - Trace("qint-model") << "Construct for " << it->first << "..." << std::endl; - m->d_uf_models[ it->first ] = fm->getFunctionValue( it->first, "$x" ); - } - } - TheoryEngineModelBuilder::processBuildModel( m, fullModel ); - //mark that the model has been set - fm->markModelSet(); - //debug the model - debugModel( fm ); - }else{ - fm->initialize( d_considerAxioms ); - //process representatives - fm->d_rep_id.clear(); - fm->d_max.clear(); - fm->d_min.clear(); - Trace("qint-model") << std::endl << "Making representatives..." << std::endl; - for( std::map< TypeNode, std::vector< Node > >::iterator it = fm->d_rep_set.d_type_reps.begin(); - it != fm->d_rep_set.d_type_reps.end(); ++it ){ - if( it->first.isSort() ){ - if( it->second.empty() ){ - std::cout << "Empty rep for " << it->first << std::endl; - exit(0); - } - Trace("qint-model") << "Representatives for " << it->first << " : " << std::endl; - for( unsigned i=0; isecond.size(); i++ ){ - Trace("qint-model") << i << " : " << it->second[i] << std::endl; - fm->d_rep_id[it->second[i]] = i; - } - fm->d_min[it->first] = it->second[0]; - fm->d_max[it->first] = it->second[it->second.size()-1]; - }else{ - //TODO: enumerate? - } - } - Trace("qint-model") << std::endl << "Making function definitions..." << std::endl; - //construct the models for functions - for( std::map::iterator it = fm->d_models.begin(); it != fm->d_models.end(); ++it ) { - Node f = it->first; - Trace("qint-model-debug") << "Building Model for " << f << std::endl; - //reset the model - //get all (non-redundant) f-applications - std::vector< Node > fapps; - Trace("qint-model-debug") << "Initial terms: " << std::endl; - for( size_t i=0; id_uf_terms[f].size(); i++ ){ - Node n = fm->d_uf_terms[f][i]; - if( !n.getAttribute(NoMatchAttribute()) ){ - Trace("qint-model-debug") << " " << n << std::endl; - fapps.push_back( n ); - } - } - if( fapps.empty() ){ - //choose arbitrary value - Node mbt = d_qe->getTermDatabase()->getModelBasisOpTerm(f); - Trace("qint-model-debug") << "Initial terms empty, add " << mbt << std::endl; - fapps.push_back( mbt ); - } - //construct the interval model - it->second->construct( fm, fapps ); - Trace("qint-model-debug") << "Definition for " << f << " : " << std::endl; - it->second->debugPrint("qint-model-debug", fm, Node::null() ); - - it->second->simplify( fm, Node::null() ); - Trace("qint-model") << "(Simplified) definition for " << f << " : " << std::endl; - it->second->debugPrint("qint-model", fm, Node::null() ); - - if( Debug.isOn("qint-model-debug") ){ - for( size_t i=0; id_uf_terms[f].size(); i++ ){ - Node e = it->second->evaluate_n( fm, fm->d_uf_terms[f][i] ); - Debug("qint-model-debug") << fm->d_uf_terms[f][i] << " evaluates to " << e << std::endl; - Assert( fm->areEqual( e, fm->d_uf_terms[f][i] ) ); - } - } - } - } -} - - -//--------------------model checking--------------------------------------- - -//do exhaustive instantiation -bool QIntervalBuilder::doExhaustiveInstantiation( FirstOrderModel * fm, Node q, int effort ) { - Trace("qint-check") << "exhaustive instantiation " << q << " " << effort << std::endl; - if (effort==0) { - - FirstOrderModelQInt * fmqint = fm->asFirstOrderModelQInt(); - QIntDef qid; - doCheck( fmqint, q, qid, q[1], fmqint->d_var_order[q]->d_var_occur ); - //now process entries - Trace("qint-inst") << "Interpretation for " << q << " is : " << std::endl; - qid.debugPrint( "qint-inst", fmqint, q ); - Trace("qint-inst") << std::endl; - Debug("qint-check-debug2") << "Make iterator..." << std::endl; - QIntDefIter qdi( fmqint, q, &qid ); - while( !qdi.isFinished() ){ - if( qdi.getValue()!=d_true ){ - Debug("qint-check-debug2") << "Set up vectors..." << std::endl; - std::vector< Node > l; - std::vector< Node > u; - std::vector< Node > inst; - qdi.getLowers( l ); - qdi.getUppers( u ); - Debug("qint-check-debug2") << "Get instantiation..." << std::endl; - if( fmqint->d_var_order[q]->getInstantiation( fmqint, l, u, inst ) ){ - Trace("qint-inst") << "** Instantiate with "; - //just add the instance - for( unsigned j=0; jaddInstantiation( q, inst ) ){ - Trace("qint-inst") << " ...added instantiation." << std::endl; - d_addedLemmas++; - }else{ - Trace("qint-inst") << " ...duplicate instantiation" << std::endl; - //verify that instantiation is witness for current entry - if( Debug.isOn("qint-check-debug2") ){ - Debug("qint-check-debug2") << "Check if : "; - std::vector< Node > exp_inst; - for( unsigned i=0; igetOrderedNumVars( q ); i++ ){ - int index = fmqint->getOrderedVarNumToVarNum( q, i ); - exp_inst.push_back( inst[ index ] ); - Debug("qint-check-debug2") << inst[index] << " "; - } - Debug("qint-check-debug2") << " evaluates to " << qdi.getValue() << std::endl; - Assert( qid.evaluate( fmqint, exp_inst )==qdi.getValue() ); - } - } - }else{ - Trace("qint-inst") << "** Spurious instantiation." << std::endl; - } - } - qdi.increment(); - } - } - return true; -} - -bool QIntervalBuilder::doCheck( FirstOrderModelQInt * m, Node q, QIntDef & qid, Node n, - QIntVarNumIndex& vindex ) { - Assert( n.getKind()!=FORALL ); - std::map< unsigned, QIntDef > children; - std::map< unsigned, Node > bchildren; - int varChCount = 0; - for( unsigned i=0; ihasTerm( n[i] ) ){ - bchildren[i] = m->getUsedRepresentative( n[i] ); - }else{ - if( !doCheck( m, q, children[i], n[i], vindex.d_var_index[i] ) ){ - bchildren[i] = Node::null(); - } - } - } - Trace("qint-check-debug") << "Compute Interpretation of " << n << " " << n.getKind() << std::endl; - if( n.getKind() == APPLY_UF || n.getKind() == VARIABLE || n.getKind() == SKOLEM ){ - Node op = n.getKind() == APPLY_UF ? n.getOperator() : n; - //uninterpreted compose - qid.construct_compose( m, q, n, m->d_models[op], children, bchildren, varChCount, vindex ); - }else if( !qid.construct_compose( m, q, n, NULL, children, bchildren, varChCount, vindex ) ){ - Trace("qint-check-debug") << "** Cannot produce definition for " << n << std::endl; - return false; - } - Trace("qint-check-debug2") << "Definition for " << n << " is : " << std::endl; - qid.debugPrint("qint-check-debug2", m, q); - qid.simplify( m, q ); - Trace("qint-check-debug") << "(Simplified) Definition for " << n << " is : " << std::endl; - qid.debugPrint("qint-check-debug", m, q); - Trace("qint-check-debug") << std::endl; - Assert( qid.isTotal( m, q ) ); - return true; -} +/********************* */ +/*! \file qinterval_builder.cpp + ** \verbatim + ** Original author: Andrew Reynolds + ** Major contributors: none + ** Minor contributors (to current version): none + ** This file is part of the CVC4 project. + ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** See the file COPYING in the top-level source directory for licensing + ** information.\endverbatim + ** + ** \brief Implementation of qinterval builder + **/ + + +#include "theory/quantifiers/qinterval_builder.h" +#include "theory/quantifiers/term_database.h" + + +using namespace std; +using namespace CVC4; +using namespace CVC4::kind; +using namespace CVC4::context; +using namespace CVC4::theory; +using namespace CVC4::theory::quantifiers; + +//lower bound is exclusive +//upper bound is inclusive + +struct QIntSort +{ + FirstOrderModelQInt * m; + bool operator() (Node i, Node j) { + return m->isLessThan( i, j ); + } +}; + +void QIntDef::init_vec( FirstOrderModelQInt * m, Node q, std::vector< Node >& l, std::vector< Node >& u ) { + for( unsigned i=0; igetOrderedNumVars( q ); i++ ){ + l.push_back( Node::null() ); + u.push_back( m->getMaximum( m->getOrderedVarType( q, i ) ) ); + } +} + +void QIntDef::debugPrint( const char * c, FirstOrderModelQInt * m, Node q, std::vector< Node >& l, std::vector< Node >& u ) +{ + Trace(c) << "( "; + for( unsigned i=0; i0 ) Trace(c) << ", "; + //Trace(c) << l[i] << "..." << u[i]; + int lindex = l[i].isNull() ? 0 : m->getRepId( l[i] ) + 1; + int uindex = m->getRepId( u[i] ); + Trace(c) << lindex << "..." << uindex; + } + Trace(c) << " )"; +} + + +int QIntDef::getEvIndex( FirstOrderModelQInt * m, Node n, bool exc ) { + if( n.isNull() ){ + Assert( exc ); + return 0; + }else{ + int min = 0; + int max = (int)(d_def_order.size()-1); + while( min!=max ){ + int index = (min+max)/2; + Assert( index>=0 && index<(int)d_def_order.size() ); + if( n==d_def_order[index] ){ + max = index; + min = index; + }else if( m->isLessThan( n, d_def_order[index] ) ){ + max = index; + }else{ + min = index+1; + } + } + if( n==d_def_order[min] && exc ){ + min++; + } + Assert( min>=0 && min<(int)d_def_order.size() ); + if( ( min!=0 && !m->isLessThan( d_def_order[min-1], n ) && ( !exc || d_def_order[min-1]!=n ) ) || + ( ( exc || d_def_order[min]!=n ) && !m->isLessThan( n, d_def_order[min] ) ) ){ + Debug("qint-error") << "ERR size : " << d_def_order.size() << ", exc : " << exc << std::endl; + for( unsigned i=0; igetRepId( d_def_order[i] ) << std::endl; + } + Debug("qint-error") << " : " << n << " " << min << " " << m->getRepId( n ) << std::endl; + } + + Assert( min==0 || m->isLessThan( d_def_order[min-1], n ) || ( exc && d_def_order[min-1]==n ) ); + Assert( ( !exc && n==d_def_order[min] ) || m->isLessThan( n, d_def_order[min] ) ); + return min; + } +} + +void QIntDef::addEntry( FirstOrderModelQInt * m, Node q, std::vector< Node >& l, std::vector< Node >& u, + Node v, unsigned depth ) { + if( depth==0 ){ + Trace("qint-compose-debug") << "Add entry "; + debugPrint( "qint-compose-debug", m, q, l, u ); + Trace("qint-compose-debug") << " -> " << v << "..." << std::endl; + } + //Assert( false ); + if( depth==u.size() ){ + Assert( d_def_order.empty() ); + Assert( v.isNull() || v.isConst() || ( v.getType().isSort() && m->getRepId( v )!=-1 ) ); + d_def_order.push_back( v ); + }else{ + /* + if( !d_def_order.empty() && + ( l[depth].isNull() || m->isLessThan( l[depth], d_def_order[d_def_order.size()-1] ) ) ){ + int startEvIndex = getEvIndex( m, l[depth], true ); + int endEvIndex; + if( m->isLessThan( u[depth], d_def_order[d_def_order.size()-1] ) ){ + endEvIndex = getEvIndex( m, u[depth] ); + }else{ + endEvIndex = d_def_order.size()-1; + } + Trace("qint-compose-debug2") << this << " adding for bounds " << l[depth] << "..." << u[depth] << std::endl; + for( int i=startEvIndex; i<=endEvIndex; i++ ){ + Trace("qint-compose-debug2") << this << " add entry " << d_def_order[i] << std::endl; + d_def[d_def_order[i]].addEntry( m, q, l, u, v, depth+1 ); + } + } + if( !d_def_order.empty() && + d_def.find(u[depth])==d_def.end() && + !m->isLessThan( d_def_order[d_def_order.size()-1], u[depth] ) ){ + Trace("qint-compose-debug2") << "Bad : depth : " << depth << std::endl; + } + Assert( d_def_order.empty() || + d_def.find(u[depth])!=d_def.end() || + m->isLessThan( d_def_order[d_def_order.size()-1], u[depth] ) ); + + if( d_def_order.empty() || m->isLessThan( d_def_order[d_def_order.size()-1], u[depth] ) ){ + Trace("qint-compose-debug2") << this << " add entry new : " << u[depth] << std::endl; + d_def_order.push_back( u[depth] ); + d_def[u[depth]].addEntry( m, q, l, u, v, depth+1 ); + } + */ + //%%%%%% + bool success = true; + int nnum = m->getVarOrder( q )->getNextNum( depth ); + Node pl; + Node pu; + if( nnum!=-1 ){ + Trace("qint-compose-debug2") << "...adding entry #" << depth << " is #" << nnum << std::endl; + //Assert( l[nnum].isNull() || l[nnum]==l[depth] || m->isLessThan( l[nnum], l[depth] ) ); + //Assert( u[nnum]==u[depth] || m->isLessThan( u[depth], u[nnum] ) ); + pl = l[nnum]; + pu = u[nnum]; + if( !m->doMeet( l[nnum], u[nnum], l[depth], u[depth], l[nnum], u[nnum] ) ){ + success = false; + } + } + //%%%%%% + if( success ){ + Node r = u[depth]; + if( d_def.find( r )!=d_def.end() ){ + d_def[r].addEntry( m, q, l, u, v, depth+1 ); + }else{ + if( !d_def_order.empty() && + !m->isLessThan( d_def_order[d_def_order.size()-1], u[depth] ) ){ + Trace("qint-compose-debug2") << "Bad : depth : " << depth << " "; + Trace("qint-compose-debug2") << d_def_order[d_def_order.size()-1] << " " << u[depth] << std::endl; + } + Assert( d_def_order.empty() || m->isLessThan( d_def_order[d_def_order.size()-1], r ) ); + d_def_order.push_back( r ); + d_def[r].addEntry( m, q, l, u, v, depth+1 ); + } + } + if( nnum!=-1 ){ + l[nnum] = pl; + u[nnum] = pu; + } + } +} + +Node QIntDef::simplify_r( FirstOrderModelQInt * m, Node q, std::vector< Node >& il, std::vector< Node >& iu, + unsigned depth ) { + if( d_def.empty() ){ + if( d_def_order.size()!=0 ){ + Debug("qint-error") << "Simplify, size = " << d_def_order.size() << std::endl; + } + Assert( d_def_order.size()==1 ); + return d_def_order[0]; + }else{ + Assert( !d_def_order.empty() ); + std::vector< Node > newDefs; + Node curr; + for( unsigned i=0; i0 ){ + if( n==curr && !n.isNull() ){ + d_def.erase( d_def_order[i-1] ); + }else{ + newDefs.push_back( d_def_order[i-1] ); + } + } + curr = n; + } + newDefs.push_back( d_def_order[d_def_order.size()-1] ); + d_def_order.clear(); + d_def_order.insert( d_def_order.end(), newDefs.begin(), newDefs.end() ); + return d_def_order.size()==1 ? curr : Node::null(); + } +} + +Node QIntDef::simplify( FirstOrderModelQInt * m, Node q ) { + std::vector< Node > l; + std::vector< Node > u; + if( !q.isNull() ){ + //init_vec( m, q, l, u ); + } + return simplify_r( m, q, l, u, 0 ); +} + +bool QIntDef::isTotal_r( FirstOrderModelQInt * m, Node q, std::vector< Node >& l, std::vector< Node >& u, + unsigned depth ) { + if( d_def_order.empty() ){ + return false; + }else if( d_def.empty() ){ + return true; + }else{ + //get the current maximum + Node mx; + if( !q.isNull() ){ + int pnum = m->getVarOrder( q )->getPrevNum( depth ); + if( pnum!=-1 ){ + mx = u[pnum]; + } + } + if( mx.isNull() ){ + mx = m->getMaximum( d_def_order[d_def_order.size()-1].getType() ); + } + //if not current maximum + if( d_def_order[d_def_order.size()-1]!=mx ){ + return false; + }else{ + Node pu = u[depth]; + for( unsigned i=0; i l; + std::vector< Node > u; + if( !q.isNull() ){ + init_vec( m, q, l, u ); + } + return isTotal_r( m, q, l, u, 0 ); +} + +void QIntDef::construct_compose_r( FirstOrderModelQInt * m, Node q, + std::vector< Node >& l, std::vector< Node >& u, + Node n, QIntDef * f, + std::vector< Node >& args, + std::map< unsigned, QIntDef >& children, + std::map< unsigned, Node >& bchildren, + QIntVarNumIndex& vindex, unsigned depth ) { + //check for short circuit + if( !f ){ + if( !args.empty() ){ + if( ( n.getKind()==OR && args[args.size()-1]==m->d_true ) || + ( n.getKind()==AND && args[args.size()-1]==m->d_false ) ){ + addEntry( m, q, l, u, args[args.size()-1] ); + return; + } + } + } + + for( unsigned i=0; i0 ) Trace("qint-compose") << ", "; + //Trace("qint-compose") << l[i] << "..." << u[i]; + int lindex = l[i].isNull() ? 0 : m->getRepId( l[i] ) + 1; + int uindex = m->getRepId( u[i] ); + Trace( "qint-compose" ) << lindex << "..." << uindex; + } + Trace("qint-compose") << " )..."; + + //finished? + if( ( f && f->d_def.empty() ) || args.size()==n.getNumChildren() ){ + if( f ){ + Assert( f->d_def_order.size()==1 ); + Trace("qint-compose") << "UVALUE(" << f->d_def_order[0] << ")" << std::endl; + addEntry( m, q, l, u, f->d_def_order[0] ); + }else{ + Node nn; + bool nnSet = false; + for( unsigned i=0; imkConst( args[0]==args[1] ); + }else{ + //apply the operator to args + nn = NodeManager::currentNM()->mkNode( n.getKind(), args ); + nn = Rewriter::rewrite( nn ); + } + } + Trace("qint-compose") << "IVALUE(" << nn << ")" << std::endl; + addEntry( m, q, l, u, nn ); + Trace("qint-compose-debug2") << "...added entry." << std::endl; + } + }else{ + //if a non-simple child + if( children.find( depth )!=children.end() ){ + //*************************** + Trace("qint-compose") << "compound child, recurse" << std::endl; + std::vector< int > currIndex; + std::vector< int > endIndex; + std::vector< Node > prevL; + std::vector< Node > prevU; + std::vector< QIntDef * > visited; + do{ + Assert( currIndex.size()==visited.size() ); + + //populate the vectors + while( visited.size()getOrderedNumVars( q ) ){ + unsigned i = visited.size(); + QIntDef * qq = visited.empty() ? &children[depth] : visited[i-1]->getChild( currIndex[i-1] ); + visited.push_back( qq ); + Node qq_mx = qq->getMaximum(); + Trace("qint-compose-debug2") << "...Get ev indices " << i << " " << l[i] << " " << u[i] << std::endl; + currIndex.push_back( qq->getEvIndex( m, l[i], true ) ); + Trace("qint-compose-debug2") << "...Done get curr index " << currIndex[currIndex.size()-1] << std::endl; + if( m->isLessThan( qq_mx, u[i] ) ){ + endIndex.push_back( qq->getNumChildren()-1 ); + }else{ + endIndex.push_back( qq->getEvIndex( m, u[i] ) ); + } + Trace("qint-compose-debug2") << "...Done get end index " << endIndex[endIndex.size()-1] << std::endl; + prevL.push_back( l[i] ); + prevU.push_back( u[i] ); + if( !m->doMeet( prevL[i], prevU[i], + qq->getLower( currIndex[i] ), qq->getUpper( currIndex[i] ), l[i], u[i] ) ){ + Assert( false ); + } + } + for( unsigned i=0; igetChild( currIndex[activeIndex] ); + if( f ){ + int fIndex = f->getEvIndex( m, qa->getValue() ); + construct_compose_r( m, q, l, u, n, f->getChild( fIndex ), args, children, bchildren, vindex, depth+1 ); + }else{ + args.push_back( qa->getValue() ); + construct_compose_r( m, q, l, u, n, f, args, children, bchildren, vindex, depth+1 ); + args.pop_back(); + } + + //increment the index (if possible) + while( activeIndex>=0 && currIndex[activeIndex]==endIndex[activeIndex] ){ + currIndex.pop_back(); + endIndex.pop_back(); + l[activeIndex] = prevL[activeIndex]; + u[activeIndex] = prevU[activeIndex]; + prevL.pop_back(); + prevU.pop_back(); + visited.pop_back(); + activeIndex--; + } + if( activeIndex>=0 ){ + for( unsigned i=0; idoMeet( prevL[activeIndex], prevU[activeIndex], + visited[activeIndex]->getLower( currIndex[activeIndex] ), + visited[activeIndex]->getUpper( currIndex[activeIndex] ), + l[activeIndex], u[activeIndex] ) ){ + Assert( false ); + } + } + }while( !visited.empty() ); + //*************************** + }else{ + Assert( bchildren.find( depth )!=bchildren.end() ); + Node v = bchildren[depth]; + if( f ){ + if( v.getKind()==BOUND_VARIABLE ){ + int vn = vindex.d_var_num[depth]; + Trace("qint-compose") << "variable #" << vn << ", recurse" << std::endl; + //int vn = m->getOrderedVarOccurId( q, n, depth ); + Trace("qint-compose-debug") << "-process " << v << ", which is var #" << vn << std::endl; + Node lprev = l[vn]; + Node uprev = u[vn]; + //restrict to last variable in order + int pnum = m->getVarOrder( q )->getPrevNum( vn ); + if( pnum!=-1 ){ + Trace("qint-compose-debug") << "-restrict to var #" << pnum << " " << l[pnum] << " " << u[pnum] << std::endl; + l[vn] = l[pnum]; + u[vn] = u[pnum]; + } + int startIndex = f->getEvIndex( m, l[vn], true ); + int endIndex = f->getEvIndex( m, u[vn] ); + Trace("qint-compose-debug") << "--will process " << startIndex << " " << endIndex << std::endl; + for( int i=startIndex; i<=endIndex; i++ ){ + if( m->doMeet( lprev, uprev, f->getLower( i ), f->getUpper( i ), l[vn], u[vn] ) ){ + construct_compose_r( m, q, l, u, n, f->getChild( i ), args, children, bchildren, vindex, depth+1 ); + }else{ + Assert( false ); + } + } + l[vn] = lprev; + u[vn] = uprev; + }else{ + Trace("qint-compose") << "value, recurse" << std::endl; + //simple + int ei = f->getEvIndex( m, v ); + construct_compose_r( m, q, l, u, n, f->getChild( ei ), args, children, bchildren, vindex, depth+1 ); + } + }else{ + Trace("qint-compose") << "value, recurse" << std::endl; + args.push_back( v ); + construct_compose_r( m, q, l, u, n, f, args, children, bchildren, vindex, depth+1 ); + args.pop_back(); + } + } + } +} + + +void QIntDef::construct_enum_r( FirstOrderModelQInt * m, Node q, unsigned vn, unsigned depth, Node v ) { + if( depth==m->getOrderedNumVars( q ) ){ + Assert( !v.isNull() ); + d_def_order.push_back( v ); + }else{ + TypeNode tn = m->getOrderedVarType( q, depth ); + //int vnum = m->getVarOrder( q )->getVar( depth )== + if( depth==vn ){ + for( unsigned i=0; id_rep_set.d_type_reps[tn].size(); i++ ){ + Node vv = m->d_rep_set.d_type_reps[tn][i]; + d_def_order.push_back( vv ); + d_def[vv].construct_enum_r( m, q, vn, depth+1, vv ); + } + }else if( m->getVarOrder( q )->getVar( depth )==m->getVarOrder( q )->getVar( vn ) && depth>vn ){ + d_def_order.push_back( v ); + d_def[v].construct_enum_r( m, q, vn, depth+1, v ); + }else{ + Node mx = m->getMaximum( tn ); + d_def_order.push_back( mx ); + d_def[mx].construct_enum_r( m, q, vn, depth+1, v ); + } + } +} + +bool QIntDef::construct_enum( FirstOrderModelQInt * m, Node q, unsigned vn ) { + TypeNode tn = m->getOrderedVarType( q, vn ); + if( tn.isSort() ){ + construct_enum_r( m, q, vn, 0, Node::null() ); + return true; + }else{ + return false; + } +} + +bool QIntDef::construct_compose( FirstOrderModelQInt * m, Node q, Node n, QIntDef * f, + std::map< unsigned, QIntDef >& children, + std::map< unsigned, Node >& bchildren, int varChCount, + QIntVarNumIndex& vindex ) { + Trace("qint-compose") << "Do " << (f ? "uninterpreted" : "interpreted"); + Trace("qint-compose") << " compose, var count = " << varChCount << "..." << std::endl; + std::vector< Node > l; + std::vector< Node > u; + init_vec( m, q, l, u ); + if( varChCount==0 || f ){ + //standard (no variable child) interpreted compose, or uninterpreted compose + std::vector< Node > args; + construct_compose_r( m, q, l, u, n, f, args, children, bchildren, vindex, 0 ); + }else{ + //special cases + bool success = false; + int varIndex = ( bchildren.find( 0 )!=bchildren.end() && bchildren[0].getKind()==BOUND_VARIABLE ) ? 0 : 1; + if( varChCount>1 ){ + if( n.getKind()==EQUAL ){ + //make it an enumeration + unsigned vn = vindex.d_var_num[0]; + if( children[0].construct_enum( m, q, vn ) ){ + bchildren.erase( 0 ); + varIndex = 1; + success = true; + } + } + }else{ + success = n.getKind()==EQUAL; + } + if( success ){ + int oIndex = varIndex==0 ? 1 : 0; + Node v = bchildren[varIndex]; + unsigned vn = vindex.d_var_num[varIndex]; + if( children.find( oIndex )==children.end() ){ + Assert( bchildren.find( oIndex )!=bchildren.end() ); + Node at = bchildren[oIndex]; + Trace("qint-icompose") << "Basic child, " << at << " with var " << v << std::endl; + Node prev = m->getPrev( bchildren[oIndex].getType(), bchildren[oIndex] ); + Node above = u[vn]; + if( !prev.isNull() ){ + u[vn] = prev; + addEntry( m, q, l, u, NodeManager::currentNM()->mkConst( false ) ); + } + l[vn] = prev; + u[vn] = at; + addEntry( m, q, l, u, NodeManager::currentNM()->mkConst( true ) ); + if( at!=above ){ + l[vn] = at; + u[vn] = above; + addEntry( m, q, l, u, NodeManager::currentNM()->mkConst( false ) ); + } + }else{ + QIntDef * qid = &children[oIndex]; + qid->debugPrint("qint-icompose", m, q ); + Trace("qint-icompose") << " against variable..." << v << ", which is var #" << vn << std::endl; + + TypeNode tn = v.getType(); + QIntDefIter qdi( m, q, qid ); + while( !qdi.isFinished() ){ + std::vector< Node > us; + qdi.getUppers( us ); + std::vector< Node > ls; + qdi.getLowers( ls ); + qdi.debugPrint( "qint-icompose" ); + + Node n_below = ls[vn]; + Node n_prev = m->getPrev( tn, qdi.getValue() ); + Node n_at = qdi.getValue(); + Node n_above = us[vn]; + Trace("qint-icompose") << n_below << " < " << n_prev << " < " << n_at << " < " << n_above << std::endl; + if( n.getKind()==EQUAL ){ + bool atLtAbove = m->isLessThan( n_at, n_above ); + Node currL = n_below; + if( n_at==n_above || atLtAbove ){ + //add for value (at-1) + if( !n_prev.isNull() && ( n_below.isNull() || m->isLessThan( n_below, n_prev ) ) ){ + ls[vn] = currL; + us[vn] = n_prev; + currL = n_prev; + Trace("qint-icompose") << "-add entry(-) at " << ls[vn] << "..." << us[vn] << std::endl; + addEntry( m, q, ls, us, NodeManager::currentNM()->mkConst( false ) ); + } + //add for value (at) + if( ( n_below.isNull() || m->isLessThan( n_below, n_at ) ) && atLtAbove ){ + ls[vn] = currL; + us[vn] = n_at; + currL = n_at; + Trace("qint-icompose") << "-add entry(=) at " << ls[vn] << "..." << us[vn] << std::endl; + addEntry( m, q, ls, us, NodeManager::currentNM()->mkConst( true ) ); + } + } + ls[vn] = currL; + us[vn] = n_above; + Trace("qint-icompose") << "-add entry(+) at " << ls[vn] << "..." << us[vn] << std::endl; + addEntry( m, q, ls, us, NodeManager::currentNM()->mkConst( n_at==n_above ) ); + }else{ + return false; + } + qdi.increment(); + + Trace("qint-icompose-debug") << "Now : " << std::endl; + debugPrint("qint-icompose-debug", m, q ); + Trace("qint-icompose-debug") << std::endl; + } + } + + Trace("qint-icompose") << "Result : " << std::endl; + debugPrint("qint-icompose", m, q ); + Trace("qint-icompose") << std::endl; + + }else{ + return false; + } + } + Trace("qint-compose") << "Done i-compose" << std::endl; + return true; +} + + +void QIntDef::construct( FirstOrderModelQInt * m, std::vector< Node >& fapps, unsigned depth ) { + d_def.clear(); + d_def_order.clear(); + Assert( !fapps.empty() ); + if( depth==fapps[0].getNumChildren() ){ + //get representative in model for this term + Assert( fapps.size()>=1 ); + Node r = m->getUsedRepresentative( fapps[0] ); + d_def_order.push_back( r ); + }else{ + std::map< Node, std::vector< Node > > fapp_child; + //partition based on evaluations of fapps[1][depth]....fapps[n][depth] + for( unsigned i=0; igetUsedRepresentative( fapps[i][depth] ); + fapp_child[r].push_back( fapps[i] ); + } + //sort by QIntSort + for( std::map< Node, std::vector< Node > >::iterator it = fapp_child.begin(); it != fapp_child.end(); ++it ){ + d_def_order.push_back( it->first ); + } + QIntSort qis; + qis.m = m; + std::sort( d_def_order.begin(), d_def_order.end(), qis ); + //construct children + for( unsigned i=0; igetMaximum( d_def_order[i].getType() ); + } + Debug("qint-model-debug2") << "Construct for " << n << ", terms = " << fapp_child[n].size() << std::endl; + d_def[d_def_order[i]].construct( m, fapp_child[n], depth+1 ); + } + } +} + +Node QIntDef::getFunctionValue( FirstOrderModelQInt * m, std::vector< Node >& vars, unsigned depth ) { + if( d_def.empty() ){ + Assert( d_def_order.size()==1 ); + //must convert to actual domain constant + if( d_def_order[0].getType().isSort() ){ + return m->d_rep_set.d_type_reps[ d_def_order[0].getType() ][ m->getRepId( d_def_order[0] ) ]; + }else{ + return m->getUsedRepresentative( d_def_order[0] ); + } + }else{ + TypeNode tn = vars[depth].getType(); + Node curr; + int rep_id = m->d_rep_set.getNumRepresentatives( tn ); + for( int i=(int)(d_def_order.size()-1); i>=0; i-- ){ + int curr_rep_id = i==0 ? 0 : m->getRepId( d_def_order[i-1] )+1; + Node ccurr = d_def[d_def_order[i]].getFunctionValue( m, vars, depth+1 ); + if( curr.isNull() ){ + curr = ccurr; + }else{ + std::vector< Node > c; + Assert( curr_rep_idd_rep_set.d_type_reps[tn][j] ) ); + } + Node cond = c.size()==1 ? c[0] : NodeManager::currentNM()->mkNode( OR, c ); + curr = NodeManager::currentNM()->mkNode( ITE, cond, ccurr, curr ); + } + rep_id = curr_rep_id; + } + return curr; + } +} + +Node QIntDef::evaluate_r( FirstOrderModelQInt * m, std::vector< Node >& reps, unsigned depth ) { + if( depth==reps.size() ){ + Assert( d_def_order.size()==1 ); + return d_def_order[0]; + }else{ + if( d_def.find( reps[depth] )!=d_def.end() ){ + return d_def[reps[depth]].evaluate_r( m, reps, depth+1 ); + }else{ + int ei = getEvIndex( m, reps[depth] ); + return d_def[d_def_order[ei]].evaluate_r( m, reps, depth+1 ); + } + } +} +Node QIntDef::evaluate_n_r( FirstOrderModelQInt * m, Node n, unsigned depth ) { + if( depth==n.getNumChildren() ){ + Assert( d_def_order.size()==1 ); + return d_def_order[0]; + }else{ + Node r = m->getUsedRepresentative( n[depth] ); + if( d_def.find( r )!=d_def.end() ){ + return d_def[r].evaluate_n_r( m, n, depth+1 ); + }else{ + int ei = getEvIndex( m, r ); + return d_def[d_def_order[ei]].evaluate_n_r( m, n, depth+1 ); + } + } +} + + + +QIntDef * QIntDef::getChild( unsigned i ) { + Assert( i l; + std::vector< Node > u; + getLowers( l ); + getUppers( u ); + QIntDef::debugPrint( c, d_fm, d_q, l, u ); + Trace( c ) << " -> " << getValue() << std::endl; +} + +void QIntDefIter::resetIndex( QIntDef * qid ){ + //std::cout << "check : " << qid << " " << qid->d_def_order.size() << " " << qid->d_def.size() << std::endl; + if( !qid->d_def.empty() ){ + //std::cout << "add to visited " << qid << std::endl; + d_index.push_back( 0 ); + d_index_visited.push_back( qid ); + resetIndex( qid->getChild( 0 ) ); + } +} + +bool QIntDefIter::increment( int index ) { + if( !isFinished() ){ + index = index==-1 ? (int)(d_index.size()-1) : index; + while( (int)(d_index.size()-1)>index ){ + //std::cout << "remove from visit 1 " << std::endl; + d_index.pop_back(); + d_index_visited.pop_back(); + } + while( index>=0 && d_index[index]>=(int)(d_index_visited[index]->d_def_order.size()-1) ){ + //std::cout << "remove from visit " << d_index_visited[ d_index_visited.size()-1 ] << std::endl; + d_index.pop_back(); + d_index_visited.pop_back(); + index--; + } + if( index>=0 ){ + //std::cout << "increment at index = " << index << std::endl; + d_index[index]++; + resetIndex( d_index_visited[index]->getChild( d_index[index] ) ); + return true; + }else{ + d_index.clear(); + return false; + } + }else{ + return false; + } +} + +Node QIntDefIter::getLower( int index ) { + if( d_index[index]==0 && !d_q.isNull() ){ + int pnum = d_fm->getVarOrder( d_q )->getPrevNum( index ); + if( pnum!=-1 ){ + return getLower( pnum ); + } + } + return d_index_visited[index]->getLower( d_index[index] ); +} + +Node QIntDefIter::getUpper( int index ) { + return d_index_visited[index]->getUpper( d_index[index] ); +} + +void QIntDefIter::getLowers( std::vector< Node >& reps ) { + for( unsigned i=0; igetVarOrder( d_q )->getPrevNum( i ); + if( pnum!=-1 ){ + added = true; + reps.push_back( reps[pnum] ); + } + } + if( !added ){ + reps.push_back( getLower( i ) ); + } + } +} + +void QIntDefIter::getUppers( std::vector< Node >& reps ) { + for( unsigned i=0; igetChild( d_index[d_index.size()-1] )->getValue(); +} + + +//------------------------variable ordering---------------------------- + +QuantVarOrder::QuantVarOrder( Node q ) : d_q( q ) { + d_var_count = 0; + initialize( q[1], 0, d_var_occur ); +} + +int QuantVarOrder::initialize( Node n, int minVarIndex, QIntVarNumIndex& vindex ) { + if( n.getKind()!=FORALL ){ + //std::vector< Node > vars; + //std::vector< int > args; + int procVarOn = n.getKind()==APPLY_UF ? 0 : 1; + for( int r=0; r<=procVarOn; r++ ){ + for( unsigned i=0; i=minVarIndex ){ + occ_index = d_var_to_num[n[i]][j]; + } + } + if( occ_index==-1 ){ + //need to assign new + d_num_to_var[d_var_count] = n[i]; + if( !d_var_to_num[n[i]].empty() ){ + int v = d_var_to_num[n[i]][ d_var_to_num[n[i]].size()-1 ]; + d_num_to_prev_num[ d_var_count ] = v; + d_num_to_next_num[ v ] = d_var_count; + } + d_var_num_index[ d_var_count ] = d_var_to_num[n[i]].size(); + d_var_to_num[n[i]].push_back( d_var_count ); + occ_index = d_var_count; + d_var_count++; + } + vindex.d_var_num[i] = occ_index; + minVarIndex = occ_index; + }else if( r==0 ){ + minVarIndex = initialize( n[i], minVarIndex, vindex.d_var_index[i] ); + } + } + } + } + return minVarIndex; +} + +bool QuantVarOrder::getInstantiation( FirstOrderModelQInt * m, std::vector< Node >& l, std::vector< Node >& u, + std::vector< Node >& inst ) { + Debug("qint-var-order-debug2") << "Get for " << d_q << " " << l.size() << " " << u.size() << std::endl; + for( unsigned i=0; igetMaximum( d_q[0][i].getType() ); + for( unsigned j=0; jdoMeet( l[index], u[index], cl, cu, ll, uu ) ){ + Debug("qint-var-order-debug2") << "FAILED" << std::endl; + return false; + } + Debug("qint-var-order-debug2") << "Result : " << ll << " " << uu << std::endl; + } + Debug("qint-var-order-debug2") << "Got " << uu << std::endl; + inst.push_back( uu ); + } + return true; +} + +void QuantVarOrder::debugPrint( const char * c ) { + Trace( c ) << "Variable order for " << d_q << " is : " << std::endl; + debugPrint( c, d_q[1], d_var_occur ); + Trace( c ) << std::endl; + for( unsigned i=0; i0 ) Trace( c ) << ","; + Trace( c ) << " "; + if( n[i].getKind()==BOUND_VARIABLE ){ + Trace(c) << "VAR[" << vindex.d_var_num[i] << "]"; + }else{ + debugPrint( c, n[i], vindex.d_var_index[i] ); + } + if( i==n.getNumChildren()-1 ) Trace( c ) << " "; + } + Trace(c) << ")"; + } +} + +QIntervalBuilder::QIntervalBuilder( context::Context* c, QuantifiersEngine* qe ) : +QModelBuilder( c, qe ){ + d_true = NodeManager::currentNM()->mkConst( true ); +} + + +//------------------------model construction---------------------------- + +void QIntervalBuilder::processBuildModel(TheoryModel* m, bool fullModel) { + Trace("fmf-qint-debug") << "process build model " << fullModel << std::endl; + FirstOrderModel* f = (FirstOrderModel*)m; + FirstOrderModelQInt* fm = f->asFirstOrderModelQInt(); + if( fullModel ){ + Trace("qint-model") << "Construct model representation..." << std::endl; + //make function values + for( std::map::iterator it = fm->d_models.begin(); it != fm->d_models.end(); ++it ) { + if( it->first.getType().getNumChildren()>1 ){ + Trace("qint-model") << "Construct for " << it->first << "..." << std::endl; + m->d_uf_models[ it->first ] = fm->getFunctionValue( it->first, "$x" ); + } + } + TheoryEngineModelBuilder::processBuildModel( m, fullModel ); + //mark that the model has been set + fm->markModelSet(); + //debug the model + debugModel( fm ); + }else{ + fm->initialize( d_considerAxioms ); + //process representatives + fm->d_rep_id.clear(); + fm->d_max.clear(); + fm->d_min.clear(); + Trace("qint-model") << std::endl << "Making representatives..." << std::endl; + for( std::map< TypeNode, std::vector< Node > >::iterator it = fm->d_rep_set.d_type_reps.begin(); + it != fm->d_rep_set.d_type_reps.end(); ++it ){ + if( it->first.isSort() ){ + if( it->second.empty() ){ + std::cout << "Empty rep for " << it->first << std::endl; + exit(0); + } + Trace("qint-model") << "Representatives for " << it->first << " : " << std::endl; + for( unsigned i=0; isecond.size(); i++ ){ + Trace("qint-model") << i << " : " << it->second[i] << std::endl; + fm->d_rep_id[it->second[i]] = i; + } + fm->d_min[it->first] = it->second[0]; + fm->d_max[it->first] = it->second[it->second.size()-1]; + }else{ + //TODO: enumerate? + } + } + Trace("qint-model") << std::endl << "Making function definitions..." << std::endl; + //construct the models for functions + for( std::map::iterator it = fm->d_models.begin(); it != fm->d_models.end(); ++it ) { + Node f = it->first; + Trace("qint-model-debug") << "Building Model for " << f << std::endl; + //reset the model + //get all (non-redundant) f-applications + std::vector< Node > fapps; + Trace("qint-model-debug") << "Initial terms: " << std::endl; + for( size_t i=0; id_uf_terms[f].size(); i++ ){ + Node n = fm->d_uf_terms[f][i]; + if( !n.getAttribute(NoMatchAttribute()) ){ + Trace("qint-model-debug") << " " << n << std::endl; + fapps.push_back( n ); + } + } + if( fapps.empty() ){ + //choose arbitrary value + Node mbt = d_qe->getTermDatabase()->getModelBasisOpTerm(f); + Trace("qint-model-debug") << "Initial terms empty, add " << mbt << std::endl; + fapps.push_back( mbt ); + } + //construct the interval model + it->second->construct( fm, fapps ); + Trace("qint-model-debug") << "Definition for " << f << " : " << std::endl; + it->second->debugPrint("qint-model-debug", fm, Node::null() ); + + it->second->simplify( fm, Node::null() ); + Trace("qint-model") << "(Simplified) definition for " << f << " : " << std::endl; + it->second->debugPrint("qint-model", fm, Node::null() ); + + if( Debug.isOn("qint-model-debug") ){ + for( size_t i=0; id_uf_terms[f].size(); i++ ){ + Node e = it->second->evaluate_n( fm, fm->d_uf_terms[f][i] ); + Debug("qint-model-debug") << fm->d_uf_terms[f][i] << " evaluates to " << e << std::endl; + Assert( fm->areEqual( e, fm->d_uf_terms[f][i] ) ); + } + } + } + } +} + + +//--------------------model checking--------------------------------------- + +//do exhaustive instantiation +bool QIntervalBuilder::doExhaustiveInstantiation( FirstOrderModel * fm, Node q, int effort ) { + Trace("qint-check") << "exhaustive instantiation " << q << " " << effort << std::endl; + if (effort==0) { + + FirstOrderModelQInt * fmqint = fm->asFirstOrderModelQInt(); + QIntDef qid; + doCheck( fmqint, q, qid, q[1], fmqint->d_var_order[q]->d_var_occur ); + //now process entries + Trace("qint-inst") << "Interpretation for " << q << " is : " << std::endl; + qid.debugPrint( "qint-inst", fmqint, q ); + Trace("qint-inst") << std::endl; + Debug("qint-check-debug2") << "Make iterator..." << std::endl; + QIntDefIter qdi( fmqint, q, &qid ); + while( !qdi.isFinished() ){ + if( qdi.getValue()!=d_true ){ + Debug("qint-check-debug2") << "Set up vectors..." << std::endl; + std::vector< Node > l; + std::vector< Node > u; + std::vector< Node > inst; + qdi.getLowers( l ); + qdi.getUppers( u ); + Debug("qint-check-debug2") << "Get instantiation..." << std::endl; + if( fmqint->d_var_order[q]->getInstantiation( fmqint, l, u, inst ) ){ + Trace("qint-inst") << "** Instantiate with "; + //just add the instance + for( unsigned j=0; jaddInstantiation( q, inst ) ){ + Trace("qint-inst") << " ...added instantiation." << std::endl; + d_addedLemmas++; + }else{ + Trace("qint-inst") << " ...duplicate instantiation" << std::endl; + //verify that instantiation is witness for current entry + if( Debug.isOn("qint-check-debug2") ){ + Debug("qint-check-debug2") << "Check if : "; + std::vector< Node > exp_inst; + for( unsigned i=0; igetOrderedNumVars( q ); i++ ){ + int index = fmqint->getOrderedVarNumToVarNum( q, i ); + exp_inst.push_back( inst[ index ] ); + Debug("qint-check-debug2") << inst[index] << " "; + } + Debug("qint-check-debug2") << " evaluates to " << qdi.getValue() << std::endl; + Assert( qid.evaluate( fmqint, exp_inst )==qdi.getValue() ); + } + } + }else{ + Trace("qint-inst") << "** Spurious instantiation." << std::endl; + } + } + qdi.increment(); + } + } + return true; +} + +bool QIntervalBuilder::doCheck( FirstOrderModelQInt * m, Node q, QIntDef & qid, Node n, + QIntVarNumIndex& vindex ) { + Assert( n.getKind()!=FORALL ); + std::map< unsigned, QIntDef > children; + std::map< unsigned, Node > bchildren; + int varChCount = 0; + for( unsigned i=0; ihasTerm( n[i] ) ){ + bchildren[i] = m->getUsedRepresentative( n[i] ); + }else{ + if( !doCheck( m, q, children[i], n[i], vindex.d_var_index[i] ) ){ + bchildren[i] = Node::null(); + } + } + } + Trace("qint-check-debug") << "Compute Interpretation of " << n << " " << n.getKind() << std::endl; + if( n.getKind() == APPLY_UF || n.getKind() == VARIABLE || n.getKind() == SKOLEM ){ + Node op = n.getKind() == APPLY_UF ? n.getOperator() : n; + //uninterpreted compose + qid.construct_compose( m, q, n, m->d_models[op], children, bchildren, varChCount, vindex ); + }else if( !qid.construct_compose( m, q, n, NULL, children, bchildren, varChCount, vindex ) ){ + Trace("qint-check-debug") << "** Cannot produce definition for " << n << std::endl; + return false; + } + Trace("qint-check-debug2") << "Definition for " << n << " is : " << std::endl; + qid.debugPrint("qint-check-debug2", m, q); + qid.simplify( m, q ); + Trace("qint-check-debug") << "(Simplified) Definition for " << n << " is : " << std::endl; + qid.debugPrint("qint-check-debug", m, q); + Trace("qint-check-debug") << std::endl; + Assert( qid.isTotal( m, q ) ); + return true; +} diff --git a/src/theory/quantifiers/qinterval_builder.h b/src/theory/quantifiers/qinterval_builder.h index 8f48776cc..6ec17756c 100755 --- a/src/theory/quantifiers/qinterval_builder.h +++ b/src/theory/quantifiers/qinterval_builder.h @@ -1,155 +1,155 @@ -/********************* */ -/*! \file qinterval_builder.h - ** \verbatim - ** Original author: Andrew Reynolds - ** Major contributors: none - ** Minor contributors (to current version): none - ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa - ** See the file COPYING in the top-level source directory for licensing - ** information.\endverbatim - ** - ** \brief qinterval model class - **/ - -#include "cvc4_private.h" - -#ifndef QINTERVAL_BUILDER -#define QINTERVAL_BUILDER - -#include "theory/quantifiers/model_builder.h" -#include "theory/quantifiers/first_order_model.h" - -namespace CVC4 { -namespace theory { -namespace quantifiers { - -class FirstOrderModelQInt; - -class QIntVarNumIndex -{ -public: - std::map< int, int > d_var_num; - std::map< int, QIntVarNumIndex > d_var_index; -}; - -class QIntDef -{ -private: - Node evaluate_r( FirstOrderModelQInt * m, std::vector< Node >& reps, unsigned depth ); - Node evaluate_n_r( FirstOrderModelQInt * m, Node n, unsigned depth ); - void construct_compose_r( FirstOrderModelQInt * m, Node q, - std::vector< Node >& l, std::vector< Node >& u, Node n, QIntDef * f, - std::vector< Node >& args, - std::map< unsigned, QIntDef >& children, - std::map< unsigned, Node >& bchildren, - QIntVarNumIndex& vindex, - unsigned depth ); - - void construct_enum_r( FirstOrderModelQInt * m, Node q, unsigned vn, unsigned depth, Node v ); - int getEvIndex( FirstOrderModelQInt * m, Node n, bool exc = false ); - void addEntry( FirstOrderModelQInt * m, Node q, std::vector< Node >& l, std::vector< Node >& u, - Node v, unsigned depth = 0 ); - Node simplify_r( FirstOrderModelQInt * m, Node q, std::vector< Node >& il, std::vector< Node >& iu, - unsigned depth ); - bool isTotal_r( FirstOrderModelQInt * m, Node q, std::vector< Node >& il, std::vector< Node >& iu, - unsigned depth ); -public: - QIntDef(){} - std::map< Node, QIntDef > d_def; - std::vector< Node > d_def_order; - - void construct( FirstOrderModelQInt * m, std::vector< Node >& fapps, unsigned depth = 0 ); - bool construct_compose( FirstOrderModelQInt * m, Node q, Node n, QIntDef * f, - std::map< unsigned, QIntDef >& children, - std::map< unsigned, Node >& bchildren, int varChCount, - QIntVarNumIndex& vindex ); - bool construct_enum( FirstOrderModelQInt * m, Node q, unsigned vn ); - - Node evaluate( FirstOrderModelQInt * m, std::vector< Node >& reps ) { return evaluate_r( m, reps, 0 ); } - Node evaluate_n( FirstOrderModelQInt * m, Node n ) { return evaluate_n_r( m, n, 0 ); } - - void debugPrint( const char * c, FirstOrderModelQInt * m, Node q, int t = 0 ); - QIntDef * getChild( unsigned i ); - Node getValue() { return d_def_order[0]; } - Node getLower( unsigned i ) { return i==0 ? Node::null() : d_def_order[i-1]; } - Node getUpper( unsigned i ) { return d_def_order[i]; } - Node getMaximum() { return d_def_order.empty() ? Node::null() : getUpper( d_def_order.size()-1 ); } - int getNumChildren() { return d_def_order.size(); } - bool isTotal( FirstOrderModelQInt * m, Node q ); - - Node simplify( FirstOrderModelQInt * m, Node q ); - Node getFunctionValue( FirstOrderModelQInt * m, std::vector< Node >& vars, unsigned depth = 0 ); - - static void init_vec( FirstOrderModelQInt * m, Node q, std::vector< Node >& l, std::vector< Node >& u ); - static void debugPrint( const char * c, FirstOrderModelQInt * m, Node q, std::vector< Node >& l, std::vector< Node >& u ); -}; - -class QIntDefIter { -private: - FirstOrderModelQInt * d_fm; - Node d_q; - void resetIndex( QIntDef * qid ); -public: - QIntDefIter( FirstOrderModelQInt * m, Node q, QIntDef * qid ); - void debugPrint( const char * c, int t = 0 ); - std::vector< QIntDef * > d_index_visited; - std::vector< int > d_index; - bool isFinished() { return d_index.empty(); } - bool increment( int index = -1 ); - unsigned getSize() { return d_index.size(); } - Node getLower( int index ); - Node getUpper( int index ); - void getLowers( std::vector< Node >& reps ); - void getUppers( std::vector< Node >& reps ); - Node getValue(); -}; - - -class QuantVarOrder -{ -private: - int initialize( Node n, int minVarIndex, QIntVarNumIndex& vindex ); - int d_var_count; - Node d_q; - void debugPrint( const char * c, Node n, QIntVarNumIndex& vindex ); -public: - QuantVarOrder( Node q ); - std::map< int, Node > d_num_to_var; - std::map< int, int > d_num_to_prev_num; - std::map< int, int > d_num_to_next_num; - std::map< Node, std::vector< int > > d_var_to_num; - std::map< int, int > d_var_num_index; - //std::map< Node, std::map< int, int > > d_var_occur; - //int getVarNum( Node n, int arg ) { return d_var_occur[n][arg]; } - unsigned getNumVars() { return d_var_count; } - Node getVar( int i ) { return d_num_to_var[i]; } - int getPrevNum( int i ) { return d_num_to_prev_num.find( i )!=d_num_to_prev_num.end() ? d_num_to_prev_num[i] : -1; } - int getNextNum( int i ) { return d_num_to_next_num.find( i )!=d_num_to_next_num.end() ? d_num_to_next_num[i] : -1; } - int getVarNumIndex( int i ) { return d_var_num_index[i]; } - bool getInstantiation( FirstOrderModelQInt * m, std::vector< Node >& l, std::vector< Node >& u, - std::vector< Node >& inst ); - void debugPrint( const char * c ); - QIntVarNumIndex d_var_occur; -}; - -class QIntervalBuilder : public QModelBuilder -{ -private: - Node d_true; - bool doCheck( FirstOrderModelQInt * m, Node q, QIntDef & qid, Node n, - QIntVarNumIndex& vindex ); -public: - QIntervalBuilder( context::Context* c, QuantifiersEngine* qe ); - //process build model - void processBuildModel(TheoryModel* m, bool fullModel); - //do exhaustive instantiation - bool doExhaustiveInstantiation( FirstOrderModel * fm, Node q, int effort ); -}; - - -} -} -} - +/********************* */ +/*! \file qinterval_builder.h + ** \verbatim + ** Original author: Andrew Reynolds + ** Major contributors: none + ** Minor contributors (to current version): none + ** This file is part of the CVC4 project. + ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** See the file COPYING in the top-level source directory for licensing + ** information.\endverbatim + ** + ** \brief qinterval model class + **/ + +#include "cvc4_private.h" + +#ifndef QINTERVAL_BUILDER +#define QINTERVAL_BUILDER + +#include "theory/quantifiers/model_builder.h" +#include "theory/quantifiers/first_order_model.h" + +namespace CVC4 { +namespace theory { +namespace quantifiers { + +class FirstOrderModelQInt; + +class QIntVarNumIndex +{ +public: + std::map< int, int > d_var_num; + std::map< int, QIntVarNumIndex > d_var_index; +}; + +class QIntDef +{ +private: + Node evaluate_r( FirstOrderModelQInt * m, std::vector< Node >& reps, unsigned depth ); + Node evaluate_n_r( FirstOrderModelQInt * m, Node n, unsigned depth ); + void construct_compose_r( FirstOrderModelQInt * m, Node q, + std::vector< Node >& l, std::vector< Node >& u, Node n, QIntDef * f, + std::vector< Node >& args, + std::map< unsigned, QIntDef >& children, + std::map< unsigned, Node >& bchildren, + QIntVarNumIndex& vindex, + unsigned depth ); + + void construct_enum_r( FirstOrderModelQInt * m, Node q, unsigned vn, unsigned depth, Node v ); + int getEvIndex( FirstOrderModelQInt * m, Node n, bool exc = false ); + void addEntry( FirstOrderModelQInt * m, Node q, std::vector< Node >& l, std::vector< Node >& u, + Node v, unsigned depth = 0 ); + Node simplify_r( FirstOrderModelQInt * m, Node q, std::vector< Node >& il, std::vector< Node >& iu, + unsigned depth ); + bool isTotal_r( FirstOrderModelQInt * m, Node q, std::vector< Node >& il, std::vector< Node >& iu, + unsigned depth ); +public: + QIntDef(){} + std::map< Node, QIntDef > d_def; + std::vector< Node > d_def_order; + + void construct( FirstOrderModelQInt * m, std::vector< Node >& fapps, unsigned depth = 0 ); + bool construct_compose( FirstOrderModelQInt * m, Node q, Node n, QIntDef * f, + std::map< unsigned, QIntDef >& children, + std::map< unsigned, Node >& bchildren, int varChCount, + QIntVarNumIndex& vindex ); + bool construct_enum( FirstOrderModelQInt * m, Node q, unsigned vn ); + + Node evaluate( FirstOrderModelQInt * m, std::vector< Node >& reps ) { return evaluate_r( m, reps, 0 ); } + Node evaluate_n( FirstOrderModelQInt * m, Node n ) { return evaluate_n_r( m, n, 0 ); } + + void debugPrint( const char * c, FirstOrderModelQInt * m, Node q, int t = 0 ); + QIntDef * getChild( unsigned i ); + Node getValue() { return d_def_order[0]; } + Node getLower( unsigned i ) { return i==0 ? Node::null() : d_def_order[i-1]; } + Node getUpper( unsigned i ) { return d_def_order[i]; } + Node getMaximum() { return d_def_order.empty() ? Node::null() : getUpper( d_def_order.size()-1 ); } + int getNumChildren() { return d_def_order.size(); } + bool isTotal( FirstOrderModelQInt * m, Node q ); + + Node simplify( FirstOrderModelQInt * m, Node q ); + Node getFunctionValue( FirstOrderModelQInt * m, std::vector< Node >& vars, unsigned depth = 0 ); + + static void init_vec( FirstOrderModelQInt * m, Node q, std::vector< Node >& l, std::vector< Node >& u ); + static void debugPrint( const char * c, FirstOrderModelQInt * m, Node q, std::vector< Node >& l, std::vector< Node >& u ); +}; + +class QIntDefIter { +private: + FirstOrderModelQInt * d_fm; + Node d_q; + void resetIndex( QIntDef * qid ); +public: + QIntDefIter( FirstOrderModelQInt * m, Node q, QIntDef * qid ); + void debugPrint( const char * c, int t = 0 ); + std::vector< QIntDef * > d_index_visited; + std::vector< int > d_index; + bool isFinished() { return d_index.empty(); } + bool increment( int index = -1 ); + unsigned getSize() { return d_index.size(); } + Node getLower( int index ); + Node getUpper( int index ); + void getLowers( std::vector< Node >& reps ); + void getUppers( std::vector< Node >& reps ); + Node getValue(); +}; + + +class QuantVarOrder +{ +private: + int initialize( Node n, int minVarIndex, QIntVarNumIndex& vindex ); + int d_var_count; + Node d_q; + void debugPrint( const char * c, Node n, QIntVarNumIndex& vindex ); +public: + QuantVarOrder( Node q ); + std::map< int, Node > d_num_to_var; + std::map< int, int > d_num_to_prev_num; + std::map< int, int > d_num_to_next_num; + std::map< Node, std::vector< int > > d_var_to_num; + std::map< int, int > d_var_num_index; + //std::map< Node, std::map< int, int > > d_var_occur; + //int getVarNum( Node n, int arg ) { return d_var_occur[n][arg]; } + unsigned getNumVars() { return d_var_count; } + Node getVar( int i ) { return d_num_to_var[i]; } + int getPrevNum( int i ) { return d_num_to_prev_num.find( i )!=d_num_to_prev_num.end() ? d_num_to_prev_num[i] : -1; } + int getNextNum( int i ) { return d_num_to_next_num.find( i )!=d_num_to_next_num.end() ? d_num_to_next_num[i] : -1; } + int getVarNumIndex( int i ) { return d_var_num_index[i]; } + bool getInstantiation( FirstOrderModelQInt * m, std::vector< Node >& l, std::vector< Node >& u, + std::vector< Node >& inst ); + void debugPrint( const char * c ); + QIntVarNumIndex d_var_occur; +}; + +class QIntervalBuilder : public QModelBuilder +{ +private: + Node d_true; + bool doCheck( FirstOrderModelQInt * m, Node q, QIntDef & qid, Node n, + QIntVarNumIndex& vindex ); +public: + QIntervalBuilder( context::Context* c, QuantifiersEngine* qe ); + //process build model + void processBuildModel(TheoryModel* m, bool fullModel); + //do exhaustive instantiation + bool doExhaustiveInstantiation( FirstOrderModel * fm, Node q, int effort ); +}; + + +} +} +} + #endif \ No newline at end of file diff --git a/src/theory/quantifiers/quant_conflict_find.cpp b/src/theory/quantifiers/quant_conflict_find.cpp index 731b53dc4..8321f17ba 100755 --- a/src/theory/quantifiers/quant_conflict_find.cpp +++ b/src/theory/quantifiers/quant_conflict_find.cpp @@ -1,2529 +1,2529 @@ -/********************* */ -/*! \file quant_conflict_find.cpp - ** \verbatim - ** Original author: Andrew Reynolds - ** Major contributors: none - ** Minor contributors (to current version): none - ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa - ** See the file COPYING in the top-level source directory for licensing - ** information.\endverbatim - ** - ** \brief quant conflict find class - ** - **/ - -#include - -#include "theory/quantifiers/quant_conflict_find.h" -#include "theory/quantifiers/quant_util.h" -#include "theory/theory_engine.h" -#include "theory/quantifiers/options.h" -#include "theory/quantifiers/term_database.h" -#include "theory/quantifiers/trigger.h" - -using namespace CVC4; -using namespace CVC4::kind; -using namespace CVC4::theory; -using namespace CVC4::theory::quantifiers; -using namespace std; - -namespace CVC4 { - -Node QcfNodeIndex::existsTerm( TNode n, std::vector< TNode >& reps, int index ) { - if( index==(int)reps.size() ){ - if( d_children.empty() ){ - return Node::null(); - }else{ - return d_children.begin()->first; - } - }else{ - std::map< TNode, QcfNodeIndex >::iterator it = d_children.find( reps[index] ); - if( it==d_children.end() ){ - return Node::null(); - }else{ - return it->second.existsTerm( n, reps, index+1 ); - } - } -} - -Node QcfNodeIndex::addTerm( TNode n, std::vector< TNode >& reps, int index ) { - if( index==(int)reps.size() ){ - if( d_children.empty() ){ - d_children[ n ].clear(); - return n; - }else{ - return d_children.begin()->first; - } - }else{ - return d_children[reps[index]].addTerm( n, reps, index+1 ); - } -} - - -void QcfNodeIndex::debugPrint( const char * c, int t ) { - for( std::map< TNode, QcfNodeIndex >::iterator it = d_children.begin(); it != d_children.end(); ++it ){ - if( !it->first.isNull() ){ - for( int j=0; jfirst << " : " << std::endl; - it->second.debugPrint( c, t+1 ); - } - } -} - - -void QuantInfo::initialize( Node q, Node qn ) { - d_q = q; - for( unsigned i=0; iisValid() ){ - /* - for( unsigned j=0; jsetInvalid(); - break; - } - } - */ - if( d_mg->isValid() ){ - for( unsigned j=q[0].getNumChildren(); jisValid() ){ - Trace("qcf-invalid") << "QCF invalid : cannot match for " << d_vars[j] << std::endl; - d_mg->setInvalid(); - break; - }else{ - std::vector< int > bvars; - d_var_mg[j]->determineVariableOrder( this, bvars ); - } - } - } - if( d_mg->isValid() ){ - std::vector< int > bvars; - d_mg->determineVariableOrder( this, bvars ); - } - } - }else{ - Trace("qcf-invalid") << "QCF invalid : body of formula cannot be processed." << std::endl; - } - Trace("qcf-qregister-summary") << "QCF register : " << ( d_mg->isValid() ? "VALID " : "INVALID" ) << " : " << q << std::endl; -} - -void QuantInfo::registerNode( Node n, bool hasPol, bool pol, bool beneathQuant ) { - Trace("qcf-qregister-debug2") << "Register : " << n << std::endl; - if( n.getKind()==FORALL ){ - registerNode( n[1], hasPol, pol, true ); - }else{ - if( !MatchGen::isHandledBoolConnective( n ) ){ - if( n.hasBoundVar() ){ - //literals - if( n.getKind()==EQUAL ){ - for( unsigned i=0; id_parent = qcf; - //qcf->d_child[i] = qcfc; - registerNode( n[i], newHasPol, newPol, beneathQuant ); - } - } - } -} - -void QuantInfo::flatten( Node n, bool beneathQuant ) { - Trace("qcf-qregister-debug2") << "Flatten : " << n << std::endl; - if( n.hasBoundVar() ){ - if( n.getKind()==BOUND_VARIABLE ){ - d_inMatchConstraint[n] = true; - } - //if( MatchGen::isHandledUfTerm( n ) || n.getKind()==ITE ){ - if( d_var_num.find( n )==d_var_num.end() ){ - Trace("qcf-qregister-debug2") << "Add FLATTEN VAR : " << n << std::endl; - d_var_num[n] = d_vars.size(); - d_vars.push_back( n ); - d_match.push_back( TNode::null() ); - d_match_term.push_back( TNode::null() ); - if( n.getKind()==ITE ){ - registerNode( n, false, false ); - }else{ - for( unsigned i=0; i >::iterator it = d_var_constraint[r].begin(); - it != d_var_constraint[r].end(); ++it ){ - for( unsigned j=0; jsecond.size(); j++ ){ - Node rr = it->second[j]; - if( !isVar( rr ) ){ - rr = p->getRepresentative( rr ); - } - if( addConstraint( p, it->first, rr, r==0 )==-1 ){ - d_var_constraint[0].clear(); - d_var_constraint[1].clear(); - //quantified formula is actually equivalent to true - Trace("qcf-qregister") << "Quantifier is equivalent to true!!!" << std::endl; - d_mg->d_children.clear(); - d_mg->d_n = NodeManager::currentNM()->mkConst( true ); - d_mg->d_type = MatchGen::typ_ground; - return; - } - } - } - } - d_mg->reset_round( p ); - for( std::map< int, MatchGen * >::iterator it = d_var_mg.begin(); it != d_var_mg.end(); ++it ){ - it->second->reset_round( p ); - } - //now, reset for matching - d_mg->reset( p, false, this ); -} - -int QuantInfo::getCurrentRepVar( int v ) { - if( v!=-1 && !d_match[v].isNull() ){ - int vn = getVarNum( d_match[v] ); - if( vn!=-1 ){ - //int vr = getCurrentRepVar( vn ); - //d_match[v] = d_vars[vr]; - //return vr; - return getCurrentRepVar( vn ); - } - } - return v; -} - -TNode QuantInfo::getCurrentValue( TNode n ) { - int v = getVarNum( n ); - if( v==-1 ){ - return n; - }else{ - if( d_match[v].isNull() ){ - return n; - }else{ - Assert( getVarNum( d_match[v] )!=v ); - return getCurrentValue( d_match[v] ); - } - } -} - -TNode QuantInfo::getCurrentExpValue( TNode n ) { - int v = getVarNum( n ); - if( v==-1 ){ - return n; - }else{ - if( d_match[v].isNull() ){ - return n; - }else{ - Assert( getVarNum( d_match[v] )!=v ); - if( d_match_term[v].isNull() ){ - return getCurrentValue( d_match[v] ); - }else{ - return d_match_term[v]; - } - } - } -} - -bool QuantInfo::getCurrentCanBeEqual( QuantConflictFind * p, int v, TNode n, bool chDiseq ) { - //check disequalities - std::map< int, std::map< TNode, int > >::iterator itd = d_curr_var_deq.find( v ); - if( itd!=d_curr_var_deq.end() ){ - for( std::map< TNode, int >::iterator it = itd->second.begin(); it != itd->second.end(); ++it ){ - Node cv = getCurrentValue( it->first ); - Debug("qcf-ccbe") << "compare " << cv << " " << n << std::endl; - if( cv==n ){ - return false; - }else if( chDiseq && !isVar( n ) && !isVar( cv ) ){ - //they must actually be disequal if we are looking for conflicts - if( !p->areDisequal( n, cv ) ){ - //TODO : check for entailed disequal - - return false; - } - } - } - } - return true; -} - -int QuantInfo::addConstraint( QuantConflictFind * p, int v, TNode n, bool polarity ) { - v = getCurrentRepVar( v ); - int vn = getVarNum( n ); - vn = vn==-1 ? -1 : getCurrentRepVar( vn ); - n = getCurrentValue( n ); - return addConstraint( p, v, n, vn, polarity, false ); -} - -int QuantInfo::addConstraint( QuantConflictFind * p, int v, TNode n, int vn, bool polarity, bool doRemove ) { - //for handling equalities between variables, and disequalities involving variables - Debug("qcf-match-debug") << "- " << (doRemove ? "un" : "" ) << "constrain : " << v << " -> " << n << " (cv=" << getCurrentValue( n ) << ")"; - Debug("qcf-match-debug") << ", (vn=" << vn << "), polarity = " << polarity << std::endl; - Assert( doRemove || n==getCurrentValue( n ) ); - Assert( doRemove || v==getCurrentRepVar( v ) ); - Assert( doRemove || vn==getCurrentRepVar( getVarNum( n ) ) ); - if( polarity ){ - if( vn!=v ){ - if( doRemove ){ - if( vn!=-1 ){ - //if set to this in the opposite direction, clean up opposite instead - // std::map< int, TNode >::iterator itmn = d_match.find( vn ); - if( d_match[vn]==d_vars[v] ){ - return addConstraint( p, vn, d_vars[v], v, true, true ); - }else{ - //unsetting variables equal - std::map< int, std::map< TNode, int > >::iterator itd = d_curr_var_deq.find( vn ); - if( itd!=d_curr_var_deq.end() ){ - //remove disequalities owned by this - std::vector< TNode > remDeq; - for( std::map< TNode, int >::iterator it = itd->second.begin(); it != itd->second.end(); ++it ){ - if( it->second==v ){ - remDeq.push_back( it->first ); - } - } - for( unsigned i=0; i::iterator itm = d_match.find( v ); - - if( vn!=-1 ){ - Debug("qcf-match-debug") << " ...Variable bound to variable" << std::endl; - //std::map< int, TNode >::iterator itmn = d_match.find( vn ); - if( d_match[v].isNull() ){ - //setting variables equal - bool alreadySet = false; - if( !d_match[vn].isNull() ){ - alreadySet = true; - Assert( !isVar( d_match[vn] ) ); - } - - //copy or check disequalities - std::map< int, std::map< TNode, int > >::iterator itd = d_curr_var_deq.find( v ); - if( itd!=d_curr_var_deq.end() ){ - for( std::map< TNode, int >::iterator it = itd->second.begin(); it != itd->second.end(); ++it ){ - Node dv = getCurrentValue( it->first ); - if( !alreadySet ){ - if( d_curr_var_deq[vn].find( dv )==d_curr_var_deq[vn].end() ){ - d_curr_var_deq[vn][dv] = v; - } - }else{ - if( !p->areMatchDisequal( d_match[vn], dv ) ){ - Debug("qcf-match-debug") << " -> fail, conflicting disequality" << std::endl; - return -1; - } - } - } - } - if( alreadySet ){ - n = getCurrentValue( n ); - } - }else{ - if( d_match[vn].isNull() ){ - Debug("qcf-match-debug") << " ...Reverse direction" << std::endl; - //set the opposite direction - return addConstraint( p, vn, d_vars[v], v, true, false ); - }else{ - Debug("qcf-match-debug") << " -> Both variables bound, compare" << std::endl; - //are they currently equal - return p->areMatchEqual( d_match[v], d_match[vn] ) ? 0 : -1; - } - } - }else{ - Debug("qcf-match-debug") << " ...Variable bound to ground" << std::endl; - if( d_match[v].isNull() ){ - }else{ - //compare ground values - Debug("qcf-match-debug") << " -> Ground value, compare " << d_match[v] << " "<< n << std::endl; - return p->areMatchEqual( d_match[v], n ) ? 0 : -1; - } - } - if( setMatch( p, v, n ) ){ - Debug("qcf-match-debug") << " -> success" << std::endl; - return 1; - }else{ - Debug("qcf-match-debug") << " -> fail, conflicting disequality" << std::endl; - return -1; - } - } - }else{ - Debug("qcf-match-debug") << " -> redundant, variable identity" << std::endl; - return 0; - } - }else{ - if( vn==v ){ - Debug("qcf-match-debug") << " -> fail, variable identity" << std::endl; - return -1; - }else{ - if( doRemove ){ - Assert( d_curr_var_deq[v].find( n )!=d_curr_var_deq[v].end() ); - d_curr_var_deq[v].erase( n ); - return 1; - }else{ - if( d_curr_var_deq[v].find( n )==d_curr_var_deq[v].end() ){ - //check if it respects equality - //std::map< int, TNode >::iterator itm = d_match.find( v ); - if( !d_match[v].isNull() ){ - TNode nv = getCurrentValue( n ); - if( !p->areMatchDisequal( nv, d_match[v] ) ){ - Debug("qcf-match-debug") << " -> fail, conflicting disequality" << std::endl; - return -1; - } - } - d_curr_var_deq[v][n] = v; - Debug("qcf-match-debug") << " -> success" << std::endl; - return 1; - }else{ - Debug("qcf-match-debug") << " -> redundant disequality" << std::endl; - return 0; - } - } - } - } -} - -bool QuantInfo::isConstrainedVar( int v ) { - if( d_curr_var_deq.find( v )!=d_curr_var_deq.end() && !d_curr_var_deq[v].empty() ){ - return true; - }else{ - Node vv = getVar( v ); - //for( std::map< int, TNode >::iterator it = d_match.begin(); it != d_match.end(); ++it ){ - for( unsigned i=0; i >::iterator it = d_curr_var_deq.begin(); it != d_curr_var_deq.end(); ++it ){ - for( std::map< TNode, int >::iterator it2 = it->second.begin(); it2 != it->second.end(); ++it2 ){ - if( it2->first==vv ){ - return true; - } - } - } - return false; - } -} - -bool QuantInfo::setMatch( QuantConflictFind * p, int v, TNode n ) { - if( getCurrentCanBeEqual( p, v, n ) ){ - Debug("qcf-match-debug") << "-- bind : " << v << " -> " << n << ", checked " << d_curr_var_deq[v].size() << " disequalities" << std::endl; - d_match[v] = n; - return true; - }else{ - return false; - } -} - -bool QuantInfo::isMatchSpurious( QuantConflictFind * p ) { - for( int i=0; i::iterator it = d_match.find( i ); - if( !d_match[i].isNull() ){ - if( !getCurrentCanBeEqual( p, i, d_match[i], p->d_effort==QuantConflictFind::effort_conflict ) ){ - return true; - } - } - } - return false; -} - -bool QuantInfo::isTConstraintSpurious( QuantConflictFind * p, std::vector< Node >& terms ) { - if( !d_tconstraints.empty() ){ - //check constraints - for( std::map< Node, bool >::iterator it = d_tconstraints.begin(); it != d_tconstraints.end(); ++it ){ - //apply substitution to the tconstraint - Node cons = it->first.substitute( p->getQuantifiersEngine()->getTermDatabase()->d_vars[d_q].begin(), - p->getQuantifiersEngine()->getTermDatabase()->d_vars[d_q].end(), - terms.begin(), terms.end() ); - cons = it->second ? cons : cons.negate(); - if( !entailmentTest( p, cons, p->d_effort==QuantConflictFind::effort_conflict ) ){ - return true; - } - } - } - return false; -} - -bool QuantInfo::entailmentTest( QuantConflictFind * p, Node lit, bool chEnt ) { - Trace("qcf-tconstraint-debug") << "Check : " << lit << std::endl; - Node rew = Rewriter::rewrite( lit ); - if( rew==p->d_false ){ - Trace("qcf-tconstraint-debug") << "...constraint " << lit << " is disentailed (rewrites to false)." << std::endl; - return false; - }else if( rew!=p->d_true ){ - //if checking for conflicts, we must be sure that the constraint is entailed - if( chEnt ){ - //check if it is entailed - Trace("qcf-tconstraint-debug") << "Check entailment of " << rew << "..." << std::endl; - std::pair et = p->getQuantifiersEngine()->getTheoryEngine()->entailmentCheck(THEORY_OF_TYPE_BASED, rew ); - ++(p->d_statistics.d_entailment_checks); - Trace("qcf-tconstraint-debug") << "ET result : " << et.first << " " << et.second << std::endl; - if( !et.first ){ - Trace("qcf-tconstraint-debug") << "...cannot show entailment of " << rew << "." << std::endl; - return false; - }else{ - return true; - } - }else{ - Trace("qcf-tconstraint-debug") << "...does not need to be entailed." << std::endl; - return true; - } - }else{ - Trace("qcf-tconstraint-debug") << "...rewrites to true." << std::endl; - return true; - } -} - -bool QuantInfo::completeMatch( QuantConflictFind * p, std::vector< int >& assigned, bool doContinue ) { - //assign values for variables that were unassigned (usually not necessary, but handles corner cases) - bool doFail = false; - bool success = true; - if( doContinue ){ - doFail = true; - success = false; - }else{ - //solve for interpreted symbol matches - // this breaks the invariant that all introduced constraints are over existing terms - for( int i=(int)(d_tsym_vars.size()-1); i>=0; i-- ){ - int index = d_tsym_vars[i]; - TNode v = getCurrentValue( d_vars[index] ); - int slv_v = -1; - if( v==d_vars[index] ){ - slv_v = index; - } - Trace("qcf-tconstraint-debug") << "Solve " << d_vars[index] << " = " << v << " " << d_vars[index].getKind() << std::endl; - if( d_vars[index].getKind()==PLUS || d_vars[index].getKind()==MULT ){ - Kind k = d_vars[index].getKind(); - std::vector< TNode > children; - for( unsigned j=0; jd_effort!=QuantConflictFind::effort_conflict ){ - break; - } - }else{ - Node z = p->getZero( k ); - if( !z.isNull() ){ - Trace("qcf-tconstraint-debug") << "...set " << d_vars[vn] << " = " << z << std::endl; - assigned.push_back( vn ); - if( !setMatch( p, vn, z ) ){ - success = false; - break; - } - } - } - }else{ - Trace("qcf-tconstraint-debug") << "...sum value " << vv << std::endl; - children.push_back( vv ); - } - }else{ - Trace("qcf-tconstraint-debug") << "...sum " << d_vars[index][j] << std::endl; - children.push_back( d_vars[index][j] ); - } - } - if( success ){ - if( slv_v!=-1 ){ - Node lhs; - if( children.empty() ){ - lhs = p->getZero( k ); - }else if( children.size()==1 ){ - lhs = children[0]; - }else{ - lhs = NodeManager::currentNM()->mkNode( k, children ); - } - Node sum; - if( v==d_vars[index] ){ - sum = lhs; - }else{ - if( p->d_effort==QuantConflictFind::effort_conflict ){ - Kind kn = k; - if( d_vars[index].getKind()==PLUS ){ - kn = MINUS; - } - if( kn!=k ){ - sum = NodeManager::currentNM()->mkNode( kn, v, lhs ); - } - } - } - if( !sum.isNull() ){ - assigned.push_back( slv_v ); - Trace("qcf-tconstraint-debug") << "...set " << d_vars[slv_v] << " = " << sum << std::endl; - if( !setMatch( p, slv_v, sum ) ){ - success = false; - } - p->d_tempCache.push_back( sum ); - } - }else{ - //must show that constraint is met - Node sum = NodeManager::currentNM()->mkNode( k, children ); - Node eq = sum.eqNode( v ); - if( !entailmentTest( p, eq ) ){ - success = false; - } - p->d_tempCache.push_back( sum ); - } - } - } - - if( !success ){ - break; - } - } - if( success ){ - //check what is left to assign - d_unassigned.clear(); - d_unassigned_tn.clear(); - std::vector< int > unassigned[2]; - std::vector< TypeNode > unassigned_tn[2]; - for( int i=0; i=0 && (int)d_una_index<(int)d_unassigned.size() ) || invalidMatch || doFail ){ - invalidMatch = false; - if( !doFail && d_una_index==(int)d_una_eqc_count.size() ){ - //check if it has now been assigned - if( d_una_indexreset( p, true, this ); - d_una_eqc_count.push_back( 0 ); - } - }else{ - d_una_eqc_count.push_back( 0 ); - } - }else{ - bool failed = false; - if( !doFail ){ - if( d_una_indexgetNextMatch( p, this ) ){ - Trace("qcf-check-unassign") << "Succeeded match with mg at " << d_una_index << std::endl; - d_una_index++; - }else{ - failed = true; - Trace("qcf-check-unassign") << "Failed match with mg at " << d_una_index << std::endl; - } - }else{ - Assert( doFail || d_una_index==(int)d_una_eqc_count.size()-1 ); - if( d_una_eqc_count[d_una_index]<(int)p->d_eqcs[d_unassigned_tn[d_una_index]].size() ){ - int currIndex = d_una_eqc_count[d_una_index]; - d_una_eqc_count[d_una_index]++; - Trace("qcf-check-unassign") << d_unassigned[d_una_index] << "->" << p->d_eqcs[d_unassigned_tn[d_una_index]][currIndex] << std::endl; - if( setMatch( p, d_unassigned[d_una_index], p->d_eqcs[d_unassigned_tn[d_una_index]][currIndex] ) ){ - d_match_term[d_unassigned[d_una_index]] = TNode::null(); - Trace("qcf-check-unassign") << "Succeeded match " << d_una_index << std::endl; - d_una_index++; - }else{ - Trace("qcf-check-unassign") << "Failed match " << d_una_index << std::endl; - invalidMatch = true; - } - }else{ - failed = true; - Trace("qcf-check-unassign") << "No more matches " << d_una_index << std::endl; - } - } - } - if( doFail || failed ){ - do{ - if( !doFail ){ - d_una_eqc_count.pop_back(); - }else{ - doFail = false; - } - d_una_index--; - }while( d_una_index>=0 && d_una_eqc_count[d_una_index]==-1 ); - } - } - } - success = d_una_index>=0; - if( success ){ - doFail = true; - Trace("qcf-check-unassign") << " Try: " << std::endl; - for( unsigned i=0; i " << d_match[ui] << std::endl; - } - } - } - }while( success && isMatchSpurious( p ) ); - } - if( success ){ - for( unsigned i=0; i " << d_match[ui] << std::endl; - } - } - return true; - }else{ - for( unsigned i=0; i& terms ){ - for( unsigned i=0; igetCurrentValue( qi->d_match[i] ); - int repVar = getCurrentRepVar( i ); - Node cv; - //std::map< int, TNode >::iterator itmt = qi->d_match_term.find( repVar ); - if( !d_match_term[repVar].isNull() ){ - cv = d_match_term[repVar]; - }else{ - cv = d_match[repVar]; - } - Debug("qcf-check-inst") << "INST : " << i << " -> " << cv << ", from " << d_match[i] << std::endl; - terms.push_back( cv ); - } -} - -void QuantInfo::revertMatch( std::vector< int >& assigned ) { - for( unsigned i=0; i "; - if( !d_match[i].isNull() ){ - Trace(c) << d_match[i]; - }else{ - Trace(c) << "(unassigned) "; - } - if( !d_curr_var_deq[i].empty() ){ - Trace(c) << ", DEQ{ "; - for( std::map< TNode, int >::iterator it = d_curr_var_deq[i].begin(); it != d_curr_var_deq[i].end(); ++it ){ - Trace(c) << it->first << " "; - } - Trace(c) << "}"; - } - if( !d_match_term[i].isNull() && d_match_term[i]!=d_match[i] ){ - Trace(c) << ", EXP : " << d_match_term[i]; - } - Trace(c) << std::endl; - } - if( !d_tconstraints.empty() ){ - Trace(c) << "ADDITIONAL CONSTRAINTS : " << std::endl; - for( std::map< Node, bool >::iterator it = d_tconstraints.begin(); it != d_tconstraints.end(); ++it ){ - Trace(c) << " " << it->first << " -> " << it->second << std::endl; - } - } -} - -MatchGen::MatchGen( QuantInfo * qi, Node n, bool isVar ){ - Trace("qcf-qregister-debug") << "Make match gen for " << n << ", isVar = " << isVar << std::endl; - std::vector< Node > qni_apps; - d_qni_size = 0; - if( isVar ){ - Assert( qi->d_var_num.find( n )!=qi->d_var_num.end() ); - if( n.getKind()==ITE ){ - d_type = typ_ite_var; - d_type_not = false; - d_n = n; - d_children.push_back( MatchGen( qi, d_n[0] ) ); - if( d_children[0].isValid() ){ - d_type = typ_ite_var; - for( unsigned i=1; i<=2; i++ ){ - Node nn = n.eqNode( n[i] ); - d_children.push_back( MatchGen( qi, nn ) ); - d_children[d_children.size()-1].d_qni_bound_except.push_back( 0 ); - if( !d_children[d_children.size()-1].isValid() ){ - setInvalid(); - break; - } - } - }else{ - d_type = typ_invalid; - } - }else{ - d_type = isHandledUfTerm( n ) ? typ_var : typ_tsym; - d_qni_var_num[0] = qi->getVarNum( n ); - d_qni_size++; - d_type_not = false; - d_n = n; - //Node f = getOperator( n ); - for( unsigned j=0; jisVar( nn ) ){ - int v = qi->d_var_num[nn]; - Trace("qcf-qregister-debug") << " is var #" << v << std::endl; - d_qni_var_num[d_qni_size] = v; - //qi->addFuncParent( v, f, j ); - }else{ - Trace("qcf-qregister-debug") << " is gterm " << nn << std::endl; - d_qni_gterm[d_qni_size] = nn; - } - d_qni_size++; - } - } - }else{ - if( n.hasBoundVar() ){ - d_type_not = false; - d_n = n; - if( d_n.getKind()==NOT ){ - d_n = d_n[0]; - d_type_not = !d_type_not; - } - - if( isHandledBoolConnective( d_n ) ){ - //non-literals - d_type = typ_formula; - for( unsigned i=0; id_qinfo[q].isVar( cn[0] ) || p->d_qinfo[q].isVar( cn[1] ) ); - //make it a built-in constraint instead - for( unsigned i=0; i<2; i++ ){ - if( p->d_qinfo[q].isVar( cn[i] ) ){ - int v = p->d_qinfo[q].getVarNum( cn[i] ); - Node cno = cn[i==0 ? 1 : 0]; - p->d_qinfo[q].d_var_constraint[ cIsNot ? 0 : 1 ][v].push_back( cno ); - break; - } - } - d_children.pop_back(); - } - */ - } - }else{ - d_type = typ_invalid; - //literals - if( isHandledUfTerm( d_n ) ){ - Assert( qi->isVar( d_n ) ); - d_type = typ_pred; - }else if( d_n.getKind()==BOUND_VARIABLE ){ - Assert( d_n.getType().isBoolean() ); - d_type = typ_bool_var; - }else if( d_n.getKind()==EQUAL || options::qcfTConstraint() ){ - for( unsigned i=0; iisVar( d_n[i] ) ){ - Trace("qcf-qregister-debug") << "ERROR : not var " << d_n[i] << std::endl; - } - Assert( qi->isVar( d_n[i] ) ); - if( d_n.getKind()!=EQUAL && qi->isVar( d_n[i] ) ){ - d_qni_var_num[i+1] = qi->d_var_num[d_n[i]]; - } - }else{ - d_qni_gterm[i] = d_n[i]; - } - } - d_type = d_n.getKind()==EQUAL ? typ_eq : typ_tconstraint; - Trace("qcf-tconstraint") << "T-Constraint : " << d_n << std::endl; - } - } - }else{ - //we will just evaluate - d_n = n; - d_type = typ_ground; - } - //if( d_type!=typ_invalid ){ - //determine an efficient children ordering - //if( !d_children.empty() ){ - //for( unsigned i=0; i& cbvars ) { - int v = qi->getVarNum( n ); - if( v!=-1 && std::find( cbvars.begin(), cbvars.end(), v )==cbvars.end() ){ - cbvars.push_back( v ); - } - for( unsigned i=0; i& bvars ) { - Trace("qcf-qregister-debug") << "Determine variable order " << d_n << std::endl; - bool isCom = d_type==typ_formula && ( d_n.getKind()==OR || d_n.getKind()==AND || d_n.getKind()==IFF ); - std::map< int, std::vector< int > > c_to_vars; - std::map< int, std::vector< int > > vars_to_c; - std::map< int, int > vb_count; - std::map< int, int > vu_count; - std::vector< bool > assigned; - Trace("qcf-qregister-debug") << "Calculate bound variables..." << std::endl; - for( unsigned i=0; i::iterator it = d_qni_gterm.begin(); it != d_qni_gterm.end(); ++it ){ - d_qni_gterm_rep[it->first] = p->getRepresentative( it->second ); - } - if( d_type==typ_ground ){ - int e = p->evaluate( d_n ); - if( e==1 ){ - d_ground_eval[0] = p->d_true; - }else if( e==-1 ){ - d_ground_eval[0] = p->d_false; - } - }else if( d_type==typ_eq ){ - for( unsigned i=0; ievaluateTerm( d_n[i] ); - } - } - } - d_qni_bound_cons.clear(); - d_qni_bound_cons_var.clear(); - d_qni_bound.clear(); -} - -void MatchGen::reset( QuantConflictFind * p, bool tgt, QuantInfo * qi ) { - d_tgt = d_type_not ? !tgt : tgt; - Debug("qcf-match") << " Reset for : " << d_n << ", type : "; - debugPrintType( "qcf-match", d_type ); - Debug("qcf-match") << ", tgt = " << d_tgt << ", children = " << d_children.size() << " " << d_children_order.size() << std::endl; - d_qn.clear(); - d_qni.clear(); - d_qni_bound.clear(); - d_child_counter = -1; - d_tgt_orig = d_tgt; - - //set up processing matches - if( d_type==typ_invalid ){ - //do nothing - }else if( d_type==typ_ground ){ - if( d_ground_eval[0]==( d_tgt ? p->d_true : p->d_false ) ){ - d_child_counter = 0; - } - }else if( d_type==typ_bool_var ){ - //get current value of the variable - TNode n = qi->getCurrentValue( d_n ); - int vn = qi->getCurrentRepVar( qi->getVarNum( n ) ); - if( vn==-1 ){ - //evaluate the value, see if it is compatible - int e = p->evaluate( n ); - if( ( e==1 && d_tgt ) || ( e==0 && !d_tgt ) ){ - d_child_counter = 0; - } - }else{ - //unassigned, set match to true/false - d_qni_bound[0] = vn; - qi->setMatch( p, vn, d_tgt ? p->d_true : p->d_false ); - d_child_counter = 0; - } - if( d_child_counter==0 ){ - d_qn.push_back( NULL ); - } - }else if( d_type==typ_var ){ - Assert( isHandledUfTerm( d_n ) ); - Node f = getOperator( p, d_n ); - Debug("qcf-match-debug") << " reset: Var will match operators of " << f << std::endl; - QcfNodeIndex * qni = p->getQcfNodeIndex( Node::null(), f ); - if( qni!=NULL ){ - d_qn.push_back( qni ); - } - d_matched_basis = false; - }else if( d_type==typ_tsym || d_type==typ_tconstraint ){ - for( std::map< int, int >::iterator it = d_qni_var_num.begin(); it != d_qni_var_num.end(); ++it ){ - int repVar = qi->getCurrentRepVar( it->second ); - if( qi->d_match[repVar].isNull() ){ - Debug("qcf-match-debug") << "Force matching on child #" << it->first << ", which is var #" << repVar << std::endl; - d_qni_bound[it->first] = repVar; - } - } - d_qn.push_back( NULL ); - }else if( d_type==typ_pred || d_type==typ_eq ){ - //add initial constraint - Node nn[2]; - int vn[2]; - if( d_type==typ_pred ){ - nn[0] = qi->getCurrentValue( d_n ); - vn[0] = qi->getCurrentRepVar( qi->getVarNum( nn[0] ) ); - nn[1] = p->getRepresentative( d_tgt ? p->d_true : p->d_false ); - vn[1] = -1; - d_tgt = true; - }else{ - for( unsigned i=0; i<2; i++ ){ - TNode nc; - std::map< int, TNode >::iterator it = d_qni_gterm_rep.find( i ); - if( it!=d_qni_gterm_rep.end() ){ - nc = it->second; - }else{ - nc = d_n[i]; - } - nn[i] = qi->getCurrentValue( nc ); - vn[i] = qi->getCurrentRepVar( qi->getVarNum( nn[i] ) ); - } - } - bool success; - if( vn[0]==-1 && vn[1]==-1 ){ - //Trace("qcf-explain") << " reset : " << d_n << " check ground values " << nn[0] << " " << nn[1] << " (tgt=" << d_tgt << ")" << std::endl; - Debug("qcf-match-debug") << " reset: check ground values " << nn[0] << " " << nn[1] << " (" << d_tgt << ")" << std::endl; - //just compare values - if( d_tgt ){ - success = p->areMatchEqual( nn[0], nn[1] ); - }else{ - if( p->d_effort==QuantConflictFind::effort_conflict ){ - success = p->areDisequal( nn[0], nn[1] ); - }else{ - success = p->areMatchDisequal( nn[0], nn[1] ); - } - } - }else{ - //otherwise, add a constraint to a variable - if( vn[1]!=-1 && vn[0]==-1 ){ - //swap - Node t = nn[1]; - nn[1] = nn[0]; - nn[0] = t; - vn[0] = vn[1]; - vn[1] = -1; - } - Debug("qcf-match-debug") << " reset: add constraint " << vn[0] << " -> " << nn[1] << " (vn=" << vn[1] << ")" << std::endl; - //add some constraint - int addc = qi->addConstraint( p, vn[0], nn[1], vn[1], d_tgt, false ); - success = addc!=-1; - //if successful and non-redundant, store that we need to cleanup this - if( addc==1 ){ - //Trace("qcf-explain") << " reset: " << d_n << " add constraint " << vn[0] << " -> " << nn[1] << " (vn=" << vn[1] << ")" << ", d_tgt = " << d_tgt << std::endl; - for( unsigned i=0; i<2; i++ ){ - if( vn[i]!=-1 && std::find( d_qni_bound_except.begin(), d_qni_bound_except.end(), i )==d_qni_bound_except.end() ){ - d_qni_bound[vn[i]] = vn[i]; - } - } - d_qni_bound_cons[vn[0]] = nn[1]; - d_qni_bound_cons_var[vn[0]] = vn[1]; - } - } - //if successful, we will bind values to variables - if( success ){ - d_qn.push_back( NULL ); - } - }else{ - if( d_children.empty() ){ - //add dummy - d_qn.push_back( NULL ); - }else{ - if( d_tgt && d_n.getKind()==FORALL ){ - //do nothing - }else{ - //reset the first child to d_tgt - d_child_counter = 0; - getChild( d_child_counter )->reset( p, d_tgt, qi ); - } - } - } - d_binding = false; - d_wasSet = true; - Debug("qcf-match") << " reset: Finished reset for " << d_n << ", success = " << ( !d_qn.empty() || d_child_counter!=-1 ) << std::endl; -} - -bool MatchGen::getNextMatch( QuantConflictFind * p, QuantInfo * qi ) { - Debug("qcf-match") << " Get next match for : " << d_n << ", type = "; - debugPrintType( "qcf-match", d_type ); - Debug("qcf-match") << ", children = " << d_children.size() << ", binding = " << d_binding << std::endl; - if( d_type==typ_invalid || d_type==typ_ground ){ - if( d_child_counter==0 ){ - d_child_counter = -1; - return true; - }else{ - d_wasSet = false; - return false; - } - }else if( d_type==typ_var || d_type==typ_eq || d_type==typ_pred || d_type==typ_bool_var || d_type==typ_tconstraint || d_type==typ_tsym ){ - bool success = false; - bool terminate = false; - do { - bool doReset = false; - bool doFail = false; - if( !d_binding ){ - if( doMatching( p, qi ) ){ - Debug("qcf-match-debug") << " - Matching succeeded" << std::endl; - d_binding = true; - d_binding_it = d_qni_bound.begin(); - doReset = true; - //for tconstraint, add constraint - if( d_type==typ_tconstraint ){ - std::map< Node, bool >::iterator it = qi->d_tconstraints.find( d_n ); - if( it==qi->d_tconstraints.end() ){ - qi->d_tconstraints[d_n] = d_tgt; - //store that we added this constraint - d_qni_bound_cons[0] = d_n; - }else if( d_tgt!=it->second ){ - success = false; - terminate = true; - } - } - }else{ - Debug("qcf-match-debug") << " - Matching failed" << std::endl; - success = false; - terminate = true; - } - }else{ - doFail = true; - } - if( d_binding ){ - //also need to create match for each variable we bound - success = true; - Debug("qcf-match-debug") << " Produce matches for bound variables by " << d_n << ", type = "; - debugPrintType( "qcf-match-debug", d_type ); - Debug("qcf-match-debug") << "..." << std::endl; - - while( ( success && d_binding_it!=d_qni_bound.end() ) || doFail ){ - std::map< int, MatchGen * >::iterator itm; - if( !doFail ){ - Debug("qcf-match-debug") << " check variable " << d_binding_it->second << std::endl; - itm = qi->d_var_mg.find( d_binding_it->second ); - } - if( doFail || ( d_binding_it->first!=0 && itm!=qi->d_var_mg.end() ) ){ - Debug("qcf-match-debug") << " we had bound variable " << d_binding_it->second << ", reset = " << doReset << std::endl; - if( doReset ){ - itm->second->reset( p, true, qi ); - } - if( doFail || !itm->second->getNextMatch( p, qi ) ){ - do { - if( d_binding_it==d_qni_bound.begin() ){ - Debug("qcf-match-debug") << " failed." << std::endl; - success = false; - }else{ - --d_binding_it; - Debug("qcf-match-debug") << " decrement..." << std::endl; - } - }while( success && ( d_binding_it->first==0 || qi->d_var_mg.find( d_binding_it->second )==qi->d_var_mg.end() ) ); - doReset = false; - doFail = false; - }else{ - Debug("qcf-match-debug") << " increment..." << std::endl; - ++d_binding_it; - doReset = true; - } - }else{ - Debug("qcf-match-debug") << " skip..." << d_binding_it->second << std::endl; - ++d_binding_it; - doReset = true; - } - } - if( !success ){ - d_binding = false; - }else{ - terminate = true; - if( d_binding_it==d_qni_bound.begin() ){ - d_binding = false; - } - } - } - }while( !terminate ); - //if not successful, clean up the variables you bound - if( !success ){ - if( d_type==typ_eq || d_type==typ_pred ){ - //clean up the constraints you added - for( std::map< int, TNode >::iterator it = d_qni_bound_cons.begin(); it != d_qni_bound_cons.end(); ++it ){ - if( !it->second.isNull() ){ - Debug("qcf-match") << " Clean up bound var " << it->first << (d_tgt ? "!" : "") << " = " << it->second << std::endl; - std::map< int, int >::iterator itb = d_qni_bound_cons_var.find( it->first ); - int vn = itb!=d_qni_bound_cons_var.end() ? itb->second : -1; - //Trace("qcf-explain") << " cleanup: " << d_n << " remove constraint " << it->first << " -> " << it->second << " (vn=" << vn << ")" << ", d_tgt = " << d_tgt << std::endl; - qi->addConstraint( p, it->first, it->second, vn, d_tgt, true ); - } - } - d_qni_bound_cons.clear(); - d_qni_bound_cons_var.clear(); - d_qni_bound.clear(); - }else{ - //clean up the matches you set - for( std::map< int, int >::iterator it = d_qni_bound.begin(); it != d_qni_bound.end(); ++it ){ - Debug("qcf-match") << " Clean up bound var " << it->second << std::endl; - Assert( it->secondgetNumVars() ); - qi->d_match[ it->second ] = TNode::null(); - qi->d_match_term[ it->second ] = TNode::null(); - } - d_qni_bound.clear(); - } - if( d_type==typ_tconstraint ){ - //remove constraint if applicable - if( d_qni_bound_cons.find( 0 )!=d_qni_bound_cons.end() ){ - qi->d_tconstraints.erase( d_n ); - d_qni_bound_cons.clear(); - } - } - /* - if( d_type==typ_var && p->d_effort==QuantConflictFind::effort_mc && !d_matched_basis ){ - d_matched_basis = true; - Node f = getOperator( d_n ); - TNode mbo = p->getQuantifiersEngine()->getTermDatabase()->getModelBasisOpTerm( f ); - if( qi->setMatch( p, d_qni_var_num[0], mbo ) ){ - success = true; - d_qni_bound[0] = d_qni_var_num[0]; - } - } - */ - } - Debug("qcf-match") << " ...finished matching for " << d_n << ", success = " << success << std::endl; - d_wasSet = success; - return success; - }else if( d_type==typ_formula || d_type==typ_ite_var ){ - bool success = false; - if( d_child_counter<0 ){ - if( d_child_counter<-1 ){ - success = true; - d_child_counter = -1; - } - }else{ - while( !success && d_child_counter>=0 ){ - //transition system based on d_child_counter - if( d_n.getKind()==OR || d_n.getKind()==AND ){ - if( (d_n.getKind()==AND)==d_tgt ){ - //all children must match simultaneously - if( getChild( d_child_counter )->getNextMatch( p, qi ) ){ - if( d_child_counter<(int)(getNumChildren()-1) ){ - d_child_counter++; - Debug("qcf-match-debug") << " Reset child " << d_child_counter << " of " << d_n << std::endl; - getChild( d_child_counter )->reset( p, d_tgt, qi ); - }else{ - success = true; - } - }else{ - //if( std::find( d_independent.begin(), d_independent.end(), d_child_counter )!=d_independent.end() ){ - // d_child_counter--; - //}else{ - d_child_counter--; - //} - } - }else{ - //one child must match - if( !getChild( d_child_counter )->getNextMatch( p, qi ) ){ - if( d_child_counter<(int)(getNumChildren()-1) ){ - d_child_counter++; - Debug("qcf-match-debug") << " Reset child " << d_child_counter << " of " << d_n << ", one match" << std::endl; - getChild( d_child_counter )->reset( p, d_tgt, qi ); - }else{ - d_child_counter = -1; - } - }else{ - success = true; - } - } - }else if( d_n.getKind()==IFF ){ - //construct match based on both children - if( d_child_counter%2==0 ){ - if( getChild( 0 )->getNextMatch( p, qi ) ){ - d_child_counter++; - getChild( 1 )->reset( p, d_child_counter==1, qi ); - }else{ - if( d_child_counter==0 ){ - d_child_counter = 2; - getChild( 0 )->reset( p, !d_tgt, qi ); - }else{ - d_child_counter = -1; - } - } - } - if( d_child_counter>=0 && d_child_counter%2==1 ){ - if( getChild( 1 )->getNextMatch( p, qi ) ){ - success = true; - }else{ - d_child_counter--; - } - } - }else if( d_n.getKind()==ITE ){ - if( d_child_counter%2==0 ){ - int index1 = d_child_counter==4 ? 1 : 0; - if( getChild( index1 )->getNextMatch( p, qi ) ){ - d_child_counter++; - getChild( d_child_counter==5 ? 2 : (d_tgt==(d_child_counter==1) ? 1 : 2) )->reset( p, d_tgt, qi ); - }else{ - if( d_child_counter==4 || ( d_type==typ_ite_var && d_child_counter==2 ) ){ - d_child_counter = -1; - }else{ - d_child_counter +=2; - getChild( d_child_counter==2 ? 0 : 1 )->reset( p, d_child_counter==2 ? !d_tgt : d_tgt, qi ); - } - } - } - if( d_child_counter>=0 && d_child_counter%2==1 ){ - int index2 = d_child_counter==5 ? 2 : (d_tgt==(d_child_counter==1) ? 1 : 2); - if( getChild( index2 )->getNextMatch( p, qi ) ){ - success = true; - }else{ - d_child_counter--; - } - } - }else if( d_n.getKind()==FORALL ){ - if( getChild( d_child_counter )->getNextMatch( p, qi ) ){ - success = true; - }else{ - d_child_counter = -1; - } - } - } - d_wasSet = success; - Debug("qcf-match") << " ...finished construct match for " << d_n << ", success = " << success << std::endl; - return success; - } - } - Debug("qcf-match") << " ...already finished for " << d_n << std::endl; - return false; -} - -bool MatchGen::getExplanation( QuantConflictFind * p, QuantInfo * qi, std::vector< Node >& exp ) { - if( d_type==typ_eq ){ - Node n[2]; - for( unsigned i=0; i<2; i++ ){ - Trace("qcf-explain") << "Explain term " << d_n[i] << "..." << std::endl; - n[i] = getExplanationTerm( p, qi, d_n[i], exp ); - } - Node eq = n[0].eqNode( n[1] ); - if( !d_tgt_orig ){ - eq = eq.negate(); - } - exp.push_back( eq ); - Trace("qcf-explain") << "Explanation for " << d_n << " (tgt=" << d_tgt_orig << ") is " << eq << ", set = " << d_wasSet << std::endl; - return true; - }else if( d_type==typ_pred ){ - Trace("qcf-explain") << "Explain term " << d_n << "..." << std::endl; - Node n = getExplanationTerm( p, qi, d_n, exp ); - if( !d_tgt_orig ){ - n = n.negate(); - } - exp.push_back( n ); - Trace("qcf-explain") << "Explanation for " << d_n << " (tgt=" << d_tgt_orig << ") is " << n << ", set = " << d_wasSet << std::endl; - return true; - }else if( d_type==typ_formula ){ - Trace("qcf-explain") << "Explanation get for " << d_n << ", counter = " << d_child_counter << ", tgt = " << d_tgt_orig << ", set = " << d_wasSet << std::endl; - if( d_n.getKind()==OR || d_n.getKind()==AND ){ - if( (d_n.getKind()==AND)==d_tgt ){ - for( unsigned i=0; igetExplanation( p, qi, exp ) ){ - return false; - } - } - }else{ - return getChild( d_child_counter )->getExplanation( p, qi, exp ); - } - }else if( d_n.getKind()==IFF ){ - for( unsigned i=0; i<2; i++ ){ - if( !getChild( i )->getExplanation( p, qi, exp ) ){ - return false; - } - } - }else if( d_n.getKind()==ITE ){ - for( unsigned i=0; i<3; i++ ){ - bool isActive = ( ( i==0 && d_child_counter!=5 ) || - ( i==1 && d_child_counter!=( d_tgt ? 3 : 1 ) ) || - ( i==2 && d_child_counter!=( d_tgt ? 1 : 3 ) ) ); - if( isActive ){ - if( !getChild( i )->getExplanation( p, qi, exp ) ){ - return false; - } - } - } - }else{ - return false; - } - return true; - }else{ - return false; - } -} - -Node MatchGen::getExplanationTerm( QuantConflictFind * p, QuantInfo * qi, Node t, std::vector< Node >& exp ) { - Node v = qi->getCurrentExpValue( t ); - if( isHandledUfTerm( t ) ){ - for( unsigned i=0; i0 ); - bool invalidMatch; - do { - invalidMatch = false; - Debug("qcf-match-debug") << " Do matching " << d_n << " " << d_qn.size() << " " << d_qni.size() << std::endl; - if( d_qn.size()==d_qni.size()+1 ) { - int index = (int)d_qni.size(); - //initialize - TNode val; - std::map< int, int >::iterator itv = d_qni_var_num.find( index ); - if( itv!=d_qni_var_num.end() ){ - //get the representative variable this variable is equal to - int repVar = qi->getCurrentRepVar( itv->second ); - Debug("qcf-match-debug") << " Match " << index << " is a variable " << itv->second << ", which is repVar " << repVar << std::endl; - //get the value the rep variable - //std::map< int, TNode >::iterator itm = qi->d_match.find( repVar ); - if( !qi->d_match[repVar].isNull() ){ - val = qi->d_match[repVar]; - Debug("qcf-match-debug") << " Variable is already bound to " << val << std::endl; - }else{ - //binding a variable - d_qni_bound[index] = repVar; - std::map< TNode, QcfNodeIndex >::iterator it = d_qn[index]->d_children.begin(); - if( it != d_qn[index]->d_children.end() ) { - d_qni.push_back( it ); - //set the match - if( qi->setMatch( p, d_qni_bound[index], it->first ) ){ - Debug("qcf-match-debug") << " Binding variable" << std::endl; - if( d_qn.size()second ); - } - }else{ - Debug("qcf-match") << " Binding variable, currently fail." << std::endl; - invalidMatch = true; - } - }else{ - Debug("qcf-match-debug") << " Binding variable, fail, no more variables to bind" << std::endl; - d_qn.pop_back(); - } - } - }else{ - Debug("qcf-match-debug") << " Match " << index << " is ground term" << std::endl; - Assert( d_qni_gterm.find( index )!=d_qni_gterm.end() ); - Assert( d_qni_gterm_rep.find( index )!=d_qni_gterm_rep.end() ); - val = d_qni_gterm_rep[index]; - Assert( !val.isNull() ); - } - if( !val.isNull() ){ - //constrained by val - std::map< TNode, QcfNodeIndex >::iterator it = d_qn[index]->d_children.find( val ); - if( it!=d_qn[index]->d_children.end() ){ - Debug("qcf-match-debug") << " Match" << std::endl; - d_qni.push_back( it ); - if( d_qn.size()second ); - } - }else{ - Debug("qcf-match-debug") << " Failed to match" << std::endl; - d_qn.pop_back(); - } - } - }else{ - Assert( d_qn.size()==d_qni.size() ); - int index = d_qni.size()-1; - //increment if binding this variable - bool success = false; - std::map< int, int >::iterator itb = d_qni_bound.find( index ); - if( itb!=d_qni_bound.end() ){ - d_qni[index]++; - if( d_qni[index]!=d_qn[index]->d_children.end() ){ - success = true; - if( qi->setMatch( p, itb->second, d_qni[index]->first ) ){ - Debug("qcf-match-debug") << " Bind next variable" << std::endl; - if( d_qn.size()second ); - } - }else{ - Debug("qcf-match-debug") << " Bind next variable, currently fail" << std::endl; - invalidMatch = true; - } - }else{ - qi->d_match[ itb->second ] = TNode::null(); - qi->d_match_term[ itb->second ] = TNode::null(); - Debug("qcf-match-debug") << " Bind next variable, no more variables to bind" << std::endl; - } - }else{ - //TODO : if it equal to something else, also try that - } - //if not incrementing, move to next - if( !success ){ - d_qn.pop_back(); - d_qni.pop_back(); - } - } - }while( ( !d_qn.empty() && d_qni.size()!=d_qni_size ) || invalidMatch ); - if( d_qni.size()==d_qni_size ){ - //Assert( !d_qni[d_qni.size()-1]->second.d_children.empty() ); - //Debug("qcf-match-debug") << " We matched " << d_qni[d_qni.size()-1]->second.d_children.begin()->first << std::endl; - Assert( !d_qni[d_qni.size()-1]->second.d_children.empty() ); - TNode t = d_qni[d_qni.size()-1]->second.d_children.begin()->first; - Debug("qcf-match-debug") << " " << d_n << " matched " << t << std::endl; - qi->d_match_term[d_qni_var_num[0]] = t; - //set the match terms - for( std::map< int, int >::iterator it = d_qni_bound.begin(); it != d_qni_bound.end(); ++it ){ - Debug("qcf-match-debug") << " position " << it->first << " bounded " << it->second << " / " << qi->d_q[0].getNumChildren() << std::endl; - //if( it->second<(int)qi->d_q[0].getNumChildren() ){ //if it is an actual variable, we are interested in knowing the actual term - if( it->first>0 ){ - Assert( !qi->d_match[ it->second ].isNull() ); - Assert( p->areEqual( t[it->first-1], qi->d_match[ it->second ] ) ); - qi->d_match_term[it->second] = t[it->first-1]; - } - //} - } - } - } - } - return !d_qn.empty(); -} - -void MatchGen::debugPrintType( const char * c, short typ, bool isTrace ) { - if( isTrace ){ - switch( typ ){ - case typ_invalid: Trace(c) << "invalid";break; - case typ_ground: Trace(c) << "ground";break; - case typ_eq: Trace(c) << "eq";break; - case typ_pred: Trace(c) << "pred";break; - case typ_formula: Trace(c) << "formula";break; - case typ_var: Trace(c) << "var";break; - case typ_ite_var: Trace(c) << "ite_var";break; - case typ_bool_var: Trace(c) << "bool_var";break; - } - }else{ - switch( typ ){ - case typ_invalid: Debug(c) << "invalid";break; - case typ_ground: Debug(c) << "ground";break; - case typ_eq: Debug(c) << "eq";break; - case typ_pred: Debug(c) << "pred";break; - case typ_formula: Debug(c) << "formula";break; - case typ_var: Debug(c) << "var";break; - case typ_ite_var: Debug(c) << "ite_var";break; - case typ_bool_var: Debug(c) << "bool_var";break; - } - } -} - -void MatchGen::setInvalid() { - d_type = typ_invalid; - d_children.clear(); -} - -bool MatchGen::isHandledBoolConnective( TNode n ) { - return n.getType().isBoolean() && ( n.getKind()==OR || n.getKind()==AND || n.getKind()==IFF || n.getKind()==ITE || n.getKind()==FORALL || n.getKind()==NOT ); -} - -bool MatchGen::isHandledUfTerm( TNode n ) { - //return n.getKind()==APPLY_UF || n.getKind()==STORE || n.getKind()==SELECT || - // n.getKind()==APPLY_CONSTRUCTOR || n.getKind()==APPLY_SELECTOR_TOTAL || n.getKind()==APPLY_TESTER; - return inst::Trigger::isAtomicTriggerKind( n.getKind() ); -} - -Node MatchGen::getOperator( QuantConflictFind * p, Node n ) { - if( isHandledUfTerm( n ) ){ - return p->getQuantifiersEngine()->getTermDatabase()->getOperator( n ); - }else{ - return Node::null(); - } -} - -bool MatchGen::isHandled( TNode n ) { - if( n.getKind()!=BOUND_VARIABLE && n.hasBoundVar() ){ - if( !isHandledBoolConnective( n ) && !isHandledUfTerm( n ) && n.getKind()!=EQUAL && n.getKind()!=ITE ){ - return false; - } - for( unsigned i=0; imkConst(true); - d_false = NodeManager::currentNM()->mkConst(false); -} - -Node QuantConflictFind::mkEqNode( Node a, Node b ) { - if( a.getType().isBoolean() ){ - return a.iffNode( b ); - }else{ - return a.eqNode( b ); - } -} - -//-------------------------------------------------- registration - -void QuantConflictFind::registerQuantifier( Node q ) { - if( !TermDb::isRewriteRule( q ) ){ - d_quants.push_back( q ); - d_quant_id[q] = d_quants.size(); - Trace("qcf-qregister") << "Register "; - debugPrintQuant( "qcf-qregister", q ); - Trace("qcf-qregister") << " : " << q << std::endl; - //make QcfNode structure - Trace("qcf-qregister") << "- Get relevant equality/disequality pairs, calculate flattening..." << std::endl; - d_qinfo[q].initialize( q, q[1] ); - - //debug print - Trace("qcf-qregister") << "- Flattened structure is :" << std::endl; - Trace("qcf-qregister") << " "; - debugPrintQuantBody( "qcf-qregister", q, q[1] ); - Trace("qcf-qregister") << std::endl; - if( d_qinfo[q].d_vars.size()>q[0].getNumChildren() ){ - Trace("qcf-qregister") << " with additional constraints : " << std::endl; - for( unsigned j=q[0].getNumChildren(); jQuantConflictFind::effort_conflict ){ - // ret = -1; - //} - }else if( n.getKind()==NOT ){ - return -evaluate( n[0] ); - }else if( n.getKind()==ITE ){ - int cev1 = evaluate( n[0] ); - int cevc[2] = { 0, 0 }; - for( unsigned i=0; i<2; i++ ){ - if( ( i==0 && cev1!=-1 ) || ( i==1 && cev1!=1 ) ){ - cevc[i] = evaluate( n[i+1] ); - if( cev1!=0 ){ - ret = cevc[i]; - break; - }else if( cevc[i]==0 ){ - break; - } - } - } - if( ret==0 && cevc[0]!=0 && cevc[0]==cevc[1] ){ - ret = cevc[0]; - } - }else if( n.getKind()==IFF ){ - int cev1 = evaluate( n[0] ); - if( cev1!=0 ){ - int cev2 = evaluate( n[1] ); - if( cev2!=0 ){ - ret = cev1==cev2 ? 1 : -1; - } - } - - }else{ - int ssval = 0; - if( n.getKind()==OR ){ - ssval = 1; - }else if( n.getKind()==AND ){ - ssval = -1; - } - bool isUnk = false; - for( unsigned i=0; i::iterator it = d_qinfo[q].d_rel_eqr.begin(); it != d_qinfo[q].d_rel_eqr.end(); ++it ){ - // it->first->d_active.set( true ); - //} - } -} - -eq::EqualityEngine * QuantConflictFind::getEqualityEngine() { - //return ((uf::TheoryUF*)d_quantEngine->getTheoryEngine()->theoryOf( theory::THEORY_UF ))->getEqualityEngine(); - return d_quantEngine->getTheoryEngine()->getMasterEqualityEngine(); -} -bool QuantConflictFind::areEqual( Node n1, Node n2 ) { - return getEqualityEngine()->hasTerm( n1 ) && getEqualityEngine()->hasTerm( n2 ) && getEqualityEngine()->areEqual( n1,n2 ); -} -bool QuantConflictFind::areDisequal( Node n1, Node n2 ) { - return n1!=n2 && getEqualityEngine()->hasTerm( n1 ) && getEqualityEngine()->hasTerm( n2 ) && getEqualityEngine()->areDisequal( n1,n2, false ); -} -Node QuantConflictFind::getRepresentative( Node n ) { - if( getEqualityEngine()->hasTerm( n ) ){ - return getEqualityEngine()->getRepresentative( n ); - }else{ - return n; - } -} -Node QuantConflictFind::evaluateTerm( Node n ) { - if( MatchGen::isHandledUfTerm( n ) ){ - Node f = MatchGen::getOperator( this, n ); - Node nn; - computeUfTerms( f ); - if( getEqualityEngine()->hasTerm( n ) ){ - computeArgReps( n ); - nn = d_uf_terms[f].existsTerm( n, d_arg_reps[n] ); - }else{ - std::vector< TNode > args; - for( unsigned i=0; id_diseq.begin(); it != eqc_b->d_diseq.end(); ++it ){ - if( (*it).second ){ - Node n = (*it).first; - EqcInfo * eqc_n = getEqcInfo( n, false ); - Assert( eqc_n ); - if( !eqc_n->isDisequal( a ) ){ - Assert( !eqc_a->isDisequal( n ) ); - eqc_n->setDisequal( a ); - eqc_a->setDisequal( n ); - //setEqual( eqc_a, eqc_b, a, n, false ); - } - eqc_n->setDisequal( b, false ); - } - } - ////move all previous EqcRegistry's regarding equalities within b - //for( NodeBoolMap::iterator it = eqc_b->d_rel_eqr_e.begin(); it != eqc_b->d_rel_eqr_e.end(); ++it ){ - // if( (*it).second ){ - // eqc_a->d_rel_eqr_e[(*it).first] = true; - // } - //} - } - //process new equalities - //setEqual( eqc_a, eqc_b, a, b, true ); - Trace("qcf-proc2") << "QCF : finished merge : " << a << " " << b << std::endl; - } - */ -} - -/** assert disequal */ -void QuantConflictFind::assertDisequal( Node a, Node b ) { - /* - a = getRepresentative( a ); - b = getRepresentative( b ); - Trace("qcf-proc") << "QCF : assert disequal : " << a << " " << b << std::endl; - EqcInfo * eqc_a = getEqcInfo( a ); - EqcInfo * eqc_b = getEqcInfo( b ); - if( !eqc_a->isDisequal( b ) ){ - Assert( !eqc_b->isDisequal( a ) ); - eqc_b->setDisequal( a ); - eqc_a->setDisequal( b ); - //setEqual( eqc_a, eqc_b, a, b, false ); - } - Trace("qcf-proc2") << "QCF : finished assert disequal : " << a << " " << b << std::endl; - */ -} - -//-------------------------------------------------- check function - -void QuantConflictFind::reset_round( Theory::Effort level ) { - d_needs_computeRelEqr = true; -} - -/** check */ -void QuantConflictFind::check( Theory::Effort level ) { - Trace("qcf-check") << "QCF : check : " << level << std::endl; - if( d_conflict ){ - Trace("qcf-check2") << "QCF : finished check : already in conflict." << std::endl; - if( level>=Theory::EFFORT_FULL ){ - Trace("qcf-warn") << "ALREADY IN CONFLICT? " << level << std::endl; - //Assert( false ); - } - }else{ - int addedLemmas = 0; - if( d_performCheck ){ - ++(d_statistics.d_inst_rounds); - double clSet = 0; - int prevEt = 0; - if( Trace.isOn("qcf-engine") ){ - prevEt = d_statistics.d_entailment_checks.getData(); - clSet = double(clock())/double(CLOCKS_PER_SEC); - Trace("qcf-engine") << "---Conflict Find Engine Round, effort = " << level << "---" << std::endl; - } - computeRelevantEqr(); - - //determine order for quantified formulas - std::vector< Node > qorder; - std::map< Node, bool > qassert; - //mark which are asserted - for( unsigned i=0; id_mg->isValid() ){ - Trace("qcf-check") << "Check quantified formula "; - debugPrintQuant("qcf-check", q); - Trace("qcf-check") << " : " << q << "..." << std::endl; - - Trace("qcf-check-debug") << "Reset round..." << std::endl; - qi->reset_round( this ); - //try to make a matches making the body false - Trace("qcf-check-debug") << "Get next match..." << std::endl; - while( qi->d_mg->getNextMatch( this, qi ) ){ - Trace("qcf-check") << "*** Produced match at effort " << e << " : " << std::endl; - qi->debugPrintMatch("qcf-check"); - Trace("qcf-check") << std::endl; - std::vector< int > assigned; - if( !qi->isMatchSpurious( this ) ){ - if( qi->completeMatch( this, assigned ) ){ - /* - if( options::qcfExp() && d_effort==effort_conflict ){ - std::vector< Node > exp; - if( qi->d_mg->getExplanation( this, qi, exp ) ){ - Trace("qcf-check-exp") << "Base explanation is : " << std::endl; - for( unsigned c=0; c c_exp; - eq::EqualityEngine* ee = ((uf::TheoryUF*)d_quantEngine->getTheoryEngine()->theoryOf( THEORY_UF ))->getEqualityEngine() ; - for( unsigned c=0; careDisequal( lit[0], lit[1], true ) ){ - exit( 98 ); - }else if( pol && !ee->areEqual( lit[0], lit[1] ) ){ - exit( 99 ); - } - ee->explainEquality( lit[0], lit[1], pol, c_exp ); - }else{ - if( !ee->areEqual( lit, pol ? d_true : d_false ) ){ - exit( pol ? 96 : 97 ); - } - ee->explainPredicate( lit, pol, c_exp ); - } - } - std::vector< Node > c_lem; - Trace("qcf-check-exp") << "Actual explanation is : " << std::endl; - for( unsigned c=0; cmkNode( OR, c_lem ); - Trace("qcf-conflict") << "QCF conflict : " << conf << std::endl; - d_quantEngine->addLemma( conf, false ); - d_conflict.set( true ); - ++(d_statistics.d_conflict_inst); - ++addedLemmas; - break; - } - } - */ - std::vector< Node > terms; - qi->getMatch( terms ); - if( !qi->isTConstraintSpurious( this, terms ) ){ - if( Debug.isOn("qcf-check-inst") ){ - //if( e==effort_conflict ){ - Node inst = d_quantEngine->getInstantiation( q, terms ); - Debug("qcf-check-inst") << "Check instantiation " << inst << "..." << std::endl; - Assert( evaluate( inst )!=1 ); - Assert( evaluate( inst )==-1 || e>effort_conflict ); - //} - } - if( d_quantEngine->addInstantiation( q, terms, false ) ){ - Trace("qcf-check") << " ... Added instantiation" << std::endl; - Trace("qcf-inst") << "*** Was from effort " << e << " : " << std::endl; - qi->debugPrintMatch("qcf-inst"); - Trace("qcf-inst") << std::endl; - ++addedLemmas; - if( e==effort_conflict ){ - d_quant_order.insert( d_quant_order.begin(), q ); - d_conflict.set( true ); - ++(d_statistics.d_conflict_inst); - break; - }else if( e==effort_prop_eq ){ - ++(d_statistics.d_prop_inst); - } - }else{ - Trace("qcf-check") << " ... Failed to add instantiation" << std::endl; - //Assert( false ); - } - } - //clean up assigned - qi->revertMatch( assigned ); - d_tempCache.clear(); - }else{ - Trace("qcf-check") << " ... Spurious instantiation (cannot assign unassigned variables)" << std::endl; - } - }else{ - Trace("qcf-check") << " ... Spurious instantiation (match is inconsistent)" << std::endl; - } - } - if( d_conflict ){ - break; - } - } - } - if( addedLemmas>0 ){ - d_quantEngine->flushLemmas(); - break; - } - } - if( Trace.isOn("qcf-engine") ){ - double clSet2 = double(clock())/double(CLOCKS_PER_SEC); - Trace("qcf-engine") << "Finished conflict find engine, time = " << (clSet2-clSet); - if( addedLemmas>0 ){ - Trace("qcf-engine") << ", effort = " << ( d_effort==effort_conflict ? "conflict" : ( d_effort==effort_prop_eq ? "prop_eq" : "mc" ) ); - Trace("qcf-engine") << ", addedLemmas = " << addedLemmas; - } - Trace("qcf-engine") << std::endl; - int currEt = d_statistics.d_entailment_checks.getData(); - if( currEt!=prevEt ){ - Trace("qcf-engine") << " Entailment checks = " << ( currEt - prevEt ) << std::endl; - } - } - } - Trace("qcf-check2") << "QCF : finished check : " << level << std::endl; - } -} - -bool QuantConflictFind::needsCheck( Theory::Effort level ) { - d_performCheck = false; - if( options::quantConflictFind() && !d_conflict ){ - if( level==Theory::EFFORT_LAST_CALL ){ - d_performCheck = options::qcfWhenMode()==QCF_WHEN_MODE_LAST_CALL; - }else if( level==Theory::EFFORT_FULL ){ - d_performCheck = options::qcfWhenMode()==QCF_WHEN_MODE_DEFAULT; - }else if( level==Theory::EFFORT_STANDARD ){ - d_performCheck = options::qcfWhenMode()==QCF_WHEN_MODE_STD; - } - } - return d_performCheck; -} - -void QuantConflictFind::computeRelevantEqr() { - if( d_needs_computeRelEqr ){ - d_needs_computeRelEqr = false; - Trace("qcf-check") << "Compute relevant equalities..." << std::endl; - d_uf_terms.clear(); - d_eqc_uf_terms.clear(); - d_eqcs.clear(); - d_model_basis.clear(); - d_arg_reps.clear(); - //double clSet = 0; - //if( Trace.isOn("qcf-opt") ){ - // clSet = double(clock())/double(CLOCKS_PER_SEC); - //} - - //long nTermst = 0; - //long nTerms = 0; - //long nEqc = 0; - - //which nodes are irrelevant for disequality matches - std::map< TNode, bool > irrelevant_dnode; - //now, store matches - eq::EqClassesIterator eqcs_i = eq::EqClassesIterator( getEqualityEngine() ); - while( !eqcs_i.isFinished() ){ - //nEqc++; - Node r = (*eqcs_i); - TypeNode rtn = r.getType(); - if( options::qcfMode()==QCF_MC ){ - std::map< TypeNode, std::vector< TNode > >::iterator itt = d_eqcs.find( rtn ); - if( itt==d_eqcs.end() ){ - Node mb = getQuantifiersEngine()->getTermDatabase()->getModelBasisTerm( rtn ); - if( !getEqualityEngine()->hasTerm( mb ) ){ - Trace("qcf-warn") << "WARNING: Model basis term does not exist!" << std::endl; - Assert( false ); - } - Node mbr = getRepresentative( mb ); - if( mbr!=r ){ - d_eqcs[rtn].push_back( mbr ); - } - d_eqcs[rtn].push_back( r ); - d_model_basis[rtn] = mb; - }else{ - itt->second.push_back( r ); - } - }else{ - d_eqcs[rtn].push_back( r ); - } - /* - eq::EqClassIterator eqc_i = eq::EqClassIterator( r, getEqualityEngine() ); - while( !eqc_i.isFinished() ){ - TNode n = (*eqc_i); - if( n.hasBoundVar() ){ - std::cout << "BAD TERM IN DB : " << n << std::endl; - exit( 199 ); - } - ++eqc_i; - } - - */ - - //if( r.getType().isInteger() ){ - // Trace("qcf-mv") << "Model value for eqc(" << r << ") : " << d_quantEngine->getValuation().getModelValue( r ) << std::endl; - //} - //EqcInfo * eqcir = getEqcInfo( r, false ); - //get relevant nodes that we are disequal from - /* - std::vector< Node > deqc; - if( eqcir ){ - for( NodeBoolMap::iterator it = eqcir->d_diseq.begin(); it != eqcir->d_diseq.end(); ++it ){ - if( (*it).second ){ - //Node rd = (*it).first; - //if( rd!=getRepresentative( rd ) ){ - // std::cout << "Bad rep!" << std::endl; - // exit( 0 ); - //} - deqc.push_back( (*it).first ); - } - } - } - */ - //process disequalities - /* - eq::EqClassIterator eqc_i = eq::EqClassIterator( r, getEqualityEngine() ); - while( !eqc_i.isFinished() ){ - TNode n = (*eqc_i); - if( n.getKind()!=EQUAL ){ - nTermst++; - //node_to_rep[n] = r; - //if( n.getNumChildren()>0 ){ - // if( n.getKind()!=APPLY_UF ){ - // std::cout << n.getKind() << " " << n.getOperator() << " " << n << std::endl; - // } - //} - if( !quantifiers::TermDb::hasBoundVarAttr( n ) ){ //temporary - - bool isRedundant; - std::map< TNode, std::vector< TNode > >::iterator it_na; - TNode fn; - if( MatchGen::isHandledUfTerm( n ) ){ - Node f = MatchGen::getOperator( this, n ); - computeArgReps( n ); - it_na = d_arg_reps.find( n ); - Assert( it_na!=d_arg_reps.end() ); - Node nadd = d_eqc_uf_terms[f].d_children[r].addTerm( n, d_arg_reps[n] ); - isRedundant = (nadd!=n); - d_uf_terms[f].addTerm( n, d_arg_reps[n] ); - }else{ - isRedundant = false; - } - nTerms += isRedundant ? 0 : 1; - }else{ - if( Debug.isOn("qcf-nground") ){ - Debug("qcf-nground") << "Non-ground term in eqc : " << n << std::endl; - Assert( false ); - } - } - } - ++eqc_i; - } - */ - ++eqcs_i; - } - /* - if( Trace.isOn("qcf-opt") ){ - double clSet2 = double(clock())/double(CLOCKS_PER_SEC); - Trace("qcf-opt") << "Compute rel eqc : " << std::endl; - Trace("qcf-opt") << " " << nEqc << " equivalence classes. " << std::endl; - Trace("qcf-opt") << " " << nTerms << " / " << nTermst << " terms." << std::endl; - Trace("qcf-opt") << " Time : " << (clSet2-clSet) << std::endl; - } - */ - } -} - -void QuantConflictFind::computeArgReps( TNode n ) { - if( d_arg_reps.find( n )==d_arg_reps.end() ){ - Assert( MatchGen::isHandledUfTerm( n ) ); - for( unsigned j=0; jgetTermDatabase()->getNumGroundTerms( f ); - for( unsigned i=0; igetTermDatabase()->d_op_map[f][i]; - if( getEqualityEngine()->hasTerm( n ) && !n.getAttribute(NoMatchAttribute()) ){ - Node r = getRepresentative( n ); - computeArgReps( n ); - d_eqc_uf_terms[f].d_children[r].addTerm( n, d_arg_reps[n] ); - d_uf_terms[f].addTerm( n, d_arg_reps[n] ); - } - } - } -} - -//-------------------------------------------------- debugging - - -void QuantConflictFind::debugPrint( const char * c ) { - //print the equivalance classes - Trace(c) << "----------EQ classes" << std::endl; - eq::EqClassesIterator eqcs_i = eq::EqClassesIterator( getEqualityEngine() ); - while( !eqcs_i.isFinished() ){ - Node n = (*eqcs_i); - //if( !n.getType().isInteger() ){ - Trace(c) << " - " << n << " : {"; - eq::EqClassIterator eqc_i = eq::EqClassIterator( n, getEqualityEngine() ); - bool pr = false; - while( !eqc_i.isFinished() ){ - Node nn = (*eqc_i); - if( nn.getKind()!=EQUAL && nn!=n ){ - Trace(c) << (pr ? "," : "" ) << " " << nn; - pr = true; - } - ++eqc_i; - } - Trace(c) << (pr ? " " : "" ) << "}" << std::endl; - /* - EqcInfo * eqcn = getEqcInfo( n, false ); - if( eqcn ){ - Trace(c) << " DEQ : {"; - pr = false; - for( NodeBoolMap::iterator it = eqcn->d_diseq.begin(); it != eqcn->d_diseq.end(); ++it ){ - if( (*it).second ){ - Trace(c) << (pr ? "," : "" ) << " " << (*it).first; - pr = true; - } - } - Trace(c) << (pr ? " " : "" ) << "}" << std::endl; - } - //} - */ - ++eqcs_i; - } -} - -void QuantConflictFind::debugPrintQuant( const char * c, Node q ) { - Trace(c) << "Q" << d_quant_id[q]; -} - -void QuantConflictFind::debugPrintQuantBody( const char * c, Node q, Node n, bool doVarNum ) { - if( n.getNumChildren()==0 ){ - Trace(c) << n; - }else if( doVarNum && d_qinfo[q].d_var_num.find( n )!=d_qinfo[q].d_var_num.end() ){ - Trace(c) << "?x" << d_qinfo[q].d_var_num[n]; - }else{ - Trace(c) << "("; - if( n.getKind()==APPLY_UF ){ - Trace(c) << n.getOperator(); - }else{ - Trace(c) << n.getKind(); - } - for( unsigned i=0; i::iterator it = d_zero.find( k ); - if( it==d_zero.end() ){ - Node nn; - if( k==PLUS ){ - nn = NodeManager::currentNM()->mkConst( Rational(0) ); - } - d_zero[k] = nn; - return nn; - }else{ - return it->second; - } -} - - -} +/********************* */ +/*! \file quant_conflict_find.cpp + ** \verbatim + ** Original author: Andrew Reynolds + ** Major contributors: none + ** Minor contributors (to current version): none + ** This file is part of the CVC4 project. + ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** See the file COPYING in the top-level source directory for licensing + ** information.\endverbatim + ** + ** \brief quant conflict find class + ** + **/ + +#include + +#include "theory/quantifiers/quant_conflict_find.h" +#include "theory/quantifiers/quant_util.h" +#include "theory/theory_engine.h" +#include "theory/quantifiers/options.h" +#include "theory/quantifiers/term_database.h" +#include "theory/quantifiers/trigger.h" + +using namespace CVC4; +using namespace CVC4::kind; +using namespace CVC4::theory; +using namespace CVC4::theory::quantifiers; +using namespace std; + +namespace CVC4 { + +Node QcfNodeIndex::existsTerm( TNode n, std::vector< TNode >& reps, int index ) { + if( index==(int)reps.size() ){ + if( d_children.empty() ){ + return Node::null(); + }else{ + return d_children.begin()->first; + } + }else{ + std::map< TNode, QcfNodeIndex >::iterator it = d_children.find( reps[index] ); + if( it==d_children.end() ){ + return Node::null(); + }else{ + return it->second.existsTerm( n, reps, index+1 ); + } + } +} + +Node QcfNodeIndex::addTerm( TNode n, std::vector< TNode >& reps, int index ) { + if( index==(int)reps.size() ){ + if( d_children.empty() ){ + d_children[ n ].clear(); + return n; + }else{ + return d_children.begin()->first; + } + }else{ + return d_children[reps[index]].addTerm( n, reps, index+1 ); + } +} + + +void QcfNodeIndex::debugPrint( const char * c, int t ) { + for( std::map< TNode, QcfNodeIndex >::iterator it = d_children.begin(); it != d_children.end(); ++it ){ + if( !it->first.isNull() ){ + for( int j=0; jfirst << " : " << std::endl; + it->second.debugPrint( c, t+1 ); + } + } +} + + +void QuantInfo::initialize( Node q, Node qn ) { + d_q = q; + for( unsigned i=0; iisValid() ){ + /* + for( unsigned j=0; jsetInvalid(); + break; + } + } + */ + if( d_mg->isValid() ){ + for( unsigned j=q[0].getNumChildren(); jisValid() ){ + Trace("qcf-invalid") << "QCF invalid : cannot match for " << d_vars[j] << std::endl; + d_mg->setInvalid(); + break; + }else{ + std::vector< int > bvars; + d_var_mg[j]->determineVariableOrder( this, bvars ); + } + } + } + if( d_mg->isValid() ){ + std::vector< int > bvars; + d_mg->determineVariableOrder( this, bvars ); + } + } + }else{ + Trace("qcf-invalid") << "QCF invalid : body of formula cannot be processed." << std::endl; + } + Trace("qcf-qregister-summary") << "QCF register : " << ( d_mg->isValid() ? "VALID " : "INVALID" ) << " : " << q << std::endl; +} + +void QuantInfo::registerNode( Node n, bool hasPol, bool pol, bool beneathQuant ) { + Trace("qcf-qregister-debug2") << "Register : " << n << std::endl; + if( n.getKind()==FORALL ){ + registerNode( n[1], hasPol, pol, true ); + }else{ + if( !MatchGen::isHandledBoolConnective( n ) ){ + if( n.hasBoundVar() ){ + //literals + if( n.getKind()==EQUAL ){ + for( unsigned i=0; id_parent = qcf; + //qcf->d_child[i] = qcfc; + registerNode( n[i], newHasPol, newPol, beneathQuant ); + } + } + } +} + +void QuantInfo::flatten( Node n, bool beneathQuant ) { + Trace("qcf-qregister-debug2") << "Flatten : " << n << std::endl; + if( n.hasBoundVar() ){ + if( n.getKind()==BOUND_VARIABLE ){ + d_inMatchConstraint[n] = true; + } + //if( MatchGen::isHandledUfTerm( n ) || n.getKind()==ITE ){ + if( d_var_num.find( n )==d_var_num.end() ){ + Trace("qcf-qregister-debug2") << "Add FLATTEN VAR : " << n << std::endl; + d_var_num[n] = d_vars.size(); + d_vars.push_back( n ); + d_match.push_back( TNode::null() ); + d_match_term.push_back( TNode::null() ); + if( n.getKind()==ITE ){ + registerNode( n, false, false ); + }else{ + for( unsigned i=0; i >::iterator it = d_var_constraint[r].begin(); + it != d_var_constraint[r].end(); ++it ){ + for( unsigned j=0; jsecond.size(); j++ ){ + Node rr = it->second[j]; + if( !isVar( rr ) ){ + rr = p->getRepresentative( rr ); + } + if( addConstraint( p, it->first, rr, r==0 )==-1 ){ + d_var_constraint[0].clear(); + d_var_constraint[1].clear(); + //quantified formula is actually equivalent to true + Trace("qcf-qregister") << "Quantifier is equivalent to true!!!" << std::endl; + d_mg->d_children.clear(); + d_mg->d_n = NodeManager::currentNM()->mkConst( true ); + d_mg->d_type = MatchGen::typ_ground; + return; + } + } + } + } + d_mg->reset_round( p ); + for( std::map< int, MatchGen * >::iterator it = d_var_mg.begin(); it != d_var_mg.end(); ++it ){ + it->second->reset_round( p ); + } + //now, reset for matching + d_mg->reset( p, false, this ); +} + +int QuantInfo::getCurrentRepVar( int v ) { + if( v!=-1 && !d_match[v].isNull() ){ + int vn = getVarNum( d_match[v] ); + if( vn!=-1 ){ + //int vr = getCurrentRepVar( vn ); + //d_match[v] = d_vars[vr]; + //return vr; + return getCurrentRepVar( vn ); + } + } + return v; +} + +TNode QuantInfo::getCurrentValue( TNode n ) { + int v = getVarNum( n ); + if( v==-1 ){ + return n; + }else{ + if( d_match[v].isNull() ){ + return n; + }else{ + Assert( getVarNum( d_match[v] )!=v ); + return getCurrentValue( d_match[v] ); + } + } +} + +TNode QuantInfo::getCurrentExpValue( TNode n ) { + int v = getVarNum( n ); + if( v==-1 ){ + return n; + }else{ + if( d_match[v].isNull() ){ + return n; + }else{ + Assert( getVarNum( d_match[v] )!=v ); + if( d_match_term[v].isNull() ){ + return getCurrentValue( d_match[v] ); + }else{ + return d_match_term[v]; + } + } + } +} + +bool QuantInfo::getCurrentCanBeEqual( QuantConflictFind * p, int v, TNode n, bool chDiseq ) { + //check disequalities + std::map< int, std::map< TNode, int > >::iterator itd = d_curr_var_deq.find( v ); + if( itd!=d_curr_var_deq.end() ){ + for( std::map< TNode, int >::iterator it = itd->second.begin(); it != itd->second.end(); ++it ){ + Node cv = getCurrentValue( it->first ); + Debug("qcf-ccbe") << "compare " << cv << " " << n << std::endl; + if( cv==n ){ + return false; + }else if( chDiseq && !isVar( n ) && !isVar( cv ) ){ + //they must actually be disequal if we are looking for conflicts + if( !p->areDisequal( n, cv ) ){ + //TODO : check for entailed disequal + + return false; + } + } + } + } + return true; +} + +int QuantInfo::addConstraint( QuantConflictFind * p, int v, TNode n, bool polarity ) { + v = getCurrentRepVar( v ); + int vn = getVarNum( n ); + vn = vn==-1 ? -1 : getCurrentRepVar( vn ); + n = getCurrentValue( n ); + return addConstraint( p, v, n, vn, polarity, false ); +} + +int QuantInfo::addConstraint( QuantConflictFind * p, int v, TNode n, int vn, bool polarity, bool doRemove ) { + //for handling equalities between variables, and disequalities involving variables + Debug("qcf-match-debug") << "- " << (doRemove ? "un" : "" ) << "constrain : " << v << " -> " << n << " (cv=" << getCurrentValue( n ) << ")"; + Debug("qcf-match-debug") << ", (vn=" << vn << "), polarity = " << polarity << std::endl; + Assert( doRemove || n==getCurrentValue( n ) ); + Assert( doRemove || v==getCurrentRepVar( v ) ); + Assert( doRemove || vn==getCurrentRepVar( getVarNum( n ) ) ); + if( polarity ){ + if( vn!=v ){ + if( doRemove ){ + if( vn!=-1 ){ + //if set to this in the opposite direction, clean up opposite instead + // std::map< int, TNode >::iterator itmn = d_match.find( vn ); + if( d_match[vn]==d_vars[v] ){ + return addConstraint( p, vn, d_vars[v], v, true, true ); + }else{ + //unsetting variables equal + std::map< int, std::map< TNode, int > >::iterator itd = d_curr_var_deq.find( vn ); + if( itd!=d_curr_var_deq.end() ){ + //remove disequalities owned by this + std::vector< TNode > remDeq; + for( std::map< TNode, int >::iterator it = itd->second.begin(); it != itd->second.end(); ++it ){ + if( it->second==v ){ + remDeq.push_back( it->first ); + } + } + for( unsigned i=0; i::iterator itm = d_match.find( v ); + + if( vn!=-1 ){ + Debug("qcf-match-debug") << " ...Variable bound to variable" << std::endl; + //std::map< int, TNode >::iterator itmn = d_match.find( vn ); + if( d_match[v].isNull() ){ + //setting variables equal + bool alreadySet = false; + if( !d_match[vn].isNull() ){ + alreadySet = true; + Assert( !isVar( d_match[vn] ) ); + } + + //copy or check disequalities + std::map< int, std::map< TNode, int > >::iterator itd = d_curr_var_deq.find( v ); + if( itd!=d_curr_var_deq.end() ){ + for( std::map< TNode, int >::iterator it = itd->second.begin(); it != itd->second.end(); ++it ){ + Node dv = getCurrentValue( it->first ); + if( !alreadySet ){ + if( d_curr_var_deq[vn].find( dv )==d_curr_var_deq[vn].end() ){ + d_curr_var_deq[vn][dv] = v; + } + }else{ + if( !p->areMatchDisequal( d_match[vn], dv ) ){ + Debug("qcf-match-debug") << " -> fail, conflicting disequality" << std::endl; + return -1; + } + } + } + } + if( alreadySet ){ + n = getCurrentValue( n ); + } + }else{ + if( d_match[vn].isNull() ){ + Debug("qcf-match-debug") << " ...Reverse direction" << std::endl; + //set the opposite direction + return addConstraint( p, vn, d_vars[v], v, true, false ); + }else{ + Debug("qcf-match-debug") << " -> Both variables bound, compare" << std::endl; + //are they currently equal + return p->areMatchEqual( d_match[v], d_match[vn] ) ? 0 : -1; + } + } + }else{ + Debug("qcf-match-debug") << " ...Variable bound to ground" << std::endl; + if( d_match[v].isNull() ){ + }else{ + //compare ground values + Debug("qcf-match-debug") << " -> Ground value, compare " << d_match[v] << " "<< n << std::endl; + return p->areMatchEqual( d_match[v], n ) ? 0 : -1; + } + } + if( setMatch( p, v, n ) ){ + Debug("qcf-match-debug") << " -> success" << std::endl; + return 1; + }else{ + Debug("qcf-match-debug") << " -> fail, conflicting disequality" << std::endl; + return -1; + } + } + }else{ + Debug("qcf-match-debug") << " -> redundant, variable identity" << std::endl; + return 0; + } + }else{ + if( vn==v ){ + Debug("qcf-match-debug") << " -> fail, variable identity" << std::endl; + return -1; + }else{ + if( doRemove ){ + Assert( d_curr_var_deq[v].find( n )!=d_curr_var_deq[v].end() ); + d_curr_var_deq[v].erase( n ); + return 1; + }else{ + if( d_curr_var_deq[v].find( n )==d_curr_var_deq[v].end() ){ + //check if it respects equality + //std::map< int, TNode >::iterator itm = d_match.find( v ); + if( !d_match[v].isNull() ){ + TNode nv = getCurrentValue( n ); + if( !p->areMatchDisequal( nv, d_match[v] ) ){ + Debug("qcf-match-debug") << " -> fail, conflicting disequality" << std::endl; + return -1; + } + } + d_curr_var_deq[v][n] = v; + Debug("qcf-match-debug") << " -> success" << std::endl; + return 1; + }else{ + Debug("qcf-match-debug") << " -> redundant disequality" << std::endl; + return 0; + } + } + } + } +} + +bool QuantInfo::isConstrainedVar( int v ) { + if( d_curr_var_deq.find( v )!=d_curr_var_deq.end() && !d_curr_var_deq[v].empty() ){ + return true; + }else{ + Node vv = getVar( v ); + //for( std::map< int, TNode >::iterator it = d_match.begin(); it != d_match.end(); ++it ){ + for( unsigned i=0; i >::iterator it = d_curr_var_deq.begin(); it != d_curr_var_deq.end(); ++it ){ + for( std::map< TNode, int >::iterator it2 = it->second.begin(); it2 != it->second.end(); ++it2 ){ + if( it2->first==vv ){ + return true; + } + } + } + return false; + } +} + +bool QuantInfo::setMatch( QuantConflictFind * p, int v, TNode n ) { + if( getCurrentCanBeEqual( p, v, n ) ){ + Debug("qcf-match-debug") << "-- bind : " << v << " -> " << n << ", checked " << d_curr_var_deq[v].size() << " disequalities" << std::endl; + d_match[v] = n; + return true; + }else{ + return false; + } +} + +bool QuantInfo::isMatchSpurious( QuantConflictFind * p ) { + for( int i=0; i::iterator it = d_match.find( i ); + if( !d_match[i].isNull() ){ + if( !getCurrentCanBeEqual( p, i, d_match[i], p->d_effort==QuantConflictFind::effort_conflict ) ){ + return true; + } + } + } + return false; +} + +bool QuantInfo::isTConstraintSpurious( QuantConflictFind * p, std::vector< Node >& terms ) { + if( !d_tconstraints.empty() ){ + //check constraints + for( std::map< Node, bool >::iterator it = d_tconstraints.begin(); it != d_tconstraints.end(); ++it ){ + //apply substitution to the tconstraint + Node cons = it->first.substitute( p->getQuantifiersEngine()->getTermDatabase()->d_vars[d_q].begin(), + p->getQuantifiersEngine()->getTermDatabase()->d_vars[d_q].end(), + terms.begin(), terms.end() ); + cons = it->second ? cons : cons.negate(); + if( !entailmentTest( p, cons, p->d_effort==QuantConflictFind::effort_conflict ) ){ + return true; + } + } + } + return false; +} + +bool QuantInfo::entailmentTest( QuantConflictFind * p, Node lit, bool chEnt ) { + Trace("qcf-tconstraint-debug") << "Check : " << lit << std::endl; + Node rew = Rewriter::rewrite( lit ); + if( rew==p->d_false ){ + Trace("qcf-tconstraint-debug") << "...constraint " << lit << " is disentailed (rewrites to false)." << std::endl; + return false; + }else if( rew!=p->d_true ){ + //if checking for conflicts, we must be sure that the constraint is entailed + if( chEnt ){ + //check if it is entailed + Trace("qcf-tconstraint-debug") << "Check entailment of " << rew << "..." << std::endl; + std::pair et = p->getQuantifiersEngine()->getTheoryEngine()->entailmentCheck(THEORY_OF_TYPE_BASED, rew ); + ++(p->d_statistics.d_entailment_checks); + Trace("qcf-tconstraint-debug") << "ET result : " << et.first << " " << et.second << std::endl; + if( !et.first ){ + Trace("qcf-tconstraint-debug") << "...cannot show entailment of " << rew << "." << std::endl; + return false; + }else{ + return true; + } + }else{ + Trace("qcf-tconstraint-debug") << "...does not need to be entailed." << std::endl; + return true; + } + }else{ + Trace("qcf-tconstraint-debug") << "...rewrites to true." << std::endl; + return true; + } +} + +bool QuantInfo::completeMatch( QuantConflictFind * p, std::vector< int >& assigned, bool doContinue ) { + //assign values for variables that were unassigned (usually not necessary, but handles corner cases) + bool doFail = false; + bool success = true; + if( doContinue ){ + doFail = true; + success = false; + }else{ + //solve for interpreted symbol matches + // this breaks the invariant that all introduced constraints are over existing terms + for( int i=(int)(d_tsym_vars.size()-1); i>=0; i-- ){ + int index = d_tsym_vars[i]; + TNode v = getCurrentValue( d_vars[index] ); + int slv_v = -1; + if( v==d_vars[index] ){ + slv_v = index; + } + Trace("qcf-tconstraint-debug") << "Solve " << d_vars[index] << " = " << v << " " << d_vars[index].getKind() << std::endl; + if( d_vars[index].getKind()==PLUS || d_vars[index].getKind()==MULT ){ + Kind k = d_vars[index].getKind(); + std::vector< TNode > children; + for( unsigned j=0; jd_effort!=QuantConflictFind::effort_conflict ){ + break; + } + }else{ + Node z = p->getZero( k ); + if( !z.isNull() ){ + Trace("qcf-tconstraint-debug") << "...set " << d_vars[vn] << " = " << z << std::endl; + assigned.push_back( vn ); + if( !setMatch( p, vn, z ) ){ + success = false; + break; + } + } + } + }else{ + Trace("qcf-tconstraint-debug") << "...sum value " << vv << std::endl; + children.push_back( vv ); + } + }else{ + Trace("qcf-tconstraint-debug") << "...sum " << d_vars[index][j] << std::endl; + children.push_back( d_vars[index][j] ); + } + } + if( success ){ + if( slv_v!=-1 ){ + Node lhs; + if( children.empty() ){ + lhs = p->getZero( k ); + }else if( children.size()==1 ){ + lhs = children[0]; + }else{ + lhs = NodeManager::currentNM()->mkNode( k, children ); + } + Node sum; + if( v==d_vars[index] ){ + sum = lhs; + }else{ + if( p->d_effort==QuantConflictFind::effort_conflict ){ + Kind kn = k; + if( d_vars[index].getKind()==PLUS ){ + kn = MINUS; + } + if( kn!=k ){ + sum = NodeManager::currentNM()->mkNode( kn, v, lhs ); + } + } + } + if( !sum.isNull() ){ + assigned.push_back( slv_v ); + Trace("qcf-tconstraint-debug") << "...set " << d_vars[slv_v] << " = " << sum << std::endl; + if( !setMatch( p, slv_v, sum ) ){ + success = false; + } + p->d_tempCache.push_back( sum ); + } + }else{ + //must show that constraint is met + Node sum = NodeManager::currentNM()->mkNode( k, children ); + Node eq = sum.eqNode( v ); + if( !entailmentTest( p, eq ) ){ + success = false; + } + p->d_tempCache.push_back( sum ); + } + } + } + + if( !success ){ + break; + } + } + if( success ){ + //check what is left to assign + d_unassigned.clear(); + d_unassigned_tn.clear(); + std::vector< int > unassigned[2]; + std::vector< TypeNode > unassigned_tn[2]; + for( int i=0; i=0 && (int)d_una_index<(int)d_unassigned.size() ) || invalidMatch || doFail ){ + invalidMatch = false; + if( !doFail && d_una_index==(int)d_una_eqc_count.size() ){ + //check if it has now been assigned + if( d_una_indexreset( p, true, this ); + d_una_eqc_count.push_back( 0 ); + } + }else{ + d_una_eqc_count.push_back( 0 ); + } + }else{ + bool failed = false; + if( !doFail ){ + if( d_una_indexgetNextMatch( p, this ) ){ + Trace("qcf-check-unassign") << "Succeeded match with mg at " << d_una_index << std::endl; + d_una_index++; + }else{ + failed = true; + Trace("qcf-check-unassign") << "Failed match with mg at " << d_una_index << std::endl; + } + }else{ + Assert( doFail || d_una_index==(int)d_una_eqc_count.size()-1 ); + if( d_una_eqc_count[d_una_index]<(int)p->d_eqcs[d_unassigned_tn[d_una_index]].size() ){ + int currIndex = d_una_eqc_count[d_una_index]; + d_una_eqc_count[d_una_index]++; + Trace("qcf-check-unassign") << d_unassigned[d_una_index] << "->" << p->d_eqcs[d_unassigned_tn[d_una_index]][currIndex] << std::endl; + if( setMatch( p, d_unassigned[d_una_index], p->d_eqcs[d_unassigned_tn[d_una_index]][currIndex] ) ){ + d_match_term[d_unassigned[d_una_index]] = TNode::null(); + Trace("qcf-check-unassign") << "Succeeded match " << d_una_index << std::endl; + d_una_index++; + }else{ + Trace("qcf-check-unassign") << "Failed match " << d_una_index << std::endl; + invalidMatch = true; + } + }else{ + failed = true; + Trace("qcf-check-unassign") << "No more matches " << d_una_index << std::endl; + } + } + } + if( doFail || failed ){ + do{ + if( !doFail ){ + d_una_eqc_count.pop_back(); + }else{ + doFail = false; + } + d_una_index--; + }while( d_una_index>=0 && d_una_eqc_count[d_una_index]==-1 ); + } + } + } + success = d_una_index>=0; + if( success ){ + doFail = true; + Trace("qcf-check-unassign") << " Try: " << std::endl; + for( unsigned i=0; i " << d_match[ui] << std::endl; + } + } + } + }while( success && isMatchSpurious( p ) ); + } + if( success ){ + for( unsigned i=0; i " << d_match[ui] << std::endl; + } + } + return true; + }else{ + for( unsigned i=0; i& terms ){ + for( unsigned i=0; igetCurrentValue( qi->d_match[i] ); + int repVar = getCurrentRepVar( i ); + Node cv; + //std::map< int, TNode >::iterator itmt = qi->d_match_term.find( repVar ); + if( !d_match_term[repVar].isNull() ){ + cv = d_match_term[repVar]; + }else{ + cv = d_match[repVar]; + } + Debug("qcf-check-inst") << "INST : " << i << " -> " << cv << ", from " << d_match[i] << std::endl; + terms.push_back( cv ); + } +} + +void QuantInfo::revertMatch( std::vector< int >& assigned ) { + for( unsigned i=0; i "; + if( !d_match[i].isNull() ){ + Trace(c) << d_match[i]; + }else{ + Trace(c) << "(unassigned) "; + } + if( !d_curr_var_deq[i].empty() ){ + Trace(c) << ", DEQ{ "; + for( std::map< TNode, int >::iterator it = d_curr_var_deq[i].begin(); it != d_curr_var_deq[i].end(); ++it ){ + Trace(c) << it->first << " "; + } + Trace(c) << "}"; + } + if( !d_match_term[i].isNull() && d_match_term[i]!=d_match[i] ){ + Trace(c) << ", EXP : " << d_match_term[i]; + } + Trace(c) << std::endl; + } + if( !d_tconstraints.empty() ){ + Trace(c) << "ADDITIONAL CONSTRAINTS : " << std::endl; + for( std::map< Node, bool >::iterator it = d_tconstraints.begin(); it != d_tconstraints.end(); ++it ){ + Trace(c) << " " << it->first << " -> " << it->second << std::endl; + } + } +} + +MatchGen::MatchGen( QuantInfo * qi, Node n, bool isVar ){ + Trace("qcf-qregister-debug") << "Make match gen for " << n << ", isVar = " << isVar << std::endl; + std::vector< Node > qni_apps; + d_qni_size = 0; + if( isVar ){ + Assert( qi->d_var_num.find( n )!=qi->d_var_num.end() ); + if( n.getKind()==ITE ){ + d_type = typ_ite_var; + d_type_not = false; + d_n = n; + d_children.push_back( MatchGen( qi, d_n[0] ) ); + if( d_children[0].isValid() ){ + d_type = typ_ite_var; + for( unsigned i=1; i<=2; i++ ){ + Node nn = n.eqNode( n[i] ); + d_children.push_back( MatchGen( qi, nn ) ); + d_children[d_children.size()-1].d_qni_bound_except.push_back( 0 ); + if( !d_children[d_children.size()-1].isValid() ){ + setInvalid(); + break; + } + } + }else{ + d_type = typ_invalid; + } + }else{ + d_type = isHandledUfTerm( n ) ? typ_var : typ_tsym; + d_qni_var_num[0] = qi->getVarNum( n ); + d_qni_size++; + d_type_not = false; + d_n = n; + //Node f = getOperator( n ); + for( unsigned j=0; jisVar( nn ) ){ + int v = qi->d_var_num[nn]; + Trace("qcf-qregister-debug") << " is var #" << v << std::endl; + d_qni_var_num[d_qni_size] = v; + //qi->addFuncParent( v, f, j ); + }else{ + Trace("qcf-qregister-debug") << " is gterm " << nn << std::endl; + d_qni_gterm[d_qni_size] = nn; + } + d_qni_size++; + } + } + }else{ + if( n.hasBoundVar() ){ + d_type_not = false; + d_n = n; + if( d_n.getKind()==NOT ){ + d_n = d_n[0]; + d_type_not = !d_type_not; + } + + if( isHandledBoolConnective( d_n ) ){ + //non-literals + d_type = typ_formula; + for( unsigned i=0; id_qinfo[q].isVar( cn[0] ) || p->d_qinfo[q].isVar( cn[1] ) ); + //make it a built-in constraint instead + for( unsigned i=0; i<2; i++ ){ + if( p->d_qinfo[q].isVar( cn[i] ) ){ + int v = p->d_qinfo[q].getVarNum( cn[i] ); + Node cno = cn[i==0 ? 1 : 0]; + p->d_qinfo[q].d_var_constraint[ cIsNot ? 0 : 1 ][v].push_back( cno ); + break; + } + } + d_children.pop_back(); + } + */ + } + }else{ + d_type = typ_invalid; + //literals + if( isHandledUfTerm( d_n ) ){ + Assert( qi->isVar( d_n ) ); + d_type = typ_pred; + }else if( d_n.getKind()==BOUND_VARIABLE ){ + Assert( d_n.getType().isBoolean() ); + d_type = typ_bool_var; + }else if( d_n.getKind()==EQUAL || options::qcfTConstraint() ){ + for( unsigned i=0; iisVar( d_n[i] ) ){ + Trace("qcf-qregister-debug") << "ERROR : not var " << d_n[i] << std::endl; + } + Assert( qi->isVar( d_n[i] ) ); + if( d_n.getKind()!=EQUAL && qi->isVar( d_n[i] ) ){ + d_qni_var_num[i+1] = qi->d_var_num[d_n[i]]; + } + }else{ + d_qni_gterm[i] = d_n[i]; + } + } + d_type = d_n.getKind()==EQUAL ? typ_eq : typ_tconstraint; + Trace("qcf-tconstraint") << "T-Constraint : " << d_n << std::endl; + } + } + }else{ + //we will just evaluate + d_n = n; + d_type = typ_ground; + } + //if( d_type!=typ_invalid ){ + //determine an efficient children ordering + //if( !d_children.empty() ){ + //for( unsigned i=0; i& cbvars ) { + int v = qi->getVarNum( n ); + if( v!=-1 && std::find( cbvars.begin(), cbvars.end(), v )==cbvars.end() ){ + cbvars.push_back( v ); + } + for( unsigned i=0; i& bvars ) { + Trace("qcf-qregister-debug") << "Determine variable order " << d_n << std::endl; + bool isCom = d_type==typ_formula && ( d_n.getKind()==OR || d_n.getKind()==AND || d_n.getKind()==IFF ); + std::map< int, std::vector< int > > c_to_vars; + std::map< int, std::vector< int > > vars_to_c; + std::map< int, int > vb_count; + std::map< int, int > vu_count; + std::vector< bool > assigned; + Trace("qcf-qregister-debug") << "Calculate bound variables..." << std::endl; + for( unsigned i=0; i::iterator it = d_qni_gterm.begin(); it != d_qni_gterm.end(); ++it ){ + d_qni_gterm_rep[it->first] = p->getRepresentative( it->second ); + } + if( d_type==typ_ground ){ + int e = p->evaluate( d_n ); + if( e==1 ){ + d_ground_eval[0] = p->d_true; + }else if( e==-1 ){ + d_ground_eval[0] = p->d_false; + } + }else if( d_type==typ_eq ){ + for( unsigned i=0; ievaluateTerm( d_n[i] ); + } + } + } + d_qni_bound_cons.clear(); + d_qni_bound_cons_var.clear(); + d_qni_bound.clear(); +} + +void MatchGen::reset( QuantConflictFind * p, bool tgt, QuantInfo * qi ) { + d_tgt = d_type_not ? !tgt : tgt; + Debug("qcf-match") << " Reset for : " << d_n << ", type : "; + debugPrintType( "qcf-match", d_type ); + Debug("qcf-match") << ", tgt = " << d_tgt << ", children = " << d_children.size() << " " << d_children_order.size() << std::endl; + d_qn.clear(); + d_qni.clear(); + d_qni_bound.clear(); + d_child_counter = -1; + d_tgt_orig = d_tgt; + + //set up processing matches + if( d_type==typ_invalid ){ + //do nothing + }else if( d_type==typ_ground ){ + if( d_ground_eval[0]==( d_tgt ? p->d_true : p->d_false ) ){ + d_child_counter = 0; + } + }else if( d_type==typ_bool_var ){ + //get current value of the variable + TNode n = qi->getCurrentValue( d_n ); + int vn = qi->getCurrentRepVar( qi->getVarNum( n ) ); + if( vn==-1 ){ + //evaluate the value, see if it is compatible + int e = p->evaluate( n ); + if( ( e==1 && d_tgt ) || ( e==0 && !d_tgt ) ){ + d_child_counter = 0; + } + }else{ + //unassigned, set match to true/false + d_qni_bound[0] = vn; + qi->setMatch( p, vn, d_tgt ? p->d_true : p->d_false ); + d_child_counter = 0; + } + if( d_child_counter==0 ){ + d_qn.push_back( NULL ); + } + }else if( d_type==typ_var ){ + Assert( isHandledUfTerm( d_n ) ); + Node f = getOperator( p, d_n ); + Debug("qcf-match-debug") << " reset: Var will match operators of " << f << std::endl; + QcfNodeIndex * qni = p->getQcfNodeIndex( Node::null(), f ); + if( qni!=NULL ){ + d_qn.push_back( qni ); + } + d_matched_basis = false; + }else if( d_type==typ_tsym || d_type==typ_tconstraint ){ + for( std::map< int, int >::iterator it = d_qni_var_num.begin(); it != d_qni_var_num.end(); ++it ){ + int repVar = qi->getCurrentRepVar( it->second ); + if( qi->d_match[repVar].isNull() ){ + Debug("qcf-match-debug") << "Force matching on child #" << it->first << ", which is var #" << repVar << std::endl; + d_qni_bound[it->first] = repVar; + } + } + d_qn.push_back( NULL ); + }else if( d_type==typ_pred || d_type==typ_eq ){ + //add initial constraint + Node nn[2]; + int vn[2]; + if( d_type==typ_pred ){ + nn[0] = qi->getCurrentValue( d_n ); + vn[0] = qi->getCurrentRepVar( qi->getVarNum( nn[0] ) ); + nn[1] = p->getRepresentative( d_tgt ? p->d_true : p->d_false ); + vn[1] = -1; + d_tgt = true; + }else{ + for( unsigned i=0; i<2; i++ ){ + TNode nc; + std::map< int, TNode >::iterator it = d_qni_gterm_rep.find( i ); + if( it!=d_qni_gterm_rep.end() ){ + nc = it->second; + }else{ + nc = d_n[i]; + } + nn[i] = qi->getCurrentValue( nc ); + vn[i] = qi->getCurrentRepVar( qi->getVarNum( nn[i] ) ); + } + } + bool success; + if( vn[0]==-1 && vn[1]==-1 ){ + //Trace("qcf-explain") << " reset : " << d_n << " check ground values " << nn[0] << " " << nn[1] << " (tgt=" << d_tgt << ")" << std::endl; + Debug("qcf-match-debug") << " reset: check ground values " << nn[0] << " " << nn[1] << " (" << d_tgt << ")" << std::endl; + //just compare values + if( d_tgt ){ + success = p->areMatchEqual( nn[0], nn[1] ); + }else{ + if( p->d_effort==QuantConflictFind::effort_conflict ){ + success = p->areDisequal( nn[0], nn[1] ); + }else{ + success = p->areMatchDisequal( nn[0], nn[1] ); + } + } + }else{ + //otherwise, add a constraint to a variable + if( vn[1]!=-1 && vn[0]==-1 ){ + //swap + Node t = nn[1]; + nn[1] = nn[0]; + nn[0] = t; + vn[0] = vn[1]; + vn[1] = -1; + } + Debug("qcf-match-debug") << " reset: add constraint " << vn[0] << " -> " << nn[1] << " (vn=" << vn[1] << ")" << std::endl; + //add some constraint + int addc = qi->addConstraint( p, vn[0], nn[1], vn[1], d_tgt, false ); + success = addc!=-1; + //if successful and non-redundant, store that we need to cleanup this + if( addc==1 ){ + //Trace("qcf-explain") << " reset: " << d_n << " add constraint " << vn[0] << " -> " << nn[1] << " (vn=" << vn[1] << ")" << ", d_tgt = " << d_tgt << std::endl; + for( unsigned i=0; i<2; i++ ){ + if( vn[i]!=-1 && std::find( d_qni_bound_except.begin(), d_qni_bound_except.end(), i )==d_qni_bound_except.end() ){ + d_qni_bound[vn[i]] = vn[i]; + } + } + d_qni_bound_cons[vn[0]] = nn[1]; + d_qni_bound_cons_var[vn[0]] = vn[1]; + } + } + //if successful, we will bind values to variables + if( success ){ + d_qn.push_back( NULL ); + } + }else{ + if( d_children.empty() ){ + //add dummy + d_qn.push_back( NULL ); + }else{ + if( d_tgt && d_n.getKind()==FORALL ){ + //do nothing + }else{ + //reset the first child to d_tgt + d_child_counter = 0; + getChild( d_child_counter )->reset( p, d_tgt, qi ); + } + } + } + d_binding = false; + d_wasSet = true; + Debug("qcf-match") << " reset: Finished reset for " << d_n << ", success = " << ( !d_qn.empty() || d_child_counter!=-1 ) << std::endl; +} + +bool MatchGen::getNextMatch( QuantConflictFind * p, QuantInfo * qi ) { + Debug("qcf-match") << " Get next match for : " << d_n << ", type = "; + debugPrintType( "qcf-match", d_type ); + Debug("qcf-match") << ", children = " << d_children.size() << ", binding = " << d_binding << std::endl; + if( d_type==typ_invalid || d_type==typ_ground ){ + if( d_child_counter==0 ){ + d_child_counter = -1; + return true; + }else{ + d_wasSet = false; + return false; + } + }else if( d_type==typ_var || d_type==typ_eq || d_type==typ_pred || d_type==typ_bool_var || d_type==typ_tconstraint || d_type==typ_tsym ){ + bool success = false; + bool terminate = false; + do { + bool doReset = false; + bool doFail = false; + if( !d_binding ){ + if( doMatching( p, qi ) ){ + Debug("qcf-match-debug") << " - Matching succeeded" << std::endl; + d_binding = true; + d_binding_it = d_qni_bound.begin(); + doReset = true; + //for tconstraint, add constraint + if( d_type==typ_tconstraint ){ + std::map< Node, bool >::iterator it = qi->d_tconstraints.find( d_n ); + if( it==qi->d_tconstraints.end() ){ + qi->d_tconstraints[d_n] = d_tgt; + //store that we added this constraint + d_qni_bound_cons[0] = d_n; + }else if( d_tgt!=it->second ){ + success = false; + terminate = true; + } + } + }else{ + Debug("qcf-match-debug") << " - Matching failed" << std::endl; + success = false; + terminate = true; + } + }else{ + doFail = true; + } + if( d_binding ){ + //also need to create match for each variable we bound + success = true; + Debug("qcf-match-debug") << " Produce matches for bound variables by " << d_n << ", type = "; + debugPrintType( "qcf-match-debug", d_type ); + Debug("qcf-match-debug") << "..." << std::endl; + + while( ( success && d_binding_it!=d_qni_bound.end() ) || doFail ){ + std::map< int, MatchGen * >::iterator itm; + if( !doFail ){ + Debug("qcf-match-debug") << " check variable " << d_binding_it->second << std::endl; + itm = qi->d_var_mg.find( d_binding_it->second ); + } + if( doFail || ( d_binding_it->first!=0 && itm!=qi->d_var_mg.end() ) ){ + Debug("qcf-match-debug") << " we had bound variable " << d_binding_it->second << ", reset = " << doReset << std::endl; + if( doReset ){ + itm->second->reset( p, true, qi ); + } + if( doFail || !itm->second->getNextMatch( p, qi ) ){ + do { + if( d_binding_it==d_qni_bound.begin() ){ + Debug("qcf-match-debug") << " failed." << std::endl; + success = false; + }else{ + --d_binding_it; + Debug("qcf-match-debug") << " decrement..." << std::endl; + } + }while( success && ( d_binding_it->first==0 || qi->d_var_mg.find( d_binding_it->second )==qi->d_var_mg.end() ) ); + doReset = false; + doFail = false; + }else{ + Debug("qcf-match-debug") << " increment..." << std::endl; + ++d_binding_it; + doReset = true; + } + }else{ + Debug("qcf-match-debug") << " skip..." << d_binding_it->second << std::endl; + ++d_binding_it; + doReset = true; + } + } + if( !success ){ + d_binding = false; + }else{ + terminate = true; + if( d_binding_it==d_qni_bound.begin() ){ + d_binding = false; + } + } + } + }while( !terminate ); + //if not successful, clean up the variables you bound + if( !success ){ + if( d_type==typ_eq || d_type==typ_pred ){ + //clean up the constraints you added + for( std::map< int, TNode >::iterator it = d_qni_bound_cons.begin(); it != d_qni_bound_cons.end(); ++it ){ + if( !it->second.isNull() ){ + Debug("qcf-match") << " Clean up bound var " << it->first << (d_tgt ? "!" : "") << " = " << it->second << std::endl; + std::map< int, int >::iterator itb = d_qni_bound_cons_var.find( it->first ); + int vn = itb!=d_qni_bound_cons_var.end() ? itb->second : -1; + //Trace("qcf-explain") << " cleanup: " << d_n << " remove constraint " << it->first << " -> " << it->second << " (vn=" << vn << ")" << ", d_tgt = " << d_tgt << std::endl; + qi->addConstraint( p, it->first, it->second, vn, d_tgt, true ); + } + } + d_qni_bound_cons.clear(); + d_qni_bound_cons_var.clear(); + d_qni_bound.clear(); + }else{ + //clean up the matches you set + for( std::map< int, int >::iterator it = d_qni_bound.begin(); it != d_qni_bound.end(); ++it ){ + Debug("qcf-match") << " Clean up bound var " << it->second << std::endl; + Assert( it->secondgetNumVars() ); + qi->d_match[ it->second ] = TNode::null(); + qi->d_match_term[ it->second ] = TNode::null(); + } + d_qni_bound.clear(); + } + if( d_type==typ_tconstraint ){ + //remove constraint if applicable + if( d_qni_bound_cons.find( 0 )!=d_qni_bound_cons.end() ){ + qi->d_tconstraints.erase( d_n ); + d_qni_bound_cons.clear(); + } + } + /* + if( d_type==typ_var && p->d_effort==QuantConflictFind::effort_mc && !d_matched_basis ){ + d_matched_basis = true; + Node f = getOperator( d_n ); + TNode mbo = p->getQuantifiersEngine()->getTermDatabase()->getModelBasisOpTerm( f ); + if( qi->setMatch( p, d_qni_var_num[0], mbo ) ){ + success = true; + d_qni_bound[0] = d_qni_var_num[0]; + } + } + */ + } + Debug("qcf-match") << " ...finished matching for " << d_n << ", success = " << success << std::endl; + d_wasSet = success; + return success; + }else if( d_type==typ_formula || d_type==typ_ite_var ){ + bool success = false; + if( d_child_counter<0 ){ + if( d_child_counter<-1 ){ + success = true; + d_child_counter = -1; + } + }else{ + while( !success && d_child_counter>=0 ){ + //transition system based on d_child_counter + if( d_n.getKind()==OR || d_n.getKind()==AND ){ + if( (d_n.getKind()==AND)==d_tgt ){ + //all children must match simultaneously + if( getChild( d_child_counter )->getNextMatch( p, qi ) ){ + if( d_child_counter<(int)(getNumChildren()-1) ){ + d_child_counter++; + Debug("qcf-match-debug") << " Reset child " << d_child_counter << " of " << d_n << std::endl; + getChild( d_child_counter )->reset( p, d_tgt, qi ); + }else{ + success = true; + } + }else{ + //if( std::find( d_independent.begin(), d_independent.end(), d_child_counter )!=d_independent.end() ){ + // d_child_counter--; + //}else{ + d_child_counter--; + //} + } + }else{ + //one child must match + if( !getChild( d_child_counter )->getNextMatch( p, qi ) ){ + if( d_child_counter<(int)(getNumChildren()-1) ){ + d_child_counter++; + Debug("qcf-match-debug") << " Reset child " << d_child_counter << " of " << d_n << ", one match" << std::endl; + getChild( d_child_counter )->reset( p, d_tgt, qi ); + }else{ + d_child_counter = -1; + } + }else{ + success = true; + } + } + }else if( d_n.getKind()==IFF ){ + //construct match based on both children + if( d_child_counter%2==0 ){ + if( getChild( 0 )->getNextMatch( p, qi ) ){ + d_child_counter++; + getChild( 1 )->reset( p, d_child_counter==1, qi ); + }else{ + if( d_child_counter==0 ){ + d_child_counter = 2; + getChild( 0 )->reset( p, !d_tgt, qi ); + }else{ + d_child_counter = -1; + } + } + } + if( d_child_counter>=0 && d_child_counter%2==1 ){ + if( getChild( 1 )->getNextMatch( p, qi ) ){ + success = true; + }else{ + d_child_counter--; + } + } + }else if( d_n.getKind()==ITE ){ + if( d_child_counter%2==0 ){ + int index1 = d_child_counter==4 ? 1 : 0; + if( getChild( index1 )->getNextMatch( p, qi ) ){ + d_child_counter++; + getChild( d_child_counter==5 ? 2 : (d_tgt==(d_child_counter==1) ? 1 : 2) )->reset( p, d_tgt, qi ); + }else{ + if( d_child_counter==4 || ( d_type==typ_ite_var && d_child_counter==2 ) ){ + d_child_counter = -1; + }else{ + d_child_counter +=2; + getChild( d_child_counter==2 ? 0 : 1 )->reset( p, d_child_counter==2 ? !d_tgt : d_tgt, qi ); + } + } + } + if( d_child_counter>=0 && d_child_counter%2==1 ){ + int index2 = d_child_counter==5 ? 2 : (d_tgt==(d_child_counter==1) ? 1 : 2); + if( getChild( index2 )->getNextMatch( p, qi ) ){ + success = true; + }else{ + d_child_counter--; + } + } + }else if( d_n.getKind()==FORALL ){ + if( getChild( d_child_counter )->getNextMatch( p, qi ) ){ + success = true; + }else{ + d_child_counter = -1; + } + } + } + d_wasSet = success; + Debug("qcf-match") << " ...finished construct match for " << d_n << ", success = " << success << std::endl; + return success; + } + } + Debug("qcf-match") << " ...already finished for " << d_n << std::endl; + return false; +} + +bool MatchGen::getExplanation( QuantConflictFind * p, QuantInfo * qi, std::vector< Node >& exp ) { + if( d_type==typ_eq ){ + Node n[2]; + for( unsigned i=0; i<2; i++ ){ + Trace("qcf-explain") << "Explain term " << d_n[i] << "..." << std::endl; + n[i] = getExplanationTerm( p, qi, d_n[i], exp ); + } + Node eq = n[0].eqNode( n[1] ); + if( !d_tgt_orig ){ + eq = eq.negate(); + } + exp.push_back( eq ); + Trace("qcf-explain") << "Explanation for " << d_n << " (tgt=" << d_tgt_orig << ") is " << eq << ", set = " << d_wasSet << std::endl; + return true; + }else if( d_type==typ_pred ){ + Trace("qcf-explain") << "Explain term " << d_n << "..." << std::endl; + Node n = getExplanationTerm( p, qi, d_n, exp ); + if( !d_tgt_orig ){ + n = n.negate(); + } + exp.push_back( n ); + Trace("qcf-explain") << "Explanation for " << d_n << " (tgt=" << d_tgt_orig << ") is " << n << ", set = " << d_wasSet << std::endl; + return true; + }else if( d_type==typ_formula ){ + Trace("qcf-explain") << "Explanation get for " << d_n << ", counter = " << d_child_counter << ", tgt = " << d_tgt_orig << ", set = " << d_wasSet << std::endl; + if( d_n.getKind()==OR || d_n.getKind()==AND ){ + if( (d_n.getKind()==AND)==d_tgt ){ + for( unsigned i=0; igetExplanation( p, qi, exp ) ){ + return false; + } + } + }else{ + return getChild( d_child_counter )->getExplanation( p, qi, exp ); + } + }else if( d_n.getKind()==IFF ){ + for( unsigned i=0; i<2; i++ ){ + if( !getChild( i )->getExplanation( p, qi, exp ) ){ + return false; + } + } + }else if( d_n.getKind()==ITE ){ + for( unsigned i=0; i<3; i++ ){ + bool isActive = ( ( i==0 && d_child_counter!=5 ) || + ( i==1 && d_child_counter!=( d_tgt ? 3 : 1 ) ) || + ( i==2 && d_child_counter!=( d_tgt ? 1 : 3 ) ) ); + if( isActive ){ + if( !getChild( i )->getExplanation( p, qi, exp ) ){ + return false; + } + } + } + }else{ + return false; + } + return true; + }else{ + return false; + } +} + +Node MatchGen::getExplanationTerm( QuantConflictFind * p, QuantInfo * qi, Node t, std::vector< Node >& exp ) { + Node v = qi->getCurrentExpValue( t ); + if( isHandledUfTerm( t ) ){ + for( unsigned i=0; i0 ); + bool invalidMatch; + do { + invalidMatch = false; + Debug("qcf-match-debug") << " Do matching " << d_n << " " << d_qn.size() << " " << d_qni.size() << std::endl; + if( d_qn.size()==d_qni.size()+1 ) { + int index = (int)d_qni.size(); + //initialize + TNode val; + std::map< int, int >::iterator itv = d_qni_var_num.find( index ); + if( itv!=d_qni_var_num.end() ){ + //get the representative variable this variable is equal to + int repVar = qi->getCurrentRepVar( itv->second ); + Debug("qcf-match-debug") << " Match " << index << " is a variable " << itv->second << ", which is repVar " << repVar << std::endl; + //get the value the rep variable + //std::map< int, TNode >::iterator itm = qi->d_match.find( repVar ); + if( !qi->d_match[repVar].isNull() ){ + val = qi->d_match[repVar]; + Debug("qcf-match-debug") << " Variable is already bound to " << val << std::endl; + }else{ + //binding a variable + d_qni_bound[index] = repVar; + std::map< TNode, QcfNodeIndex >::iterator it = d_qn[index]->d_children.begin(); + if( it != d_qn[index]->d_children.end() ) { + d_qni.push_back( it ); + //set the match + if( qi->setMatch( p, d_qni_bound[index], it->first ) ){ + Debug("qcf-match-debug") << " Binding variable" << std::endl; + if( d_qn.size()second ); + } + }else{ + Debug("qcf-match") << " Binding variable, currently fail." << std::endl; + invalidMatch = true; + } + }else{ + Debug("qcf-match-debug") << " Binding variable, fail, no more variables to bind" << std::endl; + d_qn.pop_back(); + } + } + }else{ + Debug("qcf-match-debug") << " Match " << index << " is ground term" << std::endl; + Assert( d_qni_gterm.find( index )!=d_qni_gterm.end() ); + Assert( d_qni_gterm_rep.find( index )!=d_qni_gterm_rep.end() ); + val = d_qni_gterm_rep[index]; + Assert( !val.isNull() ); + } + if( !val.isNull() ){ + //constrained by val + std::map< TNode, QcfNodeIndex >::iterator it = d_qn[index]->d_children.find( val ); + if( it!=d_qn[index]->d_children.end() ){ + Debug("qcf-match-debug") << " Match" << std::endl; + d_qni.push_back( it ); + if( d_qn.size()second ); + } + }else{ + Debug("qcf-match-debug") << " Failed to match" << std::endl; + d_qn.pop_back(); + } + } + }else{ + Assert( d_qn.size()==d_qni.size() ); + int index = d_qni.size()-1; + //increment if binding this variable + bool success = false; + std::map< int, int >::iterator itb = d_qni_bound.find( index ); + if( itb!=d_qni_bound.end() ){ + d_qni[index]++; + if( d_qni[index]!=d_qn[index]->d_children.end() ){ + success = true; + if( qi->setMatch( p, itb->second, d_qni[index]->first ) ){ + Debug("qcf-match-debug") << " Bind next variable" << std::endl; + if( d_qn.size()second ); + } + }else{ + Debug("qcf-match-debug") << " Bind next variable, currently fail" << std::endl; + invalidMatch = true; + } + }else{ + qi->d_match[ itb->second ] = TNode::null(); + qi->d_match_term[ itb->second ] = TNode::null(); + Debug("qcf-match-debug") << " Bind next variable, no more variables to bind" << std::endl; + } + }else{ + //TODO : if it equal to something else, also try that + } + //if not incrementing, move to next + if( !success ){ + d_qn.pop_back(); + d_qni.pop_back(); + } + } + }while( ( !d_qn.empty() && d_qni.size()!=d_qni_size ) || invalidMatch ); + if( d_qni.size()==d_qni_size ){ + //Assert( !d_qni[d_qni.size()-1]->second.d_children.empty() ); + //Debug("qcf-match-debug") << " We matched " << d_qni[d_qni.size()-1]->second.d_children.begin()->first << std::endl; + Assert( !d_qni[d_qni.size()-1]->second.d_children.empty() ); + TNode t = d_qni[d_qni.size()-1]->second.d_children.begin()->first; + Debug("qcf-match-debug") << " " << d_n << " matched " << t << std::endl; + qi->d_match_term[d_qni_var_num[0]] = t; + //set the match terms + for( std::map< int, int >::iterator it = d_qni_bound.begin(); it != d_qni_bound.end(); ++it ){ + Debug("qcf-match-debug") << " position " << it->first << " bounded " << it->second << " / " << qi->d_q[0].getNumChildren() << std::endl; + //if( it->second<(int)qi->d_q[0].getNumChildren() ){ //if it is an actual variable, we are interested in knowing the actual term + if( it->first>0 ){ + Assert( !qi->d_match[ it->second ].isNull() ); + Assert( p->areEqual( t[it->first-1], qi->d_match[ it->second ] ) ); + qi->d_match_term[it->second] = t[it->first-1]; + } + //} + } + } + } + } + return !d_qn.empty(); +} + +void MatchGen::debugPrintType( const char * c, short typ, bool isTrace ) { + if( isTrace ){ + switch( typ ){ + case typ_invalid: Trace(c) << "invalid";break; + case typ_ground: Trace(c) << "ground";break; + case typ_eq: Trace(c) << "eq";break; + case typ_pred: Trace(c) << "pred";break; + case typ_formula: Trace(c) << "formula";break; + case typ_var: Trace(c) << "var";break; + case typ_ite_var: Trace(c) << "ite_var";break; + case typ_bool_var: Trace(c) << "bool_var";break; + } + }else{ + switch( typ ){ + case typ_invalid: Debug(c) << "invalid";break; + case typ_ground: Debug(c) << "ground";break; + case typ_eq: Debug(c) << "eq";break; + case typ_pred: Debug(c) << "pred";break; + case typ_formula: Debug(c) << "formula";break; + case typ_var: Debug(c) << "var";break; + case typ_ite_var: Debug(c) << "ite_var";break; + case typ_bool_var: Debug(c) << "bool_var";break; + } + } +} + +void MatchGen::setInvalid() { + d_type = typ_invalid; + d_children.clear(); +} + +bool MatchGen::isHandledBoolConnective( TNode n ) { + return n.getType().isBoolean() && ( n.getKind()==OR || n.getKind()==AND || n.getKind()==IFF || n.getKind()==ITE || n.getKind()==FORALL || n.getKind()==NOT ); +} + +bool MatchGen::isHandledUfTerm( TNode n ) { + //return n.getKind()==APPLY_UF || n.getKind()==STORE || n.getKind()==SELECT || + // n.getKind()==APPLY_CONSTRUCTOR || n.getKind()==APPLY_SELECTOR_TOTAL || n.getKind()==APPLY_TESTER; + return inst::Trigger::isAtomicTriggerKind( n.getKind() ); +} + +Node MatchGen::getOperator( QuantConflictFind * p, Node n ) { + if( isHandledUfTerm( n ) ){ + return p->getQuantifiersEngine()->getTermDatabase()->getOperator( n ); + }else{ + return Node::null(); + } +} + +bool MatchGen::isHandled( TNode n ) { + if( n.getKind()!=BOUND_VARIABLE && n.hasBoundVar() ){ + if( !isHandledBoolConnective( n ) && !isHandledUfTerm( n ) && n.getKind()!=EQUAL && n.getKind()!=ITE ){ + return false; + } + for( unsigned i=0; imkConst(true); + d_false = NodeManager::currentNM()->mkConst(false); +} + +Node QuantConflictFind::mkEqNode( Node a, Node b ) { + if( a.getType().isBoolean() ){ + return a.iffNode( b ); + }else{ + return a.eqNode( b ); + } +} + +//-------------------------------------------------- registration + +void QuantConflictFind::registerQuantifier( Node q ) { + if( !TermDb::isRewriteRule( q ) ){ + d_quants.push_back( q ); + d_quant_id[q] = d_quants.size(); + Trace("qcf-qregister") << "Register "; + debugPrintQuant( "qcf-qregister", q ); + Trace("qcf-qregister") << " : " << q << std::endl; + //make QcfNode structure + Trace("qcf-qregister") << "- Get relevant equality/disequality pairs, calculate flattening..." << std::endl; + d_qinfo[q].initialize( q, q[1] ); + + //debug print + Trace("qcf-qregister") << "- Flattened structure is :" << std::endl; + Trace("qcf-qregister") << " "; + debugPrintQuantBody( "qcf-qregister", q, q[1] ); + Trace("qcf-qregister") << std::endl; + if( d_qinfo[q].d_vars.size()>q[0].getNumChildren() ){ + Trace("qcf-qregister") << " with additional constraints : " << std::endl; + for( unsigned j=q[0].getNumChildren(); jQuantConflictFind::effort_conflict ){ + // ret = -1; + //} + }else if( n.getKind()==NOT ){ + return -evaluate( n[0] ); + }else if( n.getKind()==ITE ){ + int cev1 = evaluate( n[0] ); + int cevc[2] = { 0, 0 }; + for( unsigned i=0; i<2; i++ ){ + if( ( i==0 && cev1!=-1 ) || ( i==1 && cev1!=1 ) ){ + cevc[i] = evaluate( n[i+1] ); + if( cev1!=0 ){ + ret = cevc[i]; + break; + }else if( cevc[i]==0 ){ + break; + } + } + } + if( ret==0 && cevc[0]!=0 && cevc[0]==cevc[1] ){ + ret = cevc[0]; + } + }else if( n.getKind()==IFF ){ + int cev1 = evaluate( n[0] ); + if( cev1!=0 ){ + int cev2 = evaluate( n[1] ); + if( cev2!=0 ){ + ret = cev1==cev2 ? 1 : -1; + } + } + + }else{ + int ssval = 0; + if( n.getKind()==OR ){ + ssval = 1; + }else if( n.getKind()==AND ){ + ssval = -1; + } + bool isUnk = false; + for( unsigned i=0; i::iterator it = d_qinfo[q].d_rel_eqr.begin(); it != d_qinfo[q].d_rel_eqr.end(); ++it ){ + // it->first->d_active.set( true ); + //} + } +} + +eq::EqualityEngine * QuantConflictFind::getEqualityEngine() { + //return ((uf::TheoryUF*)d_quantEngine->getTheoryEngine()->theoryOf( theory::THEORY_UF ))->getEqualityEngine(); + return d_quantEngine->getTheoryEngine()->getMasterEqualityEngine(); +} +bool QuantConflictFind::areEqual( Node n1, Node n2 ) { + return getEqualityEngine()->hasTerm( n1 ) && getEqualityEngine()->hasTerm( n2 ) && getEqualityEngine()->areEqual( n1,n2 ); +} +bool QuantConflictFind::areDisequal( Node n1, Node n2 ) { + return n1!=n2 && getEqualityEngine()->hasTerm( n1 ) && getEqualityEngine()->hasTerm( n2 ) && getEqualityEngine()->areDisequal( n1,n2, false ); +} +Node QuantConflictFind::getRepresentative( Node n ) { + if( getEqualityEngine()->hasTerm( n ) ){ + return getEqualityEngine()->getRepresentative( n ); + }else{ + return n; + } +} +Node QuantConflictFind::evaluateTerm( Node n ) { + if( MatchGen::isHandledUfTerm( n ) ){ + Node f = MatchGen::getOperator( this, n ); + Node nn; + computeUfTerms( f ); + if( getEqualityEngine()->hasTerm( n ) ){ + computeArgReps( n ); + nn = d_uf_terms[f].existsTerm( n, d_arg_reps[n] ); + }else{ + std::vector< TNode > args; + for( unsigned i=0; id_diseq.begin(); it != eqc_b->d_diseq.end(); ++it ){ + if( (*it).second ){ + Node n = (*it).first; + EqcInfo * eqc_n = getEqcInfo( n, false ); + Assert( eqc_n ); + if( !eqc_n->isDisequal( a ) ){ + Assert( !eqc_a->isDisequal( n ) ); + eqc_n->setDisequal( a ); + eqc_a->setDisequal( n ); + //setEqual( eqc_a, eqc_b, a, n, false ); + } + eqc_n->setDisequal( b, false ); + } + } + ////move all previous EqcRegistry's regarding equalities within b + //for( NodeBoolMap::iterator it = eqc_b->d_rel_eqr_e.begin(); it != eqc_b->d_rel_eqr_e.end(); ++it ){ + // if( (*it).second ){ + // eqc_a->d_rel_eqr_e[(*it).first] = true; + // } + //} + } + //process new equalities + //setEqual( eqc_a, eqc_b, a, b, true ); + Trace("qcf-proc2") << "QCF : finished merge : " << a << " " << b << std::endl; + } + */ +} + +/** assert disequal */ +void QuantConflictFind::assertDisequal( Node a, Node b ) { + /* + a = getRepresentative( a ); + b = getRepresentative( b ); + Trace("qcf-proc") << "QCF : assert disequal : " << a << " " << b << std::endl; + EqcInfo * eqc_a = getEqcInfo( a ); + EqcInfo * eqc_b = getEqcInfo( b ); + if( !eqc_a->isDisequal( b ) ){ + Assert( !eqc_b->isDisequal( a ) ); + eqc_b->setDisequal( a ); + eqc_a->setDisequal( b ); + //setEqual( eqc_a, eqc_b, a, b, false ); + } + Trace("qcf-proc2") << "QCF : finished assert disequal : " << a << " " << b << std::endl; + */ +} + +//-------------------------------------------------- check function + +void QuantConflictFind::reset_round( Theory::Effort level ) { + d_needs_computeRelEqr = true; +} + +/** check */ +void QuantConflictFind::check( Theory::Effort level ) { + Trace("qcf-check") << "QCF : check : " << level << std::endl; + if( d_conflict ){ + Trace("qcf-check2") << "QCF : finished check : already in conflict." << std::endl; + if( level>=Theory::EFFORT_FULL ){ + Trace("qcf-warn") << "ALREADY IN CONFLICT? " << level << std::endl; + //Assert( false ); + } + }else{ + int addedLemmas = 0; + if( d_performCheck ){ + ++(d_statistics.d_inst_rounds); + double clSet = 0; + int prevEt = 0; + if( Trace.isOn("qcf-engine") ){ + prevEt = d_statistics.d_entailment_checks.getData(); + clSet = double(clock())/double(CLOCKS_PER_SEC); + Trace("qcf-engine") << "---Conflict Find Engine Round, effort = " << level << "---" << std::endl; + } + computeRelevantEqr(); + + //determine order for quantified formulas + std::vector< Node > qorder; + std::map< Node, bool > qassert; + //mark which are asserted + for( unsigned i=0; id_mg->isValid() ){ + Trace("qcf-check") << "Check quantified formula "; + debugPrintQuant("qcf-check", q); + Trace("qcf-check") << " : " << q << "..." << std::endl; + + Trace("qcf-check-debug") << "Reset round..." << std::endl; + qi->reset_round( this ); + //try to make a matches making the body false + Trace("qcf-check-debug") << "Get next match..." << std::endl; + while( qi->d_mg->getNextMatch( this, qi ) ){ + Trace("qcf-check") << "*** Produced match at effort " << e << " : " << std::endl; + qi->debugPrintMatch("qcf-check"); + Trace("qcf-check") << std::endl; + std::vector< int > assigned; + if( !qi->isMatchSpurious( this ) ){ + if( qi->completeMatch( this, assigned ) ){ + /* + if( options::qcfExp() && d_effort==effort_conflict ){ + std::vector< Node > exp; + if( qi->d_mg->getExplanation( this, qi, exp ) ){ + Trace("qcf-check-exp") << "Base explanation is : " << std::endl; + for( unsigned c=0; c c_exp; + eq::EqualityEngine* ee = ((uf::TheoryUF*)d_quantEngine->getTheoryEngine()->theoryOf( THEORY_UF ))->getEqualityEngine() ; + for( unsigned c=0; careDisequal( lit[0], lit[1], true ) ){ + exit( 98 ); + }else if( pol && !ee->areEqual( lit[0], lit[1] ) ){ + exit( 99 ); + } + ee->explainEquality( lit[0], lit[1], pol, c_exp ); + }else{ + if( !ee->areEqual( lit, pol ? d_true : d_false ) ){ + exit( pol ? 96 : 97 ); + } + ee->explainPredicate( lit, pol, c_exp ); + } + } + std::vector< Node > c_lem; + Trace("qcf-check-exp") << "Actual explanation is : " << std::endl; + for( unsigned c=0; cmkNode( OR, c_lem ); + Trace("qcf-conflict") << "QCF conflict : " << conf << std::endl; + d_quantEngine->addLemma( conf, false ); + d_conflict.set( true ); + ++(d_statistics.d_conflict_inst); + ++addedLemmas; + break; + } + } + */ + std::vector< Node > terms; + qi->getMatch( terms ); + if( !qi->isTConstraintSpurious( this, terms ) ){ + if( Debug.isOn("qcf-check-inst") ){ + //if( e==effort_conflict ){ + Node inst = d_quantEngine->getInstantiation( q, terms ); + Debug("qcf-check-inst") << "Check instantiation " << inst << "..." << std::endl; + Assert( evaluate( inst )!=1 ); + Assert( evaluate( inst )==-1 || e>effort_conflict ); + //} + } + if( d_quantEngine->addInstantiation( q, terms, false ) ){ + Trace("qcf-check") << " ... Added instantiation" << std::endl; + Trace("qcf-inst") << "*** Was from effort " << e << " : " << std::endl; + qi->debugPrintMatch("qcf-inst"); + Trace("qcf-inst") << std::endl; + ++addedLemmas; + if( e==effort_conflict ){ + d_quant_order.insert( d_quant_order.begin(), q ); + d_conflict.set( true ); + ++(d_statistics.d_conflict_inst); + break; + }else if( e==effort_prop_eq ){ + ++(d_statistics.d_prop_inst); + } + }else{ + Trace("qcf-check") << " ... Failed to add instantiation" << std::endl; + //Assert( false ); + } + } + //clean up assigned + qi->revertMatch( assigned ); + d_tempCache.clear(); + }else{ + Trace("qcf-check") << " ... Spurious instantiation (cannot assign unassigned variables)" << std::endl; + } + }else{ + Trace("qcf-check") << " ... Spurious instantiation (match is inconsistent)" << std::endl; + } + } + if( d_conflict ){ + break; + } + } + } + if( addedLemmas>0 ){ + d_quantEngine->flushLemmas(); + break; + } + } + if( Trace.isOn("qcf-engine") ){ + double clSet2 = double(clock())/double(CLOCKS_PER_SEC); + Trace("qcf-engine") << "Finished conflict find engine, time = " << (clSet2-clSet); + if( addedLemmas>0 ){ + Trace("qcf-engine") << ", effort = " << ( d_effort==effort_conflict ? "conflict" : ( d_effort==effort_prop_eq ? "prop_eq" : "mc" ) ); + Trace("qcf-engine") << ", addedLemmas = " << addedLemmas; + } + Trace("qcf-engine") << std::endl; + int currEt = d_statistics.d_entailment_checks.getData(); + if( currEt!=prevEt ){ + Trace("qcf-engine") << " Entailment checks = " << ( currEt - prevEt ) << std::endl; + } + } + } + Trace("qcf-check2") << "QCF : finished check : " << level << std::endl; + } +} + +bool QuantConflictFind::needsCheck( Theory::Effort level ) { + d_performCheck = false; + if( options::quantConflictFind() && !d_conflict ){ + if( level==Theory::EFFORT_LAST_CALL ){ + d_performCheck = options::qcfWhenMode()==QCF_WHEN_MODE_LAST_CALL; + }else if( level==Theory::EFFORT_FULL ){ + d_performCheck = options::qcfWhenMode()==QCF_WHEN_MODE_DEFAULT; + }else if( level==Theory::EFFORT_STANDARD ){ + d_performCheck = options::qcfWhenMode()==QCF_WHEN_MODE_STD; + } + } + return d_performCheck; +} + +void QuantConflictFind::computeRelevantEqr() { + if( d_needs_computeRelEqr ){ + d_needs_computeRelEqr = false; + Trace("qcf-check") << "Compute relevant equalities..." << std::endl; + d_uf_terms.clear(); + d_eqc_uf_terms.clear(); + d_eqcs.clear(); + d_model_basis.clear(); + d_arg_reps.clear(); + //double clSet = 0; + //if( Trace.isOn("qcf-opt") ){ + // clSet = double(clock())/double(CLOCKS_PER_SEC); + //} + + //long nTermst = 0; + //long nTerms = 0; + //long nEqc = 0; + + //which nodes are irrelevant for disequality matches + std::map< TNode, bool > irrelevant_dnode; + //now, store matches + eq::EqClassesIterator eqcs_i = eq::EqClassesIterator( getEqualityEngine() ); + while( !eqcs_i.isFinished() ){ + //nEqc++; + Node r = (*eqcs_i); + TypeNode rtn = r.getType(); + if( options::qcfMode()==QCF_MC ){ + std::map< TypeNode, std::vector< TNode > >::iterator itt = d_eqcs.find( rtn ); + if( itt==d_eqcs.end() ){ + Node mb = getQuantifiersEngine()->getTermDatabase()->getModelBasisTerm( rtn ); + if( !getEqualityEngine()->hasTerm( mb ) ){ + Trace("qcf-warn") << "WARNING: Model basis term does not exist!" << std::endl; + Assert( false ); + } + Node mbr = getRepresentative( mb ); + if( mbr!=r ){ + d_eqcs[rtn].push_back( mbr ); + } + d_eqcs[rtn].push_back( r ); + d_model_basis[rtn] = mb; + }else{ + itt->second.push_back( r ); + } + }else{ + d_eqcs[rtn].push_back( r ); + } + /* + eq::EqClassIterator eqc_i = eq::EqClassIterator( r, getEqualityEngine() ); + while( !eqc_i.isFinished() ){ + TNode n = (*eqc_i); + if( n.hasBoundVar() ){ + std::cout << "BAD TERM IN DB : " << n << std::endl; + exit( 199 ); + } + ++eqc_i; + } + + */ + + //if( r.getType().isInteger() ){ + // Trace("qcf-mv") << "Model value for eqc(" << r << ") : " << d_quantEngine->getValuation().getModelValue( r ) << std::endl; + //} + //EqcInfo * eqcir = getEqcInfo( r, false ); + //get relevant nodes that we are disequal from + /* + std::vector< Node > deqc; + if( eqcir ){ + for( NodeBoolMap::iterator it = eqcir->d_diseq.begin(); it != eqcir->d_diseq.end(); ++it ){ + if( (*it).second ){ + //Node rd = (*it).first; + //if( rd!=getRepresentative( rd ) ){ + // std::cout << "Bad rep!" << std::endl; + // exit( 0 ); + //} + deqc.push_back( (*it).first ); + } + } + } + */ + //process disequalities + /* + eq::EqClassIterator eqc_i = eq::EqClassIterator( r, getEqualityEngine() ); + while( !eqc_i.isFinished() ){ + TNode n = (*eqc_i); + if( n.getKind()!=EQUAL ){ + nTermst++; + //node_to_rep[n] = r; + //if( n.getNumChildren()>0 ){ + // if( n.getKind()!=APPLY_UF ){ + // std::cout << n.getKind() << " " << n.getOperator() << " " << n << std::endl; + // } + //} + if( !quantifiers::TermDb::hasBoundVarAttr( n ) ){ //temporary + + bool isRedundant; + std::map< TNode, std::vector< TNode > >::iterator it_na; + TNode fn; + if( MatchGen::isHandledUfTerm( n ) ){ + Node f = MatchGen::getOperator( this, n ); + computeArgReps( n ); + it_na = d_arg_reps.find( n ); + Assert( it_na!=d_arg_reps.end() ); + Node nadd = d_eqc_uf_terms[f].d_children[r].addTerm( n, d_arg_reps[n] ); + isRedundant = (nadd!=n); + d_uf_terms[f].addTerm( n, d_arg_reps[n] ); + }else{ + isRedundant = false; + } + nTerms += isRedundant ? 0 : 1; + }else{ + if( Debug.isOn("qcf-nground") ){ + Debug("qcf-nground") << "Non-ground term in eqc : " << n << std::endl; + Assert( false ); + } + } + } + ++eqc_i; + } + */ + ++eqcs_i; + } + /* + if( Trace.isOn("qcf-opt") ){ + double clSet2 = double(clock())/double(CLOCKS_PER_SEC); + Trace("qcf-opt") << "Compute rel eqc : " << std::endl; + Trace("qcf-opt") << " " << nEqc << " equivalence classes. " << std::endl; + Trace("qcf-opt") << " " << nTerms << " / " << nTermst << " terms." << std::endl; + Trace("qcf-opt") << " Time : " << (clSet2-clSet) << std::endl; + } + */ + } +} + +void QuantConflictFind::computeArgReps( TNode n ) { + if( d_arg_reps.find( n )==d_arg_reps.end() ){ + Assert( MatchGen::isHandledUfTerm( n ) ); + for( unsigned j=0; jgetTermDatabase()->getNumGroundTerms( f ); + for( unsigned i=0; igetTermDatabase()->d_op_map[f][i]; + if( getEqualityEngine()->hasTerm( n ) && !n.getAttribute(NoMatchAttribute()) ){ + Node r = getRepresentative( n ); + computeArgReps( n ); + d_eqc_uf_terms[f].d_children[r].addTerm( n, d_arg_reps[n] ); + d_uf_terms[f].addTerm( n, d_arg_reps[n] ); + } + } + } +} + +//-------------------------------------------------- debugging + + +void QuantConflictFind::debugPrint( const char * c ) { + //print the equivalance classes + Trace(c) << "----------EQ classes" << std::endl; + eq::EqClassesIterator eqcs_i = eq::EqClassesIterator( getEqualityEngine() ); + while( !eqcs_i.isFinished() ){ + Node n = (*eqcs_i); + //if( !n.getType().isInteger() ){ + Trace(c) << " - " << n << " : {"; + eq::EqClassIterator eqc_i = eq::EqClassIterator( n, getEqualityEngine() ); + bool pr = false; + while( !eqc_i.isFinished() ){ + Node nn = (*eqc_i); + if( nn.getKind()!=EQUAL && nn!=n ){ + Trace(c) << (pr ? "," : "" ) << " " << nn; + pr = true; + } + ++eqc_i; + } + Trace(c) << (pr ? " " : "" ) << "}" << std::endl; + /* + EqcInfo * eqcn = getEqcInfo( n, false ); + if( eqcn ){ + Trace(c) << " DEQ : {"; + pr = false; + for( NodeBoolMap::iterator it = eqcn->d_diseq.begin(); it != eqcn->d_diseq.end(); ++it ){ + if( (*it).second ){ + Trace(c) << (pr ? "," : "" ) << " " << (*it).first; + pr = true; + } + } + Trace(c) << (pr ? " " : "" ) << "}" << std::endl; + } + //} + */ + ++eqcs_i; + } +} + +void QuantConflictFind::debugPrintQuant( const char * c, Node q ) { + Trace(c) << "Q" << d_quant_id[q]; +} + +void QuantConflictFind::debugPrintQuantBody( const char * c, Node q, Node n, bool doVarNum ) { + if( n.getNumChildren()==0 ){ + Trace(c) << n; + }else if( doVarNum && d_qinfo[q].d_var_num.find( n )!=d_qinfo[q].d_var_num.end() ){ + Trace(c) << "?x" << d_qinfo[q].d_var_num[n]; + }else{ + Trace(c) << "("; + if( n.getKind()==APPLY_UF ){ + Trace(c) << n.getOperator(); + }else{ + Trace(c) << n.getKind(); + } + for( unsigned i=0; i::iterator it = d_zero.find( k ); + if( it==d_zero.end() ){ + Node nn; + if( k==PLUS ){ + nn = NodeManager::currentNM()->mkConst( Rational(0) ); + } + d_zero[k] = nn; + return nn; + }else{ + return it->second; + } +} + + +} diff --git a/src/theory/quantifiers/quant_conflict_find.h b/src/theory/quantifiers/quant_conflict_find.h index 64ece7ed0..6ea7849c4 100755 --- a/src/theory/quantifiers/quant_conflict_find.h +++ b/src/theory/quantifiers/quant_conflict_find.h @@ -1,297 +1,297 @@ -/********************* */ -/*! \file quant_conflict_find.h - ** \verbatim - ** Original author: Andrew Reynolds - ** Major contributors: none - ** Minor contributors (to current version): none - ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa - ** See the file COPYING in the top-level source directory for licensing - ** information.\endverbatim - ** - ** \brief quantifiers conflict find class - **/ - -#include "cvc4_private.h" - -#ifndef QUANT_CONFLICT_FIND -#define QUANT_CONFLICT_FIND - -#include "context/cdhashmap.h" -#include "context/cdchunk_list.h" -#include "theory/quantifiers_engine.h" - -namespace CVC4 { -namespace theory { -namespace quantifiers { - -class QcfNode; - -class QuantConflictFind; - -class QcfNodeIndex { -public: - std::map< TNode, QcfNodeIndex > d_children; - void clear() { d_children.clear(); } - void debugPrint( const char * c, int t ); - Node existsTerm( TNode n, std::vector< TNode >& reps, int index = 0 ); - Node addTerm( TNode n, std::vector< TNode >& reps, int index = 0 ); -}; - -class QuantInfo; - -//match generator -class MatchGen { - friend class QuantInfo; -private: - //current children information - int d_child_counter; - //children of this object - std::vector< int > d_children_order; - unsigned getNumChildren() { return d_children.size(); } - MatchGen * getChild( int i ) { return &d_children[d_children_order[i]]; } - //MatchGen * getChild( int i ) { return &d_children[i]; } - //current matching information - std::vector< QcfNodeIndex * > d_qn; - std::vector< std::map< TNode, QcfNodeIndex >::iterator > d_qni; - bool doMatching( QuantConflictFind * p, QuantInfo * qi ); - //for matching : each index is either a variable or a ground term - unsigned d_qni_size; - std::map< int, int > d_qni_var_num; - std::map< int, TNode > d_qni_gterm; - std::map< int, TNode > d_qni_gterm_rep; - std::map< int, int > d_qni_bound; - std::vector< int > d_qni_bound_except; - std::map< int, TNode > d_qni_bound_cons; - std::map< int, int > d_qni_bound_cons_var; - std::map< int, int >::iterator d_binding_it; - //std::vector< int > d_independent; - bool d_matched_basis; - bool d_binding; - //int getVarBindingVar(); - std::map< int, Node > d_ground_eval; - //determine variable order - void determineVariableOrder( QuantInfo * qi, std::vector< int >& bvars ); - void collectBoundVar( QuantInfo * qi, Node n, std::vector< int >& cbvars ); -public: - //type of the match generator - enum { - typ_invalid, - typ_ground, - typ_pred, - typ_eq, - typ_formula, - typ_var, - typ_ite_var, - typ_bool_var, - typ_tconstraint, - typ_tsym, - }; - void debugPrintType( const char * c, short typ, bool isTrace = false ); -public: - MatchGen() : d_type( typ_invalid ){} - MatchGen( QuantInfo * qi, Node n, bool isVar = false ); - bool d_tgt; - bool d_tgt_orig; - bool d_wasSet; - Node d_n; - std::vector< MatchGen > d_children; - short d_type; - bool d_type_not; - void reset_round( QuantConflictFind * p ); - void reset( QuantConflictFind * p, bool tgt, QuantInfo * qi ); - bool getNextMatch( QuantConflictFind * p, QuantInfo * qi ); - bool getExplanation( QuantConflictFind * p, QuantInfo * qi, std::vector< Node >& exp ); - Node getExplanationTerm( QuantConflictFind * p, QuantInfo * qi, Node t, std::vector< Node >& exp ); - bool isValid() { return d_type!=typ_invalid; } - void setInvalid(); - - // is this term treated as UF application? - static bool isHandledBoolConnective( TNode n ); - static bool isHandledUfTerm( TNode n ); - static Node getOperator( QuantConflictFind * p, Node n ); - //can this node be handled by the algorithm - static bool isHandled( TNode n ); -}; - -//info for quantifiers -class QuantInfo { -private: - void registerNode( Node n, bool hasPol, bool pol, bool beneathQuant = false ); - void flatten( Node n, bool beneathQuant ); -private: //for completing match - std::vector< int > d_unassigned; - std::vector< TypeNode > d_unassigned_tn; - int d_unassigned_nvar; - int d_una_index; - std::vector< int > d_una_eqc_count; -public: - QuantInfo() : d_mg( NULL ) {} - ~QuantInfo() { delete d_mg; } - std::vector< TNode > d_vars; - std::map< TNode, int > d_var_num; - std::vector< int > d_tsym_vars; - std::map< TNode, bool > d_inMatchConstraint; - std::map< int, std::vector< Node > > d_var_constraint[2]; - int getVarNum( TNode v ) { return d_var_num.find( v )!=d_var_num.end() ? d_var_num[v] : -1; } - bool isVar( TNode v ) { return d_var_num.find( v )!=d_var_num.end(); } - int getNumVars() { return (int)d_vars.size(); } - TNode getVar( int i ) { return d_vars[i]; } - - MatchGen * d_mg; - Node d_q; - std::map< int, MatchGen * > d_var_mg; - void reset_round( QuantConflictFind * p ); -public: - //initialize - void initialize( Node q, Node qn ); - //current constraints - std::vector< TNode > d_match; - std::vector< TNode > d_match_term; - std::map< int, std::map< TNode, int > > d_curr_var_deq; - std::map< Node, bool > d_tconstraints; - int getCurrentRepVar( int v ); - TNode getCurrentValue( TNode n ); - TNode getCurrentExpValue( TNode n ); - bool getCurrentCanBeEqual( QuantConflictFind * p, int v, TNode n, bool chDiseq = false ); - int addConstraint( QuantConflictFind * p, int v, TNode n, bool polarity ); - int addConstraint( QuantConflictFind * p, int v, TNode n, int vn, bool polarity, bool doRemove ); - bool setMatch( QuantConflictFind * p, int v, TNode n ); - bool isMatchSpurious( QuantConflictFind * p ); - bool isTConstraintSpurious( QuantConflictFind * p, std::vector< Node >& terms ); - bool entailmentTest( QuantConflictFind * p, Node lit, bool chEnt = true ); - bool completeMatch( QuantConflictFind * p, std::vector< int >& assigned, bool doContinue = false ); - void revertMatch( std::vector< int >& assigned ); - void debugPrintMatch( const char * c ); - bool isConstrainedVar( int v ); -public: - void getMatch( std::vector< Node >& terms ); -}; - -class QuantConflictFind : public QuantifiersModule -{ - friend class QcfNodeIndex; - friend class MatchGen; - friend class QuantInfo; - typedef context::CDChunkList NodeList; - typedef context::CDHashMap NodeBoolMap; -private: - context::Context* d_c; - context::CDO< bool > d_conflict; - bool d_performCheck; - std::vector< Node > d_quant_order; - std::map< Kind, Node > d_zero; - //for storing nodes created during t-constraint solving (prevents memory leaks) - std::vector< Node > d_tempCache; -private: - std::map< Node, Node > d_op_node; - int d_fid_count; - std::map< Node, int > d_fid; - Node mkEqNode( Node a, Node b ); -public: //for ground terms - Node d_true; - Node d_false; - TNode getZero( Kind k ); -private: - Node evaluateTerm( Node n ); - int evaluate( Node n, bool pref = false, bool hasPref = false ); -private: - //currently asserted quantifiers - NodeList d_qassert; - std::map< Node, QuantInfo > d_qinfo; -private: //for equivalence classes - eq::EqualityEngine * getEqualityEngine(); - bool areDisequal( Node n1, Node n2 ); - bool areEqual( Node n1, Node n2 ); - Node getRepresentative( Node n ); - -/* - class EqcInfo { - public: - EqcInfo( context::Context* c ) : d_diseq( c ) {} - NodeBoolMap d_diseq; - bool isDisequal( Node n ) { return d_diseq.find( n )!=d_diseq.end() && d_diseq[n]; } - void setDisequal( Node n, bool val = true ) { d_diseq[n] = val; } - //NodeBoolMap& getRelEqr( int index ) { return index==0 ? d_rel_eqr_e : d_rel_eqr_d; } - }; - std::map< Node, EqcInfo * > d_eqc_info; - EqcInfo * getEqcInfo( Node n, bool doCreate = true ); -*/ - // operator -> index(terms) - std::map< TNode, QcfNodeIndex > d_uf_terms; - // operator -> index(eqc -> terms) - std::map< TNode, QcfNodeIndex > d_eqc_uf_terms; - //get qcf node index - QcfNodeIndex * getQcfNodeIndex( Node eqc, Node f ); - QcfNodeIndex * getQcfNodeIndex( Node f ); - // type -> list(eqc) - std::map< TypeNode, std::vector< TNode > > d_eqcs; - std::map< TypeNode, Node > d_model_basis; - //mapping from UF terms to representatives of their arguments - std::map< TNode, std::vector< TNode > > d_arg_reps; - //compute arg reps - void computeArgReps( TNode n ); - //compute - void computeUfTerms( TNode f ); -public: - enum { - effort_conflict, - effort_prop_eq, - effort_mc, - }; - short d_effort; - void setEffort( int e ) { d_effort = e; } - static short getMaxQcfEffort(); - bool areMatchEqual( TNode n1, TNode n2 ); - bool areMatchDisequal( TNode n1, TNode n2 ); -public: - QuantConflictFind( QuantifiersEngine * qe, context::Context* c ); - /** register quantifier */ - void registerQuantifier( Node q ); -public: - /** assert quantifier */ - void assertNode( Node q ); - /** new node */ - void newEqClass( Node n ); - /** merge */ - void merge( Node a, Node b ); - /** assert disequal */ - void assertDisequal( Node a, Node b ); - /** reset round */ - void reset_round( Theory::Effort level ); - /** check */ - void check( Theory::Effort level ); - /** needs check */ - bool needsCheck( Theory::Effort level ); -private: - bool d_needs_computeRelEqr; -public: - void computeRelevantEqr(); -private: - void debugPrint( const char * c ); - //for debugging - std::vector< Node > d_quants; - std::map< Node, int > d_quant_id; - void debugPrintQuant( const char * c, Node q ); - void debugPrintQuantBody( const char * c, Node q, Node n, bool doVarNum = true ); -public: - /** statistics class */ - class Statistics { - public: - IntStat d_inst_rounds; - IntStat d_conflict_inst; - IntStat d_prop_inst; - IntStat d_entailment_checks; - Statistics(); - ~Statistics(); - }; - Statistics d_statistics; - /** Identify this module */ - std::string identify() const { return "QcfEngine"; } -}; - -} -} -} - -#endif +/********************* */ +/*! \file quant_conflict_find.h + ** \verbatim + ** Original author: Andrew Reynolds + ** Major contributors: none + ** Minor contributors (to current version): none + ** This file is part of the CVC4 project. + ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** See the file COPYING in the top-level source directory for licensing + ** information.\endverbatim + ** + ** \brief quantifiers conflict find class + **/ + +#include "cvc4_private.h" + +#ifndef QUANT_CONFLICT_FIND +#define QUANT_CONFLICT_FIND + +#include "context/cdhashmap.h" +#include "context/cdchunk_list.h" +#include "theory/quantifiers_engine.h" + +namespace CVC4 { +namespace theory { +namespace quantifiers { + +class QcfNode; + +class QuantConflictFind; + +class QcfNodeIndex { +public: + std::map< TNode, QcfNodeIndex > d_children; + void clear() { d_children.clear(); } + void debugPrint( const char * c, int t ); + Node existsTerm( TNode n, std::vector< TNode >& reps, int index = 0 ); + Node addTerm( TNode n, std::vector< TNode >& reps, int index = 0 ); +}; + +class QuantInfo; + +//match generator +class MatchGen { + friend class QuantInfo; +private: + //current children information + int d_child_counter; + //children of this object + std::vector< int > d_children_order; + unsigned getNumChildren() { return d_children.size(); } + MatchGen * getChild( int i ) { return &d_children[d_children_order[i]]; } + //MatchGen * getChild( int i ) { return &d_children[i]; } + //current matching information + std::vector< QcfNodeIndex * > d_qn; + std::vector< std::map< TNode, QcfNodeIndex >::iterator > d_qni; + bool doMatching( QuantConflictFind * p, QuantInfo * qi ); + //for matching : each index is either a variable or a ground term + unsigned d_qni_size; + std::map< int, int > d_qni_var_num; + std::map< int, TNode > d_qni_gterm; + std::map< int, TNode > d_qni_gterm_rep; + std::map< int, int > d_qni_bound; + std::vector< int > d_qni_bound_except; + std::map< int, TNode > d_qni_bound_cons; + std::map< int, int > d_qni_bound_cons_var; + std::map< int, int >::iterator d_binding_it; + //std::vector< int > d_independent; + bool d_matched_basis; + bool d_binding; + //int getVarBindingVar(); + std::map< int, Node > d_ground_eval; + //determine variable order + void determineVariableOrder( QuantInfo * qi, std::vector< int >& bvars ); + void collectBoundVar( QuantInfo * qi, Node n, std::vector< int >& cbvars ); +public: + //type of the match generator + enum { + typ_invalid, + typ_ground, + typ_pred, + typ_eq, + typ_formula, + typ_var, + typ_ite_var, + typ_bool_var, + typ_tconstraint, + typ_tsym, + }; + void debugPrintType( const char * c, short typ, bool isTrace = false ); +public: + MatchGen() : d_type( typ_invalid ){} + MatchGen( QuantInfo * qi, Node n, bool isVar = false ); + bool d_tgt; + bool d_tgt_orig; + bool d_wasSet; + Node d_n; + std::vector< MatchGen > d_children; + short d_type; + bool d_type_not; + void reset_round( QuantConflictFind * p ); + void reset( QuantConflictFind * p, bool tgt, QuantInfo * qi ); + bool getNextMatch( QuantConflictFind * p, QuantInfo * qi ); + bool getExplanation( QuantConflictFind * p, QuantInfo * qi, std::vector< Node >& exp ); + Node getExplanationTerm( QuantConflictFind * p, QuantInfo * qi, Node t, std::vector< Node >& exp ); + bool isValid() { return d_type!=typ_invalid; } + void setInvalid(); + + // is this term treated as UF application? + static bool isHandledBoolConnective( TNode n ); + static bool isHandledUfTerm( TNode n ); + static Node getOperator( QuantConflictFind * p, Node n ); + //can this node be handled by the algorithm + static bool isHandled( TNode n ); +}; + +//info for quantifiers +class QuantInfo { +private: + void registerNode( Node n, bool hasPol, bool pol, bool beneathQuant = false ); + void flatten( Node n, bool beneathQuant ); +private: //for completing match + std::vector< int > d_unassigned; + std::vector< TypeNode > d_unassigned_tn; + int d_unassigned_nvar; + int d_una_index; + std::vector< int > d_una_eqc_count; +public: + QuantInfo() : d_mg( NULL ) {} + ~QuantInfo() { delete d_mg; } + std::vector< TNode > d_vars; + std::map< TNode, int > d_var_num; + std::vector< int > d_tsym_vars; + std::map< TNode, bool > d_inMatchConstraint; + std::map< int, std::vector< Node > > d_var_constraint[2]; + int getVarNum( TNode v ) { return d_var_num.find( v )!=d_var_num.end() ? d_var_num[v] : -1; } + bool isVar( TNode v ) { return d_var_num.find( v )!=d_var_num.end(); } + int getNumVars() { return (int)d_vars.size(); } + TNode getVar( int i ) { return d_vars[i]; } + + MatchGen * d_mg; + Node d_q; + std::map< int, MatchGen * > d_var_mg; + void reset_round( QuantConflictFind * p ); +public: + //initialize + void initialize( Node q, Node qn ); + //current constraints + std::vector< TNode > d_match; + std::vector< TNode > d_match_term; + std::map< int, std::map< TNode, int > > d_curr_var_deq; + std::map< Node, bool > d_tconstraints; + int getCurrentRepVar( int v ); + TNode getCurrentValue( TNode n ); + TNode getCurrentExpValue( TNode n ); + bool getCurrentCanBeEqual( QuantConflictFind * p, int v, TNode n, bool chDiseq = false ); + int addConstraint( QuantConflictFind * p, int v, TNode n, bool polarity ); + int addConstraint( QuantConflictFind * p, int v, TNode n, int vn, bool polarity, bool doRemove ); + bool setMatch( QuantConflictFind * p, int v, TNode n ); + bool isMatchSpurious( QuantConflictFind * p ); + bool isTConstraintSpurious( QuantConflictFind * p, std::vector< Node >& terms ); + bool entailmentTest( QuantConflictFind * p, Node lit, bool chEnt = true ); + bool completeMatch( QuantConflictFind * p, std::vector< int >& assigned, bool doContinue = false ); + void revertMatch( std::vector< int >& assigned ); + void debugPrintMatch( const char * c ); + bool isConstrainedVar( int v ); +public: + void getMatch( std::vector< Node >& terms ); +}; + +class QuantConflictFind : public QuantifiersModule +{ + friend class QcfNodeIndex; + friend class MatchGen; + friend class QuantInfo; + typedef context::CDChunkList NodeList; + typedef context::CDHashMap NodeBoolMap; +private: + context::Context* d_c; + context::CDO< bool > d_conflict; + bool d_performCheck; + std::vector< Node > d_quant_order; + std::map< Kind, Node > d_zero; + //for storing nodes created during t-constraint solving (prevents memory leaks) + std::vector< Node > d_tempCache; +private: + std::map< Node, Node > d_op_node; + int d_fid_count; + std::map< Node, int > d_fid; + Node mkEqNode( Node a, Node b ); +public: //for ground terms + Node d_true; + Node d_false; + TNode getZero( Kind k ); +private: + Node evaluateTerm( Node n ); + int evaluate( Node n, bool pref = false, bool hasPref = false ); +private: + //currently asserted quantifiers + NodeList d_qassert; + std::map< Node, QuantInfo > d_qinfo; +private: //for equivalence classes + eq::EqualityEngine * getEqualityEngine(); + bool areDisequal( Node n1, Node n2 ); + bool areEqual( Node n1, Node n2 ); + Node getRepresentative( Node n ); + +/* + class EqcInfo { + public: + EqcInfo( context::Context* c ) : d_diseq( c ) {} + NodeBoolMap d_diseq; + bool isDisequal( Node n ) { return d_diseq.find( n )!=d_diseq.end() && d_diseq[n]; } + void setDisequal( Node n, bool val = true ) { d_diseq[n] = val; } + //NodeBoolMap& getRelEqr( int index ) { return index==0 ? d_rel_eqr_e : d_rel_eqr_d; } + }; + std::map< Node, EqcInfo * > d_eqc_info; + EqcInfo * getEqcInfo( Node n, bool doCreate = true ); +*/ + // operator -> index(terms) + std::map< TNode, QcfNodeIndex > d_uf_terms; + // operator -> index(eqc -> terms) + std::map< TNode, QcfNodeIndex > d_eqc_uf_terms; + //get qcf node index + QcfNodeIndex * getQcfNodeIndex( Node eqc, Node f ); + QcfNodeIndex * getQcfNodeIndex( Node f ); + // type -> list(eqc) + std::map< TypeNode, std::vector< TNode > > d_eqcs; + std::map< TypeNode, Node > d_model_basis; + //mapping from UF terms to representatives of their arguments + std::map< TNode, std::vector< TNode > > d_arg_reps; + //compute arg reps + void computeArgReps( TNode n ); + //compute + void computeUfTerms( TNode f ); +public: + enum { + effort_conflict, + effort_prop_eq, + effort_mc, + }; + short d_effort; + void setEffort( int e ) { d_effort = e; } + static short getMaxQcfEffort(); + bool areMatchEqual( TNode n1, TNode n2 ); + bool areMatchDisequal( TNode n1, TNode n2 ); +public: + QuantConflictFind( QuantifiersEngine * qe, context::Context* c ); + /** register quantifier */ + void registerQuantifier( Node q ); +public: + /** assert quantifier */ + void assertNode( Node q ); + /** new node */ + void newEqClass( Node n ); + /** merge */ + void merge( Node a, Node b ); + /** assert disequal */ + void assertDisequal( Node a, Node b ); + /** reset round */ + void reset_round( Theory::Effort level ); + /** check */ + void check( Theory::Effort level ); + /** needs check */ + bool needsCheck( Theory::Effort level ); +private: + bool d_needs_computeRelEqr; +public: + void computeRelevantEqr(); +private: + void debugPrint( const char * c ); + //for debugging + std::vector< Node > d_quants; + std::map< Node, int > d_quant_id; + void debugPrintQuant( const char * c, Node q ); + void debugPrintQuantBody( const char * c, Node q, Node n, bool doVarNum = true ); +public: + /** statistics class */ + class Statistics { + public: + IntStat d_inst_rounds; + IntStat d_conflict_inst; + IntStat d_prop_inst; + IntStat d_entailment_checks; + Statistics(); + ~Statistics(); + }; + Statistics d_statistics; + /** Identify this module */ + std::string identify() const { return "QcfEngine"; } +}; + +} +} +} + +#endif diff --git a/src/theory/strings/regexp_operation.cpp b/src/theory/strings/regexp_operation.cpp index aee6294bc..18df0f759 100644 --- a/src/theory/strings/regexp_operation.cpp +++ b/src/theory/strings/regexp_operation.cpp @@ -1,1521 +1,1521 @@ -/********************* */ +/********************* */ -/*! \file regexp_operation.cpp - ** \verbatim - ** Original author: Tianyi Liang - ** Major contributors: none - ** Minor contributors (to current version): none - ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa - ** See the file COPYING in the top-level source directory for licensing - ** information.\endverbatim - ** - ** \brief Symbolic Regular Expresion Operations - ** - ** Symbolic Regular Expresion Operations - **/ - -#include "theory/strings/regexp_operation.h" -#include "expr/kind.h" - -namespace CVC4 { -namespace theory { -namespace strings { - -RegExpOpr::RegExpOpr() { - d_emptyString = NodeManager::currentNM()->mkConst( ::CVC4::String("") ); - d_true = NodeManager::currentNM()->mkConst( true ); - d_false = NodeManager::currentNM()->mkConst( false ); - d_zero = NodeManager::currentNM()->mkConst( ::CVC4::Rational(0) ); - d_one = NodeManager::currentNM()->mkConst( ::CVC4::Rational(1) ); - d_emptySingleton = NodeManager::currentNM()->mkNode( kind::STRING_TO_REGEXP, d_emptyString ); - std::vector< Node > nvec; - d_emptyRegexp = NodeManager::currentNM()->mkNode( kind::REGEXP_EMPTY, nvec ); - d_sigma = NodeManager::currentNM()->mkNode( kind::REGEXP_SIGMA, nvec ); - d_sigma_star = NodeManager::currentNM()->mkNode( kind::REGEXP_STAR, d_sigma ); - d_card = 256; -} - -int RegExpOpr::gcd ( int a, int b ) { - int c; - while ( a != 0 ) { - c = a; a = b%a; b = c; - } - return b; -} - -bool RegExpOpr::checkConstRegExp( Node r ) { - Trace("strings-regexp-cstre") << "RegExp-CheckConstRegExp starts with " << mkString( r ) << std::endl; - bool ret = true; - if( d_cstre_cache.find( r ) != d_cstre_cache.end() ) { - ret = d_cstre_cache[r]; - } else { - if(r.getKind() == kind::STRING_TO_REGEXP) { - Node tmp = Rewriter::rewrite( r[0] ); - ret = tmp.isConst(); - } else { - for(unsigned i=0; i vec_nodes; - for(unsigned i=0; imkNode(kind::AND, vec_nodes); - } - } - break; - } - case kind::REGEXP_UNION: { - bool flag = false; - std::vector< Node > vec_nodes; - for(unsigned i=0; imkNode(kind::OR, vec_nodes); - } - } - break; - } - case kind::REGEXP_INTER: { - bool flag = false; - std::vector< Node > vec_nodes; - for(unsigned i=0; imkNode(kind::AND, vec_nodes); - } - } - break; - } - case kind::REGEXP_STAR: { - ret = 1; - break; - } - case kind::REGEXP_PLUS: { - ret = delta( r[0], exp ); - break; - } - case kind::REGEXP_OPT: { - ret = 1; - break; - } - case kind::REGEXP_RANGE: { - ret = 2; - break; - } - default: { - Trace("strings-error") << "Unsupported term: " << mkString( r ) << " in delta of RegExp." << std::endl; - Assert( false ); - //return Node::null(); - } - } - if(!exp.isNull()) { - exp = Rewriter::rewrite(exp); - } - std::pair< int, Node > p(ret, exp); - d_delta_cache[r] = p; - } - Trace("regexp-delta") << "RegExp-Delta returns : " << ret << std::endl; - return ret; -} - -// 0-unknown, 1-yes, 2-no -int RegExpOpr::derivativeS( Node r, CVC4::String c, Node &retNode ) { - Assert( c.size() < 2 ); - Trace("regexp-derive") << "RegExp-derive starts with R{ " << mkString( r ) << " }, c=" << c << std::endl; - - int ret = 1; - retNode = d_emptyRegexp; - - PairNodeStr dv = std::make_pair( r, c ); - if( d_deriv_cache.find( dv ) != d_deriv_cache.end() ) { - retNode = d_deriv_cache[dv].first; - ret = d_deriv_cache[dv].second; - } else if( c.isEmptyString() ) { - Node expNode; - ret = delta( r, expNode ); - if(ret == 0) { - retNode = NodeManager::currentNM()->mkNode(kind::ITE, expNode, r, d_emptyRegexp); - } else if(ret == 1) { - retNode = r; - } - std::pair< Node, int > p(retNode, ret); - d_deriv_cache[dv] = p; - } else { - switch( r.getKind() ) { - case kind::REGEXP_EMPTY: { - ret = 2; - break; - } - case kind::REGEXP_SIGMA: { - retNode = d_emptySingleton; - break; - } - case kind::STRING_TO_REGEXP: { - Node tmp = Rewriter::rewrite(r[0]); - if(tmp.isConst()) { - if(tmp == d_emptyString) { - ret = 2; - } else { - if(tmp.getConst< CVC4::String >().getFirstChar() == c.getFirstChar()) { - retNode = NodeManager::currentNM()->mkNode( kind::STRING_TO_REGEXP, - tmp.getConst< CVC4::String >().size() == 1 ? d_emptyString : NodeManager::currentNM()->mkConst( tmp.getConst< CVC4::String >().substr(1) ) ); - } else { - ret = 2; - } - } - } else { - ret = 0; - Node rest; - if(tmp.getKind() == kind::STRING_CONCAT) { - Node t2 = tmp[0]; - if(t2.isConst()) { - if(t2.getConst< CVC4::String >().getFirstChar() == c.getFirstChar()) { - Node n = NodeManager::currentNM()->mkNode( kind::STRING_TO_REGEXP, - tmp.getConst< CVC4::String >().size() == 1 ? d_emptyString : NodeManager::currentNM()->mkConst( tmp.getConst< CVC4::String >().substr(1) ) ); - std::vector< Node > vec_nodes; - vec_nodes.push_back(n); - for(unsigned i=1; imkNode(kind::REGEXP_CONCAT, vec_nodes); - ret = 1; - } else { - ret = 2; - } - } else { - tmp = tmp[0]; - std::vector< Node > vec_nodes; - for(unsigned i=1; imkNode(kind::REGEXP_CONCAT, vec_nodes); - } - } - if(ret == 0) { - Node sk = NodeManager::currentNM()->mkSkolem( "rsp", NodeManager::currentNM()->stringType(), "Split RegExp" ); - retNode = NodeManager::currentNM()->mkNode(kind::STRING_TO_REGEXP, sk); - if(!rest.isNull()) { - retNode = Rewriter::rewrite(NodeManager::currentNM()->mkNode(kind::REGEXP_CONCAT, retNode, rest)); - } - Node exp = tmp.eqNode(NodeManager::currentNM()->mkNode(kind::STRING_CONCAT, - NodeManager::currentNM()->mkConst(c), sk)); - retNode = Rewriter::rewrite(NodeManager::currentNM()->mkNode(kind::ITE, exp, retNode, d_emptyRegexp)); - } - } - break; - } - case kind::REGEXP_CONCAT: { - std::vector< Node > vec_nodes; - std::vector< Node > delta_nodes; - Node dnode = d_true; - for(unsigned i=0; i vec_nodes2; - if(dc != d_emptySingleton) { - vec_nodes2.push_back( dc ); - } - for(unsigned j=i+1; jmkNode( kind::REGEXP_CONCAT, vec_nodes2 ); - if(dnode != d_true) { - tmp = Rewriter::rewrite(NodeManager::currentNM()->mkNode(kind::ITE, dnode, tmp, d_emptyRegexp)); - ret = 0; - } - if(std::find(vec_nodes.begin(), vec_nodes.end(), tmp) == vec_nodes.end()) { - vec_nodes.push_back( tmp ); - } - } - Node exp3; - int rt2 = delta( r[i], exp3 ); - if( rt2 == 0 ) { - dnode = Rewriter::rewrite(NodeManager::currentNM()->mkNode(kind::AND, dnode, exp3)); - } else if( rt2 == 2 ) { - break; - } - } - retNode = vec_nodes.size() == 0 ? d_emptyRegexp : - ( vec_nodes.size()==1 ? vec_nodes[0] : NodeManager::currentNM()->mkNode( kind::REGEXP_UNION, vec_nodes ) ); - if(retNode == d_emptyRegexp) { - ret = 2; - } - break; - } - case kind::REGEXP_UNION: { - std::vector< Node > vec_nodes; - for(unsigned i=0; imkNode( kind::REGEXP_UNION, vec_nodes ) ); - if(retNode == d_emptyRegexp) { - ret = 2; - } - break; - } - case kind::REGEXP_INTER: { - bool flag = true; - bool flag_sg = false; - std::vector< Node > vec_nodes; - for(unsigned i=0; imkNode( kind::REGEXP_INTER, vec_nodes ) ); - if(retNode == d_emptyRegexp) { - ret = 2; - } - } - } else { - retNode = d_emptyRegexp; - ret = 2; - } - break; - } - case kind::REGEXP_STAR: { - Node dc; - ret = derivativeS(r[0], c, dc); - retNode = dc==d_emptyRegexp ? dc : (dc==d_emptySingleton ? r : NodeManager::currentNM()->mkNode( kind::REGEXP_CONCAT, dc, r )); - break; - } - default: { - Trace("strings-error") << "Unsupported term: " << mkString( r ) << " in derivative of RegExp." << std::endl; - Assert( false, "Unsupported Term" ); - } - } - if(retNode != d_emptyRegexp) { - retNode = Rewriter::rewrite( retNode ); - } - std::pair< Node, int > p(retNode, ret); - d_deriv_cache[dv] = p; - } - - Trace("regexp-derive") << "RegExp-derive returns : " << mkString( retNode ) << std::endl; - return ret; -} - -Node RegExpOpr::derivativeSingle( Node r, CVC4::String c ) { - Assert( c.size() < 2 ); - Trace("regexp-derive") << "RegExp-derive starts with R{ " << mkString( r ) << " }, c=" << c << std::endl; - Node retNode = d_emptyRegexp; - PairNodeStr dv = std::make_pair( r, c ); - if( d_dv_cache.find( dv ) != d_dv_cache.end() ) { - retNode = d_dv_cache[dv]; - } else if( c.isEmptyString() ){ - Node exp; - int tmp = delta( r, exp ); - if(tmp == 0) { - // TODO variable - retNode = d_emptyRegexp; - } else if(tmp == 1) { - retNode = r; - } else { - retNode = d_emptyRegexp; - } - } else { - int k = r.getKind(); - switch( k ) { - case kind::REGEXP_EMPTY: { - retNode = d_emptyRegexp; - break; - } - case kind::REGEXP_SIGMA: { - retNode = NodeManager::currentNM()->mkNode( kind::STRING_TO_REGEXP, d_emptyString ); - break; - } - case kind::STRING_TO_REGEXP: { - if(r[0].isConst()) { - if(r[0] == d_emptyString) { - retNode = d_emptyRegexp; - } else { - if(r[0].getConst< CVC4::String >().getFirstChar() == c.getFirstChar()) { - retNode = NodeManager::currentNM()->mkNode( kind::STRING_TO_REGEXP, - r[0].getConst< CVC4::String >().size() == 1 ? d_emptyString : NodeManager::currentNM()->mkConst( r[0].getConst< CVC4::String >().substr(1) ) ); - } else { - retNode = d_emptyRegexp; - } - } - } else { - // TODO variable - retNode = d_emptyRegexp; - } - break; - } - case kind::REGEXP_CONCAT: { - Node rees = NodeManager::currentNM()->mkNode( kind::STRING_TO_REGEXP, d_emptyString ); - std::vector< Node > vec_nodes; - for(unsigned i=0; i vec_nodes2; - if(dc != rees) { - vec_nodes2.push_back( dc ); - } - for(unsigned j=i+1; jmkNode( kind::REGEXP_CONCAT, vec_nodes2 ); - if(std::find(vec_nodes.begin(), vec_nodes.end(), tmp) == vec_nodes.end()) { - vec_nodes.push_back( tmp ); - } - } - Node exp; - if( delta( r[i], exp ) != 1 ) { - break; - } - } - retNode = vec_nodes.size() == 0 ? d_emptyRegexp : - ( vec_nodes.size()==1 ? vec_nodes[0] : NodeManager::currentNM()->mkNode( kind::REGEXP_UNION, vec_nodes ) ); - break; - } - case kind::REGEXP_UNION: { - std::vector< Node > vec_nodes; - for(unsigned i=0; imkNode( kind::REGEXP_UNION, vec_nodes ) ); - break; - } - case kind::REGEXP_INTER: { - bool flag = true; - bool flag_sg = false; - std::vector< Node > vec_nodes; - for(unsigned i=0; imkNode( kind::REGEXP_INTER, vec_nodes ) ); - } - } else { - retNode = d_emptyRegexp; - } - break; - } - case kind::REGEXP_STAR: { - Node dc = derivativeSingle(r[0], c); - if(dc != d_emptyRegexp) { - retNode = dc==NodeManager::currentNM()->mkNode( kind::STRING_TO_REGEXP, d_emptyString ) ? r : NodeManager::currentNM()->mkNode( kind::REGEXP_CONCAT, dc, r ); - } else { - retNode = d_emptyRegexp; - } - break; - } - default: { - //TODO: special sym: sigma, none, all - Trace("strings-error") << "Unsupported term: " << mkString( r ) << " in derivative of RegExp." << std::endl; - Assert( false, "Unsupported Term" ); - //return Node::null(); - } - } - if(retNode != d_emptyRegexp) { - retNode = Rewriter::rewrite( retNode ); - } - d_dv_cache[dv] = retNode; - } - Trace("regexp-derive") << "RegExp-derive returns : " << mkString( retNode ) << std::endl; - return retNode; -} - -//TODO: -bool RegExpOpr::guessLength( Node r, int &co ) { - int k = r.getKind(); - switch( k ) { - case kind::STRING_TO_REGEXP: - { - if(r[0].isConst()) { - co += r[0].getConst< CVC4::String >().size(); - return true; - } else { - return false; - } - } - break; - case kind::REGEXP_CONCAT: - { - for(unsigned i=0; i &pcset, SetNodes &pvset ) { - std::map< Node, std::pair< std::set, SetNodes > >::const_iterator itr = d_fset_cache.find(r); - if(itr != d_fset_cache.end()) { - pcset.insert((itr->second).first.begin(), (itr->second).first.end()); - pvset.insert((itr->second).second.begin(), (itr->second).second.end()); - } else { - std::set cset; - SetNodes vset; - int k = r.getKind(); - switch( k ) { - case kind::REGEXP_EMPTY: { - break; - } - case kind::REGEXP_SIGMA: { - for(unsigned i=0; i(); - if(s.size() != 0) { - cset.insert(s[0]); - } - } else if(st.getKind() == kind::VARIABLE) { - vset.insert( st ); - } else { - if(st[0].isConst()) { - CVC4::String s = st[0].getConst< CVC4::String >(); - cset.insert(s[0]); - } else { - vset.insert( st[0] ); - } - } - break; - } - case kind::REGEXP_CONCAT: { - for(unsigned i=0; i, SetNodes > p(cset, vset); - d_fset_cache[r] = p; - - Trace("regexp-fset") << "FSET( " << mkString(r) << " ) = { "; - for(std::set::const_iterator itr = cset.begin(); - itr != cset.end(); itr++) { - Trace("regexp-fset") << CVC4::String::convertUnsignedIntToChar(*itr) << ","; - } - Trace("regexp-fset") << " }" << std::endl; - } -} - -bool RegExpOpr::follow( Node r, CVC4::String c, std::vector< char > &vec_chars ) { - int k = r.getKind(); - switch( k ) { - case kind::STRING_TO_REGEXP: - { - if(r[0].isConst()) { - if(r[0] != d_emptyString) { - char t1 = r[0].getConst< CVC4::String >().getFirstChar(); - if(c.isEmptyString()) { - vec_chars.push_back( t1 ); - return true; - } else { - char t2 = c.getFirstChar(); - if(t1 != t2) { - return false; - } else { - if(c.size() >= 2) { - vec_chars.push_back( c.substr(1,1).getFirstChar() ); - } else { - vec_chars.push_back( '\0' ); - } - return true; - } - } - } else { - return false; - } - } else { - return false; - } - } - break; - case kind::REGEXP_CONCAT: - { - for(unsigned i=0; i(); - } - } else { - return false; - } - } - vec_chars.push_back( '\0' ); - return true; - } - break; - case kind::REGEXP_UNION: - { - bool flag = false; - for(unsigned i=0; i vt2; - for(unsigned i=0; i v_tmp; - if( !follow(r[i], c, v_tmp) ) { - return false; - } - std::vector< char > vt3(vt2); - vt2.clear(); - std::set_intersection( vt3.begin(), vt3.end(), v_tmp.begin(), v_tmp.end(), vt2.begin() ); - if(vt2.size() == 0) { - return false; - } - } - vec_chars.insert( vec_chars.end(), vt2.begin(), vt2.end() ); - return true; - } - break; - case kind::REGEXP_STAR: - { - if(follow(r[0], c, vec_chars)) { - if(vec_chars[vec_chars.size() - 1] == '\0') { - if(c.isEmptyString()) { - return true; - } else { - vec_chars.pop_back(); - c = d_emptyString.getConst< CVC4::String >(); - return follow(r[0], c, vec_chars); - } - } else { - return true; - } - } else { - vec_chars.push_back( '\0' ); - return true; - } - } - break; - default: { - Trace("strings-error") << "Unsupported term: " << mkString( r ) << " in delta of RegExp." << std::endl; - //AlwaysAssert( false ); - //return Node::null(); - return false; - } - } -} - -Node RegExpOpr::mkAllExceptOne( char exp_c ) { - std::vector< Node > vec_nodes; - for(char c=d_char_start; c<=d_char_end; ++c) { - if(c != exp_c ) { - Node n = NodeManager::currentNM()->mkNode( kind::STRING_TO_REGEXP, NodeManager::currentNM()->mkConst( ::CVC4::String( c ) ) ); - vec_nodes.push_back( n ); - } - } - return NodeManager::currentNM()->mkNode( kind::REGEXP_UNION, vec_nodes ); -} - -//simplify -void RegExpOpr::simplify(Node t, std::vector< Node > &new_nodes, bool polarity) { - Trace("strings-regexp-simpl") << "RegExp-Simpl starts with " << t << ", polarity=" << polarity << std::endl; - Assert(t.getKind() == kind::STRING_IN_REGEXP); - Node str = Rewriter::rewrite(t[0]); - Node re = Rewriter::rewrite(t[1]); - if(polarity) { - simplifyPRegExp( str, re, new_nodes ); - } else { - simplifyNRegExp( str, re, new_nodes ); - } - Trace("strings-regexp-simpl") << "RegExp-Simpl returns (" << new_nodes.size() << "):\n"; - for(unsigned i=0; i &new_nodes ) { - std::pair < Node, Node > p(s, r); - std::map < std::pair< Node, Node >, Node >::const_iterator itr = d_simpl_neg_cache.find(p); - if(itr != d_simpl_neg_cache.end()) { - new_nodes.push_back( itr->second ); - } else { - int k = r.getKind(); - Node conc; - switch( k ) { - case kind::REGEXP_EMPTY: { - conc = d_true; - break; - } - case kind::REGEXP_SIGMA: { - conc = d_one.eqNode(NodeManager::currentNM()->mkNode(kind::STRING_LENGTH, s)).negate(); - break; - } - case kind::STRING_TO_REGEXP: { - conc = s.eqNode(r[0]).negate(); - break; - } - case kind::REGEXP_CONCAT: { - //TODO: rewrite empty - Node lens = NodeManager::currentNM()->mkNode(kind::STRING_LENGTH, s); - Node b1 = NodeManager::currentNM()->mkBoundVar(NodeManager::currentNM()->integerType()); - Node b1v = NodeManager::currentNM()->mkNode(kind::BOUND_VAR_LIST, b1); - Node g1 = NodeManager::currentNM()->mkNode( kind::AND, NodeManager::currentNM()->mkNode(kind::GEQ, b1, d_zero), - NodeManager::currentNM()->mkNode( kind::GEQ, NodeManager::currentNM()->mkNode(kind::STRING_LENGTH, s), b1 ) ); - Node s1 = Rewriter::rewrite(NodeManager::currentNM()->mkNode(kind::STRING_SUBSTR_TOTAL, s, d_zero, b1)); - Node s2 = Rewriter::rewrite(NodeManager::currentNM()->mkNode(kind::STRING_SUBSTR_TOTAL, s, b1, NodeManager::currentNM()->mkNode(kind::MINUS, lens, b1))); - Node s1r1 = NodeManager::currentNM()->mkNode(kind::STRING_IN_REGEXP, s1, r[0]).negate(); - if(r[0].getKind() == kind::STRING_TO_REGEXP) { - s1r1 = s1.eqNode(r[0][0]).negate(); - } else if(r[0].getKind() == kind::REGEXP_EMPTY) { - s1r1 = d_true; - } - Node r2 = r[1]; - if(r.getNumChildren() > 2) { - std::vector< Node > nvec; - for(unsigned i=1; imkNode(kind::REGEXP_CONCAT, nvec); - } - r2 = Rewriter::rewrite(r2); - Node s2r2 = NodeManager::currentNM()->mkNode(kind::STRING_IN_REGEXP, s2, r2).negate(); - if(r2.getKind() == kind::STRING_TO_REGEXP) { - s2r2 = s2.eqNode(r2[0]).negate(); - } else if(r2.getKind() == kind::REGEXP_EMPTY) { - s2r2 = d_true; - } - - conc = NodeManager::currentNM()->mkNode(kind::OR, s1r1, s2r2); - conc = NodeManager::currentNM()->mkNode(kind::IMPLIES, g1, conc); - conc = NodeManager::currentNM()->mkNode(kind::FORALL, b1v, conc); - break; - } - case kind::REGEXP_UNION: { - std::vector< Node > c_and; - for(unsigned i=0; imkNode(kind::STRING_IN_REGEXP, s, r[i]).negate()); - } - } - conc = c_and.size() == 0 ? d_true : - c_and.size() == 1 ? c_and[0] : NodeManager::currentNM()->mkNode(kind::AND, c_and); - break; - } - case kind::REGEXP_INTER: { - bool emptyflag = false; - std::vector< Node > c_or; - for(unsigned i=0; imkNode(kind::STRING_IN_REGEXP, s, r[i]).negate()); - } - } - if(emptyflag) { - conc = d_true; - } else { - conc = c_or.size() == 1 ? c_or[0] : NodeManager::currentNM()->mkNode(kind::OR, c_or); - } - break; - } - case kind::REGEXP_STAR: { - if(s == d_emptyString) { - conc = d_false; - } else if(r[0].getKind() == kind::REGEXP_EMPTY) { - conc = s.eqNode(d_emptyString).negate(); - } else if(r[0].getKind() == kind::REGEXP_SIGMA) { - conc = d_false; - } else { - Node lens = NodeManager::currentNM()->mkNode(kind::STRING_LENGTH, s); - Node sne = s.eqNode(d_emptyString).negate(); - Node b1 = NodeManager::currentNM()->mkBoundVar(NodeManager::currentNM()->integerType()); - Node b1v = NodeManager::currentNM()->mkNode(kind::BOUND_VAR_LIST, b1); - Node g1 = NodeManager::currentNM()->mkNode( kind::AND, NodeManager::currentNM()->mkNode(kind::GEQ, b1, d_one), - NodeManager::currentNM()->mkNode( kind::GEQ, lens, b1 ) ); - //internal - Node s1 = NodeManager::currentNM()->mkNode(kind::STRING_SUBSTR_TOTAL, s, d_zero, b1); - Node s2 = NodeManager::currentNM()->mkNode(kind::STRING_SUBSTR_TOTAL, s, b1, NodeManager::currentNM()->mkNode(kind::MINUS, lens, b1)); - Node s1r1 = NodeManager::currentNM()->mkNode(kind::STRING_IN_REGEXP, s1, r[0]).negate(); - Node s2r2 = NodeManager::currentNM()->mkNode(kind::STRING_IN_REGEXP, s2, r).negate(); - - conc = NodeManager::currentNM()->mkNode(kind::OR, s1r1, s2r2); - conc = NodeManager::currentNM()->mkNode(kind::IMPLIES, g1, conc); - conc = NodeManager::currentNM()->mkNode(kind::FORALL, b1v, conc); - conc = NodeManager::currentNM()->mkNode(kind::AND, sne, conc); - } - break; - } - default: { - Trace("strings-regexp") << "Unsupported term: " << r << " in simplifyNRegExp." << std::endl; - Assert( false, "Unsupported Term" ); - } - } - conc = Rewriter::rewrite( conc ); - new_nodes.push_back( conc ); - d_simpl_neg_cache[p] = conc; - } -} -void RegExpOpr::simplifyPRegExp( Node s, Node r, std::vector< Node > &new_nodes ) { - std::pair < Node, Node > p(s, r); - std::map < std::pair< Node, Node >, Node >::const_iterator itr = d_simpl_cache.find(p); - if(itr != d_simpl_cache.end()) { - new_nodes.push_back( itr->second ); - } else { - int k = r.getKind(); - Node conc; - switch( k ) { - case kind::REGEXP_EMPTY: { - conc = d_false; - break; - } - case kind::REGEXP_SIGMA: { - conc = d_one.eqNode(NodeManager::currentNM()->mkNode(kind::STRING_LENGTH, s)); - break; - } - case kind::STRING_TO_REGEXP: { - conc = s.eqNode(r[0]); - break; - } - case kind::REGEXP_CONCAT: { - std::vector< Node > nvec; - std::vector< Node > cc; - bool emptyflag = false; - for(unsigned i=0; imkSkolem( "rc", s.getType(), "created for regular expression concat" ); - Node lem = NodeManager::currentNM()->mkNode(kind::STRING_IN_REGEXP, sk, r[i]); - nvec.push_back(lem); - cc.push_back(sk); - } - } - if(emptyflag) { - conc = d_false; - } else { - Node lem = s.eqNode( NodeManager::currentNM()->mkNode(kind::STRING_CONCAT, cc) ); - nvec.push_back(lem); - conc = nvec.size() == 1 ? nvec[0] : NodeManager::currentNM()->mkNode(kind::AND, nvec); - } - break; - } - case kind::REGEXP_UNION: { - std::vector< Node > c_or; - for(unsigned i=0; imkNode(kind::STRING_IN_REGEXP, s, r[i])); - } - } - conc = c_or.size() == 0 ? d_false : - c_or.size() == 1 ? c_or[0] : NodeManager::currentNM()->mkNode(kind::OR, c_or); - break; - } - case kind::REGEXP_INTER: { - std::vector< Node > c_and; - bool emptyflag = false; - for(unsigned i=0; imkNode(kind::STRING_IN_REGEXP, s, r[i])); - } - } - if(emptyflag) { - conc = d_false; - } else { - conc = c_and.size() == 1 ? c_and[0] : NodeManager::currentNM()->mkNode(kind::AND, c_and); - } - break; - } - case kind::REGEXP_STAR: { - if(s == d_emptyString) { - conc = d_true; - } else if(r[0].getKind() == kind::REGEXP_EMPTY) { - conc = s.eqNode(d_emptyString); - } else if(r[0].getKind() == kind::REGEXP_SIGMA) { - conc = d_true; - } else { - Node se = s.eqNode(d_emptyString); - Node sinr = NodeManager::currentNM()->mkNode(kind::STRING_IN_REGEXP, s, r[0]); - Node sk1 = NodeManager::currentNM()->mkSkolem( "rs", s.getType(), "created for regular expression star" ); - Node sk2 = NodeManager::currentNM()->mkSkolem( "rs", s.getType(), "created for regular expression star" ); - Node s1nz = sk1.eqNode(d_emptyString).negate(); - Node s2nz = sk2.eqNode(d_emptyString).negate(); - Node s1inr = NodeManager::currentNM()->mkNode(kind::STRING_IN_REGEXP, sk1, r[0]); - Node s2inrs = NodeManager::currentNM()->mkNode(kind::STRING_IN_REGEXP, sk2, r); - Node s12 = s.eqNode(NodeManager::currentNM()->mkNode(kind::STRING_CONCAT, sk1, sk2)); - - conc = NodeManager::currentNM()->mkNode(kind::AND, s12, s1nz, s2nz, s1inr, s2inrs); - conc = NodeManager::currentNM()->mkNode(kind::OR, se, sinr, conc); - } - break; - } - default: { - Trace("strings-regexp") << "Unsupported term: " << r << " in simplifyPRegExp." << std::endl; - Assert( false, "Unsupported Term" ); - } - } - conc = Rewriter::rewrite( conc ); - new_nodes.push_back( conc ); - d_simpl_cache[p] = conc; - } -} - -void RegExpOpr::getCharSet( Node r, std::set &pcset, SetNodes &pvset ) { - std::map< Node, std::pair< std::set, SetNodes > >::const_iterator itr = d_cset_cache.find(r); - if(itr != d_cset_cache.end()) { - pcset.insert((itr->second).first.begin(), (itr->second).first.end()); - pvset.insert((itr->second).second.begin(), (itr->second).second.end()); - } else { - std::set cset; - SetNodes vset; - int k = r.getKind(); - switch( k ) { - case kind::REGEXP_EMPTY: { - break; - } - case kind::REGEXP_SIGMA: { - for(unsigned i=0; i(); - s.getCharSet( cset ); - } else if(st.getKind() == kind::VARIABLE) { - vset.insert( st ); - } else { - for(unsigned i=0; i(); - s.getCharSet( cset ); - } else { - vset.insert( st[i] ); - } - } - } - break; - } - case kind::REGEXP_CONCAT: { - for(unsigned i=0; i, SetNodes > p(cset, vset); - d_cset_cache[r] = p; - - Trace("regexp-cset") << "CSET( " << mkString(r) << " ) = { "; - for(std::set::const_iterator itr = cset.begin(); - itr != cset.end(); itr++) { - Trace("regexp-cset") << CVC4::String::convertUnsignedIntToChar(*itr) << ","; - } - Trace("regexp-cset") << " }" << std::endl; - } -} - +/*! \file regexp_operation.cpp + ** \verbatim + ** Original author: Tianyi Liang + ** Major contributors: none + ** Minor contributors (to current version): none + ** This file is part of the CVC4 project. + ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** See the file COPYING in the top-level source directory for licensing + ** information.\endverbatim + ** + ** \brief Symbolic Regular Expresion Operations + ** + ** Symbolic Regular Expresion Operations + **/ -Node RegExpOpr::intersectInternal( Node r1, Node r2, std::map< unsigned, std::set< PairNodes > > cache, bool &spflag ) { - if(spflag) { - //TODO: var - return Node::null(); - } - std::pair < Node, Node > p(r1, r2); - std::map < std::pair< Node, Node >, Node >::const_iterator itr = d_inter_cache.find(p); - Node rNode; - if(itr != d_inter_cache.end()) { - rNode = itr->second; - } else { - if(r1 == r2) { - rNode = r1; - } else if(r1 == d_emptyRegexp || r2 == d_emptyRegexp) { - rNode = d_emptyRegexp; - } else if(r1 == d_emptySingleton || r2 == d_emptySingleton) { - Node exp; - int r = delta((r1 == d_emptySingleton ? r2 : r1), exp); - if(r == 0) { - //TODO: variable - spflag = true; - } else if(r == 1) { - rNode = d_emptySingleton; - } else { - rNode = d_emptyRegexp; - } - } else { - std::set< unsigned > cset, cset2; - std::set< Node > vset, vset2; - getCharSet(r1, cset, vset); - getCharSet(r2, cset2, vset2); - if(vset.empty() && vset2.empty()) { - cset.clear(); - firstChars(r1, cset, vset); - std::vector< Node > vec_nodes; - for(std::set::const_iterator itr = cset.begin(); - itr != cset.end(); itr++) { - CVC4::String c( CVC4::String::convertUnsignedIntToChar(*itr) ); - std::pair< Node, Node > p(r1, r2); - if(cache[ *itr ].find(p) == cache[ *itr ].end()) { - Node r1l = derivativeSingle(r1, c); - Node r2l = derivativeSingle(r2, c); - std::map< unsigned, std::set< PairNodes > > cache2(cache); - PairNodes p(r1l, r2l); - cache2[ *itr ].insert( p ); - Node rt = intersectInternal(r1l, r2l, cache2, spflag); - if(spflag) { - //TODO: - return Node::null(); - } - rt = Rewriter::rewrite( NodeManager::currentNM()->mkNode(kind::REGEXP_CONCAT, - NodeManager::currentNM()->mkNode(kind::STRING_TO_REGEXP, NodeManager::currentNM()->mkConst(c)), rt) ); - vec_nodes.push_back(rt); - } - } - rNode = vec_nodes.size()==0 ? d_emptyRegexp : vec_nodes.size()==1 ? vec_nodes[0] : - NodeManager::currentNM()->mkNode(kind::REGEXP_UNION, vec_nodes); - rNode = Rewriter::rewrite( rNode ); - } else { - //TODO: non-empty var set - spflag = true; - } - } - d_inter_cache[p] = rNode; - } - Trace("regexp-intersect") << "INTERSECT( " << mkString(r1) << ", " << mkString(r2) << " ) = " << mkString(rNode) << std::endl; - return rNode; -} -Node RegExpOpr::intersect(Node r1, Node r2, bool &spflag) { - std::map< unsigned, std::set< PairNodes > > cache; - if(checkConstRegExp(r1) && checkConstRegExp(r2)) { - return intersectInternal(r1, r2, cache, spflag); - } else { - spflag = true; - return Node::null(); - } -} - -Node RegExpOpr::complement(Node r, int &ret) { - Node rNode; - ret = 1; - if(d_compl_cache.find(r) != d_compl_cache.end()) { - rNode = d_compl_cache[r].first; - ret = d_compl_cache[r].second; - } else { - if(r == d_emptyRegexp) { - rNode = d_sigma_star; - } else if(r == d_emptySingleton) { - rNode = NodeManager::currentNM()->mkNode(kind::REGEXP_CONCAT, d_sigma, d_sigma_star); - } else if(!checkConstRegExp(r)) { - //TODO: var to be extended - ret = 0; - } else { - std::set cset; - SetNodes vset; - firstChars(r, cset, vset); - std::vector< Node > vec_nodes; - for(unsigned i=0; imkNode(kind::STRING_TO_REGEXP, NodeManager::currentNM()->mkConst(c)); - Node r2; - if(cset.find(i) == cset.end()) { - r2 = d_sigma_star; - } else { - int rt; - derivativeS(r, c, r2); - if(r2 == r) { - r2 = d_emptyRegexp; - } else { - r2 = complement(r2, rt); - } - } - n = Rewriter::rewrite(NodeManager::currentNM()->mkNode(kind::REGEXP_CONCAT, n, r2)); - vec_nodes.push_back(n); - } - rNode = vec_nodes.size()==0? d_emptyRegexp : vec_nodes.size()==1? vec_nodes[0] : - NodeManager::currentNM()->mkNode(kind::REGEXP_UNION, vec_nodes); - } - rNode = Rewriter::rewrite(rNode); - std::pair< Node, int > p(rNode, ret); - d_compl_cache[r] = p; - } - Trace("regexp-compl") << "COMPL( " << mkString(r) << " ) = " << mkString(rNode) << ", ret=" << ret << std::endl; - return rNode; -} - -void RegExpOpr::splitRegExp(Node r, std::vector< PairNodes > &pset) { - Assert(checkConstRegExp(r)); - if(d_split_cache.find(r) != d_split_cache.end()) { - pset = d_split_cache[r]; - } else { - switch( r.getKind() ) { - case kind::REGEXP_EMPTY: { - break; - } - case kind::REGEXP_OPT: { - PairNodes tmp(d_emptySingleton, d_emptySingleton); - pset.push_back(tmp); - } - case kind::REGEXP_RANGE: - case kind::REGEXP_SIGMA: { - PairNodes tmp1(d_emptySingleton, r); - PairNodes tmp2(r, d_emptySingleton); - pset.push_back(tmp1); - pset.push_back(tmp2); - break; - } - case kind::STRING_TO_REGEXP: { - Assert(r[0].isConst()); - CVC4::String s = r[0].getConst< CVC4::String >(); - PairNodes tmp1(d_emptySingleton, r); - pset.push_back(tmp1); - for(unsigned i=1; imkNode(kind::STRING_TO_REGEXP, NodeManager::currentNM()->mkConst(s1)); - Node n2 = NodeManager::currentNM()->mkNode(kind::STRING_TO_REGEXP, NodeManager::currentNM()->mkConst(s2)); - PairNodes tmp3(n1, n2); - pset.push_back(tmp3); - } - PairNodes tmp2(r, d_emptySingleton); - pset.push_back(tmp2); - break; - } - case kind::REGEXP_CONCAT: { - for(unsigned i=0; i tset; - splitRegExp(r[i], tset); - std::vector< Node > hvec; - std::vector< Node > tvec; - for(unsigned j=0; j<=i; j++) { - hvec.push_back(r[j]); - } - for(unsigned j=i; jmkNode(kind::REGEXP_CONCAT, hvec) ); - Node r2 = Rewriter::rewrite( tvec.size()==1?tvec[0]:NodeManager::currentNM()->mkNode(kind::REGEXP_CONCAT, tvec) ); - PairNodes tmp2(r1, r2); - pset.push_back(tmp2); - } - } - break; - } - case kind::REGEXP_UNION: { - for(unsigned i=0; i tset; - splitRegExp(r[i], tset); - pset.insert(pset.end(), tset.begin(), tset.end()); - } - break; - } - case kind::REGEXP_INTER: { - bool spflag = false; - Node tmp = r[0]; - for(unsigned i=1; i tset; - splitRegExp(r[0], tset); - PairNodes tmp1(d_emptySingleton, d_emptySingleton); - pset.push_back(tmp1); - for(unsigned i=0; imkNode(kind::REGEXP_CONCAT, r, tset[i].first); - Node r2 = tset[i].second==d_emptySingleton ? r : NodeManager::currentNM()->mkNode(kind::REGEXP_CONCAT, tset[i].second, r); - PairNodes tmp2(r1, r2); - pset.push_back(tmp2); - } - break; - } - case kind::REGEXP_PLUS: { - std::vector< PairNodes > tset; - splitRegExp(r[0], tset); - for(unsigned i=0; imkNode(kind::REGEXP_CONCAT, r, tset[i].first); - Node r2 = NodeManager::currentNM()->mkNode(kind::REGEXP_CONCAT, tset[i].second, r); - PairNodes tmp2(r1, r2); - pset.push_back(tmp2); - } - break; - } - default: { - Trace("strings-error") << "Unsupported term: " << r << " in splitRegExp." << std::endl; - Assert( false ); - //return Node::null(); - } - } - d_split_cache[r] = pset; - } -} - -//printing -std::string RegExpOpr::niceChar( Node r ) { - if(r.isConst()) { - std::string s = r.getConst().toString() ; - return s == "" ? "{E}" : ( s == " " ? "{ }" : s.size()>1? "("+s+")" : s ); - } else { - std::string ss = "$" + r.toString(); - return ss; - } -} -std::string RegExpOpr::mkString( Node r ) { - std::string retStr; - if(r.isNull()) { - retStr = "Empty"; - } else { - int k = r.getKind(); - switch( k ) { - case kind::REGEXP_EMPTY: { - retStr += "Empty"; - break; - } - case kind::REGEXP_SIGMA: { - retStr += "{W}"; - break; - } - case kind::STRING_TO_REGEXP: { - retStr += niceChar( r[0] ); - break; - } - case kind::REGEXP_CONCAT: { - retStr += "("; - for(unsigned i=0; imkConst( ::CVC4::String("") ); + d_true = NodeManager::currentNM()->mkConst( true ); + d_false = NodeManager::currentNM()->mkConst( false ); + d_zero = NodeManager::currentNM()->mkConst( ::CVC4::Rational(0) ); + d_one = NodeManager::currentNM()->mkConst( ::CVC4::Rational(1) ); + d_emptySingleton = NodeManager::currentNM()->mkNode( kind::STRING_TO_REGEXP, d_emptyString ); + std::vector< Node > nvec; + d_emptyRegexp = NodeManager::currentNM()->mkNode( kind::REGEXP_EMPTY, nvec ); + d_sigma = NodeManager::currentNM()->mkNode( kind::REGEXP_SIGMA, nvec ); + d_sigma_star = NodeManager::currentNM()->mkNode( kind::REGEXP_STAR, d_sigma ); + d_card = 256; +} + +int RegExpOpr::gcd ( int a, int b ) { + int c; + while ( a != 0 ) { + c = a; a = b%a; b = c; + } + return b; +} + +bool RegExpOpr::checkConstRegExp( Node r ) { + Trace("strings-regexp-cstre") << "RegExp-CheckConstRegExp starts with " << mkString( r ) << std::endl; + bool ret = true; + if( d_cstre_cache.find( r ) != d_cstre_cache.end() ) { + ret = d_cstre_cache[r]; + } else { + if(r.getKind() == kind::STRING_TO_REGEXP) { + Node tmp = Rewriter::rewrite( r[0] ); + ret = tmp.isConst(); + } else { + for(unsigned i=0; i vec_nodes; + for(unsigned i=0; imkNode(kind::AND, vec_nodes); + } + } + break; + } + case kind::REGEXP_UNION: { + bool flag = false; + std::vector< Node > vec_nodes; + for(unsigned i=0; imkNode(kind::OR, vec_nodes); + } + } + break; + } + case kind::REGEXP_INTER: { + bool flag = false; + std::vector< Node > vec_nodes; + for(unsigned i=0; imkNode(kind::AND, vec_nodes); + } + } + break; + } + case kind::REGEXP_STAR: { + ret = 1; + break; + } + case kind::REGEXP_PLUS: { + ret = delta( r[0], exp ); + break; + } + case kind::REGEXP_OPT: { + ret = 1; + break; + } + case kind::REGEXP_RANGE: { + ret = 2; + break; + } + default: { + Trace("strings-error") << "Unsupported term: " << mkString( r ) << " in delta of RegExp." << std::endl; + Assert( false ); + //return Node::null(); + } + } + if(!exp.isNull()) { + exp = Rewriter::rewrite(exp); + } + std::pair< int, Node > p(ret, exp); + d_delta_cache[r] = p; + } + Trace("regexp-delta") << "RegExp-Delta returns : " << ret << std::endl; + return ret; +} + +// 0-unknown, 1-yes, 2-no +int RegExpOpr::derivativeS( Node r, CVC4::String c, Node &retNode ) { + Assert( c.size() < 2 ); + Trace("regexp-derive") << "RegExp-derive starts with R{ " << mkString( r ) << " }, c=" << c << std::endl; + + int ret = 1; + retNode = d_emptyRegexp; + + PairNodeStr dv = std::make_pair( r, c ); + if( d_deriv_cache.find( dv ) != d_deriv_cache.end() ) { + retNode = d_deriv_cache[dv].first; + ret = d_deriv_cache[dv].second; + } else if( c.isEmptyString() ) { + Node expNode; + ret = delta( r, expNode ); + if(ret == 0) { + retNode = NodeManager::currentNM()->mkNode(kind::ITE, expNode, r, d_emptyRegexp); + } else if(ret == 1) { + retNode = r; + } + std::pair< Node, int > p(retNode, ret); + d_deriv_cache[dv] = p; + } else { + switch( r.getKind() ) { + case kind::REGEXP_EMPTY: { + ret = 2; + break; + } + case kind::REGEXP_SIGMA: { + retNode = d_emptySingleton; + break; + } + case kind::STRING_TO_REGEXP: { + Node tmp = Rewriter::rewrite(r[0]); + if(tmp.isConst()) { + if(tmp == d_emptyString) { + ret = 2; + } else { + if(tmp.getConst< CVC4::String >().getFirstChar() == c.getFirstChar()) { + retNode = NodeManager::currentNM()->mkNode( kind::STRING_TO_REGEXP, + tmp.getConst< CVC4::String >().size() == 1 ? d_emptyString : NodeManager::currentNM()->mkConst( tmp.getConst< CVC4::String >().substr(1) ) ); + } else { + ret = 2; + } + } + } else { + ret = 0; + Node rest; + if(tmp.getKind() == kind::STRING_CONCAT) { + Node t2 = tmp[0]; + if(t2.isConst()) { + if(t2.getConst< CVC4::String >().getFirstChar() == c.getFirstChar()) { + Node n = NodeManager::currentNM()->mkNode( kind::STRING_TO_REGEXP, + tmp.getConst< CVC4::String >().size() == 1 ? d_emptyString : NodeManager::currentNM()->mkConst( tmp.getConst< CVC4::String >().substr(1) ) ); + std::vector< Node > vec_nodes; + vec_nodes.push_back(n); + for(unsigned i=1; imkNode(kind::REGEXP_CONCAT, vec_nodes); + ret = 1; + } else { + ret = 2; + } + } else { + tmp = tmp[0]; + std::vector< Node > vec_nodes; + for(unsigned i=1; imkNode(kind::REGEXP_CONCAT, vec_nodes); + } + } + if(ret == 0) { + Node sk = NodeManager::currentNM()->mkSkolem( "rsp", NodeManager::currentNM()->stringType(), "Split RegExp" ); + retNode = NodeManager::currentNM()->mkNode(kind::STRING_TO_REGEXP, sk); + if(!rest.isNull()) { + retNode = Rewriter::rewrite(NodeManager::currentNM()->mkNode(kind::REGEXP_CONCAT, retNode, rest)); + } + Node exp = tmp.eqNode(NodeManager::currentNM()->mkNode(kind::STRING_CONCAT, + NodeManager::currentNM()->mkConst(c), sk)); + retNode = Rewriter::rewrite(NodeManager::currentNM()->mkNode(kind::ITE, exp, retNode, d_emptyRegexp)); + } + } + break; + } + case kind::REGEXP_CONCAT: { + std::vector< Node > vec_nodes; + std::vector< Node > delta_nodes; + Node dnode = d_true; + for(unsigned i=0; i vec_nodes2; + if(dc != d_emptySingleton) { + vec_nodes2.push_back( dc ); + } + for(unsigned j=i+1; jmkNode( kind::REGEXP_CONCAT, vec_nodes2 ); + if(dnode != d_true) { + tmp = Rewriter::rewrite(NodeManager::currentNM()->mkNode(kind::ITE, dnode, tmp, d_emptyRegexp)); + ret = 0; + } + if(std::find(vec_nodes.begin(), vec_nodes.end(), tmp) == vec_nodes.end()) { + vec_nodes.push_back( tmp ); + } + } + Node exp3; + int rt2 = delta( r[i], exp3 ); + if( rt2 == 0 ) { + dnode = Rewriter::rewrite(NodeManager::currentNM()->mkNode(kind::AND, dnode, exp3)); + } else if( rt2 == 2 ) { + break; + } + } + retNode = vec_nodes.size() == 0 ? d_emptyRegexp : + ( vec_nodes.size()==1 ? vec_nodes[0] : NodeManager::currentNM()->mkNode( kind::REGEXP_UNION, vec_nodes ) ); + if(retNode == d_emptyRegexp) { + ret = 2; + } + break; + } + case kind::REGEXP_UNION: { + std::vector< Node > vec_nodes; + for(unsigned i=0; imkNode( kind::REGEXP_UNION, vec_nodes ) ); + if(retNode == d_emptyRegexp) { + ret = 2; + } + break; + } + case kind::REGEXP_INTER: { + bool flag = true; + bool flag_sg = false; + std::vector< Node > vec_nodes; + for(unsigned i=0; imkNode( kind::REGEXP_INTER, vec_nodes ) ); + if(retNode == d_emptyRegexp) { + ret = 2; + } + } + } else { + retNode = d_emptyRegexp; + ret = 2; + } + break; + } + case kind::REGEXP_STAR: { + Node dc; + ret = derivativeS(r[0], c, dc); + retNode = dc==d_emptyRegexp ? dc : (dc==d_emptySingleton ? r : NodeManager::currentNM()->mkNode( kind::REGEXP_CONCAT, dc, r )); + break; + } + default: { + Trace("strings-error") << "Unsupported term: " << mkString( r ) << " in derivative of RegExp." << std::endl; + Assert( false, "Unsupported Term" ); + } + } + if(retNode != d_emptyRegexp) { + retNode = Rewriter::rewrite( retNode ); + } + std::pair< Node, int > p(retNode, ret); + d_deriv_cache[dv] = p; + } + + Trace("regexp-derive") << "RegExp-derive returns : " << mkString( retNode ) << std::endl; + return ret; +} + +Node RegExpOpr::derivativeSingle( Node r, CVC4::String c ) { + Assert( c.size() < 2 ); + Trace("regexp-derive") << "RegExp-derive starts with R{ " << mkString( r ) << " }, c=" << c << std::endl; + Node retNode = d_emptyRegexp; + PairNodeStr dv = std::make_pair( r, c ); + if( d_dv_cache.find( dv ) != d_dv_cache.end() ) { + retNode = d_dv_cache[dv]; + } else if( c.isEmptyString() ){ + Node exp; + int tmp = delta( r, exp ); + if(tmp == 0) { + // TODO variable + retNode = d_emptyRegexp; + } else if(tmp == 1) { + retNode = r; + } else { + retNode = d_emptyRegexp; + } + } else { + int k = r.getKind(); + switch( k ) { + case kind::REGEXP_EMPTY: { + retNode = d_emptyRegexp; + break; + } + case kind::REGEXP_SIGMA: { + retNode = NodeManager::currentNM()->mkNode( kind::STRING_TO_REGEXP, d_emptyString ); + break; + } + case kind::STRING_TO_REGEXP: { + if(r[0].isConst()) { + if(r[0] == d_emptyString) { + retNode = d_emptyRegexp; + } else { + if(r[0].getConst< CVC4::String >().getFirstChar() == c.getFirstChar()) { + retNode = NodeManager::currentNM()->mkNode( kind::STRING_TO_REGEXP, + r[0].getConst< CVC4::String >().size() == 1 ? d_emptyString : NodeManager::currentNM()->mkConst( r[0].getConst< CVC4::String >().substr(1) ) ); + } else { + retNode = d_emptyRegexp; + } + } + } else { + // TODO variable + retNode = d_emptyRegexp; + } + break; + } + case kind::REGEXP_CONCAT: { + Node rees = NodeManager::currentNM()->mkNode( kind::STRING_TO_REGEXP, d_emptyString ); + std::vector< Node > vec_nodes; + for(unsigned i=0; i vec_nodes2; + if(dc != rees) { + vec_nodes2.push_back( dc ); + } + for(unsigned j=i+1; jmkNode( kind::REGEXP_CONCAT, vec_nodes2 ); + if(std::find(vec_nodes.begin(), vec_nodes.end(), tmp) == vec_nodes.end()) { + vec_nodes.push_back( tmp ); + } + } + Node exp; + if( delta( r[i], exp ) != 1 ) { + break; + } + } + retNode = vec_nodes.size() == 0 ? d_emptyRegexp : + ( vec_nodes.size()==1 ? vec_nodes[0] : NodeManager::currentNM()->mkNode( kind::REGEXP_UNION, vec_nodes ) ); + break; + } + case kind::REGEXP_UNION: { + std::vector< Node > vec_nodes; + for(unsigned i=0; imkNode( kind::REGEXP_UNION, vec_nodes ) ); + break; + } + case kind::REGEXP_INTER: { + bool flag = true; + bool flag_sg = false; + std::vector< Node > vec_nodes; + for(unsigned i=0; imkNode( kind::REGEXP_INTER, vec_nodes ) ); + } + } else { + retNode = d_emptyRegexp; + } + break; + } + case kind::REGEXP_STAR: { + Node dc = derivativeSingle(r[0], c); + if(dc != d_emptyRegexp) { + retNode = dc==NodeManager::currentNM()->mkNode( kind::STRING_TO_REGEXP, d_emptyString ) ? r : NodeManager::currentNM()->mkNode( kind::REGEXP_CONCAT, dc, r ); + } else { + retNode = d_emptyRegexp; + } + break; + } + default: { + //TODO: special sym: sigma, none, all + Trace("strings-error") << "Unsupported term: " << mkString( r ) << " in derivative of RegExp." << std::endl; + Assert( false, "Unsupported Term" ); + //return Node::null(); + } + } + if(retNode != d_emptyRegexp) { + retNode = Rewriter::rewrite( retNode ); + } + d_dv_cache[dv] = retNode; + } + Trace("regexp-derive") << "RegExp-derive returns : " << mkString( retNode ) << std::endl; + return retNode; +} + +//TODO: +bool RegExpOpr::guessLength( Node r, int &co ) { + int k = r.getKind(); + switch( k ) { + case kind::STRING_TO_REGEXP: + { + if(r[0].isConst()) { + co += r[0].getConst< CVC4::String >().size(); + return true; + } else { + return false; + } + } + break; + case kind::REGEXP_CONCAT: + { + for(unsigned i=0; i &pcset, SetNodes &pvset ) { + std::map< Node, std::pair< std::set, SetNodes > >::const_iterator itr = d_fset_cache.find(r); + if(itr != d_fset_cache.end()) { + pcset.insert((itr->second).first.begin(), (itr->second).first.end()); + pvset.insert((itr->second).second.begin(), (itr->second).second.end()); + } else { + std::set cset; + SetNodes vset; + int k = r.getKind(); + switch( k ) { + case kind::REGEXP_EMPTY: { + break; + } + case kind::REGEXP_SIGMA: { + for(unsigned i=0; i(); + if(s.size() != 0) { + cset.insert(s[0]); + } + } else if(st.getKind() == kind::VARIABLE) { + vset.insert( st ); + } else { + if(st[0].isConst()) { + CVC4::String s = st[0].getConst< CVC4::String >(); + cset.insert(s[0]); + } else { + vset.insert( st[0] ); + } + } + break; + } + case kind::REGEXP_CONCAT: { + for(unsigned i=0; i, SetNodes > p(cset, vset); + d_fset_cache[r] = p; + + Trace("regexp-fset") << "FSET( " << mkString(r) << " ) = { "; + for(std::set::const_iterator itr = cset.begin(); + itr != cset.end(); itr++) { + Trace("regexp-fset") << CVC4::String::convertUnsignedIntToChar(*itr) << ","; + } + Trace("regexp-fset") << " }" << std::endl; + } +} + +bool RegExpOpr::follow( Node r, CVC4::String c, std::vector< char > &vec_chars ) { + int k = r.getKind(); + switch( k ) { + case kind::STRING_TO_REGEXP: + { + if(r[0].isConst()) { + if(r[0] != d_emptyString) { + char t1 = r[0].getConst< CVC4::String >().getFirstChar(); + if(c.isEmptyString()) { + vec_chars.push_back( t1 ); + return true; + } else { + char t2 = c.getFirstChar(); + if(t1 != t2) { + return false; + } else { + if(c.size() >= 2) { + vec_chars.push_back( c.substr(1,1).getFirstChar() ); + } else { + vec_chars.push_back( '\0' ); + } + return true; + } + } + } else { + return false; + } + } else { + return false; + } + } + break; + case kind::REGEXP_CONCAT: + { + for(unsigned i=0; i(); + } + } else { + return false; + } + } + vec_chars.push_back( '\0' ); + return true; + } + break; + case kind::REGEXP_UNION: + { + bool flag = false; + for(unsigned i=0; i vt2; + for(unsigned i=0; i v_tmp; + if( !follow(r[i], c, v_tmp) ) { + return false; + } + std::vector< char > vt3(vt2); + vt2.clear(); + std::set_intersection( vt3.begin(), vt3.end(), v_tmp.begin(), v_tmp.end(), vt2.begin() ); + if(vt2.size() == 0) { + return false; + } + } + vec_chars.insert( vec_chars.end(), vt2.begin(), vt2.end() ); + return true; + } + break; + case kind::REGEXP_STAR: + { + if(follow(r[0], c, vec_chars)) { + if(vec_chars[vec_chars.size() - 1] == '\0') { + if(c.isEmptyString()) { + return true; + } else { + vec_chars.pop_back(); + c = d_emptyString.getConst< CVC4::String >(); + return follow(r[0], c, vec_chars); + } + } else { + return true; + } + } else { + vec_chars.push_back( '\0' ); + return true; + } + } + break; + default: { + Trace("strings-error") << "Unsupported term: " << mkString( r ) << " in delta of RegExp." << std::endl; + //AlwaysAssert( false ); + //return Node::null(); + return false; + } + } +} + +Node RegExpOpr::mkAllExceptOne( char exp_c ) { + std::vector< Node > vec_nodes; + for(char c=d_char_start; c<=d_char_end; ++c) { + if(c != exp_c ) { + Node n = NodeManager::currentNM()->mkNode( kind::STRING_TO_REGEXP, NodeManager::currentNM()->mkConst( ::CVC4::String( c ) ) ); + vec_nodes.push_back( n ); + } + } + return NodeManager::currentNM()->mkNode( kind::REGEXP_UNION, vec_nodes ); +} + +//simplify +void RegExpOpr::simplify(Node t, std::vector< Node > &new_nodes, bool polarity) { + Trace("strings-regexp-simpl") << "RegExp-Simpl starts with " << t << ", polarity=" << polarity << std::endl; + Assert(t.getKind() == kind::STRING_IN_REGEXP); + Node str = Rewriter::rewrite(t[0]); + Node re = Rewriter::rewrite(t[1]); + if(polarity) { + simplifyPRegExp( str, re, new_nodes ); + } else { + simplifyNRegExp( str, re, new_nodes ); + } + Trace("strings-regexp-simpl") << "RegExp-Simpl returns (" << new_nodes.size() << "):\n"; + for(unsigned i=0; i &new_nodes ) { + std::pair < Node, Node > p(s, r); + std::map < std::pair< Node, Node >, Node >::const_iterator itr = d_simpl_neg_cache.find(p); + if(itr != d_simpl_neg_cache.end()) { + new_nodes.push_back( itr->second ); + } else { + int k = r.getKind(); + Node conc; + switch( k ) { + case kind::REGEXP_EMPTY: { + conc = d_true; + break; + } + case kind::REGEXP_SIGMA: { + conc = d_one.eqNode(NodeManager::currentNM()->mkNode(kind::STRING_LENGTH, s)).negate(); + break; + } + case kind::STRING_TO_REGEXP: { + conc = s.eqNode(r[0]).negate(); + break; + } + case kind::REGEXP_CONCAT: { + //TODO: rewrite empty + Node lens = NodeManager::currentNM()->mkNode(kind::STRING_LENGTH, s); + Node b1 = NodeManager::currentNM()->mkBoundVar(NodeManager::currentNM()->integerType()); + Node b1v = NodeManager::currentNM()->mkNode(kind::BOUND_VAR_LIST, b1); + Node g1 = NodeManager::currentNM()->mkNode( kind::AND, NodeManager::currentNM()->mkNode(kind::GEQ, b1, d_zero), + NodeManager::currentNM()->mkNode( kind::GEQ, NodeManager::currentNM()->mkNode(kind::STRING_LENGTH, s), b1 ) ); + Node s1 = Rewriter::rewrite(NodeManager::currentNM()->mkNode(kind::STRING_SUBSTR_TOTAL, s, d_zero, b1)); + Node s2 = Rewriter::rewrite(NodeManager::currentNM()->mkNode(kind::STRING_SUBSTR_TOTAL, s, b1, NodeManager::currentNM()->mkNode(kind::MINUS, lens, b1))); + Node s1r1 = NodeManager::currentNM()->mkNode(kind::STRING_IN_REGEXP, s1, r[0]).negate(); + if(r[0].getKind() == kind::STRING_TO_REGEXP) { + s1r1 = s1.eqNode(r[0][0]).negate(); + } else if(r[0].getKind() == kind::REGEXP_EMPTY) { + s1r1 = d_true; + } + Node r2 = r[1]; + if(r.getNumChildren() > 2) { + std::vector< Node > nvec; + for(unsigned i=1; imkNode(kind::REGEXP_CONCAT, nvec); + } + r2 = Rewriter::rewrite(r2); + Node s2r2 = NodeManager::currentNM()->mkNode(kind::STRING_IN_REGEXP, s2, r2).negate(); + if(r2.getKind() == kind::STRING_TO_REGEXP) { + s2r2 = s2.eqNode(r2[0]).negate(); + } else if(r2.getKind() == kind::REGEXP_EMPTY) { + s2r2 = d_true; + } + + conc = NodeManager::currentNM()->mkNode(kind::OR, s1r1, s2r2); + conc = NodeManager::currentNM()->mkNode(kind::IMPLIES, g1, conc); + conc = NodeManager::currentNM()->mkNode(kind::FORALL, b1v, conc); + break; + } + case kind::REGEXP_UNION: { + std::vector< Node > c_and; + for(unsigned i=0; imkNode(kind::STRING_IN_REGEXP, s, r[i]).negate()); + } + } + conc = c_and.size() == 0 ? d_true : + c_and.size() == 1 ? c_and[0] : NodeManager::currentNM()->mkNode(kind::AND, c_and); + break; + } + case kind::REGEXP_INTER: { + bool emptyflag = false; + std::vector< Node > c_or; + for(unsigned i=0; imkNode(kind::STRING_IN_REGEXP, s, r[i]).negate()); + } + } + if(emptyflag) { + conc = d_true; + } else { + conc = c_or.size() == 1 ? c_or[0] : NodeManager::currentNM()->mkNode(kind::OR, c_or); + } + break; + } + case kind::REGEXP_STAR: { + if(s == d_emptyString) { + conc = d_false; + } else if(r[0].getKind() == kind::REGEXP_EMPTY) { + conc = s.eqNode(d_emptyString).negate(); + } else if(r[0].getKind() == kind::REGEXP_SIGMA) { + conc = d_false; + } else { + Node lens = NodeManager::currentNM()->mkNode(kind::STRING_LENGTH, s); + Node sne = s.eqNode(d_emptyString).negate(); + Node b1 = NodeManager::currentNM()->mkBoundVar(NodeManager::currentNM()->integerType()); + Node b1v = NodeManager::currentNM()->mkNode(kind::BOUND_VAR_LIST, b1); + Node g1 = NodeManager::currentNM()->mkNode( kind::AND, NodeManager::currentNM()->mkNode(kind::GEQ, b1, d_one), + NodeManager::currentNM()->mkNode( kind::GEQ, lens, b1 ) ); + //internal + Node s1 = NodeManager::currentNM()->mkNode(kind::STRING_SUBSTR_TOTAL, s, d_zero, b1); + Node s2 = NodeManager::currentNM()->mkNode(kind::STRING_SUBSTR_TOTAL, s, b1, NodeManager::currentNM()->mkNode(kind::MINUS, lens, b1)); + Node s1r1 = NodeManager::currentNM()->mkNode(kind::STRING_IN_REGEXP, s1, r[0]).negate(); + Node s2r2 = NodeManager::currentNM()->mkNode(kind::STRING_IN_REGEXP, s2, r).negate(); + + conc = NodeManager::currentNM()->mkNode(kind::OR, s1r1, s2r2); + conc = NodeManager::currentNM()->mkNode(kind::IMPLIES, g1, conc); + conc = NodeManager::currentNM()->mkNode(kind::FORALL, b1v, conc); + conc = NodeManager::currentNM()->mkNode(kind::AND, sne, conc); + } + break; + } + default: { + Trace("strings-regexp") << "Unsupported term: " << r << " in simplifyNRegExp." << std::endl; + Assert( false, "Unsupported Term" ); + } + } + conc = Rewriter::rewrite( conc ); + new_nodes.push_back( conc ); + d_simpl_neg_cache[p] = conc; + } +} +void RegExpOpr::simplifyPRegExp( Node s, Node r, std::vector< Node > &new_nodes ) { + std::pair < Node, Node > p(s, r); + std::map < std::pair< Node, Node >, Node >::const_iterator itr = d_simpl_cache.find(p); + if(itr != d_simpl_cache.end()) { + new_nodes.push_back( itr->second ); + } else { + int k = r.getKind(); + Node conc; + switch( k ) { + case kind::REGEXP_EMPTY: { + conc = d_false; + break; + } + case kind::REGEXP_SIGMA: { + conc = d_one.eqNode(NodeManager::currentNM()->mkNode(kind::STRING_LENGTH, s)); + break; + } + case kind::STRING_TO_REGEXP: { + conc = s.eqNode(r[0]); + break; + } + case kind::REGEXP_CONCAT: { + std::vector< Node > nvec; + std::vector< Node > cc; + bool emptyflag = false; + for(unsigned i=0; imkSkolem( "rc", s.getType(), "created for regular expression concat" ); + Node lem = NodeManager::currentNM()->mkNode(kind::STRING_IN_REGEXP, sk, r[i]); + nvec.push_back(lem); + cc.push_back(sk); + } + } + if(emptyflag) { + conc = d_false; + } else { + Node lem = s.eqNode( NodeManager::currentNM()->mkNode(kind::STRING_CONCAT, cc) ); + nvec.push_back(lem); + conc = nvec.size() == 1 ? nvec[0] : NodeManager::currentNM()->mkNode(kind::AND, nvec); + } + break; + } + case kind::REGEXP_UNION: { + std::vector< Node > c_or; + for(unsigned i=0; imkNode(kind::STRING_IN_REGEXP, s, r[i])); + } + } + conc = c_or.size() == 0 ? d_false : + c_or.size() == 1 ? c_or[0] : NodeManager::currentNM()->mkNode(kind::OR, c_or); + break; + } + case kind::REGEXP_INTER: { + std::vector< Node > c_and; + bool emptyflag = false; + for(unsigned i=0; imkNode(kind::STRING_IN_REGEXP, s, r[i])); + } + } + if(emptyflag) { + conc = d_false; + } else { + conc = c_and.size() == 1 ? c_and[0] : NodeManager::currentNM()->mkNode(kind::AND, c_and); + } + break; + } + case kind::REGEXP_STAR: { + if(s == d_emptyString) { + conc = d_true; + } else if(r[0].getKind() == kind::REGEXP_EMPTY) { + conc = s.eqNode(d_emptyString); + } else if(r[0].getKind() == kind::REGEXP_SIGMA) { + conc = d_true; + } else { + Node se = s.eqNode(d_emptyString); + Node sinr = NodeManager::currentNM()->mkNode(kind::STRING_IN_REGEXP, s, r[0]); + Node sk1 = NodeManager::currentNM()->mkSkolem( "rs", s.getType(), "created for regular expression star" ); + Node sk2 = NodeManager::currentNM()->mkSkolem( "rs", s.getType(), "created for regular expression star" ); + Node s1nz = sk1.eqNode(d_emptyString).negate(); + Node s2nz = sk2.eqNode(d_emptyString).negate(); + Node s1inr = NodeManager::currentNM()->mkNode(kind::STRING_IN_REGEXP, sk1, r[0]); + Node s2inrs = NodeManager::currentNM()->mkNode(kind::STRING_IN_REGEXP, sk2, r); + Node s12 = s.eqNode(NodeManager::currentNM()->mkNode(kind::STRING_CONCAT, sk1, sk2)); + + conc = NodeManager::currentNM()->mkNode(kind::AND, s12, s1nz, s2nz, s1inr, s2inrs); + conc = NodeManager::currentNM()->mkNode(kind::OR, se, sinr, conc); + } + break; + } + default: { + Trace("strings-regexp") << "Unsupported term: " << r << " in simplifyPRegExp." << std::endl; + Assert( false, "Unsupported Term" ); + } + } + conc = Rewriter::rewrite( conc ); + new_nodes.push_back( conc ); + d_simpl_cache[p] = conc; + } +} + +void RegExpOpr::getCharSet( Node r, std::set &pcset, SetNodes &pvset ) { + std::map< Node, std::pair< std::set, SetNodes > >::const_iterator itr = d_cset_cache.find(r); + if(itr != d_cset_cache.end()) { + pcset.insert((itr->second).first.begin(), (itr->second).first.end()); + pvset.insert((itr->second).second.begin(), (itr->second).second.end()); + } else { + std::set cset; + SetNodes vset; + int k = r.getKind(); + switch( k ) { + case kind::REGEXP_EMPTY: { + break; + } + case kind::REGEXP_SIGMA: { + for(unsigned i=0; i(); + s.getCharSet( cset ); + } else if(st.getKind() == kind::VARIABLE) { + vset.insert( st ); + } else { + for(unsigned i=0; i(); + s.getCharSet( cset ); + } else { + vset.insert( st[i] ); + } + } + } + break; + } + case kind::REGEXP_CONCAT: { + for(unsigned i=0; i, SetNodes > p(cset, vset); + d_cset_cache[r] = p; + + Trace("regexp-cset") << "CSET( " << mkString(r) << " ) = { "; + for(std::set::const_iterator itr = cset.begin(); + itr != cset.end(); itr++) { + Trace("regexp-cset") << CVC4::String::convertUnsignedIntToChar(*itr) << ","; + } + Trace("regexp-cset") << " }" << std::endl; + } +} + + +Node RegExpOpr::intersectInternal( Node r1, Node r2, std::map< unsigned, std::set< PairNodes > > cache, bool &spflag ) { + if(spflag) { + //TODO: var + return Node::null(); + } + std::pair < Node, Node > p(r1, r2); + std::map < std::pair< Node, Node >, Node >::const_iterator itr = d_inter_cache.find(p); + Node rNode; + if(itr != d_inter_cache.end()) { + rNode = itr->second; + } else { + if(r1 == r2) { + rNode = r1; + } else if(r1 == d_emptyRegexp || r2 == d_emptyRegexp) { + rNode = d_emptyRegexp; + } else if(r1 == d_emptySingleton || r2 == d_emptySingleton) { + Node exp; + int r = delta((r1 == d_emptySingleton ? r2 : r1), exp); + if(r == 0) { + //TODO: variable + spflag = true; + } else if(r == 1) { + rNode = d_emptySingleton; + } else { + rNode = d_emptyRegexp; + } + } else { + std::set< unsigned > cset, cset2; + std::set< Node > vset, vset2; + getCharSet(r1, cset, vset); + getCharSet(r2, cset2, vset2); + if(vset.empty() && vset2.empty()) { + cset.clear(); + firstChars(r1, cset, vset); + std::vector< Node > vec_nodes; + for(std::set::const_iterator itr = cset.begin(); + itr != cset.end(); itr++) { + CVC4::String c( CVC4::String::convertUnsignedIntToChar(*itr) ); + std::pair< Node, Node > p(r1, r2); + if(cache[ *itr ].find(p) == cache[ *itr ].end()) { + Node r1l = derivativeSingle(r1, c); + Node r2l = derivativeSingle(r2, c); + std::map< unsigned, std::set< PairNodes > > cache2(cache); + PairNodes p(r1l, r2l); + cache2[ *itr ].insert( p ); + Node rt = intersectInternal(r1l, r2l, cache2, spflag); + if(spflag) { + //TODO: + return Node::null(); + } + rt = Rewriter::rewrite( NodeManager::currentNM()->mkNode(kind::REGEXP_CONCAT, + NodeManager::currentNM()->mkNode(kind::STRING_TO_REGEXP, NodeManager::currentNM()->mkConst(c)), rt) ); + vec_nodes.push_back(rt); + } + } + rNode = vec_nodes.size()==0 ? d_emptyRegexp : vec_nodes.size()==1 ? vec_nodes[0] : + NodeManager::currentNM()->mkNode(kind::REGEXP_UNION, vec_nodes); + rNode = Rewriter::rewrite( rNode ); + } else { + //TODO: non-empty var set + spflag = true; + } + } + d_inter_cache[p] = rNode; + } + Trace("regexp-intersect") << "INTERSECT( " << mkString(r1) << ", " << mkString(r2) << " ) = " << mkString(rNode) << std::endl; + return rNode; +} +Node RegExpOpr::intersect(Node r1, Node r2, bool &spflag) { + std::map< unsigned, std::set< PairNodes > > cache; + if(checkConstRegExp(r1) && checkConstRegExp(r2)) { + return intersectInternal(r1, r2, cache, spflag); + } else { + spflag = true; + return Node::null(); + } +} + +Node RegExpOpr::complement(Node r, int &ret) { + Node rNode; + ret = 1; + if(d_compl_cache.find(r) != d_compl_cache.end()) { + rNode = d_compl_cache[r].first; + ret = d_compl_cache[r].second; + } else { + if(r == d_emptyRegexp) { + rNode = d_sigma_star; + } else if(r == d_emptySingleton) { + rNode = NodeManager::currentNM()->mkNode(kind::REGEXP_CONCAT, d_sigma, d_sigma_star); + } else if(!checkConstRegExp(r)) { + //TODO: var to be extended + ret = 0; + } else { + std::set cset; + SetNodes vset; + firstChars(r, cset, vset); + std::vector< Node > vec_nodes; + for(unsigned i=0; imkNode(kind::STRING_TO_REGEXP, NodeManager::currentNM()->mkConst(c)); + Node r2; + if(cset.find(i) == cset.end()) { + r2 = d_sigma_star; + } else { + int rt; + derivativeS(r, c, r2); + if(r2 == r) { + r2 = d_emptyRegexp; + } else { + r2 = complement(r2, rt); + } + } + n = Rewriter::rewrite(NodeManager::currentNM()->mkNode(kind::REGEXP_CONCAT, n, r2)); + vec_nodes.push_back(n); + } + rNode = vec_nodes.size()==0? d_emptyRegexp : vec_nodes.size()==1? vec_nodes[0] : + NodeManager::currentNM()->mkNode(kind::REGEXP_UNION, vec_nodes); + } + rNode = Rewriter::rewrite(rNode); + std::pair< Node, int > p(rNode, ret); + d_compl_cache[r] = p; + } + Trace("regexp-compl") << "COMPL( " << mkString(r) << " ) = " << mkString(rNode) << ", ret=" << ret << std::endl; + return rNode; +} + +void RegExpOpr::splitRegExp(Node r, std::vector< PairNodes > &pset) { + Assert(checkConstRegExp(r)); + if(d_split_cache.find(r) != d_split_cache.end()) { + pset = d_split_cache[r]; + } else { + switch( r.getKind() ) { + case kind::REGEXP_EMPTY: { + break; + } + case kind::REGEXP_OPT: { + PairNodes tmp(d_emptySingleton, d_emptySingleton); + pset.push_back(tmp); + } + case kind::REGEXP_RANGE: + case kind::REGEXP_SIGMA: { + PairNodes tmp1(d_emptySingleton, r); + PairNodes tmp2(r, d_emptySingleton); + pset.push_back(tmp1); + pset.push_back(tmp2); + break; + } + case kind::STRING_TO_REGEXP: { + Assert(r[0].isConst()); + CVC4::String s = r[0].getConst< CVC4::String >(); + PairNodes tmp1(d_emptySingleton, r); + pset.push_back(tmp1); + for(unsigned i=1; imkNode(kind::STRING_TO_REGEXP, NodeManager::currentNM()->mkConst(s1)); + Node n2 = NodeManager::currentNM()->mkNode(kind::STRING_TO_REGEXP, NodeManager::currentNM()->mkConst(s2)); + PairNodes tmp3(n1, n2); + pset.push_back(tmp3); + } + PairNodes tmp2(r, d_emptySingleton); + pset.push_back(tmp2); + break; + } + case kind::REGEXP_CONCAT: { + for(unsigned i=0; i tset; + splitRegExp(r[i], tset); + std::vector< Node > hvec; + std::vector< Node > tvec; + for(unsigned j=0; j<=i; j++) { + hvec.push_back(r[j]); + } + for(unsigned j=i; jmkNode(kind::REGEXP_CONCAT, hvec) ); + Node r2 = Rewriter::rewrite( tvec.size()==1?tvec[0]:NodeManager::currentNM()->mkNode(kind::REGEXP_CONCAT, tvec) ); + PairNodes tmp2(r1, r2); + pset.push_back(tmp2); + } + } + break; + } + case kind::REGEXP_UNION: { + for(unsigned i=0; i tset; + splitRegExp(r[i], tset); + pset.insert(pset.end(), tset.begin(), tset.end()); + } + break; + } + case kind::REGEXP_INTER: { + bool spflag = false; + Node tmp = r[0]; + for(unsigned i=1; i tset; + splitRegExp(r[0], tset); + PairNodes tmp1(d_emptySingleton, d_emptySingleton); + pset.push_back(tmp1); + for(unsigned i=0; imkNode(kind::REGEXP_CONCAT, r, tset[i].first); + Node r2 = tset[i].second==d_emptySingleton ? r : NodeManager::currentNM()->mkNode(kind::REGEXP_CONCAT, tset[i].second, r); + PairNodes tmp2(r1, r2); + pset.push_back(tmp2); + } + break; + } + case kind::REGEXP_PLUS: { + std::vector< PairNodes > tset; + splitRegExp(r[0], tset); + for(unsigned i=0; imkNode(kind::REGEXP_CONCAT, r, tset[i].first); + Node r2 = NodeManager::currentNM()->mkNode(kind::REGEXP_CONCAT, tset[i].second, r); + PairNodes tmp2(r1, r2); + pset.push_back(tmp2); + } + break; + } + default: { + Trace("strings-error") << "Unsupported term: " << r << " in splitRegExp." << std::endl; + Assert( false ); + //return Node::null(); + } + } + d_split_cache[r] = pset; + } +} + +//printing +std::string RegExpOpr::niceChar( Node r ) { + if(r.isConst()) { + std::string s = r.getConst().toString() ; + return s == "" ? "{E}" : ( s == " " ? "{ }" : s.size()>1? "("+s+")" : s ); + } else { + std::string ss = "$" + r.toString(); + return ss; + } +} +std::string RegExpOpr::mkString( Node r ) { + std::string retStr; + if(r.isNull()) { + retStr = "Empty"; + } else { + int k = r.getKind(); + switch( k ) { + case kind::REGEXP_EMPTY: { + retStr += "Empty"; + break; + } + case kind::REGEXP_SIGMA: { + retStr += "{W}"; + break; + } + case kind::STRING_TO_REGEXP: { + retStr += niceChar( r[0] ); + break; + } + case kind::REGEXP_CONCAT: { + retStr += "("; + for(unsigned i=0; i -#include -#include -#include "util/hash.h" -#include "util/regexp.h" -#include "theory/theory.h" -#include "theory/rewriter.h" -//#include "context/cdhashmap.h" - -namespace CVC4 { -namespace theory { -namespace strings { - -class RegExpOpr { - typedef std::pair< Node, CVC4::String > PairNodeStr; - typedef std::set< Node > SetNodes; - typedef std::pair< Node, Node > PairNodes; - -private: - unsigned d_card; - Node d_emptyString; - Node d_true; - Node d_false; - Node d_emptySingleton; - Node d_emptyRegexp; - Node d_zero; - Node d_one; - - char d_char_start; - char d_char_end; - Node d_sigma; - Node d_sigma_star; - - std::map< PairNodes, Node > d_simpl_cache; - std::map< PairNodes, Node > d_simpl_neg_cache; - std::map< Node, std::pair< int, Node > > d_delta_cache; - std::map< PairNodeStr, Node > d_dv_cache; - std::map< PairNodeStr, std::pair< Node, int > > d_deriv_cache; - std::map< Node, std::pair< Node, int > > d_compl_cache; - std::map< Node, bool > d_cstre_cache; - std::map< Node, std::pair< std::set, std::set > > d_cset_cache; - std::map< Node, std::pair< std::set, std::set > > d_fset_cache; - std::map< PairNodes, Node > d_inter_cache; - std::map< Node, std::vector< PairNodes > > d_split_cache; - //bool checkStarPlus( Node t ); - void simplifyPRegExp( Node s, Node r, std::vector< Node > &new_nodes ); - void simplifyNRegExp( Node s, Node r, std::vector< Node > &new_nodes ); - std::string niceChar( Node r ); - int gcd ( int a, int b ); - Node mkAllExceptOne( char c ); - - void getCharSet( Node r, std::set &pcset, SetNodes &pvset ); - Node intersectInternal( Node r1, Node r2, std::map< unsigned, std::set< PairNodes > > cache, bool &spflag ); - void firstChars( Node r, std::set &pcset, SetNodes &pvset ); - - //TODO: for intersection - bool follow( Node r, CVC4::String c, std::vector< char > &vec_chars ); - -public: - RegExpOpr(); - - bool checkConstRegExp( Node r ); - void simplify(Node t, std::vector< Node > &new_nodes, bool polarity); - int delta( Node r, Node &exp ); - int derivativeS( Node r, CVC4::String c, Node &retNode ); - Node derivativeSingle( Node r, CVC4::String c ); - bool guessLength( Node r, int &co ); - Node intersect(Node r1, Node r2, bool &spflag); - Node complement(Node r, int &ret); - void splitRegExp(Node r, std::vector< PairNodes > &pset); - - std::string mkString( Node r ); -}; - -}/* CVC4::theory::strings namespace */ -}/* CVC4::theory namespace */ -}/* CVC4 namespace */ - -#endif /* __CVC4__THEORY__STRINGS__REGEXP__OPERATION_H */ +/********************* */ +/*! \file regexp_operation.h + ** \verbatim + ** Original author: Tianyi Liang + ** Major contributors: none + ** Minor contributors (to current version): none + ** This file is part of the CVC4 project. + ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** See the file COPYING in the top-level source directory for licensing + ** information.\endverbatim + ** + ** \brief Symbolic Regular Expresion Operations + ** + ** Symbolic Regular Expression Operations + **/ + +#include "cvc4_private.h" + +#ifndef __CVC4__THEORY__STRINGS__REGEXP__OPERATION_H +#define __CVC4__THEORY__STRINGS__REGEXP__OPERATION_H + +#include +#include +#include +#include "util/hash.h" +#include "util/regexp.h" +#include "theory/theory.h" +#include "theory/rewriter.h" +//#include "context/cdhashmap.h" + +namespace CVC4 { +namespace theory { +namespace strings { + +class RegExpOpr { + typedef std::pair< Node, CVC4::String > PairNodeStr; + typedef std::set< Node > SetNodes; + typedef std::pair< Node, Node > PairNodes; + +private: + unsigned d_card; + Node d_emptyString; + Node d_true; + Node d_false; + Node d_emptySingleton; + Node d_emptyRegexp; + Node d_zero; + Node d_one; + + char d_char_start; + char d_char_end; + Node d_sigma; + Node d_sigma_star; + + std::map< PairNodes, Node > d_simpl_cache; + std::map< PairNodes, Node > d_simpl_neg_cache; + std::map< Node, std::pair< int, Node > > d_delta_cache; + std::map< PairNodeStr, Node > d_dv_cache; + std::map< PairNodeStr, std::pair< Node, int > > d_deriv_cache; + std::map< Node, std::pair< Node, int > > d_compl_cache; + std::map< Node, bool > d_cstre_cache; + std::map< Node, std::pair< std::set, std::set > > d_cset_cache; + std::map< Node, std::pair< std::set, std::set > > d_fset_cache; + std::map< PairNodes, Node > d_inter_cache; + std::map< Node, std::vector< PairNodes > > d_split_cache; + //bool checkStarPlus( Node t ); + void simplifyPRegExp( Node s, Node r, std::vector< Node > &new_nodes ); + void simplifyNRegExp( Node s, Node r, std::vector< Node > &new_nodes ); + std::string niceChar( Node r ); + int gcd ( int a, int b ); + Node mkAllExceptOne( char c ); + + void getCharSet( Node r, std::set &pcset, SetNodes &pvset ); + Node intersectInternal( Node r1, Node r2, std::map< unsigned, std::set< PairNodes > > cache, bool &spflag ); + void firstChars( Node r, std::set &pcset, SetNodes &pvset ); + + //TODO: for intersection + bool follow( Node r, CVC4::String c, std::vector< char > &vec_chars ); + +public: + RegExpOpr(); + + bool checkConstRegExp( Node r ); + void simplify(Node t, std::vector< Node > &new_nodes, bool polarity); + int delta( Node r, Node &exp ); + int derivativeS( Node r, CVC4::String c, Node &retNode ); + Node derivativeSingle( Node r, CVC4::String c ); + bool guessLength( Node r, int &co ); + Node intersect(Node r1, Node r2, bool &spflag); + Node complement(Node r, int &ret); + void splitRegExp(Node r, std::vector< PairNodes > &pset); + + std::string mkString( Node r ); +}; + +}/* CVC4::theory::strings namespace */ +}/* CVC4::theory namespace */ +}/* CVC4 namespace */ + +#endif /* __CVC4__THEORY__STRINGS__REGEXP__OPERATION_H */ diff --git a/src/util/regexp.cpp b/src/util/regexp.cpp index cbc0b843b..ce6f0d29b 100644 --- a/src/util/regexp.cpp +++ b/src/util/regexp.cpp @@ -1,159 +1,159 @@ -/********************* */ -/*! \file regexp.cpp - ** \verbatim - ** Original author: Tianyi Liang - ** Major contributors: none - ** Minor contributors (to current version): Morgan Deters - ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa - ** See the file COPYING in the top-level source directory for licensing - ** information.\endverbatim - ** - ** \brief [[ Add one-line brief description here ]] - ** - ** [[ Add lengthier description here ]] - ** \todo document this file - **/ - -#include "util/regexp.h" -#include -#include - -using namespace std; - -namespace CVC4 { - -void String::toInternal(const std::string &s) { - d_str.clear(); - unsigned i=0; - while(i < s.size()) { - if(s[i] == '\\') { - i++; - if(i < s.size()) { - switch(s[i]) { - case 'n': {d_str.push_back( convertCharToUnsignedInt('\n') );i++;} break; - case 't': {d_str.push_back( convertCharToUnsignedInt('\t') );i++;} break; - case 'v': {d_str.push_back( convertCharToUnsignedInt('\v') );i++;} break; - case 'b': {d_str.push_back( convertCharToUnsignedInt('\b') );i++;} break; - case 'r': {d_str.push_back( convertCharToUnsignedInt('\r') );i++;} break; - case 'f': {d_str.push_back( convertCharToUnsignedInt('\f') );i++;} break; - case 'a': {d_str.push_back( convertCharToUnsignedInt('\a') );i++;} break; - case '\\': {d_str.push_back( convertCharToUnsignedInt('\\') );i++;} break; - case 'x': { - if(i + 2 < s.size()) { - if(isxdigit(s[i+1]) && isxdigit(s[i+2])) { - d_str.push_back( convertCharToUnsignedInt( hexToDec(s[i+1]) * 16 + hexToDec(s[i+2]) ) ); - i += 3; - } else { - throw CVC4::Exception( "Illegal String Literal: \"" + s + "\"" ); - } - } else { - throw CVC4::Exception( "Illegal String Literal: \"" + s + "\", must have two digits after \\x" ); - } - } - break; - default: { - if(isdigit(s[i])) { - int num = (int)s[i] - (int)'0'; - bool flag = num < 4; - if(i+1 < s.size() && num < 8 && isdigit(s[i+1]) && s[i+1] < '8') { - num = num * 8 + (int)s[i+1] - (int)'0'; - if(flag && i+2 < s.size() && isdigit(s[i+2]) && s[i+2] < '8') { - num = num * 8 + (int)s[i+2] - (int)'0'; - d_str.push_back( convertCharToUnsignedInt((char)num) ); - i += 3; - } else { - d_str.push_back( convertCharToUnsignedInt((char)num) ); - i += 2; - } - } else { - d_str.push_back( convertCharToUnsignedInt((char)num) ); - i++; - } - } else if((unsigned)s[i] > 127) { - throw CVC4::Exception( "Illegal String Literal: \"" + s + "\", must use escaped sequence" ); - } else { - d_str.push_back( convertCharToUnsignedInt(s[i]) ); - i++; - } - } - } - } else { - throw CVC4::Exception( "should be handled by lexer: \"" + s + "\"" ); - //d_str.push_back( convertCharToUnsignedInt('\\') ); - } - } else if((unsigned)s[i] > 127) { - throw CVC4::Exception( "Illegal String Literal: \"" + s + "\", must use escaped sequence" ); - } else { - d_str.push_back( convertCharToUnsignedInt(s[i]) ); - i++; - } - } -} - -void String::getCharSet(std::set &cset) const { - for(std::vector::const_iterator itr = d_str.begin(); - itr != d_str.end(); itr++) { - cset.insert( *itr ); - } -} - -std::size_t String::overlap(String &y) const { - std::size_t i = d_str.size() < y.size() ? d_str.size() : y.size(); - for(; i>0; i--) { - String s = suffix(i); - String p = y.prefix(i); - if(s == p) { - return i; - } - } - return i; -} - -std::string String::toString() const { - std::string str; - for(unsigned int i=0; i( &(std::ostringstream() << (int)c) )->str(); - } - } - str += s; - } - } - return str; -} - -std::ostream& operator <<(std::ostream& os, const String& s) { - return os << "\"" << s.toString() << "\""; -} - -std::ostream& operator<<(std::ostream& out, const RegExp& s) { - return out << "regexp(" << s.getType() << ')'; -} - -}/* CVC4 namespace */ +/********************* */ +/*! \file regexp.cpp + ** \verbatim + ** Original author: Tianyi Liang + ** Major contributors: none + ** Minor contributors (to current version): Morgan Deters + ** This file is part of the CVC4 project. + ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** See the file COPYING in the top-level source directory for licensing + ** information.\endverbatim + ** + ** \brief [[ Add one-line brief description here ]] + ** + ** [[ Add lengthier description here ]] + ** \todo document this file + **/ + +#include "util/regexp.h" +#include +#include + +using namespace std; + +namespace CVC4 { + +void String::toInternal(const std::string &s) { + d_str.clear(); + unsigned i=0; + while(i < s.size()) { + if(s[i] == '\\') { + i++; + if(i < s.size()) { + switch(s[i]) { + case 'n': {d_str.push_back( convertCharToUnsignedInt('\n') );i++;} break; + case 't': {d_str.push_back( convertCharToUnsignedInt('\t') );i++;} break; + case 'v': {d_str.push_back( convertCharToUnsignedInt('\v') );i++;} break; + case 'b': {d_str.push_back( convertCharToUnsignedInt('\b') );i++;} break; + case 'r': {d_str.push_back( convertCharToUnsignedInt('\r') );i++;} break; + case 'f': {d_str.push_back( convertCharToUnsignedInt('\f') );i++;} break; + case 'a': {d_str.push_back( convertCharToUnsignedInt('\a') );i++;} break; + case '\\': {d_str.push_back( convertCharToUnsignedInt('\\') );i++;} break; + case 'x': { + if(i + 2 < s.size()) { + if(isxdigit(s[i+1]) && isxdigit(s[i+2])) { + d_str.push_back( convertCharToUnsignedInt( hexToDec(s[i+1]) * 16 + hexToDec(s[i+2]) ) ); + i += 3; + } else { + throw CVC4::Exception( "Illegal String Literal: \"" + s + "\"" ); + } + } else { + throw CVC4::Exception( "Illegal String Literal: \"" + s + "\", must have two digits after \\x" ); + } + } + break; + default: { + if(isdigit(s[i])) { + int num = (int)s[i] - (int)'0'; + bool flag = num < 4; + if(i+1 < s.size() && num < 8 && isdigit(s[i+1]) && s[i+1] < '8') { + num = num * 8 + (int)s[i+1] - (int)'0'; + if(flag && i+2 < s.size() && isdigit(s[i+2]) && s[i+2] < '8') { + num = num * 8 + (int)s[i+2] - (int)'0'; + d_str.push_back( convertCharToUnsignedInt((char)num) ); + i += 3; + } else { + d_str.push_back( convertCharToUnsignedInt((char)num) ); + i += 2; + } + } else { + d_str.push_back( convertCharToUnsignedInt((char)num) ); + i++; + } + } else if((unsigned)s[i] > 127) { + throw CVC4::Exception( "Illegal String Literal: \"" + s + "\", must use escaped sequence" ); + } else { + d_str.push_back( convertCharToUnsignedInt(s[i]) ); + i++; + } + } + } + } else { + throw CVC4::Exception( "should be handled by lexer: \"" + s + "\"" ); + //d_str.push_back( convertCharToUnsignedInt('\\') ); + } + } else if((unsigned)s[i] > 127) { + throw CVC4::Exception( "Illegal String Literal: \"" + s + "\", must use escaped sequence" ); + } else { + d_str.push_back( convertCharToUnsignedInt(s[i]) ); + i++; + } + } +} + +void String::getCharSet(std::set &cset) const { + for(std::vector::const_iterator itr = d_str.begin(); + itr != d_str.end(); itr++) { + cset.insert( *itr ); + } +} + +std::size_t String::overlap(String &y) const { + std::size_t i = d_str.size() < y.size() ? d_str.size() : y.size(); + for(; i>0; i--) { + String s = suffix(i); + String p = y.prefix(i); + if(s == p) { + return i; + } + } + return i; +} + +std::string String::toString() const { + std::string str; + for(unsigned int i=0; i( &(std::ostringstream() << (int)c) )->str(); + } + } + str += s; + } + } + return str; +} + +std::ostream& operator <<(std::ostream& os, const String& s) { + return os << "\"" << s.toString() << "\""; +} + +std::ostream& operator<<(std::ostream& out, const RegExp& s) { + return out << "regexp(" << s.getType() << ')'; +} + +}/* CVC4 namespace */ -- cgit v1.2.3 From bb35ed4f871e4cb5d33c1030fc5547bb92ec334b Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Sun, 15 Jun 2014 22:30:48 -0400 Subject: Fix compile errors with some versions of GCC. --- src/theory/bv/bitblaster_template.h | 4 ++-- src/theory/bv/bv_quick_check.h | 6 +----- src/theory/bv/lazy_bitblaster.h | 34 ++++++++++++++++++---------------- src/theory/bv/theory_bv_utils.h | 7 ++++--- 4 files changed, 25 insertions(+), 26 deletions(-) (limited to 'src/theory') diff --git a/src/theory/bv/bitblaster_template.h b/src/theory/bv/bitblaster_template.h index 25de81f2c..8971d289f 100644 --- a/src/theory/bv/bitblaster_template.h +++ b/src/theory/bv/bitblaster_template.h @@ -134,9 +134,9 @@ class TLazyBitblaster : public TBitblaster { prop::BVSatSolverInterface* d_satSolver; prop::CnfStream* d_cnfStream; - AssertionList d_assertedAtoms; /**< context dependent list storing the atoms + AssertionList* d_assertedAtoms; /**< context dependent list storing the atoms currently asserted by the DPLL SAT solver. */ - ExplanationMap d_explanations; /**< context dependent list of explanations for the propagated literals. + ExplanationMap* d_explanations; /**< context dependent list of explanations for the propagated literals. Only used when bvEagerPropagate option enabled. */ VarSet d_variables; AtomSet d_bbAtoms; diff --git a/src/theory/bv/bv_quick_check.h b/src/theory/bv/bv_quick_check.h index c09994c06..4ec9c9231 100644 --- a/src/theory/bv/bv_quick_check.h +++ b/src/theory/bv/bv_quick_check.h @@ -26,6 +26,7 @@ #include "context/cdo.h" #include "prop/sat_solver_types.h" #include "util/statistics_registry.h" +#include "theory/bv/theory_bv_utils.h" namespace CVC4 { namespace theory { @@ -34,11 +35,6 @@ class TheoryModel; namespace bv { - - -typedef __gnu_cxx::hash_set NodeSet; -typedef __gnu_cxx::hash_set TNodeSet; - class TLazyBitblaster; class TheoryBV; diff --git a/src/theory/bv/lazy_bitblaster.h b/src/theory/bv/lazy_bitblaster.h index 013e230f6..570549866 100644 --- a/src/theory/bv/lazy_bitblaster.h +++ b/src/theory/bv/lazy_bitblaster.h @@ -36,11 +36,11 @@ namespace theory { namespace bv { TLazyBitblaster::TLazyBitblaster(context::Context* c, bv::TheoryBV* bv, const std::string name, bool emptyNotify) - : TBitblaster() + : TBitblaster() , d_bv(bv) , d_ctx(c) - , d_assertedAtoms(c) - , d_explanations(c) + , d_assertedAtoms(new(true) context::CDList(c)) + , d_explanations(new(true) ExplanationMap(c)) , d_variables() , d_bbAtoms() , d_abstraction(NULL) @@ -192,8 +192,8 @@ void TLazyBitblaster::explain(TNode atom, std::vector& explanation) { ++(d_statistics.d_numExplainedPropagations); if (options::bvEagerExplanations()) { - Assert (d_explanations.find(lit) != d_explanations.end()); - const std::vector& literal_explanation = d_explanations[lit].get(); + Assert (d_explanations->find(lit) != d_explanations->end()); + const std::vector& literal_explanation = (*d_explanations)[lit].get(); for (unsigned i = 0; i < literal_explanation.size(); ++i) { explanation.push_back(d_cnfStream->getNode(literal_explanation[i])); } @@ -241,7 +241,7 @@ bool TLazyBitblaster::assertToSat(TNode lit, bool propagate) { prop::SatValue ret = d_satSolver->assertAssumption(markerLit, propagate); - d_assertedAtoms.push_back(markerLit); + d_assertedAtoms->push_back(markerLit); return ret == prop::SAT_VALUE_TRUE || ret == prop::SAT_VALUE_UNKNOWN; } @@ -256,24 +256,24 @@ bool TLazyBitblaster::assertToSat(TNode lit, bool propagate) { bool TLazyBitblaster::solve() { if (Trace.isOn("bitvector")) { Trace("bitvector") << "TLazyBitblaster::solve() asserted atoms "; - context::CDList::const_iterator it = d_assertedAtoms.begin(); - for (; it != d_assertedAtoms.end(); ++it) { + context::CDList::const_iterator it = d_assertedAtoms->begin(); + for (; it != d_assertedAtoms->end(); ++it) { Trace("bitvector") << " " << d_cnfStream->getNode(*it) << "\n"; } } - Debug("bitvector") << "TLazyBitblaster::solve() asserted atoms " << d_assertedAtoms.size() <<"\n"; + Debug("bitvector") << "TLazyBitblaster::solve() asserted atoms " << d_assertedAtoms->size() <<"\n"; return prop::SAT_VALUE_TRUE == d_satSolver->solve(); } prop::SatValue TLazyBitblaster::solveWithBudget(unsigned long budget) { if (Trace.isOn("bitvector")) { Trace("bitvector") << "TLazyBitblaster::solveWithBudget() asserted atoms "; - context::CDList::const_iterator it = d_assertedAtoms.begin(); - for (; it != d_assertedAtoms.end(); ++it) { + context::CDList::const_iterator it = d_assertedAtoms->begin(); + for (; it != d_assertedAtoms->end(); ++it) { Trace("bitvector") << " " << d_cnfStream->getNode(*it) << "\n"; } } - Debug("bitvector") << "TLazyBitblaster::solveWithBudget() asserted atoms " << d_assertedAtoms.size() <<"\n"; + Debug("bitvector") << "TLazyBitblaster::solveWithBudget() asserted atoms " << d_assertedAtoms->size() <<"\n"; return d_satSolver->solve(budget); } @@ -327,10 +327,10 @@ TLazyBitblaster::Statistics::~Statistics() { bool TLazyBitblaster::MinisatNotify::notify(prop::SatLiteral lit) { if(options::bvEagerExplanations()) { // compute explanation - if (d_lazyBB->d_explanations.find(lit) == d_lazyBB->d_explanations.end()) { + if (d_lazyBB->d_explanations->find(lit) == d_lazyBB->d_explanations->end()) { std::vector literal_explanation; d_lazyBB->d_satSolver->explain(lit, literal_explanation); - d_lazyBB->d_explanations.insert(lit, literal_explanation); + d_lazyBB->d_explanations->insert(lit, literal_explanation); } else { // we propagated it at a lower level return true; @@ -478,8 +478,10 @@ void TLazyBitblaster::clearSolver() { Assert (d_ctx->getLevel() == 0); delete d_satSolver; delete d_cnfStream; - d_assertedAtoms = context::CDList(d_ctx); - d_explanations = ExplanationMap(d_ctx); + d_assertedAtoms->deleteSelf(); + d_assertedAtoms = new(true) context::CDList(d_ctx); + d_explanations->deleteSelf(); + d_explanations = new(true) ExplanationMap(d_ctx); d_bbAtoms.clear(); d_variables.clear(); d_termCache.clear(); diff --git a/src/theory/bv/theory_bv_utils.h b/src/theory/bv/theory_bv_utils.h index 9679c0260..4dfea9d1d 100644 --- a/src/theory/bv/theory_bv_utils.h +++ b/src/theory/bv/theory_bv_utils.h @@ -24,10 +24,13 @@ #include #include "expr/node_manager.h" - namespace CVC4 { namespace theory { namespace bv { + +typedef __gnu_cxx::hash_set NodeSet; +typedef __gnu_cxx::hash_set TNodeSet; + namespace utils { inline uint32_t pow2(uint32_t power) { @@ -254,8 +257,6 @@ inline unsigned isPow2Const(TNode node) { return bv.isPow2(); } -typedef __gnu_cxx::hash_set TNodeSet; - inline Node mkOr(const std::vector& nodes) { std::set all; all.insert(nodes.begin(), nodes.end()); -- cgit v1.2.3 From 2faa605e3935f2d2048309934c307b7dc8546241 Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Mon, 16 Jun 2014 23:26:49 -0400 Subject: Clean up glpk detection a little, fix a detection bug. --- config/glpk.m4 | 25 +++++-------------------- src/theory/arith/approx_simplex.cpp | 8 +------- 2 files changed, 6 insertions(+), 27 deletions(-) (limited to 'src/theory') diff --git a/config/glpk.m4 b/config/glpk.m4 index c5592ab19..cc2a3be71 100644 --- a/config/glpk.m4 +++ b/config/glpk.m4 @@ -34,10 +34,7 @@ elif test "$with_glpk" = yes; then dnl Try a bunch of combinations until something works :-/ GLPK_LIBS= - AC_CHECK_HEADERS([glpk/glpk.h glpk.h], [break]) - if test x$ac_cv_header_glpk_glpk_h = xno && test x$ac_cv_header_glpk_h = xno; then - AC_MSG_FAILURE([cannot find glpk.h, the GLPK header!]) - fi + AC_CHECK_HEADER([glpk.h], [], [AC_MSG_FAILURE([cannot find glpk.h, the GLPK header!])]) AC_MSG_CHECKING([how to link glpk]) CVC4_TRY_GLPK_WITH([]) CVC4_TRY_GLPK_WITH([-lgmp]) @@ -115,11 +112,7 @@ if test -z "$GLPK_LIBS"; then CPPFLAGS="$CVC4CPPFLAGS $CPPFLAGS" LDFLAGS="$GLPK_LDFLAGS $LDFLAGS" LIBS="-lglpk $1" - AC_LINK_IFELSE([AC_LANG_PROGRAM([#ifdef HAVE_GLPK_GLPK_H] - [#include ] - [#else] - [#include ] - [#endif], + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], [int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL)])], [GLPK_LIBS="-lglpk $1"], []) @@ -139,22 +132,14 @@ if test -z "$GLPK_LIBS"; then cvc4_save_LIBS="$LIBS" cvc4_save_CPPFLAGS="$CPPFLAGS" cvc4_save_LDFLAGS="$LDFLAGS" - CPPFLAGS="$CVC4_CPPFLAGS $CPPFLAGS" + CPPFLAGS="$CVC4CPPFLAGS $CPPFLAGS" LDFLAGS="-static $GLPK_LDFLAGS $LDFLAGS" LIBS="-lglpk-static $1" - AC_LINK_IFELSE([AC_LANG_PROGRAM([#ifdef HAVE_GLPK_GLPK_H] - [#include ] - [#else] - [#include ] - [#endif], + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], [int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL)])], [GLPK_LIBS="-lglpk-static $1"], [ LIBS="-lglpk $1" - AC_LINK_IFELSE([AC_LANG_PROGRAM([#ifdef HAVE_GLPK_GLPK_H] - [#include ] - [#else] - [#include ] - [#endif], + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], [int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL)])], [GLPK_LIBS="-lglpk $1"]) ]) diff --git a/src/theory/arith/approx_simplex.cpp b/src/theory/arith/approx_simplex.cpp index 9f6b1796e..676c5cb25 100644 --- a/src/theory/arith/approx_simplex.cpp +++ b/src/theory/arith/approx_simplex.cpp @@ -431,13 +431,7 @@ public: /* Begin the declaration of GLPK specific code. */ #ifdef CVC4_USE_GLPK extern "C" { -/* Sometimes the header is in a subdirectory glpk/, sometimes not. - * The configure script figures it out. */ -#ifdef HAVE_GLPK_GLPK_H -# include -#else /* HAVE_GLPK_GLPK_H */ -# include -#endif /* HAVE_GLPK_GLPK_H */ +#include }/* extern "C" */ namespace CVC4 { -- cgit v1.2.3 From 35cdae503bd88633a52333bf06fbf80cd81926e2 Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Mon, 16 Jun 2014 23:44:57 -0400 Subject: Fix rewriter typo. --- src/theory/booleans/theory_bool_rewriter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/theory') diff --git a/src/theory/booleans/theory_bool_rewriter.cpp b/src/theory/booleans/theory_bool_rewriter.cpp index ef415139d..b243627b2 100644 --- a/src/theory/booleans/theory_bool_rewriter.cpp +++ b/src/theory/booleans/theory_bool_rewriter.cpp @@ -233,7 +233,7 @@ RewriteResponse TheoryBoolRewriter::preRewrite(TNode n) { } else if (n[1][1] == t && n[1][0].isConst()) { matchesForm = true; - constantsEqual = (n[1][1] == c); + constantsEqual = (n[1][0] == c); } } if(matchesForm){ -- cgit v1.2.3 From bbf11e1b852bd888e4afdf2a80970032d85af898 Mon Sep 17 00:00:00 2001 From: Tim King Date: Tue, 17 Jun 2014 11:55:51 -0400 Subject: This commit adds a priority queue implementation. This is to avoid compilation troubles with libc++. --- src/theory/arith/error_set.cpp | 4 +- src/theory/arith/error_set.h | 49 +++--- src/util/Makefile.am | 1 + src/util/bin_heap.h | 344 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 374 insertions(+), 24 deletions(-) create mode 100644 src/util/bin_heap.h (limited to 'src/theory') diff --git a/src/theory/arith/error_set.cpp b/src/theory/arith/error_set.cpp index 6d341ed12..4a63b1a6a 100644 --- a/src/theory/arith/error_set.cpp +++ b/src/theory/arith/error_set.cpp @@ -253,11 +253,11 @@ void ErrorSet::update(ErrorInformation& ei){ case MINIMUM_AMOUNT: case MAXIMUM_AMOUNT: ei.setAmount(computeDiff(ei.getVariable())); - d_focus.modify(ei.getHandle(), ei.getVariable()); + d_focus.update(ei.getHandle(), ei.getVariable()); break; case SUM_METRIC: ei.setMetric(sumMetric(ei.getVariable())); - d_focus.modify(ei.getHandle(), ei.getVariable()); + d_focus.update(ei.getHandle(), ei.getVariable()); break; case VAR_ORDER: //do nothing diff --git a/src/theory/arith/error_set.h b/src/theory/arith/error_set.h index b87282ba0..cff6807c4 100644 --- a/src/theory/arith/error_set.h +++ b/src/theory/arith/error_set.h @@ -29,23 +29,24 @@ #include "theory/arith/callbacks.h" #include "util/statistics_registry.h" - -#if CVC4_GCC_HAS_PB_DS_BUG - // Unfortunate bug in some older GCCs (e.g., v4.2): - // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36612 - // Requires some header-hacking to work around -# define __throw_container_error inline __throw_container_error -# define __throw_insert_error inline __throw_insert_error -# define __throw_join_error inline __throw_join_error -# define __throw_resize_error inline __throw_resize_error -# include -# undef __throw_container_error -# undef __throw_insert_error -# undef __throw_join_error -# undef __throw_resize_error -#endif /* CVC4_GCC_HAS_PB_DS_BUG */ - -#include +#include "util/bin_heap.h" + +// #if CVC4_GCC_HAS_PB_DS_BUG +// // Unfortunate bug in some older GCCs (e.g., v4.2): +// // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36612 +// // Requires some header-hacking to work around +// # define __throw_container_error inline __throw_container_error +// # define __throw_insert_error inline __throw_insert_error +// # define __throw_join_error inline __throw_join_error +// # define __throw_resize_error inline __throw_resize_error +// # include +// # undef __throw_container_error +// # undef __throw_insert_error +// # undef __throw_join_error +// # undef __throw_resize_error +// #endif /* CVC4_GCC_HAS_PB_DS_BUG */ + +// #include #include @@ -103,12 +104,16 @@ public: // // typedef FocusSet::handle_type FocusSetHandle; -typedef CVC4_PB_DS_NAMESPACE::priority_queue< - ArithVar, - ComparatorPivotRule, - CVC4_PB_DS_NAMESPACE::pairing_heap_tag> FocusSet; +// typedef CVC4_PB_DS_NAMESPACE::priority_queue< +// ArithVar, +// ComparatorPivotRule, +// CVC4_PB_DS_NAMESPACE::pairing_heap_tag> FocusSet; + +// typedef FocusSet::point_iterator FocusSetHandle; + +typedef BinaryHeap FocusSet; +typedef FocusSet::handle FocusSetHandle; -typedef FocusSet::point_iterator FocusSetHandle; class ErrorInformation { private: diff --git a/src/util/Makefile.am b/src/util/Makefile.am index bf3f1a873..9122f9ddb 100644 --- a/src/util/Makefile.am +++ b/src/util/Makefile.am @@ -95,6 +95,7 @@ libutil_la_SOURCES = \ sort_inference.cpp \ regexp.h \ regexp.cpp \ + bin_heap.h \ didyoumean.h \ didyoumean.cpp diff --git a/src/util/bin_heap.h b/src/util/bin_heap.h new file mode 100644 index 000000000..9238d12a5 --- /dev/null +++ b/src/util/bin_heap.h @@ -0,0 +1,344 @@ + +/** + * An implementation of a binary heap. + * Attempts to roughly follow the contract of Boost's d_ary_heap. + * (http://www.boost.org/doc/libs/1_49_0/doc/html/boost/heap/d_ary_heap.html) + * Also attempts to generalize ext/pd_bs/priority_queue. + * (http://gcc.gnu.org/onlinedocs/libstdc++/ext/pb_ds/priority_queue.html) + */ +namespace CVC4 { + +template > +class BinaryHeap { +private: + typedef Elem T; + struct HElement; + + typedef std::vector ElementVector; + + struct HElement { + HElement(size_t pos, const T& elem): d_pos(pos), d_elem(elem) {} + size_t d_pos; + T d_elem; + }; + + /** A 0 indexed binary heap. */ + ElementVector d_heap; + + /** The comparator. */ + CmpFcn d_cmp; + +public: + BinaryHeap(const CmpFcn& c = CmpFcn()) + : d_heap() + , d_cmp(c) + {} + + ~BinaryHeap(){ + clear(); + } + + BinaryHeap& operator=(const BinaryHeap& other); + + + class handle { + private: + HElement* d_pointer; + handle(HElement* p) : d_pointer(p){} + friend class const_handle; + friend class BinaryHeap; + public: + handle() : d_pointer(NULL) {} + const T& operator*() const { + Assert(d_pointer != NULL); + return *d_pointer; + } + + bool operator==(const handle& h) const { + return d_pointer == h.d_pointer; + } + }; /* BinaryHeap<>::handle */ + + class const_iterator { + private: + typename ElementVector::const_iterator d_iter; + friend class BinaryHeap; + const_iterator(const typename ElementVector::const_iterator& iter) + : d_iter(iter) + {} + public: + const_iterator(){} + inline bool operator==(const const_iterator& ci) const{ + return d_iter == ci.d_iter; + } + inline bool operator!=(const const_iterator& ci) const{ + return d_iter != ci.d_iter; + } + inline const_iterator& operator++(){ + ++d_iter; + return *this; + } + inline const T& operator*() const{ + const HElement* he = *d_iter; + return he->d_elem; + } + + };/* BinaryHeap<>::const_iterator */ + + class const_handle { + private: + const HElement* d_pointer; + const_handle(const HElement* p) : d_pointer(p){} + friend class BinaryHeap; + public: + const_handle() : d_pointer(NULL) {} + const_handle(const handle& h) : d_pointer(h.d_pointer) { } + + const T& operator*() const { + Assert(d_pointer != NULL); + return *d_pointer; + } + + bool operator==(const handle& h) const { + return d_pointer == h.d_pointer; + } + bool operator!=(const handle& h) const { + return d_pointer != h.d_pointer; + } + }; /* BinaryHeap<>::const_handle */ + + + inline size_t size() const { return d_heap.size(); } + inline bool empty() const { return d_heap.empty(); } + + inline const_iterator begin() const { + return const_iterator(d_heap.begin()); + } + + inline const_iterator end() const { + return const_iterator(d_heap.end()); + } + + void clear(){ + typename ElementVector::iterator i=d_heap.begin(), iend=d_heap.end(); + for(; i!=iend; ++i){ + HElement* he = *i; + delete he; + } + d_heap.clear(); + } + + void swap(BinaryHeap& heap){ + std::swap(d_heap, heap.d_heap); + std::swap(d_cmp, heap.d_cmp); + } + + handle push(const T& toAdded){ + Assert(size() < MAX_SIZE); + HElement* he = new HElement(size(), toAdded); + d_heap.push_back(he); + up_heap(he); + return handle(he); + } + + void erase(handle h){ + Assert(!empty()); + Assert(debugHandle(h)); + + HElement* he = h.d_pointer; + size_t pos = he->d_pos; + if(pos == root()){ + // the top element can be efficiently removed by pop + pop(); + }else if(pos == last()){ + // the last element can be safely removed + d_heap.pop_back(); + delete he; + }else{ + // This corresponds to + // 1) swapping the elements at pos with the element at last: + // 2) deleting the new last element + // 3) updating the position of the new element at pos + swapIndices(pos, last()); + d_heap.pop_back(); + delete he; + update(handle(d_heap[pos])); + } + } + + void pop(){ + Assert(!empty()); + swapIndices(root(), last()); + HElement* b = d_heap.back(); + d_heap.pop_back(); + delete b; + + if(!empty()){ + down_heap(d_heap.front()); + } + } + + const T& top() const { + Assert(!empty()); + return (d_heap.front())->d_elem; + } + + void update(handle h){ + Assert(!empty()); + Assert(debugHandle(h)); + + // The relationship between h and its parent, left and right has become unknown. + // But it is assumed that parent <= left, and parent <= right still hold. + // Figure out whether to up_heap or down_heap. + + Assert(!empty()); + HElement* he = h.d_pointer; + + size_t pos = he->d_pos; + if(pos == root()){ + // no parent + down_heap(he); + }else{ + size_t par = parent(pos); + HElement* at_parent = d_heap[par]; + if(gt(he->d_elem, at_parent->d_elem)){ + // he > parent + up_heap(he); + }else{ + down_heap(he); + } + } + } + + void update(handle h, const T& val){ + Assert(!empty()); + Assert(debugHandle(h)); + h.d_pointer->d_elem = val; + update(h); + } + + /** (std::numeric_limits::max()-2)/2; */ + static const size_t MAX_SIZE; + + inline bool gt(const T& a, const T& b) const{ + // cmp acts like an operator< + return d_cmp(b, a); + } + + inline bool lt(const T& a, const T& b) const{ + return d_cmp(a, b); + } + +private: + inline static size_t parent(size_t p){ + Assert(p != root()); + return (p-1)/2; + } + inline static size_t right(size_t p){ return 2*p+2; } + inline static size_t left(size_t p){ return 2*p+1; } + inline static size_t root(){ return 0; } + inline size_t last() const{ + Assert(!empty()); + return size() - 1; + } + + inline void swapIndices(size_t i, size_t j){ + HElement* at_i = d_heap[i]; + HElement* at_j = d_heap[j]; + swap(i,j,at_i,at_j); + } + + inline void swapPointers(HElement* at_i, HElement* at_j){ + // still works if at_i == at_j + size_t i = at_i->d_pos; + size_t j = at_j->d_pos; + swap(i,j,at_i,at_j); + } + + inline void swap(size_t i, size_t j, HElement* at_i, HElement* at_j){ + // still works if i == j + d_heap[i] = at_j; + d_heap[j] = at_i; + at_i->d_pos = j; + at_j->d_pos = i; + } + + void up_heap(HElement* he){ + const size_t& curr = he->d_pos; + // The value of curr changes implicitly during swap operations. + while(curr != root()){ + // he->d_elem > parent + size_t par = parent(curr); + HElement* at_parent = d_heap[par]; + if(gt(he->d_elem, at_parent->d_elem)){ + swap(curr, par, he, at_parent); + }else{ + break; + } + } + } + + void down_heap(HElement* he){ + const size_t& curr = he->d_pos; + // The value of curr changes implicitly during swap operations. + size_t N = size(); + size_t r, l; + + while((r = right(curr)) < N){ + l = left(curr); + + // if at_left == at_right, favor left + HElement* at_left = d_heap[l]; + HElement* at_right = d_heap[r]; + if(lt(he->d_elem, at_left->d_elem)){ + // he < at_left + if(lt(at_left->d_elem, at_right->d_elem)){ + // he < at_left < at_right + swap(curr, r, he, at_right); + }else{ + // he < at_left + // at_right <= at_left + swap(curr, l, he, at_left); + } + }else{ + // at_left <= he + if(lt(he->d_elem, at_right->d_elem)){ + // left <= he < at_right + swap(curr, r, he, at_right); + }else{ + // left <= he + // at_right <= he + break; + } + } + } + l = left(curr); + if(r >= N && l < N){ + // there is a left but not a right + HElement* at_left = d_heap[l]; + if(lt(he->d_elem, at_left->d_elem)){ + // he < at_left + swap(curr, l, he, at_left); + } + } + + } + + + bool debugHandle(handle h) const{ + HElement* he = h.d_pointer; + if( he == NULL ){ + return true; + }else if(he->d_pos >= size()){ + return false; + }else{ + return he == d_heap[he->d_pos]; + } + } + +}; /* class BinaryHeap<> */ + +template +const size_t BinaryHeap::MAX_SIZE = (std::numeric_limits::max()-2)/2; + +} /* namespace CVC4 */ -- cgit v1.2.3 From b766bc3bcc5510a283f8f35f3362b33f8a0ed461 Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Tue, 17 Jun 2014 17:29:12 -0400 Subject: Final preparations for arithmetic for building with libc++. --- src/theory/arith/normal_form.cpp | 2 +- src/theory/arith/normal_form.h | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'src/theory') diff --git a/src/theory/arith/normal_form.cpp b/src/theory/arith/normal_form.cpp index afaaedbf9..ce0bd9d30 100644 --- a/src/theory/arith/normal_form.cpp +++ b/src/theory/arith/normal_form.cpp @@ -90,7 +90,7 @@ bool Variable::isDivMember(Node n){ bool VarList::isSorted(iterator start, iterator end) { - return __gnu_cxx::is_sorted(start, end); + return std::is_sorted(start, end); } bool VarList::isMember(Node n) { diff --git a/src/theory/arith/normal_form.h b/src/theory/arith/normal_form.h index 3267834b5..8d37bed23 100644 --- a/src/theory/arith/normal_form.h +++ b/src/theory/arith/normal_form.h @@ -28,7 +28,6 @@ #include #include -#include namespace CVC4 { namespace theory { @@ -510,7 +509,7 @@ private: public: - class iterator { + class iterator : public std::iterator { private: internal_iterator d_iter; @@ -732,7 +731,7 @@ public: } static bool isSorted(const std::vector& m) { - return __gnu_cxx::is_sorted(m.begin(), m.end()); + return std::is_sorted(m.begin(), m.end()); } static bool isStrictlySorted(const std::vector& m) { -- cgit v1.2.3 From 6a438d52aaabea7a60b6902d428166c9e0f3548f Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Tue, 17 Jun 2014 20:21:12 -0400 Subject: Fix for pre-C++11 is_sorted(). --- config/is_sorted.m4 | 20 ++++++++++++++++++++ configure.ac | 3 +++ src/theory/arith/normal_form.cpp | 4 ++++ src/theory/arith/normal_form.h | 8 ++++++++ 4 files changed, 35 insertions(+) create mode 100644 config/is_sorted.m4 (limited to 'src/theory') diff --git a/config/is_sorted.m4 b/config/is_sorted.m4 new file mode 100644 index 000000000..52b062d7e --- /dev/null +++ b/config/is_sorted.m4 @@ -0,0 +1,20 @@ +# CHECK_FOR_IS_SORTED +# ------------------- +# Look for is_sorted in std:: and __gnu_cxx:: and define +# some things to make it easy to find later. +AC_DEFUN([CHECK_FOR_IS_SORTED], [ +AC_MSG_CHECKING([where we can find is_sorted]) +AC_LANG_PUSH([C++]) +is_sorted_result= +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], + [std::is_sorted((int*)0L, (int*)0L);])], + [is_sorted_result=std], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], + [__gnu_cxx::is_sorted((int*)0L, (int*)0L);])], + [is_sorted_result=__gnu_cxx], + [AC_MSG_FAILURE([cannot find std::is_sorted() or __gnu_cxx::is_sorted()])])]) +AC_LANG_POP([C++]) +AC_MSG_RESULT($is_sorted_result) +if test "$is_sorted_result" = __gnu_cxx; then is_sorted_result=1; else is_sorted_result=0; fi +AC_DEFINE_UNQUOTED([IS_SORTED_IN_GNUCXX_NAMESPACE], $is_sorted_result, [Define to 1 if __gnu_cxx::is_sorted() exists]) +])# CHECK_FOR_IS_SORTED diff --git a/configure.ac b/configure.ac index e30c12a6f..629e1625b 100644 --- a/configure.ac +++ b/configure.ac @@ -1002,6 +1002,9 @@ AC_CHECK_DECLS([optreset], [], [], [#include ]) # check with which standard strerror_r() complies AC_FUNC_STRERROR_R +# is is_sorted() in std or __gnu_cxx? +CHECK_FOR_IS_SORTED + # require boost library BOOST_REQUIRE() diff --git a/src/theory/arith/normal_form.cpp b/src/theory/arith/normal_form.cpp index ce0bd9d30..5334abbbf 100644 --- a/src/theory/arith/normal_form.cpp +++ b/src/theory/arith/normal_form.cpp @@ -90,7 +90,11 @@ bool Variable::isDivMember(Node n){ bool VarList::isSorted(iterator start, iterator end) { +#if IS_SORTED_IN_GNUCXX_NAMESPACE + return __gnu_cxx::is_sorted(start, end); +#else /* IS_SORTED_IN_GNUCXX_NAMESPACE */ return std::is_sorted(start, end); +#endif /* IS_SORTED_IN_GNUCXX_NAMESPACE */ } bool VarList::isMember(Node n) { diff --git a/src/theory/arith/normal_form.h b/src/theory/arith/normal_form.h index 8d37bed23..1a3327e8f 100644 --- a/src/theory/arith/normal_form.h +++ b/src/theory/arith/normal_form.h @@ -29,6 +29,10 @@ #include #include +#if IS_SORTED_IN_GNUCXX_NAMESPACE +# include +#endif /* IS_SORTED_IN_GNUCXX_NAMESPACE */ + namespace CVC4 { namespace theory { namespace arith { @@ -731,7 +735,11 @@ public: } static bool isSorted(const std::vector& m) { +#if IS_SORTED_IN_GNUCXX_NAMESPACE + return __gnu_cxx::is_sorted(m.begin(), m.end()); +#else /* IS_SORTED_IN_GNUCXX_NAMESPACE */ return std::is_sorted(m.begin(), m.end()); +#endif /* IS_SORTED_IN_GNUCXX_NAMESPACE */ } static bool isStrictlySorted(const std::vector& m) { -- cgit v1.2.3 From 875d0f0b01339aab4e60c408f1d7aa601e9653e6 Mon Sep 17 00:00:00 2001 From: Kshitij Bansal Date: Tue, 17 Jun 2014 23:03:22 -0400 Subject: disable unate lemmas when using incremental mode --- src/theory/arith/cut_log.h | 4 ++-- src/theory/arith/options_handlers.h | 8 ++++---- src/theory/arith/theory_arith_private.cpp | 33 +++++++++++++++++-------------- test/regress/regress0/Makefile.am | 8 ++++++-- test/unit/theory/theory_arith_white.h | 1 + 5 files changed, 31 insertions(+), 23 deletions(-) (limited to 'src/theory') diff --git a/src/theory/arith/cut_log.h b/src/theory/arith/cut_log.h index 123313617..bbd1b3694 100644 --- a/src/theory/arith/cut_log.h +++ b/src/theory/arith/cut_log.h @@ -125,11 +125,11 @@ public: }; std::ostream& operator<<(std::ostream& os, const CutInfo& ci); -struct BranchCutInfo : public CutInfo { +class BranchCutInfo : public CutInfo { BranchCutInfo(int execOrd, int br, Kind dir, double val); }; -struct RowsDeleted : public CutInfo { +class RowsDeleted : public CutInfo { RowsDeleted(int execOrd, int nrows, const int num[]); }; diff --git a/src/theory/arith/options_handlers.h b/src/theory/arith/options_handlers.h index f81f1b227..038baf79d 100644 --- a/src/theory/arith/options_handlers.h +++ b/src/theory/arith/options_handlers.h @@ -25,10 +25,10 @@ namespace CVC4 { namespace theory { namespace arith { -static const std::string arithPresolveLemmasHelp = "\ -Presolve lemmas are generated before SAT search begins using the relationship\n\ +static const std::string arithUnateLemmasHelp = "\ +Unate lemmas are generated before SAT search begins using the relationship\n\ of constant terms and polynomials.\n\ -Modes currently supported by the --arith-presolve-lemmas option:\n\ +Modes currently supported by the --unate-lemmas option:\n\ + none \n\ + ineqs \n\ Outputs lemmas of the general form (<= p c) implies (<= p d) for c < d.\n\ @@ -73,7 +73,7 @@ inline ArithUnateLemmaMode stringToArithUnateLemmaMode(std::string option, std:: } else if(optarg == "eqs") { return EQUALITY_PRESOLVE_LEMMAS; } else if(optarg == "help") { - puts(arithPresolveLemmasHelp.c_str()); + puts(arithUnateLemmasHelp.c_str()); exit(1); } else { throw OptionException(std::string("unknown option for --unate-lemmas: `") + diff --git a/src/theory/arith/theory_arith_private.cpp b/src/theory/arith/theory_arith_private.cpp index f3bdca7c7..b2eec924c 100644 --- a/src/theory/arith/theory_arith_private.cpp +++ b/src/theory/arith/theory_arith_private.cpp @@ -40,6 +40,7 @@ #include "smt/logic_request.h" #include "smt/logic_exception.h" +#include "smt/options.h" // for incrementalSolving() #include "theory/arith/arithvar.h" #include "theory/arith/cut_log.h" @@ -4212,21 +4213,23 @@ void TheoryArithPrivate::presolve(){ } vector lemmas; - switch(options::arithUnateLemmaMode()){ - case NO_PRESOLVE_LEMMAS: - break; - case INEQUALITY_PRESOLVE_LEMMAS: - d_constraintDatabase.outputUnateInequalityLemmas(lemmas); - break; - case EQUALITY_PRESOLVE_LEMMAS: - d_constraintDatabase.outputUnateEqualityLemmas(lemmas); - break; - case ALL_PRESOLVE_LEMMAS: - d_constraintDatabase.outputUnateInequalityLemmas(lemmas); - d_constraintDatabase.outputUnateEqualityLemmas(lemmas); - break; - default: - Unhandled(options::arithUnateLemmaMode()); + if(!options::incrementalSolving()) { + switch(options::arithUnateLemmaMode()){ + case NO_PRESOLVE_LEMMAS: + break; + case INEQUALITY_PRESOLVE_LEMMAS: + d_constraintDatabase.outputUnateInequalityLemmas(lemmas); + break; + case EQUALITY_PRESOLVE_LEMMAS: + d_constraintDatabase.outputUnateEqualityLemmas(lemmas); + break; + case ALL_PRESOLVE_LEMMAS: + d_constraintDatabase.outputUnateInequalityLemmas(lemmas); + d_constraintDatabase.outputUnateEqualityLemmas(lemmas); + break; + default: + Unhandled(options::arithUnateLemmaMode()); + } } vector::const_iterator i = lemmas.begin(), i_end = lemmas.end(); diff --git a/test/regress/regress0/Makefile.am b/test/regress/regress0/Makefile.am index 10148e5bc..18931e3fa 100644 --- a/test/regress/regress0/Makefile.am +++ b/test/regress/regress0/Makefile.am @@ -147,7 +147,6 @@ BUG_TESTS = \ bug484.smt2 \ bug486.cvc \ bug507.smt2 \ - bug512.smt2 \ bug512.minimized.smt2 \ bug516.smt2 \ bug519.smt2 \ @@ -162,6 +161,11 @@ BUG_TESTS = \ TESTS = $(SMT_TESTS) $(SMT2_TESTS) $(CVC_TESTS) $(TPTP_TESTS) $(BUG_TESTS) +# bug512 -- taking too long, --time-per not working perhaps? in any case, +# we have a minimized version still getting tested +DISABLED_TESTS = \ + bug512.smt2 + EXTRA_DIST = $(TESTS) \ simplification_bug4.smt2.expect \ bug216.smt2.expect @@ -175,7 +179,7 @@ TESTS += \ endif # and make sure to distribute it -EXTRA_DIST += \ +EXTRA_DIST += $(DISABLED_TESTS) \ subranges.cvc \ arrayinuf_error.smt2 \ errorcrash.smt2 \ diff --git a/test/unit/theory/theory_arith_white.h b/test/unit/theory/theory_arith_white.h index c99c66fff..d117f5173 100644 --- a/test/unit/theory/theory_arith_white.h +++ b/test/unit/theory/theory_arith_white.h @@ -103,6 +103,7 @@ public: d_em = new ExprManager(); d_nm = NodeManager::fromExprManager(d_em); d_smt = new SmtEngine(d_em); + d_smt->setOption("incremental", false); d_ctxt = d_smt->d_context; d_uctxt = d_smt->d_userContext; d_scope = new SmtScope(d_smt); -- cgit v1.2.3 From 7bff213cbad334474b4db582d9965f7ef5ba9946 Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Wed, 18 Jun 2014 00:10:38 -0400 Subject: Fix GLPK builds: correct access specifier on cut classes. --- src/theory/arith/cut_log.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/theory') diff --git a/src/theory/arith/cut_log.h b/src/theory/arith/cut_log.h index bbd1b3694..237a4ce2b 100644 --- a/src/theory/arith/cut_log.h +++ b/src/theory/arith/cut_log.h @@ -126,10 +126,12 @@ public: std::ostream& operator<<(std::ostream& os, const CutInfo& ci); class BranchCutInfo : public CutInfo { +public: BranchCutInfo(int execOrd, int br, Kind dir, double val); }; class RowsDeleted : public CutInfo { +public: RowsDeleted(int execOrd, int nrows, const int num[]); }; -- cgit v1.2.3 From 61258d16bb812c5b5c8fb8dade1d2b497c69570b Mon Sep 17 00:00:00 2001 From: lianah Date: Thu, 19 Jun 2014 18:19:25 -0400 Subject: added model generation to eager bit-blasting and turned abc off by default --- src/smt/smt_engine.cpp | 5 ++- src/theory/bv/bitblaster_template.h | 26 ++++++++----- src/theory/bv/bv_eager_solver.cpp | 10 ++++- src/theory/bv/bv_eager_solver.h | 6 ++- src/theory/bv/eager_bitblaster.h | 73 +++++++++++++++++++++++++++++++++++-- src/theory/bv/lazy_bitblaster.h | 2 +- src/theory/bv/options | 4 +- src/theory/bv/options_handlers.h | 18 +-------- src/theory/bv/theory_bv.cpp | 6 ++- src/theory/bv/theory_bv.h | 1 + src/theory/theory_model.cpp | 4 +- test/unit/Makefile.am | 1 + test/unit/theory/theory_bv_white.h | 3 +- 13 files changed, 120 insertions(+), 39 deletions(-) (limited to 'src/theory') diff --git a/src/smt/smt_engine.cpp b/src/smt/smt_engine.cpp index f82fc86ed..ffe239e2f 100644 --- a/src/smt/smt_engine.cpp +++ b/src/smt/smt_engine.cpp @@ -3180,8 +3180,11 @@ void SmtEnginePrivate::processAssertions() { // everything gets bit-blasted to internal SAT solver if (options::bitblastMode() == theory::bv::BITBLAST_MODE_EAGER) { for (unsigned i = 0; i < d_assertionsToCheck.size(); ++i) { - Node eager_atom = NodeManager::currentNM()->mkNode(kind::BITVECTOR_EAGER_ATOM, d_assertionsToCheck[i]); + TNode atom = d_assertionsToCheck[i]; + Node eager_atom = NodeManager::currentNM()->mkNode(kind::BITVECTOR_EAGER_ATOM, atom); d_assertionsToCheck[i] = eager_atom; + TheoryModel* m = d_smt.d_theoryEngine->getModel(); + m->addSubstitution(eager_atom, atom); } } diff --git a/src/theory/bv/bitblaster_template.h b/src/theory/bv/bitblaster_template.h index 8971d289f..4b0465498 100644 --- a/src/theory/bv/bitblaster_template.h +++ b/src/theory/bv/bitblaster_template.h @@ -57,6 +57,8 @@ namespace bv { class BitblastingRegistrar; typedef __gnu_cxx::hash_set NodeSet; +typedef __gnu_cxx::hash_set TNodeSet; + class AbstractionModule; /** @@ -70,7 +72,7 @@ class TBitblaster { protected: typedef std::vector Bits; typedef __gnu_cxx::hash_map TermDefMap; - typedef __gnu_cxx::hash_set AtomSet; + typedef __gnu_cxx::hash_set TNodeSet; typedef void (*TermBBStrategy) (TNode, Bits&, TBitblaster*); typedef T (*AtomBBStrategy) (TNode, TBitblaster*); @@ -104,8 +106,6 @@ class TheoryBV; class TLazyBitblaster : public TBitblaster { typedef std::vector Bits; - typedef __gnu_cxx::hash_set VarSet; - typedef __gnu_cxx::hash_set AtomSet; typedef context::CDList AssertionList; typedef context::CDHashMap , prop::SatLiteralHashFunction> ExplanationMap; @@ -138,8 +138,8 @@ class TLazyBitblaster : public TBitblaster { currently asserted by the DPLL SAT solver. */ ExplanationMap* d_explanations; /**< context dependent list of explanations for the propagated literals. Only used when bvEagerPropagate option enabled. */ - VarSet d_variables; - AtomSet d_bbAtoms; + TNodeSet d_variables; + TNodeSet d_bbAtoms; AbstractionModule* d_abstraction; bool d_emptyNotify; @@ -188,7 +188,7 @@ public: */ void collectModelInfo(TheoryModel* m, bool fullModel); - typedef VarSet::const_iterator vars_iterator; + typedef TNodeSet::const_iterator vars_iterator; vars_iterator beginVars() { return d_variables.begin(); } vars_iterator endVars() { return d_variables.end(); } @@ -239,7 +239,14 @@ class EagerBitblaster : public TBitblaster { BitblastingRegistrar* d_bitblastingRegistrar; context::Context* d_nullContext; prop::CnfStream* d_cnfStream; - TNodeSet d_bbAtoms; + + theory::bv::TheoryBV* d_bv; + TNodeSet d_bbAtoms; + TNodeSet d_variables; + + Node getVarValue(TNode a, bool fullModel); + bool isSharedTerm(TNode node); + public: void addAtom(TNode atom); void makeVariable(TNode node, Bits& bits); @@ -249,10 +256,11 @@ public: bool hasBBAtom(TNode atom) const; void bbFormula(TNode formula); void storeBBAtom(TNode atom, Node atom_bb); - EagerBitblaster(); + EagerBitblaster(theory::bv::TheoryBV* theory_bv); ~EagerBitblaster(); bool assertToSat(TNode node, bool propagate = true); - bool solve(); + bool solve(); + void collectModelInfo(TheoryModel* m, bool fullModel); }; class AigBitblaster : public TBitblaster { diff --git a/src/theory/bv/bv_eager_solver.cpp b/src/theory/bv/bv_eager_solver.cpp index af35c0499..166d43e35 100644 --- a/src/theory/bv/bv_eager_solver.cpp +++ b/src/theory/bv/bv_eager_solver.cpp @@ -24,11 +24,12 @@ using namespace CVC4; using namespace CVC4::theory; using namespace CVC4::theory::bv; -EagerBitblastSolver::EagerBitblastSolver() +EagerBitblastSolver::EagerBitblastSolver(TheoryBV* bv) : d_assertionSet() , d_bitblaster(NULL) , d_aigBitblaster(NULL) , d_useAig(options::bitvectorAig()) + , d_bv(bv) {} EagerBitblastSolver::~EagerBitblastSolver() { @@ -53,7 +54,7 @@ void EagerBitblastSolver::initialize() { if (d_useAig) { d_aigBitblaster = new AigBitblaster(); } else { - d_bitblaster = new EagerBitblaster(); + d_bitblaster = new EagerBitblaster(d_bv); } } @@ -106,3 +107,8 @@ bool EagerBitblastSolver::hasAssertions(const std::vector &formulas) { } return true; } + +void EagerBitblastSolver::collectModelInfo(TheoryModel* m, bool fullModel) { + AlwaysAssert(!d_useAig && d_bitblaster); + d_bitblaster->collectModelInfo(m, fullModel); +} diff --git a/src/theory/bv/bv_eager_solver.h b/src/theory/bv/bv_eager_solver.h index 1fb65c9c8..65fddd819 100644 --- a/src/theory/bv/bv_eager_solver.h +++ b/src/theory/bv/bv_eager_solver.h @@ -16,6 +16,8 @@ #include "cvc4_private.h" #include "expr/node.h" +#include "theory/theory_model.h" +#include "theory/bv/theory_bv.h" #include #pragma once @@ -37,8 +39,9 @@ class EagerBitblastSolver { EagerBitblaster* d_bitblaster; AigBitblaster* d_aigBitblaster; bool d_useAig; + TheoryBV* d_bv; public: - EagerBitblastSolver(); + EagerBitblastSolver(theory::bv::TheoryBV* bv); ~EagerBitblastSolver(); bool checkSat(); void assertFormula(TNode formula); @@ -48,6 +51,7 @@ public: void turnOffAig(); bool isInitialized(); void initialize(); + void collectModelInfo(theory::TheoryModel* m, bool fullModel); }; } diff --git a/src/theory/bv/eager_bitblaster.h b/src/theory/bv/eager_bitblaster.h index da73c7f09..91ef866bd 100644 --- a/src/theory/bv/eager_bitblaster.h +++ b/src/theory/bv/eager_bitblaster.h @@ -20,11 +20,13 @@ #define __CVC4__EAGER__BITBLASTER_H -#include "bitblaster_template.h" #include "theory/theory_registrar.h" +#include "theory/bv/bitblaster_template.h" +#include "theory/bv/options.h" +#include "theory/theory_model.h" #include "prop/cnf_stream.h" #include "prop/sat_solver_factory.h" -#include "theory/bv/options.h" + namespace CVC4 { namespace theory { @@ -43,9 +45,11 @@ public: };/* class Registrar */ -EagerBitblaster::EagerBitblaster() +EagerBitblaster::EagerBitblaster(TheoryBV* theory_bv) : TBitblaster() + , d_bv(theory_bv) , d_bbAtoms() + , d_variables() { d_bitblastingRegistrar = new BitblastingRegistrar(this); d_nullContext = new context::Context(); @@ -126,6 +130,7 @@ void EagerBitblaster::makeVariable(TNode var, Bits& bits) { for (unsigned i = 0; i < utils::getSize(var); ++i) { bits.push_back(utils::mkBitOf(var, i)); } + d_variables.insert(var); } Node EagerBitblaster::getBBAtom(TNode node) const { @@ -154,6 +159,68 @@ bool EagerBitblaster::solve() { } +/** + * Returns the value a is currently assigned to in the SAT solver + * or null if the value is completely unassigned. + * + * @param a + * @param fullModel whether to create a "full model," i.e., add + * constants to equivalence classes that don't already have them + * + * @return + */ +Node EagerBitblaster::getVarValue(TNode a, bool fullModel) { + if (!hasBBTerm(a)) { + Assert(isSharedTerm(a)); + return Node(); + } + Bits bits; + getBBTerm(a, bits); + Integer value(0); + for (int i = bits.size() -1; i >= 0; --i) { + prop::SatValue bit_value; + if (d_cnfStream->hasLiteral(bits[i])) { + prop::SatLiteral bit = d_cnfStream->getLiteral(bits[i]); + bit_value = d_satSolver->value(bit); + Assert (bit_value != prop::SAT_VALUE_UNKNOWN); + } else { + // the bit is unconstrainted so we can give it an arbitrary value + bit_value = prop::SAT_VALUE_FALSE; + } + Integer bit_int = bit_value == prop::SAT_VALUE_TRUE ? Integer(1) : Integer(0); + value = value * 2 + bit_int; + } + return utils::mkConst(BitVector(bits.size(), value)); +} + + +void EagerBitblaster::collectModelInfo(TheoryModel* m, bool fullModel) { + TNodeSet::const_iterator it = d_variables.begin(); + for (; it!= d_variables.end(); ++it) { + TNode var = *it; + if (Theory::theoryOf(var) == theory::THEORY_BV || isSharedTerm(var)) { + Node const_value = getVarValue(var, fullModel); + if(const_value == Node()) { + if( fullModel ){ + // if the value is unassigned just set it to zero + const_value = utils::mkConst(BitVector(utils::getSize(var), 0u)); + } + } + if(const_value != Node()) { + Debug("bitvector-model") << "TLazyBitblaster::collectModelInfo (assert (= " + << var << " " + << const_value << "))\n"; + m->assertEquality(var, const_value, true); + } + } + } +} + +bool EagerBitblaster::isSharedTerm(TNode node) { + return d_bv->d_sharedTermsSet.find(node) != d_bv->d_sharedTermsSet.end(); +} + + } /*bv namespace */ } /* theory namespace */ } /* CVC4 namespace*/ diff --git a/src/theory/bv/lazy_bitblaster.h b/src/theory/bv/lazy_bitblaster.h index 570549866..e11254dbb 100644 --- a/src/theory/bv/lazy_bitblaster.h +++ b/src/theory/bv/lazy_bitblaster.h @@ -453,7 +453,7 @@ Node TLazyBitblaster::getVarValue(TNode a, bool fullModel) { } void TLazyBitblaster::collectModelInfo(TheoryModel* m, bool fullModel) { - __gnu_cxx::hash_set::iterator it = d_variables.begin(); + TNodeSet::iterator it = d_variables.begin(); for (; it!= d_variables.end(); ++it) { TNode var = *it; if (Theory::theoryOf(var) == theory::THEORY_BV || isSharedTerm(var)) { diff --git a/src/theory/bv/options b/src/theory/bv/options index b5a4fea93..81d88421b 100644 --- a/src/theory/bv/options +++ b/src/theory/bv/options @@ -5,14 +5,14 @@ module BV "theory/bv/options.h" Bitvector theory -# Option to set the bit-blasting mode (lazy, eager, eager-aig) +# Option to set the bit-blasting mode (lazy, eager) option bitblastMode bitblast --bitblast=MODE CVC4::theory::bv::BitblastMode :handler CVC4::theory::bv::stringToBitblastMode :default CVC4::theory::bv::BITBLAST_MODE_LAZY :read-write :include "theory/bv/bitblast_mode.h" :handler-include "theory/bv/options_handlers.h" choose bitblasting mode, see --bitblast=help # Options for eager bit-blasting -option bitvectorAig --bitblast-aig bool :default false :predicate CVC4::theory::bv::abcEnabledBuild :predicate-include "theory/bv/options_handlers.h" :read-write :link --bitblast=eager +option bitvectorAig --bitblast-aig bool :default false :predicate CVC4::theory::bv::abcEnabledBuild :predicate-include "theory/bv/options_handlers.h" :read-write :link --bitblast=eager :link --bv-aig-simp="balance;drw" bitblast by first converting to AIG (only if --bitblast=eager) expert-option bitvectorAigSimplifications --bv-aig-simp=FILE std::string :default "" :predicate CVC4::theory::bv::abcEnabledBuild :read-write :link --bitblast-aig diff --git a/src/theory/bv/options_handlers.h b/src/theory/bv/options_handlers.h index 5d85a1be0..7cdd4aac5 100644 --- a/src/theory/bv/options_handlers.h +++ b/src/theory/bv/options_handlers.h @@ -56,9 +56,6 @@ lazy (default)\n\ \n\ eager\n\ + Bitblast eagerly to bv SAT solver\n\ -\n\ -aig\n\ -+ Bitblast eagerly to bv SAT solver by converting to AIG\n\ "; inline BitblastMode stringToBitblastMode(std::string option, std::string optarg, SmtEngine* smt) throw(OptionException) { @@ -70,7 +67,8 @@ inline BitblastMode stringToBitblastMode(std::string option, std::string optarg, options::bitvectorEqualitySolver.set(true); } if (!options::bitvectorEqualitySlicer.wasSetByUser()) { - if (options::incrementalSolving()) { + if (options::incrementalSolving() || + options::produceModels()) { options::bitvectorEqualitySlicer.set(BITVECTOR_SLICER_OFF); } else { options::bitvectorEqualitySlicer.set(BITVECTOR_SLICER_AUTO); @@ -85,10 +83,6 @@ inline BitblastMode stringToBitblastMode(std::string option, std::string optarg, } return BITBLAST_MODE_LAZY; } else if(optarg == "eager") { - if (options::produceModels()) { - throw OptionException(std::string("Eager bit-blasting does not currently support model generation. \n\ - Try --bitblast=lazy")); - } if (options::incrementalSolving() && options::incrementalSolving.wasSetByUser()) { @@ -96,14 +90,6 @@ inline BitblastMode stringToBitblastMode(std::string option, std::string optarg, Try --bitblast=lazy")); } - if (!options::bitvectorAig.wasSetByUser()) { - options::bitvectorAig.set(true); - abcEnabledBuild("--bitblast-aig", true, NULL); - } - if (!options::bitvectorAigSimplifications.wasSetByUser()) { - // due to a known bug in abc switching to using drw instead of rw - options::bitvectorAigSimplifications.set("balance;drw"); - } if (!options::bitvectorToBool.wasSetByUser()) { options::bitvectorToBool.set(true); } diff --git a/src/theory/bv/theory_bv.cpp b/src/theory/bv/theory_bv.cpp index d3da10a90..4b5333e46 100644 --- a/src/theory/bv/theory_bv.cpp +++ b/src/theory/bv/theory_bv.cpp @@ -61,7 +61,7 @@ TheoryBV::TheoryBV(context::Context* c, context::UserContext* u, OutputChannel& { if (options::bitblastMode() == theory::bv::BITBLAST_MODE_EAGER) { - d_eagerSolver = new EagerBitblastSolver(); + d_eagerSolver = new EagerBitblastSolver(this); return; } @@ -434,7 +434,9 @@ void TheoryBV::check(Effort e) void TheoryBV::collectModelInfo( TheoryModel* m, bool fullModel ){ Assert(!inConflict()); - + if (options::bitblastMode() == theory::bv::BITBLAST_MODE_EAGER) { + d_eagerSolver->collectModelInfo(m, fullModel); + } for (unsigned i = 0; i < d_subtheories.size(); ++i) { if (d_subtheories[i]->isComplete()) { d_subtheories[i]->collectModelInfo(m, fullModel); diff --git a/src/theory/bv/theory_bv.h b/src/theory/bv/theory_bv.h index 683f002cf..e96df8df2 100644 --- a/src/theory/bv/theory_bv.h +++ b/src/theory/bv/theory_bv.h @@ -209,6 +209,7 @@ private: friend class LazyBitblaster; friend class TLazyBitblaster; + friend class EagerBitblaster; friend class BitblastSolver; friend class EqualitySolver; friend class CoreSolver; diff --git a/src/theory/theory_model.cpp b/src/theory/theory_model.cpp index 6c0018c05..46eb5606b 100644 --- a/src/theory/theory_model.cpp +++ b/src/theory/theory_model.cpp @@ -152,7 +152,9 @@ Node TheoryModel::getModelValue(TNode n, bool hasBoundVars) const Unreachable(); } - if (n.getNumChildren() > 0) { + if (n.getNumChildren() > 0 && + n.getKind() != kind::BITVECTOR_ACKERMANIZE_UDIV && + n.getKind() != kind::BITVECTOR_ACKERMANIZE_UREM) { std::vector children; if (n.getKind() == APPLY_UF) { Node op = getModelValue(n.getOperator(), hasBoundVars); diff --git a/test/unit/Makefile.am b/test/unit/Makefile.am index 4d437d2f0..be64e3ea1 100644 --- a/test/unit/Makefile.am +++ b/test/unit/Makefile.am @@ -11,6 +11,7 @@ UNIT_TESTS += \ theory/theory_black \ theory/theory_white \ theory/theory_arith_white \ + theory/theory_bv_white \ theory/type_enumerator_white \ expr/node_white \ expr/node_black \ diff --git a/test/unit/theory/theory_bv_white.h b/test/unit/theory/theory_bv_white.h index 4999ec3d4..dd65fc8e4 100644 --- a/test/unit/theory/theory_bv_white.h +++ b/test/unit/theory/theory_bv_white.h @@ -21,6 +21,7 @@ #include "theory/theory.h" #include "smt/smt_engine.h" #include "smt/smt_engine_scope.h" +#include "theory/bv/theory_bv.h" #include "theory/bv/eager_bitblaster.h" #include "expr/node.h" #include "expr/node_manager.h" @@ -59,7 +60,7 @@ public: d_smt = new SmtEngine(d_em); d_scope = new SmtScope(d_smt); d_smt->setOption("bitblast", SExpr("eager")); - d_bb = new EagerBitblaster(); + d_bb = new EagerBitblaster(NULL); } void tearDown() { -- cgit v1.2.3 From 9df2b70bac396301ac9c0586f60414033ba7f128 Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Fri, 20 Jun 2014 19:59:42 -0400 Subject: UF kinds documentation --- src/theory/uf/kinds | 6 +++--- src/theory/uf/theory_uf_type_rules.h | 9 +++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) (limited to 'src/theory') diff --git a/src/theory/uf/kinds b/src/theory/uf/kinds index e99c3366c..ccdac32ab 100644 --- a/src/theory/uf/kinds +++ b/src/theory/uf/kinds @@ -11,14 +11,14 @@ properties stable-infinite parametric properties check propagate ppStaticLearn presolve getNextDecisionRequest rewriter ::CVC4::theory::uf::TheoryUfRewriter "theory/uf/theory_uf_rewriter.h" -parameterized APPLY_UF VARIABLE 1: "uninterpreted function application" +parameterized APPLY_UF VARIABLE 1: "application of an uninterpreted function; first parameter is the function, remaining ones are parameters to that function" typerule APPLY_UF ::CVC4::theory::uf::UfTypeRule -operator CARDINALITY_CONSTRAINT 2 "cardinality constraint" +operator CARDINALITY_CONSTRAINT 2 "cardinality constraint on sort S: first parameter is (any) term of sort S, second is a positive integer constant k that bounds the cardinality of S" typerule CARDINALITY_CONSTRAINT ::CVC4::theory::uf::CardinalityConstraintTypeRule -operator COMBINED_CARDINALITY_CONSTRAINT 1 "combined cardinality constraint" +operator COMBINED_CARDINALITY_CONSTRAINT 1 "combined cardinality constraint; parameter is a positive integer constant k that bounds the sum of the cardinalities of all sorts in the signature" typerule COMBINED_CARDINALITY_CONSTRAINT ::CVC4::theory::uf::CombinedCardinalityConstraintTypeRule endtheory diff --git a/src/theory/uf/theory_uf_type_rules.h b/src/theory/uf/theory_uf_type_rules.h index 128b8ceda..4f64da37e 100644 --- a/src/theory/uf/theory_uf_type_rules.h +++ b/src/theory/uf/theory_uf_type_rules.h @@ -61,6 +61,9 @@ public: inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check) throw(TypeCheckingExceptionPrivate) { if( check ) { + // don't care what it is, but it should be well-typed + n[0].getType(check); + TypeNode valType = n[1].getType(check); if( valType != nodeManager->integerType() ) { throw TypeCheckingExceptionPrivate(n, "cardinality constraint must be integer"); @@ -85,6 +88,12 @@ public: if( valType != nodeManager->integerType() ) { throw TypeCheckingExceptionPrivate(n, "combined cardinality constraint must be integer"); } + if( n[0].getKind()!=kind::CONST_RATIONAL ){ + throw TypeCheckingExceptionPrivate(n, "combined cardinality constraint must be a constant"); + } + if( n[0].getConst().getNumerator().sgn()!=1 ){ + throw TypeCheckingExceptionPrivate(n, "combined cardinality constraint must be positive"); + } } return nodeManager->booleanType(); } -- cgit v1.2.3 From 88ff88ba783aa91895e6b03ef21287a051ae9c99 Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Fri, 20 Jun 2014 19:59:54 -0400 Subject: Quantifiers kinds documentation --- src/theory/quantifiers/kinds | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/theory') diff --git a/src/theory/quantifiers/kinds b/src/theory/quantifiers/kinds index 795bc1ab4..6fb480c3d 100644 --- a/src/theory/quantifiers/kinds +++ b/src/theory/quantifiers/kinds @@ -11,23 +11,23 @@ properties check propagate presolve getNextDecisionRequest rewriter ::CVC4::theory::quantifiers::QuantifiersRewriter "theory/quantifiers/quantifiers_rewriter.h" -operator FORALL 2:3 "universally quantified formula" +operator FORALL 2:3 "universally quantified formula; first parameter is an BOUND_VAR_LIST, second is quantifier body, and an optional third parameter is an INST_PATTERN_LIST" -operator EXISTS 2:3 "existentially quantified formula" +operator EXISTS 2:3 "existentially quantified formula; first parameter is an BOUND_VAR_LIST, second is quantifier body, and an optional third parameter is an INST_PATTERN_LIST" variable INST_CONSTANT "instantiation constant" sort BOUND_VAR_LIST_TYPE \ Cardinality::INTEGERS \ not-well-founded \ - "Bound Var type" + "the type of bound variable lists" -operator BOUND_VAR_LIST 1: "bound variables" +operator BOUND_VAR_LIST 1: "a list of bound variables (used to bind variables under a quantifier)" sort INST_PATTERN_TYPE \ Cardinality::INTEGERS \ not-well-founded \ - "Instantiation pattern type" + "instantiation pattern type" # Instantiation pattern, also called trigger. # This node is used for specifying hints for quantifier instantiation. @@ -37,10 +37,10 @@ operator INST_PATTERN 1: "instantiation pattern" sort INST_PATTERN_LIST_TYPE \ Cardinality::INTEGERS \ not-well-founded \ - "Instantiation pattern list type" + "the type of instantiation pattern lists" # a list of instantiation patterns -operator INST_PATTERN_LIST 1: "instantiation pattern list" +operator INST_PATTERN_LIST 1: "a list of instantiation patterns" typerule FORALL ::CVC4::theory::quantifiers::QuantifierForallTypeRule typerule EXISTS ::CVC4::theory::quantifiers::QuantifierExistsTypeRule @@ -53,16 +53,16 @@ typerule INST_PATTERN_LIST ::CVC4::theory::quantifiers::QuantifierInstPatternLis sort RRHB_TYPE \ Cardinality::INTEGERS \ not-well-founded \ - "head and body of the rule type" + "head and body of the rule type (for rewrite-rules theory)" # operators... # variables, guards, RR_REWRITE/REDUCTION_RULE/DEDUCTION_RULE -operator REWRITE_RULE 3 "general rewrite rule" +operator REWRITE_RULE 3 "general rewrite rule (for rewrite-rules theory)" #HEAD/BODY/TRIGGER -operator RR_REWRITE 2:3 "actual rewrite rule" -operator RR_REDUCTION 2:3 "actual reduction rule" -operator RR_DEDUCTION 2:3 "actual deduction rule" +operator RR_REWRITE 2:3 "actual rewrite rule (for rewrite-rules theory)" +operator RR_REDUCTION 2:3 "actual reduction rule (for rewrite-rules theory)" +operator RR_DEDUCTION 2:3 "actual deduction rule (for rewrite-rules theory)" typerule REWRITE_RULE ::CVC4::theory::quantifiers::RewriteRuleTypeRule typerule RR_REWRITE ::CVC4::theory::quantifiers::RRRewriteTypeRule -- cgit v1.2.3 From 07019586cd7ef6f77ce675eb594f6e3cc2f2502e Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Fri, 20 Jun 2014 20:00:36 -0400 Subject: Datatypes kinds documentation --- src/theory/datatypes/kinds | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) (limited to 'src/theory') diff --git a/src/theory/datatypes/kinds b/src/theory/datatypes/kinds index b222738ae..d8b42111c 100644 --- a/src/theory/datatypes/kinds +++ b/src/theory/datatypes/kinds @@ -7,7 +7,6 @@ theory THEORY_DATATYPES ::CVC4::theory::datatypes::TheoryDatatypes "theory/datatypes/theory_datatypes.h" typechecker "theory/datatypes/theory_datatypes_type_rules.h" - properties check presolve parametric propagate rewriter ::CVC4::theory::datatypes::DatatypesRewriter "theory/datatypes/datatypes_rewriter.h" @@ -36,18 +35,18 @@ cardinality TESTER_TYPE \ "::CVC4::theory::builtin::FunctionProperties::computeCardinality(%TYPE%)" \ "theory/builtin/theory_builtin_type_rules.h" -parameterized APPLY_CONSTRUCTOR APPLY_TYPE_ASCRIPTION 0: "constructor application" +parameterized APPLY_CONSTRUCTOR APPLY_TYPE_ASCRIPTION 0: "constructor application; first parameter is the constructor, remaining parameters (if any) are parameters to the constructor" -parameterized APPLY_SELECTOR SELECTOR_TYPE 1: "selector application" -parameterized APPLY_SELECTOR_TOTAL [SELECTOR_TYPE] 1: "selector application (total)" +parameterized APPLY_SELECTOR SELECTOR_TYPE 1 "selector application; parameter is a datatype term (undefined if mis-applied)" +parameterized APPLY_SELECTOR_TOTAL [SELECTOR_TYPE] 1 "selector application; parameter is a datatype term (defined rigidly if mis-applied)" -parameterized APPLY_TESTER TESTER_TYPE 1: "tester application" +parameterized APPLY_TESTER TESTER_TYPE 1 "tester application; first parameter is a tester, second is a datatype term" constant DATATYPE_TYPE \ ::CVC4::Datatype \ "::CVC4::DatatypeHashFunction" \ "util/datatype.h" \ - "datatype type" + "a datatype type" cardinality DATATYPE_TYPE \ "%TYPE%.getConst().getCardinality()" \ "util/datatype.h" @@ -74,12 +73,12 @@ enumerator PARAMETRIC_DATATYPE \ "theory/datatypes/type_enumerator.h" parameterized APPLY_TYPE_ASCRIPTION ASCRIPTION_TYPE 1 \ - "type ascription, for datatype constructor applications" + "type ascription, for datatype constructor applications; first parameter is an ASCRIPTION_TYPE, second is the datatype constructor application being ascribed" constant ASCRIPTION_TYPE \ ::CVC4::AscriptionType \ ::CVC4::AscriptionTypeHashFunction \ "util/ascription_type.h" \ - "a type parameter for type ascription" + "a type parameter for type ascription; payload is an instance of the CVC4::AscriptionType class" typerule APPLY_CONSTRUCTOR ::CVC4::theory::datatypes::DatatypeConstructorTypeRule typerule APPLY_SELECTOR ::CVC4::theory::datatypes::DatatypeSelectorTypeRule @@ -102,7 +101,7 @@ enumerator TUPLE_TYPE \ "::CVC4::theory::datatypes::TupleEnumerator" \ "theory/datatypes/type_enumerator.h" -operator TUPLE 0: "a tuple" +operator TUPLE 0: "a tuple (N-ary)" typerule TUPLE ::CVC4::theory::datatypes::TupleTypeRule construle TUPLE ::CVC4::theory::datatypes::TupleProperties @@ -110,21 +109,21 @@ constant TUPLE_SELECT_OP \ ::CVC4::TupleSelect \ ::CVC4::TupleSelectHashFunction \ "util/tuple.h" \ - "operator for a tuple select" -parameterized TUPLE_SELECT TUPLE_SELECT_OP 1 "tuple select" + "operator for a tuple select; payload is an instance of the CVC4::TupleSelect class" +parameterized TUPLE_SELECT TUPLE_SELECT_OP 1 "tuple select; first parameter is a TUPLE_SELECT_OP, second is the tuple" typerule TUPLE_SELECT ::CVC4::theory::datatypes::TupleSelectTypeRule constant TUPLE_UPDATE_OP \ ::CVC4::TupleUpdate \ ::CVC4::TupleUpdateHashFunction \ "util/tuple.h" \ - "operator for a tuple update" -parameterized TUPLE_UPDATE TUPLE_UPDATE_OP 2 "tuple update" + "operator for a tuple update; payload is an instance of the CVC4::TupleUpdate class" +parameterized TUPLE_UPDATE TUPLE_UPDATE_OP 2 "tuple update; first parameter is a TUPLE_UPDATE_OP (which references an index), second is the tuple, third is the element to store in the tuple at the given index" typerule TUPLE_UPDATE ::CVC4::theory::datatypes::TupleUpdateTypeRule constant RECORD_TYPE \ ::CVC4::Record \ - "::CVC4::RecordHashFunction" \ + ::CVC4::RecordHashFunction \ "util/record.h" \ "record type" cardinality RECORD_TYPE \ @@ -138,7 +137,7 @@ enumerator RECORD_TYPE \ "::CVC4::theory::datatypes::RecordEnumerator" \ "theory/datatypes/type_enumerator.h" -parameterized RECORD RECORD_TYPE 0: "a record" +parameterized RECORD RECORD_TYPE 0: "a record; first parameter is a RECORD_TYPE; remaining parameters (if any) are the individual values for fields, in order" typerule RECORD ::CVC4::theory::datatypes::RecordTypeRule construle RECORD ::CVC4::theory::datatypes::RecordProperties @@ -146,16 +145,16 @@ constant RECORD_SELECT_OP \ ::CVC4::RecordSelect \ ::CVC4::RecordSelectHashFunction \ "util/record.h" \ - "operator for a record select" -parameterized RECORD_SELECT RECORD_SELECT_OP 1 "record select" + "operator for a record select; payload is an instance CVC4::RecordSelect class" +parameterized RECORD_SELECT RECORD_SELECT_OP 1 "record select; first parameter is a RECORD_SELECT_OP, second is a record term to select from" typerule RECORD_SELECT ::CVC4::theory::datatypes::RecordSelectTypeRule constant RECORD_UPDATE_OP \ ::CVC4::RecordUpdate \ ::CVC4::RecordUpdateHashFunction \ "util/record.h" \ - "operator for a record update" -parameterized RECORD_UPDATE RECORD_UPDATE_OP 2 "record update" + "operator for a record update; payload is an instance CVC4::RecordSelect class" +parameterized RECORD_UPDATE RECORD_UPDATE_OP 2 "record update; first parameter is a RECORD_UPDATE_OP (which references a field), second is a record term to update, third is the element to store in the record in the given field" typerule RECORD_UPDATE ::CVC4::theory::datatypes::RecordUpdateTypeRule endtheory -- cgit v1.2.3 From f10e5730217a653c5608273201193f22b808660e Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Fri, 20 Jun 2014 20:00:27 -0400 Subject: Bit-vector kinds documentation --- src/theory/bv/kinds | 114 +++++++++++++++++------------------ src/theory/bv/theory_bv_type_rules.h | 51 ++++++++-------- 2 files changed, 81 insertions(+), 84 deletions(-) (limited to 'src/theory') diff --git a/src/theory/bv/kinds b/src/theory/bv/kinds index 4b2bba741..b4ecc1d3d 100644 --- a/src/theory/bv/kinds +++ b/src/theory/bv/kinds @@ -25,7 +25,7 @@ constant CONST_BITVECTOR \ ::CVC4::BitVector \ ::CVC4::BitVectorHashFunction \ "util/bitvector.h" \ - "a fixed-width bit-vector constant" + "a fixed-width bit-vector constant; payload is an instance of the CVC4::BitVector class" enumerator BITVECTOR_TYPE \ "::CVC4::theory::bv::BitVectorEnumerator" \ @@ -36,101 +36,101 @@ well-founded BITVECTOR_TYPE \ "(*CVC4::theory::TypeEnumerator(%TYPE%))" \ "theory/type_enumerator.h" -operator BITVECTOR_CONCAT 2: "bit-vector concatenation" -operator BITVECTOR_AND 2: "bitwise and" -operator BITVECTOR_OR 2: "bitwise or" -operator BITVECTOR_XOR 2: "bitwise xor" -operator BITVECTOR_NOT 1 "bitwise not" -operator BITVECTOR_NAND 2 "bitwise nand" -operator BITVECTOR_NOR 2 "bitwise nor" -operator BITVECTOR_XNOR 2 "bitwise xnor" -operator BITVECTOR_COMP 2 "equality comparison (returns one bit)" -operator BITVECTOR_MULT 2: "bit-vector multiplication" -operator BITVECTOR_PLUS 2: "bit-vector addition" -operator BITVECTOR_SUB 2 "bit-vector subtraction" -operator BITVECTOR_NEG 1 "bit-vector unary negation" -operator BITVECTOR_UDIV 2 "bit-vector unsigned division, truncating towards 0 (undefined if divisor is 0)" -operator BITVECTOR_UREM 2 "bit-vector unsigned remainder from truncating division (undefined if divisor is 0)" -operator BITVECTOR_SDIV 2 "bit-vector 2's complement signed division" -operator BITVECTOR_SREM 2 "bit-vector 2's complement signed remainder (sign follows dividend)" -operator BITVECTOR_SMOD 2 "bit-vector 2's complement signed remainder (sign follows divisor)" -# total division kinds -operator BITVECTOR_UDIV_TOTAL 2 "bit-vector total unsigned division, truncating towards 0 (undefined if divisor is 0)" -operator BITVECTOR_UREM_TOTAL 2 "bit-vector total unsigned remainder from truncating division (undefined if divisor is 0)" - -operator BITVECTOR_SHL 2 "bit-vector left shift" -operator BITVECTOR_LSHR 2 "bit-vector logical shift right" -operator BITVECTOR_ASHR 2 "bit-vector arithmetic shift right" -operator BITVECTOR_ULT 2 "bit-vector unsigned less than" -operator BITVECTOR_ULE 2 "bit-vector unsigned less than or equal" -operator BITVECTOR_UGT 2 "bit-vector unsigned greater than" -operator BITVECTOR_UGE 2 "bit-vector unsigned greater than or equal" -operator BITVECTOR_SLT 2 "bit-vector signed less than" -operator BITVECTOR_SLE 2 "bit-vector signed less than or equal" -operator BITVECTOR_SGT 2 "bit-vector signed greater than" -operator BITVECTOR_SGE 2 "signed greater than or equal" - -operator BITVECTOR_EAGER_ATOM 1 "formula to be treated as a bv atom via eager bit-blasting" -operator BITVECTOR_ACKERMANIZE_UDIV 1 "term to be treated as a variable; used for eager bitblasting ackerman expansion of bvudiv" -operator BITVECTOR_ACKERMANIZE_UREM 1 "term to be treated as a variable; used for eager bitblasting ackerman expansion of bvurem" +operator BITVECTOR_CONCAT 2: "concatenation of two or more bit-vectors" +operator BITVECTOR_AND 2: "bitwise and of two or more bit-vectors" +operator BITVECTOR_OR 2: "bitwise or of two or more bit-vectors" +operator BITVECTOR_XOR 2: "bitwise xor of two or more bit-vectors" +operator BITVECTOR_NOT 1 "bitwise not of a bit-vector" +operator BITVECTOR_NAND 2 "bitwise nand of two bit-vectors" +operator BITVECTOR_NOR 2 "bitwise nor of two bit-vectors" +operator BITVECTOR_XNOR 2 "bitwise xnor of two bit-vectors" +operator BITVECTOR_COMP 2 "equality comparison of two bit-vectors (returns one bit)" +operator BITVECTOR_MULT 2: "multiplication of two or more bit-vectors" +operator BITVECTOR_PLUS 2: "addition of two or more bit-vectors" +operator BITVECTOR_SUB 2 "subtraction of two bit-vectors" +operator BITVECTOR_NEG 1 "unary negation of a bit-vector" +operator BITVECTOR_UDIV 2 "unsigned division of two bit-vectors, truncating towards 0 (undefined if divisor is 0)" +operator BITVECTOR_UREM 2 "unsigned remainder from truncating division of two bit-vectors (undefined if divisor is 0)" +operator BITVECTOR_SDIV 2 "2's complement signed division" +operator BITVECTOR_SREM 2 "2's complement signed remainder (sign follows dividend)" +operator BITVECTOR_SMOD 2 "2's complement signed remainder (sign follows divisor)" +# total division kinds +operator BITVECTOR_UDIV_TOTAL 2 "unsigned division of two bit-vectors, truncating towards 0 (defined to be the all-ones bit pattern, if divisor is 0)" +operator BITVECTOR_UREM_TOTAL 2 "unsigned remainder from truncating division of two bit-vectors (defined to be equal to the dividend, if divisor is 0)" + +operator BITVECTOR_SHL 2 "bit-vector shift left (the two bit-vector parameters must have same width)" +operator BITVECTOR_LSHR 2 "bit-vector logical shift right (the two bit-vector parameters must have same width)" +operator BITVECTOR_ASHR 2 "bit-vector arithmetic shift right (the two bit-vector parameters must have same width)" +operator BITVECTOR_ULT 2 "bit-vector unsigned less than (the two bit-vector parameters must have same width)" +operator BITVECTOR_ULE 2 "bit-vector unsigned less than or equal (the two bit-vector parameters must have same width)" +operator BITVECTOR_UGT 2 "bit-vector unsigned greater than (the two bit-vector parameters must have same width)" +operator BITVECTOR_UGE 2 "bit-vector unsigned greater than or equal (the two bit-vector parameters must have same width)" +operator BITVECTOR_SLT 2 "bit-vector signed less than (the two bit-vector parameters must have same width)" +operator BITVECTOR_SLE 2 "bit-vector signed less than or equal (the two bit-vector parameters must have same width)" +operator BITVECTOR_SGT 2 "bit-vector signed greater than (the two bit-vector parameters must have same width)" +operator BITVECTOR_SGE 2 "bit-vector signed greater than or equal (the two bit-vector parameters must have same width)" + +operator BITVECTOR_EAGER_ATOM 1 "formula to be treated as a bv atom via eager bit-blasting (internal-only symbol)" +operator BITVECTOR_ACKERMANIZE_UDIV 1 "term to be treated as a variable; used for eager bit-blasting Ackermann expansion of bvudiv (internal-only symbol)" +operator BITVECTOR_ACKERMANIZE_UREM 1 "term to be treated as a variable; used for eager bit-blasting Ackermann expansion of bvurem (internal-only symbol)" constant BITVECTOR_BITOF_OP \ ::CVC4::BitVectorBitOf \ ::CVC4::BitVectorBitOfHashFunction \ "util/bitvector.h" \ - "operator for the bit-vector boolean bit extract" + "operator for the bit-vector boolean bit extract; payload is an instance of the CVC4::BitVectorBitOf class" constant BITVECTOR_EXTRACT_OP \ ::CVC4::BitVectorExtract \ ::CVC4::BitVectorExtractHashFunction \ "util/bitvector.h" \ - "operator for the bit-vector extract" + "operator for the bit-vector extract; payload is an instance of the CVC4::BitVectorExtract class" constant BITVECTOR_REPEAT_OP \ ::CVC4::BitVectorRepeat \ "::CVC4::UnsignedHashFunction< ::CVC4::BitVectorRepeat >" \ "util/bitvector.h" \ - "operator for the bit-vector repeat" + "operator for the bit-vector repeat; payload is an instance of the CVC4::BitVectorRepeat class" constant BITVECTOR_ZERO_EXTEND_OP \ ::CVC4::BitVectorZeroExtend \ "::CVC4::UnsignedHashFunction< ::CVC4::BitVectorZeroExtend >" \ "util/bitvector.h" \ - "operator for the bit-vector zero-extend" + "operator for the bit-vector zero-extend; payload is an instance of the CVC4::BitVectorZeroExtend class" constant BITVECTOR_SIGN_EXTEND_OP \ ::CVC4::BitVectorSignExtend \ "::CVC4::UnsignedHashFunction< ::CVC4::BitVectorSignExtend >" \ "util/bitvector.h" \ - "operator for the bit-vector sign-extend" + "operator for the bit-vector sign-extend; payload is an instance of the CVC4::BitVectorSignExtend class" constant BITVECTOR_ROTATE_LEFT_OP \ ::CVC4::BitVectorRotateLeft \ "::CVC4::UnsignedHashFunction< ::CVC4::BitVectorRotateLeft >" \ "util/bitvector.h" \ - "operator for the bit-vector rotate left" + "operator for the bit-vector rotate left; payload is an instance of the CVC4::BitVectorRotateLeft class" constant BITVECTOR_ROTATE_RIGHT_OP \ ::CVC4::BitVectorRotateRight \ "::CVC4::UnsignedHashFunction< ::CVC4::BitVectorRotateRight >" \ "util/bitvector.h" \ - "operator for the bit-vector rotate right" + "operator for the bit-vector rotate right; payload is an instance of the CVC4::BitVectorRotateRight class" -parameterized BITVECTOR_BITOF BITVECTOR_BITOF_OP 1 "bit-vector boolean bit extract" -parameterized BITVECTOR_EXTRACT BITVECTOR_EXTRACT_OP 1 "bit-vector extract" -parameterized BITVECTOR_REPEAT BITVECTOR_REPEAT_OP 1 "bit-vector repeat" -parameterized BITVECTOR_ZERO_EXTEND BITVECTOR_ZERO_EXTEND_OP 1 "bit-vector zero-extend" -parameterized BITVECTOR_SIGN_EXTEND BITVECTOR_SIGN_EXTEND_OP 1 "bit-vector sign-extend" -parameterized BITVECTOR_ROTATE_LEFT BITVECTOR_ROTATE_LEFT_OP 1 "bit-vector rotate left" -parameterized BITVECTOR_ROTATE_RIGHT BITVECTOR_ROTATE_RIGHT_OP 1 "bit-vector rotate right" +parameterized BITVECTOR_BITOF BITVECTOR_BITOF_OP 1 "bit-vector boolean bit extract; first parameter is a BITVECTOR_BITOF_OP, second is a bit-vector term" +parameterized BITVECTOR_EXTRACT BITVECTOR_EXTRACT_OP 1 "bit-vector extract; first parameter is a BITVECTOR_EXTRACT_OP, second is a bit-vector term" +parameterized BITVECTOR_REPEAT BITVECTOR_REPEAT_OP 1 "bit-vector repeat; first parameter is a BITVECTOR_REPEAT_OP, second is a bit-vector term" +parameterized BITVECTOR_ZERO_EXTEND BITVECTOR_ZERO_EXTEND_OP 1 "bit-vector zero-extend; first parameter is a BITVECTOR_ZERO_EXTEND_OP, second is a bit-vector term" +parameterized BITVECTOR_SIGN_EXTEND BITVECTOR_SIGN_EXTEND_OP 1 "bit-vector sign-extend; first parameter is a BITVECTOR_SIGN_EXTEND_OP, second is a bit-vector term" +parameterized BITVECTOR_ROTATE_LEFT BITVECTOR_ROTATE_LEFT_OP 1 "bit-vector rotate left; first parameter is a BITVECTOR_ROTATE_LEFT_OP, second is a bit-vector term" +parameterized BITVECTOR_ROTATE_RIGHT BITVECTOR_ROTATE_RIGHT_OP 1 "bit-vector rotate right; first parameter is a BITVECTOR_ROTATE_RIGHT_OP, second is a bit-vector term" constant INT_TO_BITVECTOR_OP \ ::CVC4::IntToBitVector \ "::CVC4::UnsignedHashFunction< ::CVC4::IntToBitVector >" \ "util/bitvector.h" \ - "operator for the integer conversion to bit-vector" -parameterized INT_TO_BITVECTOR INT_TO_BITVECTOR_OP 1 "integer conversion to bit-vector" -operator BITVECTOR_TO_NAT 1 "bit-vector conversion to (nonnegative) integer" + "operator for the integer conversion to bit-vector; payload is an instance of the CVC4::IntToBitVector class" +parameterized INT_TO_BITVECTOR INT_TO_BITVECTOR_OP 1 "integer conversion to bit-vector; first parameter is an INT_TO_BITVECTOR_OP, second is an integer term" +operator BITVECTOR_TO_NAT 1 "bit-vector conversion to (nonnegative) integer; parameter is a bit-vector" typerule CONST_BITVECTOR ::CVC4::theory::bv::BitVectorConstantTypeRule @@ -142,7 +142,7 @@ typerule BITVECTOR_NAND ::CVC4::theory::bv::BitVectorFixedWidthTypeRule typerule BITVECTOR_NOR ::CVC4::theory::bv::BitVectorFixedWidthTypeRule typerule BITVECTOR_XNOR ::CVC4::theory::bv::BitVectorFixedWidthTypeRule -typerule BITVECTOR_COMP ::CVC4::theory::bv::BitVectorCompRule +typerule BITVECTOR_COMP ::CVC4::theory::bv::BitVectorCompTypeRule typerule BITVECTOR_MULT ::CVC4::theory::bv::BitVectorFixedWidthTypeRule typerule BITVECTOR_PLUS ::CVC4::theory::bv::BitVectorFixedWidthTypeRule @@ -178,7 +178,7 @@ typerule BITVECTOR_ACKERMANIZE_UREM ::CVC4::theory::bv::BitVectorAckermanization typerule BITVECTOR_EXTRACT_OP ::CVC4::theory::bv::BitVectorExtractOpTypeRule typerule BITVECTOR_EXTRACT ::CVC4::theory::bv::BitVectorExtractTypeRule typerule BITVECTOR_BITOF ::CVC4::theory::bv::BitVectorBitOfTypeRule -typerule BITVECTOR_CONCAT ::CVC4::theory::bv::BitVectorConcatRule +typerule BITVECTOR_CONCAT ::CVC4::theory::bv::BitVectorConcatTypeRule typerule BITVECTOR_REPEAT ::CVC4::theory::bv::BitVectorRepeatTypeRule typerule BITVECTOR_ZERO_EXTEND ::CVC4::theory::bv::BitVectorExtendTypeRule typerule BITVECTOR_SIGN_EXTEND ::CVC4::theory::bv::BitVectorExtendTypeRule diff --git a/src/theory/bv/theory_bv_type_rules.h b/src/theory/bv/theory_bv_type_rules.h index c1829ce69..d7e22c32c 100644 --- a/src/theory/bv/theory_bv_type_rules.h +++ b/src/theory/bv/theory_bv_type_rules.h @@ -5,13 +5,13 @@ ** Major contributors: Liana Hadarean, Christopher L. Conway, Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** - ** \brief Bitvector theory. + ** \brief Bitvector theory typing rules ** - ** Bitvector theory. + ** Bitvector theory typing rules. **/ #include "cvc4_private.h" @@ -36,18 +36,17 @@ public: } return nodeManager->mkBitVectorType(n.getConst().getSize()); } -}; - +};/* class BitVectorConstantTypeRule */ class BitVectorBitOfTypeRule { public: inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check) throw (TypeCheckingExceptionPrivate) { - + if(check) { BitVectorBitOf info = n.getOperator().getConst(); TypeNode t = n[0].getType(check); - + if (!t.isBitVector()) { throw TypeCheckingExceptionPrivate(n, "expecting bit-vector term"); } @@ -55,12 +54,11 @@ public: throw TypeCheckingExceptionPrivate(n, "extract index is larger than the bitvector size"); } } - return nodeManager->booleanType(); + return nodeManager->booleanType(); } -}; - +};/* class BitVectorBitOfTypeRule */ -class BitVectorCompRule { +class BitVectorCompTypeRule { public: inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check) throw (TypeCheckingExceptionPrivate, AssertionException) { @@ -73,7 +71,7 @@ public: } return nodeManager->mkBitVectorType(1); } -}; +};/* class BitVectorCompTypeRule */ class BitVectorFixedWidthTypeRule { public: @@ -94,7 +92,7 @@ public: } return t; } -}; +};/* class BitVectorFixedWidthTypeRule */ class BitVectorPredicateTypeRule { public: @@ -112,7 +110,7 @@ public: } return nodeManager->booleanType(); } -}; +};/* class BitVectorPredicateTypeRule */ class BitVectorEagerAtomTypeRule { public: @@ -126,7 +124,7 @@ public: } return nodeManager->booleanType(); } -}; +};/* class BitVectorEagerAtomTypeRule */ class BitVectorAckermanizationUdivTypeRule { public: @@ -138,9 +136,9 @@ public: throw TypeCheckingExceptionPrivate(n, "expecting bit-vector term"); } } - return lhsType; + return lhsType; } -}; +};/* class BitVectorAckermanizationUdivTypeRule */ class BitVectorAckermanizationUremTypeRule { public: @@ -152,10 +150,9 @@ public: throw TypeCheckingExceptionPrivate(n, "expecting bit-vector term"); } } - return lhsType; + return lhsType; } -}; - +};/* class BitVectorAckermanizationUremTypeRule */ class BitVectorExtractTypeRule { public: @@ -181,7 +178,7 @@ public: } return nodeManager->mkBitVectorType(extractInfo.high - extractInfo.low + 1); } -}; +};/* class BitVectorExtractTypeRule */ class BitVectorExtractOpTypeRule { public: @@ -190,9 +187,9 @@ public: Assert(n.getKind() == kind::BITVECTOR_EXTRACT_OP); return nodeManager->builtinOperatorType(); } -}; +};/* class BitVectorExtractOpTypeRule */ -class BitVectorConcatRule { +class BitVectorConcatTypeRule { public: inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check) throw (TypeCheckingExceptionPrivate, AssertionException) { @@ -211,7 +208,7 @@ public: } return nodeManager->mkBitVectorType(size); } -}; +};/* class BitVectorConcatTypeRule */ class BitVectorRepeatTypeRule { public: @@ -227,7 +224,7 @@ public: unsigned repeatAmount = n.getOperator().getConst(); return nodeManager->mkBitVectorType(repeatAmount * t.getBitVectorSize()); } -}; +};/* class BitVectorRepeatTypeRule */ class BitVectorExtendTypeRule { public: @@ -245,7 +242,7 @@ public: (unsigned) n.getOperator().getConst(); return nodeManager->mkBitVectorType(extendAmount + t.getBitVectorSize()); } -}; +};/* class BitVectorExtendTypeRule */ class BitVectorConversionTypeRule { public: @@ -268,7 +265,7 @@ public: InternalError("bv-conversion typerule invoked for non-bv-conversion kind"); } -}; +};/* class BitVectorConversionTypeRule */ class CardinalityComputer { public: -- cgit v1.2.3 From f37411e40673b07e8fe7d20ed9b6c5be98f3b8ae Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Fri, 20 Jun 2014 22:25:21 -0400 Subject: Implement RecordProperties::mkGroundTerm(). Resolves bug #546. --- src/theory/datatypes/theory_datatypes_type_rules.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/theory') diff --git a/src/theory/datatypes/theory_datatypes_type_rules.h b/src/theory/datatypes/theory_datatypes_type_rules.h index 09d43b3bc..4d0acccc8 100644 --- a/src/theory/datatypes/theory_datatypes_type_rules.h +++ b/src/theory/datatypes/theory_datatypes_type_rules.h @@ -477,7 +477,18 @@ struct RecordUpdateTypeRule { struct RecordProperties { inline static Node mkGroundTerm(TypeNode type) { - Unimplemented(); + Assert(type.getKind() == kind::RECORD_TYPE); + + const Record& rec = type.getRecord(); + std::vector children; + for(Record::iterator i = rec.begin(), + i_end = rec.end(); + i != i_end; + ++i) { + children.push_back((*i).second.mkGroundTerm()); + } + + return NodeManager::currentNM()->mkNode(NodeManager::currentNM()->mkConst(rec), children); } inline static bool computeIsConst(NodeManager* nodeManager, TNode n) { -- cgit v1.2.3 From 7b8c765e84987ae90226f9f7244492318fa85817 Mon Sep 17 00:00:00 2001 From: lianah Date: Sat, 21 Jun 2014 17:45:31 -0400 Subject: fixed build failure --- src/Makefile.am | 6 +- src/theory/bv/aig_bitblaster.cpp | 653 +++++++++++++++++++++++++++++++ src/theory/bv/aig_bitblaster.h | 658 -------------------------------- src/theory/bv/bitblaster_template.h | 10 + src/theory/bv/bv_eager_solver.cpp | 3 +- src/theory/bv/bv_subtheory_bitblast.cpp | 3 +- src/theory/bv/eager_bitblaster.cpp | 208 ++++++++++ src/theory/bv/eager_bitblaster.h | 230 ----------- src/theory/bv/lazy_bitblaster.cpp | 495 ++++++++++++++++++++++++ src/theory/bv/lazy_bitblaster.h | 505 ------------------------ test/unit/theory/theory_bv_white.h | 2 +- 11 files changed, 1373 insertions(+), 1400 deletions(-) create mode 100644 src/theory/bv/aig_bitblaster.cpp delete mode 100644 src/theory/bv/aig_bitblaster.h create mode 100644 src/theory/bv/eager_bitblaster.cpp delete mode 100644 src/theory/bv/eager_bitblaster.h create mode 100644 src/theory/bv/lazy_bitblaster.cpp delete mode 100644 src/theory/bv/lazy_bitblaster.h (limited to 'src/theory') diff --git a/src/Makefile.am b/src/Makefile.am index fb7994699..805ed6cb7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -188,9 +188,9 @@ libcvc4_la_SOURCES = \ theory/bv/bv_inequality_graph.cpp \ theory/bv/bitblast_strategies_template.h \ theory/bv/bitblaster_template.h \ - theory/bv/lazy_bitblaster.h \ - theory/bv/eager_bitblaster.h \ - theory/bv/aig_bitblaster.h \ + theory/bv/lazy_bitblaster.cpp \ + theory/bv/eager_bitblaster.cpp \ + theory/bv/aig_bitblaster.cpp \ theory/bv/bv_eager_solver.h \ theory/bv/bv_eager_solver.cpp \ theory/bv/slicer.h \ diff --git a/src/theory/bv/aig_bitblaster.cpp b/src/theory/bv/aig_bitblaster.cpp new file mode 100644 index 000000000..70d69a138 --- /dev/null +++ b/src/theory/bv/aig_bitblaster.cpp @@ -0,0 +1,653 @@ +/********************* */ +/*! \file aig_bitblaster.cpp + ** \verbatim + ** Original author: Liana Hadarean + ** Major contributors: none + ** Minor contributors (to current version): lianah + ** This file is part of the CVC4 project. + ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** See the file COPYING in the top-level source directory for licensing + ** information.\endverbatim + ** + ** \brief + ** + ** Bitblaster for the lazy bv solver. + **/ + +#include "cvc4_private.h" +#include "bitblaster_template.h" +#include "prop/cnf_stream.h" +#include "prop/sat_solver_factory.h" +#include "theory/bv/options.h" + + +#ifdef CVC4_USE_ABC +// Function is defined as static in ABC. Not sure how else to do this. +static inline int Cnf_Lit2Var( int Lit ) { return (Lit & 1)? -(Lit >> 1)-1 : (Lit >> 1)+1; } + +extern "C" { +extern Aig_Man_t * Abc_NtkToDar( Abc_Ntk_t * pNtk, int fExors, int fRegisters ); +} + + +namespace CVC4 { +namespace theory { +namespace bv { + +template <> inline +std::string toString (const std::vector& bits) { + Unreachable("Don't know how to print AIG"); +} + + +template <> inline +Abc_Obj_t* mkTrue() { + return Abc_AigConst1(AigBitblaster::currentAigNtk()); +} + +template <> inline +Abc_Obj_t* mkFalse() { + return Abc_ObjNot(mkTrue()); +} + +template <> inline +Abc_Obj_t* mkNot(Abc_Obj_t* a) { + return Abc_ObjNot(a); +} + +template <> inline +Abc_Obj_t* mkOr(Abc_Obj_t* a, Abc_Obj_t* b) { + return Abc_AigOr(AigBitblaster::currentAigM(), a, b); +} + +template <> inline +Abc_Obj_t* mkOr(const std::vector& children) { + Assert (children.size()); + if (children.size() == 1) + return children[0]; + + Abc_Obj_t* result = children[0]; + for (unsigned i = 1; i < children.size(); ++i) { + result = Abc_AigOr(AigBitblaster::currentAigM(), result, children[i]); + } + return result; +} + + +template <> inline +Abc_Obj_t* mkAnd(Abc_Obj_t* a, Abc_Obj_t* b) { + return Abc_AigAnd(AigBitblaster::currentAigM(), a, b); +} + +template <> inline +Abc_Obj_t* mkAnd(const std::vector& children) { + Assert (children.size()); + if (children.size() == 1) + return children[0]; + + Abc_Obj_t* result = children[0]; + for (unsigned i = 1; i < children.size(); ++i) { + result = Abc_AigAnd(AigBitblaster::currentAigM(), result, children[i]); + } + return result; +} + +template <> inline +Abc_Obj_t* mkXor(Abc_Obj_t* a, Abc_Obj_t* b) { + return Abc_AigXor(AigBitblaster::currentAigM(), a, b); +} + +template <> inline +Abc_Obj_t* mkIff(Abc_Obj_t* a, Abc_Obj_t* b) { + return mkNot(mkXor(a, b)); +} + +template <> inline +Abc_Obj_t* mkIte(Abc_Obj_t* cond, Abc_Obj_t* a, Abc_Obj_t* b) { + return Abc_AigMux(AigBitblaster::currentAigM(), cond, a, b); +} + +} /* CVC4::theory::bv */ +} /* CVC4::theory */ +} /* CVC4 */ + +using namespace CVC4; +using namespace CVC4::theory; +using namespace CVC4::theory::bv; + + +Abc_Ntk_t* AigBitblaster::abcAigNetwork = NULL; + +Abc_Ntk_t* AigBitblaster::currentAigNtk() { + if (!AigBitblaster::abcAigNetwork) { + Abc_Start(); + abcAigNetwork = Abc_NtkAlloc( ABC_NTK_STRASH, ABC_FUNC_AIG, 1); + char pName[] = "CVC4::theory::bv::AigNetwork"; + abcAigNetwork->pName = Extra_UtilStrsav(pName); + } + + return abcAigNetwork; +} + + +Abc_Aig_t* AigBitblaster::currentAigM() { + return (Abc_Aig_t*)(currentAigNtk()->pManFunc); +} + +AigBitblaster::AigBitblaster() + : TBitblaster() + , d_aigCache() + , d_bbAtoms() + , d_aigOutputNode(NULL) +{ + d_nullContext = new context::Context(); + d_satSolver = prop::SatSolverFactory::createMinisat(d_nullContext, "AigBitblaster"); + MinisatEmptyNotify* notify = new MinisatEmptyNotify(); + d_satSolver->setNotify(notify); +} + +AigBitblaster::~AigBitblaster() { + Assert (abcAigNetwork == NULL); + delete d_nullContext; +} + +Abc_Obj_t* AigBitblaster::bbFormula(TNode node) { + Assert (node.getType().isBoolean()); + Debug("bitvector-bitblast") << "AigBitblaster::bbFormula "<< node << "\n"; + + if (hasAig(node)) + return getAig(node); + + Abc_Obj_t* result = NULL; + + Debug("bitvector-aig") << "AigBitblaster::convertToAig " << node <<"\n"; + switch (node.getKind()) { + case kind::AND: + { + result = bbFormula(node[0]); + for (unsigned i = 1; i < node.getNumChildren(); ++i) { + Abc_Obj_t* child = bbFormula(node[i]); + result = mkAnd(result, child); + } + break; + } + case kind::OR: + { + result = bbFormula(node[0]); + for (unsigned i = 1; i < node.getNumChildren(); ++i) { + Abc_Obj_t* child = bbFormula(node[i]); + result = mkOr(result, child); + } + break; + } + case kind::IFF: + { + Assert (node.getNumChildren() == 2); + Abc_Obj_t* child1 = bbFormula(node[0]); + Abc_Obj_t* child2 = bbFormula(node[1]); + + result = mkIff(child1, child2); + break; + } + case kind::XOR: + { + result = bbFormula(node[0]); + for (unsigned i = 1; i < node.getNumChildren(); ++i) { + Abc_Obj_t* child = bbFormula(node[i]); + result = mkXor(result, child); + } + break; + } + case kind::IMPLIES: + { + Assert (node.getNumChildren() == 2); + Abc_Obj_t* child1 = bbFormula(node[0]); + Abc_Obj_t* child2 = bbFormula(node[1]); + + result = mkOr(mkNot(child1), child2); + break; + } + case kind::ITE: + { + Assert (node.getNumChildren() == 3); + Abc_Obj_t* a = bbFormula(node[0]); + Abc_Obj_t* b = bbFormula(node[1]); + Abc_Obj_t* c = bbFormula(node[2]); + result = mkIte(a, b, c); + break; + } + case kind::NOT: + { + Abc_Obj_t* child1 = bbFormula(node[0]); + result = mkNot(child1); + break; + } + case kind::CONST_BOOLEAN: + { + result = node.getConst() ? mkTrue() : mkFalse(); + break; + } + case kind::VARIABLE: + case kind::SKOLEM: + { + result = mkInput(node); + break; + } + default: + bbAtom(node); + result = getBBAtom(node); + } + + cacheAig(node, result); + Debug("bitvector-aig") << "AigBitblaster::bbFormula done " << node << " => " << result <<"\n"; + return result; +} + +void AigBitblaster::bbAtom(TNode node) { + if (hasBBAtom(node)) { + return; + } + + Debug("bitvector-bitblast") << "Bitblasting atom " << node <<"\n"; + + // the bitblasted definition of the atom + Node normalized = Rewriter::rewrite(node); + Abc_Obj_t* atom_bb = (d_atomBBStrategies[normalized.getKind()])(normalized, this); + storeBBAtom(node, atom_bb); + Debug("bitvector-bitblast") << "Done bitblasting atom " << node <<"\n"; +} + +void AigBitblaster::bbTerm(TNode node, Bits& bits) { + if (hasBBTerm(node)) { + getBBTerm(node, bits); + return; + } + + Debug("bitvector-bitblast") << "Bitblasting term " << node <<"\n"; + d_termBBStrategies[node.getKind()] (node, bits, this); + + Assert (bits.size() == utils::getSize(node)); + storeBBTerm(node, bits); +} + + +void AigBitblaster::cacheAig(TNode node, Abc_Obj_t* aig) { + Assert (!hasAig(node)); + d_aigCache.insert(std::make_pair(node, aig)); +} +bool AigBitblaster::hasAig(TNode node) { + return d_aigCache.find(node) != d_aigCache.end(); +} +Abc_Obj_t* AigBitblaster::getAig(TNode node) { + Assert(hasAig(node)); + Debug("bitvector-aig") << "AigSimplifer::getAig " << node << " => " << d_aigCache.find(node)->second <<"\n"; + return d_aigCache.find(node)->second; +} + +void AigBitblaster::makeVariable(TNode node, Bits& bits) { + + for (unsigned i = 0; i < utils::getSize(node); ++i) { + Node bit = utils::mkBitOf(node, i); + Abc_Obj_t* input = mkInput(bit); + cacheAig(bit, input); + bits.push_back(input); + } +} + +Abc_Obj_t* AigBitblaster::mkInput(TNode input) { + Assert (!hasInput(input)); + Assert(input.getKind() == kind::BITVECTOR_BITOF || + (input.getType().isBoolean() && + (input.getKind() == kind::VARIABLE || + input.getKind() == kind::SKOLEM))); + Abc_Obj_t* aig_input = Abc_NtkCreatePi(currentAigNtk()); + // d_aigCache.insert(std::make_pair(input, aig_input)); + d_nodeToAigInput.insert(std::make_pair(input, aig_input)); + Debug("bitvector-aig") << "AigSimplifer::mkInput " << input << " " << aig_input <<"\n"; + return aig_input; +} + +bool AigBitblaster::hasInput(TNode input) { + return d_nodeToAigInput.find(input) != d_nodeToAigInput.end(); +} + +bool AigBitblaster::solve(TNode node) { + // setting output of network to be the query + Assert (d_aigOutputNode == NULL); + Abc_Obj_t* query = bbFormula(node); + d_aigOutputNode = Abc_NtkCreatePo(currentAigNtk()); + Abc_ObjAddFanin(d_aigOutputNode, query); + + simplifyAig(); + convertToCnfAndAssert(); + // no need to use abc anymore + + TimerStat::CodeTimer solveTimer(d_statistics.d_solveTime); + prop::SatValue result = d_satSolver->solve(); + + Assert (result != prop::SAT_VALUE_UNKNOWN); + return result == prop::SAT_VALUE_TRUE; +} + + +void addAliases(Abc_Frame_t* pAbc); + +void AigBitblaster::simplifyAig() { + TimerStat::CodeTimer simpTimer(d_statistics.d_simplificationTime); + + Abc_AigCleanup(currentAigM()); + Assert (Abc_NtkCheck(currentAigNtk())); + + const char* command = options::bitvectorAigSimplifications().c_str(); + Abc_Frame_t* pAbc = Abc_FrameGetGlobalFrame(); + Abc_FrameSetCurrentNetwork(pAbc, currentAigNtk()); + + addAliases(pAbc); + if ( Cmd_CommandExecute( pAbc, command ) ) { + fprintf( stdout, "Cannot execute command \"%s\".\n", command ); + exit(-1); + } + abcAigNetwork = Abc_FrameReadNtk(pAbc); +} + + +void AigBitblaster::convertToCnfAndAssert() { + TimerStat::CodeTimer cnfConversionTimer(d_statistics.d_cnfConversionTime); + + Aig_Man_t * pMan = NULL; + Cnf_Dat_t * pCnf = NULL; + assert( Abc_NtkIsStrash(currentAigNtk()) ); + + // convert to the AIG manager + pMan = Abc_NtkToDar(currentAigNtk(), 0, 0 ); + Abc_Stop(); + + // // free old network + // Abc_NtkDelete(currentAigNtk()); + // abcAigNetwork = NULL; + + Assert (pMan != NULL); + Assert (Aig_ManCheck(pMan)); + pCnf = Cnf_DeriveFast( pMan, 0 ); + + assertToSatSolver(pCnf); + + Cnf_DataFree( pCnf ); + Cnf_ManFree(); + Aig_ManStop(pMan); +} + +void AigBitblaster::assertToSatSolver(Cnf_Dat_t* pCnf) { + unsigned numVariables = pCnf->nVars; + unsigned numClauses = pCnf->nClauses; + + d_statistics.d_numVariables += numVariables; + d_statistics.d_numClauses += numClauses; + + // create variables in the sat solver + std::vector sat_variables; + for (unsigned i = 0; i < numVariables; ++i) { + sat_variables.push_back(d_satSolver->newVar(false, false, false)); + } + + // construct clauses and add to sat solver + int * pLit, * pStop; + for (unsigned i = 0; i < numClauses; i++ ) { + prop::SatClause clause; + for (pLit = pCnf->pClauses[i], pStop = pCnf->pClauses[i+1]; pLit < pStop; pLit++ ) { + int int_lit = Cnf_Lit2Var(*pLit); + Assert (int_lit != 0); + unsigned index = int_lit < 0? -int_lit : int_lit; + Assert (index - 1 < sat_variables.size()); + prop::SatLiteral lit(sat_variables[index-1], int_lit < 0); + clause.push_back(lit); + } + d_satSolver->addClause(clause, false); + } +} + +void addAliases(Abc_Frame_t* pAbc) { + std::vector aliases; + aliases.push_back("alias b balance"); + aliases.push_back("alias rw rewrite"); + aliases.push_back("alias rwz rewrite -z"); + aliases.push_back("alias rf refactor"); + aliases.push_back("alias rfz refactor -z"); + aliases.push_back("alias re restructure"); + aliases.push_back("alias rez restructure -z"); + aliases.push_back("alias rs resub"); + aliases.push_back("alias rsz resub -z"); + aliases.push_back("alias rsk6 rs -K 6"); + aliases.push_back("alias rszk5 rsz -K 5"); + aliases.push_back("alias bl b -l"); + aliases.push_back("alias rwl rw -l"); + aliases.push_back("alias rwzl rwz -l"); + aliases.push_back("alias rwzl rwz -l"); + aliases.push_back("alias rfl rf -l"); + aliases.push_back("alias rfzl rfz -l"); + aliases.push_back("alias brw \"b; rw\""); + + for (unsigned i = 0; i < aliases.size(); ++i) { + if ( Cmd_CommandExecute( pAbc, aliases[i].c_str() ) ) { + fprintf( stdout, "Cannot execute command \"%s\".\n", aliases[i].c_str() ); + exit(-1); + } + } +} + +bool AigBitblaster::hasBBAtom(TNode atom) const { + return d_bbAtoms.find(atom) != d_bbAtoms.end(); +} + +void AigBitblaster::storeBBAtom(TNode atom, Abc_Obj_t* atom_bb) { + d_bbAtoms.insert(std::make_pair(atom, atom_bb)); +} + +Abc_Obj_t* AigBitblaster::getBBAtom(TNode atom) const { + Assert (hasBBAtom(atom)); + return d_bbAtoms.find(atom)->second; +} + +AigBitblaster::Statistics::Statistics() + : d_numClauses("theory::bv::AigBitblaster::numClauses", 0) + , d_numVariables("theory::bv::AigBitblaster::numVariables", 0) + , d_simplificationTime("theory::bv::AigBitblaster::simplificationTime") + , d_cnfConversionTime("theory::bv::AigBitblaster::cnfConversionTime") + , d_solveTime("theory::bv::AigBitblaster::solveTime") +{ + StatisticsRegistry::registerStat(&d_numClauses); + StatisticsRegistry::registerStat(&d_numVariables); + StatisticsRegistry::registerStat(&d_simplificationTime); + StatisticsRegistry::registerStat(&d_cnfConversionTime); + StatisticsRegistry::registerStat(&d_solveTime); +} + +AigBitblaster::Statistics::~Statistics() { + StatisticsRegistry::unregisterStat(&d_numClauses); + StatisticsRegistry::unregisterStat(&d_numVariables); + StatisticsRegistry::unregisterStat(&d_simplificationTime); + StatisticsRegistry::unregisterStat(&d_cnfConversionTime); + StatisticsRegistry::unregisterStat(&d_solveTime); +} + +#else // CVC4_USE_ABC + +namespace CVC4 { +namespace theory { +namespace bv { + +template <> inline +std::string toString (const std::vector& bits) { + Unreachable("Don't know how to print AIG"); +} + + +template <> inline +Abc_Obj_t* mkTrue() { + Unreachable(); + return NULL; +} + +template <> inline +Abc_Obj_t* mkFalse() { + Unreachable(); + return NULL; +} + +template <> inline +Abc_Obj_t* mkNot(Abc_Obj_t* a) { + Unreachable(); + return NULL; +} + +template <> inline +Abc_Obj_t* mkOr(Abc_Obj_t* a, Abc_Obj_t* b) { + Unreachable(); + return NULL; +} + +template <> inline +Abc_Obj_t* mkOr(const std::vector& children) { + Unreachable(); + return NULL; +} + + +template <> inline +Abc_Obj_t* mkAnd(Abc_Obj_t* a, Abc_Obj_t* b) { + Unreachable(); + return NULL; +} + +template <> inline +Abc_Obj_t* mkAnd(const std::vector& children) { + Unreachable(); + return NULL; +} + +template <> inline +Abc_Obj_t* mkXor(Abc_Obj_t* a, Abc_Obj_t* b) { + Unreachable(); + return NULL; +} + +template <> inline +Abc_Obj_t* mkIff(Abc_Obj_t* a, Abc_Obj_t* b) { + Unreachable(); + return NULL; +} + +template <> inline +Abc_Obj_t* mkIte(Abc_Obj_t* cond, Abc_Obj_t* a, Abc_Obj_t* b) { + Unreachable(); + return NULL; +} + +} /* CVC4::theory::bv */ +} /* CVC4::theory */ +} /* CVC4 */ + +using namespace CVC4; +using namespace CVC4::theory; +using namespace CVC4::theory::bv; + +Abc_Ntk_t* AigBitblaster::abcAigNetwork = NULL; + +Abc_Ntk_t* AigBitblaster::currentAigNtk() { + Unreachable(); + return NULL; +} + + +Abc_Aig_t* AigBitblaster::currentAigM() { + Unreachable(); + return NULL; +} + +AigBitblaster::~AigBitblaster() { + Unreachable(); +} + +Abc_Obj_t* AigBitblaster::bbFormula(TNode node) { + Unreachable(); + return NULL; +} + +void AigBitblaster::bbAtom(TNode node) { + Unreachable(); +} + +void AigBitblaster::bbTerm(TNode node, Bits& bits) { + Unreachable(); +} + + +void AigBitblaster::cacheAig(TNode node, Abc_Obj_t* aig) { + Unreachable(); +} +bool AigBitblaster::hasAig(TNode node) { + Unreachable(); + return false; +} +Abc_Obj_t* AigBitblaster::getAig(TNode node) { + Unreachable(); + return NULL; +} + +void AigBitblaster::makeVariable(TNode node, Bits& bits) { + Unreachable(); +} + +Abc_Obj_t* AigBitblaster::mkInput(TNode input) { + Unreachable(); + return NULL; +} + +bool AigBitblaster::hasInput(TNode input) { + Unreachable(); + return false; +} + +bool AigBitblaster::solve(TNode node) { + Unreachable(); + return false; +} +void AigBitblaster::simplifyAig() { + Unreachable(); +} + +void AigBitblaster::convertToCnfAndAssert() { + Unreachable(); +} + +void AigBitblaster::assertToSatSolver(Cnf_Dat_t* pCnf) { + Unreachable(); +} +bool AigBitblaster::hasBBAtom(TNode atom) const { + Unreachable(); + return false; +} + +void AigBitblaster::storeBBAtom(TNode atom, Abc_Obj_t* atom_bb) { + Unreachable(); +} + +Abc_Obj_t* AigBitblaster::getBBAtom(TNode atom) const { + Unreachable(); + return NULL; +} + +AigBitblaster::Statistics::Statistics() + : d_numClauses("theory::bv::AigBitblaster::numClauses", 0) + , d_numVariables("theory::bv::AigBitblaster::numVariables", 0) + , d_simplificationTime("theory::bv::AigBitblaster::simplificationTime") + , d_cnfConversionTime("theory::bv::AigBitblaster::cnfConversionTime") + , d_solveTime("theory::bv::AigBitblaster::solveTime") +{} + +AigBitblaster::Statistics::~Statistics() {} + +AigBitblaster::AigBitblaster() { + Unreachable(); +} +#endif // CVC4_USE_ABC diff --git a/src/theory/bv/aig_bitblaster.h b/src/theory/bv/aig_bitblaster.h deleted file mode 100644 index d1635f950..000000000 --- a/src/theory/bv/aig_bitblaster.h +++ /dev/null @@ -1,658 +0,0 @@ -/********************* */ -/*! \file aig_bitblaster.h - ** \verbatim - ** Original author: Liana Hadarean - ** Major contributors: none - ** Minor contributors (to current version): lianah - ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa - ** See the file COPYING in the top-level source directory for licensing - ** information.\endverbatim - ** - ** \brief - ** - ** Bitblaster for the lazy bv solver. - **/ - -#include "cvc4_private.h" - -#ifndef __CVC4__AIG__BITBLASTER_H -#define __CVC4__AIG__BITBLASTER_H - - -#include "bitblaster_template.h" -#include "prop/cnf_stream.h" -#include "prop/sat_solver_factory.h" -#include "theory/bv/options.h" - - -#ifdef CVC4_USE_ABC -// Function is defined as static in ABC. Not sure how else to do this. -static inline int Cnf_Lit2Var( int Lit ) { return (Lit & 1)? -(Lit >> 1)-1 : (Lit >> 1)+1; } - -extern "C" { -extern Aig_Man_t * Abc_NtkToDar( Abc_Ntk_t * pNtk, int fExors, int fRegisters ); -} - - -namespace CVC4 { -namespace theory { -namespace bv { - -template <> inline -std::string toString (const std::vector& bits) { - Unreachable("Don't know how to print AIG"); -} - - -template <> inline -Abc_Obj_t* mkTrue() { - return Abc_AigConst1(AigBitblaster::currentAigNtk()); -} - -template <> inline -Abc_Obj_t* mkFalse() { - return Abc_ObjNot(mkTrue()); -} - -template <> inline -Abc_Obj_t* mkNot(Abc_Obj_t* a) { - return Abc_ObjNot(a); -} - -template <> inline -Abc_Obj_t* mkOr(Abc_Obj_t* a, Abc_Obj_t* b) { - return Abc_AigOr(AigBitblaster::currentAigM(), a, b); -} - -template <> inline -Abc_Obj_t* mkOr(const std::vector& children) { - Assert (children.size()); - if (children.size() == 1) - return children[0]; - - Abc_Obj_t* result = children[0]; - for (unsigned i = 1; i < children.size(); ++i) { - result = Abc_AigOr(AigBitblaster::currentAigM(), result, children[i]); - } - return result; -} - - -template <> inline -Abc_Obj_t* mkAnd(Abc_Obj_t* a, Abc_Obj_t* b) { - return Abc_AigAnd(AigBitblaster::currentAigM(), a, b); -} - -template <> inline -Abc_Obj_t* mkAnd(const std::vector& children) { - Assert (children.size()); - if (children.size() == 1) - return children[0]; - - Abc_Obj_t* result = children[0]; - for (unsigned i = 1; i < children.size(); ++i) { - result = Abc_AigAnd(AigBitblaster::currentAigM(), result, children[i]); - } - return result; -} - -template <> inline -Abc_Obj_t* mkXor(Abc_Obj_t* a, Abc_Obj_t* b) { - return Abc_AigXor(AigBitblaster::currentAigM(), a, b); -} - -template <> inline -Abc_Obj_t* mkIff(Abc_Obj_t* a, Abc_Obj_t* b) { - return mkNot(mkXor(a, b)); -} - -template <> inline -Abc_Obj_t* mkIte(Abc_Obj_t* cond, Abc_Obj_t* a, Abc_Obj_t* b) { - return Abc_AigMux(AigBitblaster::currentAigM(), cond, a, b); -} - - -Abc_Ntk_t* AigBitblaster::abcAigNetwork = NULL; - -Abc_Ntk_t* AigBitblaster::currentAigNtk() { - if (!AigBitblaster::abcAigNetwork) { - Abc_Start(); - abcAigNetwork = Abc_NtkAlloc( ABC_NTK_STRASH, ABC_FUNC_AIG, 1); - char pName[] = "CVC4::theory::bv::AigNetwork"; - abcAigNetwork->pName = Extra_UtilStrsav(pName); - } - - return abcAigNetwork; -} - - -Abc_Aig_t* AigBitblaster::currentAigM() { - return (Abc_Aig_t*)(currentAigNtk()->pManFunc); -} - -AigBitblaster::AigBitblaster() - : TBitblaster() - , d_aigCache() - , d_bbAtoms() - , d_aigOutputNode(NULL) -{ - d_nullContext = new context::Context(); - d_satSolver = prop::SatSolverFactory::createMinisat(d_nullContext, "AigBitblaster"); - MinisatEmptyNotify* notify = new MinisatEmptyNotify(); - d_satSolver->setNotify(notify); -} - -AigBitblaster::~AigBitblaster() { - Assert (abcAigNetwork == NULL); - delete d_nullContext; -} - -Abc_Obj_t* AigBitblaster::bbFormula(TNode node) { - Assert (node.getType().isBoolean()); - Debug("bitvector-bitblast") << "AigBitblaster::bbFormula "<< node << "\n"; - - if (hasAig(node)) - return getAig(node); - - Abc_Obj_t* result = NULL; - - Debug("bitvector-aig") << "AigBitblaster::convertToAig " << node <<"\n"; - switch (node.getKind()) { - case kind::AND: - { - result = bbFormula(node[0]); - for (unsigned i = 1; i < node.getNumChildren(); ++i) { - Abc_Obj_t* child = bbFormula(node[i]); - result = mkAnd(result, child); - } - break; - } - case kind::OR: - { - result = bbFormula(node[0]); - for (unsigned i = 1; i < node.getNumChildren(); ++i) { - Abc_Obj_t* child = bbFormula(node[i]); - result = mkOr(result, child); - } - break; - } - case kind::IFF: - { - Assert (node.getNumChildren() == 2); - Abc_Obj_t* child1 = bbFormula(node[0]); - Abc_Obj_t* child2 = bbFormula(node[1]); - - result = mkIff(child1, child2); - break; - } - case kind::XOR: - { - result = bbFormula(node[0]); - for (unsigned i = 1; i < node.getNumChildren(); ++i) { - Abc_Obj_t* child = bbFormula(node[i]); - result = mkXor(result, child); - } - break; - } - case kind::IMPLIES: - { - Assert (node.getNumChildren() == 2); - Abc_Obj_t* child1 = bbFormula(node[0]); - Abc_Obj_t* child2 = bbFormula(node[1]); - - result = mkOr(mkNot(child1), child2); - break; - } - case kind::ITE: - { - Assert (node.getNumChildren() == 3); - Abc_Obj_t* a = bbFormula(node[0]); - Abc_Obj_t* b = bbFormula(node[1]); - Abc_Obj_t* c = bbFormula(node[2]); - result = mkIte(a, b, c); - break; - } - case kind::NOT: - { - Abc_Obj_t* child1 = bbFormula(node[0]); - result = mkNot(child1); - break; - } - case kind::CONST_BOOLEAN: - { - result = node.getConst() ? mkTrue() : mkFalse(); - break; - } - case kind::VARIABLE: - case kind::SKOLEM: - { - result = mkInput(node); - break; - } - default: - bbAtom(node); - result = getBBAtom(node); - } - - cacheAig(node, result); - Debug("bitvector-aig") << "AigBitblaster::bbFormula done " << node << " => " << result <<"\n"; - return result; -} - -void AigBitblaster::bbAtom(TNode node) { - if (hasBBAtom(node)) { - return; - } - - Debug("bitvector-bitblast") << "Bitblasting atom " << node <<"\n"; - - // the bitblasted definition of the atom - Node normalized = Rewriter::rewrite(node); - Abc_Obj_t* atom_bb = (d_atomBBStrategies[normalized.getKind()])(normalized, this); - storeBBAtom(node, atom_bb); - Debug("bitvector-bitblast") << "Done bitblasting atom " << node <<"\n"; -} - -void AigBitblaster::bbTerm(TNode node, Bits& bits) { - if (hasBBTerm(node)) { - getBBTerm(node, bits); - return; - } - - Debug("bitvector-bitblast") << "Bitblasting term " << node <<"\n"; - d_termBBStrategies[node.getKind()] (node, bits, this); - - Assert (bits.size() == utils::getSize(node)); - storeBBTerm(node, bits); -} - - -void AigBitblaster::cacheAig(TNode node, Abc_Obj_t* aig) { - Assert (!hasAig(node)); - d_aigCache.insert(std::make_pair(node, aig)); -} -bool AigBitblaster::hasAig(TNode node) { - return d_aigCache.find(node) != d_aigCache.end(); -} -Abc_Obj_t* AigBitblaster::getAig(TNode node) { - Assert(hasAig(node)); - Debug("bitvector-aig") << "AigSimplifer::getAig " << node << " => " << d_aigCache.find(node)->second <<"\n"; - return d_aigCache.find(node)->second; -} - -void AigBitblaster::makeVariable(TNode node, Bits& bits) { - - for (unsigned i = 0; i < utils::getSize(node); ++i) { - Node bit = utils::mkBitOf(node, i); - Abc_Obj_t* input = mkInput(bit); - cacheAig(bit, input); - bits.push_back(input); - } -} - -Abc_Obj_t* AigBitblaster::mkInput(TNode input) { - Assert (!hasInput(input)); - Assert(input.getKind() == kind::BITVECTOR_BITOF || - (input.getType().isBoolean() && - (input.getKind() == kind::VARIABLE || - input.getKind() == kind::SKOLEM))); - Abc_Obj_t* aig_input = Abc_NtkCreatePi(currentAigNtk()); - // d_aigCache.insert(std::make_pair(input, aig_input)); - d_nodeToAigInput.insert(std::make_pair(input, aig_input)); - Debug("bitvector-aig") << "AigSimplifer::mkInput " << input << " " << aig_input <<"\n"; - return aig_input; -} - -bool AigBitblaster::hasInput(TNode input) { - return d_nodeToAigInput.find(input) != d_nodeToAigInput.end(); -} - -bool AigBitblaster::solve(TNode node) { - // setting output of network to be the query - Assert (d_aigOutputNode == NULL); - Abc_Obj_t* query = bbFormula(node); - d_aigOutputNode = Abc_NtkCreatePo(currentAigNtk()); - Abc_ObjAddFanin(d_aigOutputNode, query); - - simplifyAig(); - convertToCnfAndAssert(); - // no need to use abc anymore - - TimerStat::CodeTimer solveTimer(d_statistics.d_solveTime); - prop::SatValue result = d_satSolver->solve(); - - Assert (result != prop::SAT_VALUE_UNKNOWN); - return result == prop::SAT_VALUE_TRUE; -} - - -void addAliases(Abc_Frame_t* pAbc); - -void AigBitblaster::simplifyAig() { - TimerStat::CodeTimer simpTimer(d_statistics.d_simplificationTime); - - Abc_AigCleanup(currentAigM()); - Assert (Abc_NtkCheck(currentAigNtk())); - - const char* command = options::bitvectorAigSimplifications().c_str(); - Abc_Frame_t* pAbc = Abc_FrameGetGlobalFrame(); - Abc_FrameSetCurrentNetwork(pAbc, currentAigNtk()); - - addAliases(pAbc); - if ( Cmd_CommandExecute( pAbc, command ) ) { - fprintf( stdout, "Cannot execute command \"%s\".\n", command ); - exit(-1); - } - abcAigNetwork = Abc_FrameReadNtk(pAbc); -} - - -void AigBitblaster::convertToCnfAndAssert() { - TimerStat::CodeTimer cnfConversionTimer(d_statistics.d_cnfConversionTime); - - Aig_Man_t * pMan = NULL; - Cnf_Dat_t * pCnf = NULL; - assert( Abc_NtkIsStrash(currentAigNtk()) ); - - // convert to the AIG manager - pMan = Abc_NtkToDar(currentAigNtk(), 0, 0 ); - Abc_Stop(); - - // // free old network - // Abc_NtkDelete(currentAigNtk()); - // abcAigNetwork = NULL; - - Assert (pMan != NULL); - Assert (Aig_ManCheck(pMan)); - pCnf = Cnf_DeriveFast( pMan, 0 ); - - assertToSatSolver(pCnf); - - Cnf_DataFree( pCnf ); - Cnf_ManFree(); - Aig_ManStop(pMan); -} - -void AigBitblaster::assertToSatSolver(Cnf_Dat_t* pCnf) { - unsigned numVariables = pCnf->nVars; - unsigned numClauses = pCnf->nClauses; - - d_statistics.d_numVariables += numVariables; - d_statistics.d_numClauses += numClauses; - - // create variables in the sat solver - std::vector sat_variables; - for (unsigned i = 0; i < numVariables; ++i) { - sat_variables.push_back(d_satSolver->newVar(false, false, false)); - } - - // construct clauses and add to sat solver - int * pLit, * pStop; - for (unsigned i = 0; i < numClauses; i++ ) { - prop::SatClause clause; - for (pLit = pCnf->pClauses[i], pStop = pCnf->pClauses[i+1]; pLit < pStop; pLit++ ) { - int int_lit = Cnf_Lit2Var(*pLit); - Assert (int_lit != 0); - unsigned index = int_lit < 0? -int_lit : int_lit; - Assert (index - 1 < sat_variables.size()); - prop::SatLiteral lit(sat_variables[index-1], int_lit < 0); - clause.push_back(lit); - } - d_satSolver->addClause(clause, false); - } -} - -void addAliases(Abc_Frame_t* pAbc) { - std::vector aliases; - aliases.push_back("alias b balance"); - aliases.push_back("alias rw rewrite"); - aliases.push_back("alias rwz rewrite -z"); - aliases.push_back("alias rf refactor"); - aliases.push_back("alias rfz refactor -z"); - aliases.push_back("alias re restructure"); - aliases.push_back("alias rez restructure -z"); - aliases.push_back("alias rs resub"); - aliases.push_back("alias rsz resub -z"); - aliases.push_back("alias rsk6 rs -K 6"); - aliases.push_back("alias rszk5 rsz -K 5"); - aliases.push_back("alias bl b -l"); - aliases.push_back("alias rwl rw -l"); - aliases.push_back("alias rwzl rwz -l"); - aliases.push_back("alias rwzl rwz -l"); - aliases.push_back("alias rfl rf -l"); - aliases.push_back("alias rfzl rfz -l"); - aliases.push_back("alias brw \"b; rw\""); - - for (unsigned i = 0; i < aliases.size(); ++i) { - if ( Cmd_CommandExecute( pAbc, aliases[i].c_str() ) ) { - fprintf( stdout, "Cannot execute command \"%s\".\n", aliases[i].c_str() ); - exit(-1); - } - } -} - -bool AigBitblaster::hasBBAtom(TNode atom) const { - return d_bbAtoms.find(atom) != d_bbAtoms.end(); -} - -void AigBitblaster::storeBBAtom(TNode atom, Abc_Obj_t* atom_bb) { - d_bbAtoms.insert(std::make_pair(atom, atom_bb)); -} - -Abc_Obj_t* AigBitblaster::getBBAtom(TNode atom) const { - Assert (hasBBAtom(atom)); - return d_bbAtoms.find(atom)->second; -} - -AigBitblaster::Statistics::Statistics() - : d_numClauses("theory::bv::AigBitblaster::numClauses", 0) - , d_numVariables("theory::bv::AigBitblaster::numVariables", 0) - , d_simplificationTime("theory::bv::AigBitblaster::simplificationTime") - , d_cnfConversionTime("theory::bv::AigBitblaster::cnfConversionTime") - , d_solveTime("theory::bv::AigBitblaster::solveTime") -{ - StatisticsRegistry::registerStat(&d_numClauses); - StatisticsRegistry::registerStat(&d_numVariables); - StatisticsRegistry::registerStat(&d_simplificationTime); - StatisticsRegistry::registerStat(&d_cnfConversionTime); - StatisticsRegistry::registerStat(&d_solveTime); -} - -AigBitblaster::Statistics::~Statistics() { - StatisticsRegistry::unregisterStat(&d_numClauses); - StatisticsRegistry::unregisterStat(&d_numVariables); - StatisticsRegistry::unregisterStat(&d_simplificationTime); - StatisticsRegistry::unregisterStat(&d_cnfConversionTime); - StatisticsRegistry::unregisterStat(&d_solveTime); -} - - - -} /*bv namespace */ -} /* theory namespace */ -} /* CVC4 namespace*/ - - -#else // CVC4_USE_ABC - -namespace CVC4 { -namespace theory { -namespace bv { - -template <> inline -std::string toString (const std::vector& bits) { - Unreachable("Don't know how to print AIG"); -} - - -template <> inline -Abc_Obj_t* mkTrue() { - Unreachable(); - return NULL; -} - -template <> inline -Abc_Obj_t* mkFalse() { - Unreachable(); - return NULL; -} - -template <> inline -Abc_Obj_t* mkNot(Abc_Obj_t* a) { - Unreachable(); - return NULL; -} - -template <> inline -Abc_Obj_t* mkOr(Abc_Obj_t* a, Abc_Obj_t* b) { - Unreachable(); - return NULL; -} - -template <> inline -Abc_Obj_t* mkOr(const std::vector& children) { - Unreachable(); - return NULL; -} - - -template <> inline -Abc_Obj_t* mkAnd(Abc_Obj_t* a, Abc_Obj_t* b) { - Unreachable(); - return NULL; -} - -template <> inline -Abc_Obj_t* mkAnd(const std::vector& children) { - Unreachable(); - return NULL; -} - -template <> inline -Abc_Obj_t* mkXor(Abc_Obj_t* a, Abc_Obj_t* b) { - Unreachable(); - return NULL; -} - -template <> inline -Abc_Obj_t* mkIff(Abc_Obj_t* a, Abc_Obj_t* b) { - Unreachable(); - return NULL; -} - -template <> inline -Abc_Obj_t* mkIte(Abc_Obj_t* cond, Abc_Obj_t* a, Abc_Obj_t* b) { - Unreachable(); - return NULL; -} - - -Abc_Ntk_t* AigBitblaster::abcAigNetwork = NULL; - -Abc_Ntk_t* AigBitblaster::currentAigNtk() { - Unreachable(); - return NULL; -} - - -Abc_Aig_t* AigBitblaster::currentAigM() { - Unreachable(); - return NULL; -} - -AigBitblaster::~AigBitblaster() { - Unreachable(); -} - -Abc_Obj_t* AigBitblaster::bbFormula(TNode node) { - Unreachable(); - return NULL; -} - -void AigBitblaster::bbAtom(TNode node) { - Unreachable(); -} - -void AigBitblaster::bbTerm(TNode node, Bits& bits) { - Unreachable(); -} - - -void AigBitblaster::cacheAig(TNode node, Abc_Obj_t* aig) { - Unreachable(); -} -bool AigBitblaster::hasAig(TNode node) { - Unreachable(); - return false; -} -Abc_Obj_t* AigBitblaster::getAig(TNode node) { - Unreachable(); - return NULL; -} - -void AigBitblaster::makeVariable(TNode node, Bits& bits) { - Unreachable(); -} - -Abc_Obj_t* AigBitblaster::mkInput(TNode input) { - Unreachable(); - return NULL; -} - -bool AigBitblaster::hasInput(TNode input) { - Unreachable(); - return false; -} - -bool AigBitblaster::solve(TNode node) { - Unreachable(); - return false; -} -void AigBitblaster::simplifyAig() { - Unreachable(); -} - -void AigBitblaster::convertToCnfAndAssert() { - Unreachable(); -} - -void AigBitblaster::assertToSatSolver(Cnf_Dat_t* pCnf) { - Unreachable(); -} -bool AigBitblaster::hasBBAtom(TNode atom) const { - Unreachable(); - return false; -} - -void AigBitblaster::storeBBAtom(TNode atom, Abc_Obj_t* atom_bb) { - Unreachable(); -} - -Abc_Obj_t* AigBitblaster::getBBAtom(TNode atom) const { - Unreachable(); - return NULL; -} - -AigBitblaster::Statistics::Statistics() - : d_numClauses("theory::bv::AigBitblaster::numClauses", 0) - , d_numVariables("theory::bv::AigBitblaster::numVariables", 0) - , d_simplificationTime("theory::bv::AigBitblaster::simplificationTime") - , d_cnfConversionTime("theory::bv::AigBitblaster::cnfConversionTime") - , d_solveTime("theory::bv::AigBitblaster::solveTime") -{} - -AigBitblaster::Statistics::~Statistics() {} - -AigBitblaster::AigBitblaster() { - Unreachable(); -} - -} // namespace bv -} // namespace theory -} // namespace CVC4 - - -#endif // CVC4_USE_ABC - -#endif // __CVC4__AIG__BITBLASTER_H diff --git a/src/theory/bv/bitblaster_template.h b/src/theory/bv/bitblaster_template.h index 4b0465498..2b6037a12 100644 --- a/src/theory/bv/bitblaster_template.h +++ b/src/theory/bv/bitblaster_template.h @@ -27,6 +27,7 @@ #include "bitblast_strategies_template.h" #include "prop/sat_solver.h" #include "theory/valuation.h" +#include "theory/theory_registrar.h" class Abc_Obj_t_; typedef Abc_Obj_t_ Abc_Obj_t; @@ -263,6 +264,15 @@ public: void collectModelInfo(TheoryModel* m, bool fullModel); }; +class BitblastingRegistrar: public prop::Registrar { + EagerBitblaster* d_bitblaster; +public: + BitblastingRegistrar(EagerBitblaster* bb) + : d_bitblaster(bb) + {} + void preRegister(Node n); +}; /* class Registrar */ + class AigBitblaster : public TBitblaster { typedef std::hash_map TNodeAigMap; typedef std::hash_map NodeAigMap; diff --git a/src/theory/bv/bv_eager_solver.cpp b/src/theory/bv/bv_eager_solver.cpp index 166d43e35..4e822d3c0 100644 --- a/src/theory/bv/bv_eager_solver.cpp +++ b/src/theory/bv/bv_eager_solver.cpp @@ -16,8 +16,7 @@ #include "theory/bv/bv_eager_solver.h" #include "theory/bv/bitblaster_template.h" -#include "theory/bv/eager_bitblaster.h" -#include "theory/bv/aig_bitblaster.h" +#include "theory/bv/options.h" using namespace std; using namespace CVC4; diff --git a/src/theory/bv/bv_subtheory_bitblast.cpp b/src/theory/bv/bv_subtheory_bitblast.cpp index ebe017ee1..ad5ff15b6 100644 --- a/src/theory/bv/bv_subtheory_bitblast.cpp +++ b/src/theory/bv/bv_subtheory_bitblast.cpp @@ -17,9 +17,10 @@ #include "theory/bv/bv_subtheory_bitblast.h" #include "theory/bv/theory_bv.h" #include "theory/bv/theory_bv_utils.h" -#include "theory/bv/lazy_bitblaster.h" +#include "theory/bv/bitblaster_template.h" #include "theory/bv/bv_quick_check.h" #include "theory/bv/options.h" +#include "theory/bv/abstraction.h" #include "theory/decision_attributes.h" #include "decision/options.h" diff --git a/src/theory/bv/eager_bitblaster.cpp b/src/theory/bv/eager_bitblaster.cpp new file mode 100644 index 000000000..5b52fc241 --- /dev/null +++ b/src/theory/bv/eager_bitblaster.cpp @@ -0,0 +1,208 @@ +/********************* */ +/*! \file eager_bitblaster.cpp + ** \verbatim + ** Original author: Liana Hadarean + ** Major contributors: none + ** Minor contributors (to current version): lianah + ** This file is part of the CVC4 project. + ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** See the file COPYING in the top-level source directory for licensing + ** information.\endverbatim + ** + ** \brief + ** + ** Bitblaster for the eager bv solver. + **/ + +#include "cvc4_private.h" + +#include "theory/bv/bitblaster_template.h" +#include "theory/bv/options.h" +#include "theory/theory_model.h" +#include "theory/bv/theory_bv.h" +#include "prop/cnf_stream.h" +#include "prop/sat_solver_factory.h" + + +using namespace CVC4; +using namespace CVC4::theory; +using namespace CVC4::theory::bv; + +void BitblastingRegistrar::preRegister(Node n) { + d_bitblaster->bbAtom(n); +}; + +EagerBitblaster::EagerBitblaster(TheoryBV* theory_bv) + : TBitblaster() + , d_bv(theory_bv) + , d_bbAtoms() + , d_variables() +{ + d_bitblastingRegistrar = new BitblastingRegistrar(this); + d_nullContext = new context::Context(); + + d_satSolver = prop::SatSolverFactory::createMinisat(d_nullContext, "EagerBitblaster"); + d_cnfStream = new prop::TseitinCnfStream(d_satSolver, d_bitblastingRegistrar, d_nullContext); + + MinisatEmptyNotify* notify = new MinisatEmptyNotify(); + d_satSolver->setNotify(notify); +} + +EagerBitblaster::~EagerBitblaster() { + delete d_cnfStream; + delete d_satSolver; + delete d_nullContext; + delete d_bitblastingRegistrar; +} + +void EagerBitblaster::bbFormula(TNode node) { + d_cnfStream->convertAndAssert(node, false, false); +} + +/** + * Bitblasts the atom, assigns it a marker literal, adding it to the SAT solver + * NOTE: duplicate clauses are not detected because of marker literal + * @param node the atom to be bitblasted + * + */ +void EagerBitblaster::bbAtom(TNode node) { + node = node.getKind() == kind::NOT? node[0] : node; + if (node.getKind() == kind::BITVECTOR_BITOF) + return; + if (hasBBAtom(node)) { + return; + } + + Debug("bitvector-bitblast") << "Bitblasting node " << node <<"\n"; + + // the bitblasted definition of the atom + Node normalized = Rewriter::rewrite(node); + Node atom_bb = normalized.getKind() != kind::CONST_BOOLEAN ? + Rewriter::rewrite(d_atomBBStrategies[normalized.getKind()](normalized, this)) : + normalized; + // asserting that the atom is true iff the definition holds + Node atom_definition = utils::mkNode(kind::IFF, node, atom_bb); + + AlwaysAssert (options::bitblastMode() == theory::bv::BITBLAST_MODE_EAGER); + storeBBAtom(node, atom_definition); + d_cnfStream->convertAndAssert(atom_definition, false, false); +} + +void EagerBitblaster::storeBBAtom(TNode atom, Node atom_bb) { + // no need to store the definition for the lazy bit-blaster + d_bbAtoms.insert(atom); +} + +bool EagerBitblaster::hasBBAtom(TNode atom) const { + return d_bbAtoms.find(atom) != d_bbAtoms.end(); +} + +void EagerBitblaster::bbTerm(TNode node, Bits& bits) { + if (hasBBTerm(node)) { + getBBTerm(node, bits); + return; + } + + Debug("bitvector-bitblast") << "Bitblasting node " << node <<"\n"; + + d_termBBStrategies[node.getKind()] (node, bits, this); + + Assert (bits.size() == utils::getSize(node)); + + storeBBTerm(node, bits); +} + +void EagerBitblaster::makeVariable(TNode var, Bits& bits) { + Assert(bits.size() == 0); + for (unsigned i = 0; i < utils::getSize(var); ++i) { + bits.push_back(utils::mkBitOf(var, i)); + } + d_variables.insert(var); +} + +Node EagerBitblaster::getBBAtom(TNode node) const { + return node; +} + + +/** + * Calls the solve method for the Sat Solver. + * + * @return true for sat, and false for unsat + */ + +bool EagerBitblaster::solve() { + if (Trace.isOn("bitvector")) { + Trace("bitvector") << "EagerBitblaster::solve(). \n"; + } + Debug("bitvector") << "EagerBitblaster::solve(). \n"; + // TODO: clear some memory + // if (something) { + // NodeManager* nm= NodeManager::currentNM(); + // Rewriter::garbageCollect(); + // nm->reclaimZombiesUntil(options::zombieHuntThreshold()); + // } + return prop::SAT_VALUE_TRUE == d_satSolver->solve(); +} + + +/** + * Returns the value a is currently assigned to in the SAT solver + * or null if the value is completely unassigned. + * + * @param a + * @param fullModel whether to create a "full model," i.e., add + * constants to equivalence classes that don't already have them + * + * @return + */ +Node EagerBitblaster::getVarValue(TNode a, bool fullModel) { + if (!hasBBTerm(a)) { + Assert(isSharedTerm(a)); + return Node(); + } + Bits bits; + getBBTerm(a, bits); + Integer value(0); + for (int i = bits.size() -1; i >= 0; --i) { + prop::SatValue bit_value; + if (d_cnfStream->hasLiteral(bits[i])) { + prop::SatLiteral bit = d_cnfStream->getLiteral(bits[i]); + bit_value = d_satSolver->value(bit); + Assert (bit_value != prop::SAT_VALUE_UNKNOWN); + } else { + // the bit is unconstrainted so we can give it an arbitrary value + bit_value = prop::SAT_VALUE_FALSE; + } + Integer bit_int = bit_value == prop::SAT_VALUE_TRUE ? Integer(1) : Integer(0); + value = value * 2 + bit_int; + } + return utils::mkConst(BitVector(bits.size(), value)); +} + + +void EagerBitblaster::collectModelInfo(TheoryModel* m, bool fullModel) { + TNodeSet::const_iterator it = d_variables.begin(); + for (; it!= d_variables.end(); ++it) { + TNode var = *it; + if (Theory::theoryOf(var) == theory::THEORY_BV || isSharedTerm(var)) { + Node const_value = getVarValue(var, fullModel); + if(const_value == Node()) { + if( fullModel ){ + // if the value is unassigned just set it to zero + const_value = utils::mkConst(BitVector(utils::getSize(var), 0u)); + } + } + if(const_value != Node()) { + Debug("bitvector-model") << "TLazyBitblaster::collectModelInfo (assert (= " + << var << " " + << const_value << "))\n"; + m->assertEquality(var, const_value, true); + } + } + } +} + +bool EagerBitblaster::isSharedTerm(TNode node) { + return d_bv->d_sharedTermsSet.find(node) != d_bv->d_sharedTermsSet.end(); +} diff --git a/src/theory/bv/eager_bitblaster.h b/src/theory/bv/eager_bitblaster.h deleted file mode 100644 index 91ef866bd..000000000 --- a/src/theory/bv/eager_bitblaster.h +++ /dev/null @@ -1,230 +0,0 @@ -/********************* */ -/*! \file eager_bitblaster.h - ** \verbatim - ** Original author: Liana Hadarean - ** Major contributors: none - ** Minor contributors (to current version): lianah - ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa - ** See the file COPYING in the top-level source directory for licensing - ** information.\endverbatim - ** - ** \brief - ** - ** Bitblaster for the lazy bv solver. - **/ - -#include "cvc4_private.h" - -#ifndef __CVC4__EAGER__BITBLASTER_H -#define __CVC4__EAGER__BITBLASTER_H - - -#include "theory/theory_registrar.h" -#include "theory/bv/bitblaster_template.h" -#include "theory/bv/options.h" -#include "theory/theory_model.h" -#include "prop/cnf_stream.h" -#include "prop/sat_solver_factory.h" - - -namespace CVC4 { -namespace theory { -namespace bv { - - -class BitblastingRegistrar: public prop::Registrar { - EagerBitblaster* d_bitblaster; -public: - BitblastingRegistrar(EagerBitblaster* bb) - : d_bitblaster(bb) - {} - void preRegister(Node n) { - d_bitblaster->bbAtom(n); - }; - -};/* class Registrar */ - -EagerBitblaster::EagerBitblaster(TheoryBV* theory_bv) - : TBitblaster() - , d_bv(theory_bv) - , d_bbAtoms() - , d_variables() -{ - d_bitblastingRegistrar = new BitblastingRegistrar(this); - d_nullContext = new context::Context(); - - d_satSolver = prop::SatSolverFactory::createMinisat(d_nullContext, "EagerBitblaster"); - d_cnfStream = new prop::TseitinCnfStream(d_satSolver, d_bitblastingRegistrar, d_nullContext); - - MinisatEmptyNotify* notify = new MinisatEmptyNotify(); - d_satSolver->setNotify(notify); -} - -EagerBitblaster::~EagerBitblaster() { - delete d_cnfStream; - delete d_satSolver; - delete d_nullContext; - delete d_bitblastingRegistrar; -} - -void EagerBitblaster::bbFormula(TNode node) { - d_cnfStream->convertAndAssert(node, false, false); -} - -/** - * Bitblasts the atom, assigns it a marker literal, adding it to the SAT solver - * NOTE: duplicate clauses are not detected because of marker literal - * @param node the atom to be bitblasted - * - */ -void EagerBitblaster::bbAtom(TNode node) { - node = node.getKind() == kind::NOT? node[0] : node; - if (node.getKind() == kind::BITVECTOR_BITOF) - return; - if (hasBBAtom(node)) { - return; - } - - Debug("bitvector-bitblast") << "Bitblasting node " << node <<"\n"; - - // the bitblasted definition of the atom - Node normalized = Rewriter::rewrite(node); - Node atom_bb = normalized.getKind() != kind::CONST_BOOLEAN ? - Rewriter::rewrite(d_atomBBStrategies[normalized.getKind()](normalized, this)) : - normalized; - // asserting that the atom is true iff the definition holds - Node atom_definition = utils::mkNode(kind::IFF, node, atom_bb); - - AlwaysAssert (options::bitblastMode() == theory::bv::BITBLAST_MODE_EAGER); - storeBBAtom(node, atom_definition); - d_cnfStream->convertAndAssert(atom_definition, false, false); -} - -void EagerBitblaster::storeBBAtom(TNode atom, Node atom_bb) { - // no need to store the definition for the lazy bit-blaster - d_bbAtoms.insert(atom); -} - -bool EagerBitblaster::hasBBAtom(TNode atom) const { - return d_bbAtoms.find(atom) != d_bbAtoms.end(); -} - -void EagerBitblaster::bbTerm(TNode node, Bits& bits) { - if (hasBBTerm(node)) { - getBBTerm(node, bits); - return; - } - - Debug("bitvector-bitblast") << "Bitblasting node " << node <<"\n"; - - d_termBBStrategies[node.getKind()] (node, bits, this); - - Assert (bits.size() == utils::getSize(node)); - - storeBBTerm(node, bits); -} - -void EagerBitblaster::makeVariable(TNode var, Bits& bits) { - Assert(bits.size() == 0); - for (unsigned i = 0; i < utils::getSize(var); ++i) { - bits.push_back(utils::mkBitOf(var, i)); - } - d_variables.insert(var); -} - -Node EagerBitblaster::getBBAtom(TNode node) const { - return node; -} - - -/** - * Calls the solve method for the Sat Solver. - * - * @return true for sat, and false for unsat - */ - -bool EagerBitblaster::solve() { - if (Trace.isOn("bitvector")) { - Trace("bitvector") << "EagerBitblaster::solve(). \n"; - } - Debug("bitvector") << "EagerBitblaster::solve(). \n"; - // TODO: clear some memory - // if (something) { - // NodeManager* nm= NodeManager::currentNM(); - // Rewriter::garbageCollect(); - // nm->reclaimZombiesUntil(options::zombieHuntThreshold()); - // } - return prop::SAT_VALUE_TRUE == d_satSolver->solve(); -} - - -/** - * Returns the value a is currently assigned to in the SAT solver - * or null if the value is completely unassigned. - * - * @param a - * @param fullModel whether to create a "full model," i.e., add - * constants to equivalence classes that don't already have them - * - * @return - */ -Node EagerBitblaster::getVarValue(TNode a, bool fullModel) { - if (!hasBBTerm(a)) { - Assert(isSharedTerm(a)); - return Node(); - } - Bits bits; - getBBTerm(a, bits); - Integer value(0); - for (int i = bits.size() -1; i >= 0; --i) { - prop::SatValue bit_value; - if (d_cnfStream->hasLiteral(bits[i])) { - prop::SatLiteral bit = d_cnfStream->getLiteral(bits[i]); - bit_value = d_satSolver->value(bit); - Assert (bit_value != prop::SAT_VALUE_UNKNOWN); - } else { - // the bit is unconstrainted so we can give it an arbitrary value - bit_value = prop::SAT_VALUE_FALSE; - } - Integer bit_int = bit_value == prop::SAT_VALUE_TRUE ? Integer(1) : Integer(0); - value = value * 2 + bit_int; - } - return utils::mkConst(BitVector(bits.size(), value)); -} - - -void EagerBitblaster::collectModelInfo(TheoryModel* m, bool fullModel) { - TNodeSet::const_iterator it = d_variables.begin(); - for (; it!= d_variables.end(); ++it) { - TNode var = *it; - if (Theory::theoryOf(var) == theory::THEORY_BV || isSharedTerm(var)) { - Node const_value = getVarValue(var, fullModel); - if(const_value == Node()) { - if( fullModel ){ - // if the value is unassigned just set it to zero - const_value = utils::mkConst(BitVector(utils::getSize(var), 0u)); - } - } - if(const_value != Node()) { - Debug("bitvector-model") << "TLazyBitblaster::collectModelInfo (assert (= " - << var << " " - << const_value << "))\n"; - m->assertEquality(var, const_value, true); - } - } - } -} - -bool EagerBitblaster::isSharedTerm(TNode node) { - return d_bv->d_sharedTermsSet.find(node) != d_bv->d_sharedTermsSet.end(); -} - - -} /*bv namespace */ -} /* theory namespace */ -} /* CVC4 namespace*/ - - - -#endif diff --git a/src/theory/bv/lazy_bitblaster.cpp b/src/theory/bv/lazy_bitblaster.cpp new file mode 100644 index 000000000..d3ab68a5a --- /dev/null +++ b/src/theory/bv/lazy_bitblaster.cpp @@ -0,0 +1,495 @@ +/********************* */ +/*! \file lazy_bitblaster.cpp +** \verbatim +** Original author: Liana Hadarean +** Major contributors: none +** Minor contributors (to current version): lianah +** This file is part of the CVC4 project. +** Copyright (c) 2009-2013 New York University and The University of Iowa +** See the file COPYING in the top-level source directory for licensing +** information.\endverbatim +** +** \brief +** +** Bitblaster for the lazy bv solver. +**/ + +#include "cvc4_private.h" +#include "bitblaster_template.h" +#include "theory_bv_utils.h" +#include "theory/rewriter.h" +#include "prop/cnf_stream.h" +#include "prop/sat_solver.h" +#include "prop/sat_solver_factory.h" +#include "theory/bv/theory_bv.h" +#include "theory/bv/options.h" +#include "theory/theory_model.h" +#include "theory/bv/abstraction.h" + +using namespace CVC4; +using namespace CVC4::theory; +using namespace CVC4::theory::bv; + + +TLazyBitblaster::TLazyBitblaster(context::Context* c, bv::TheoryBV* bv, const std::string name, bool emptyNotify) + : TBitblaster() + , d_bv(bv) + , d_ctx(c) + , d_assertedAtoms(new(true) context::CDList(c)) + , d_explanations(new(true) ExplanationMap(c)) + , d_variables() + , d_bbAtoms() + , d_abstraction(NULL) + , d_emptyNotify(emptyNotify) + , d_name(name) + , d_statistics(name) { + d_satSolver = prop::SatSolverFactory::createMinisat(c, name); + d_nullRegistrar = new prop::NullRegistrar(); + d_nullContext = new context::Context(); + d_cnfStream = new prop::TseitinCnfStream(d_satSolver, + d_nullRegistrar, + d_nullContext); + + prop::BVSatSolverInterface::Notify* notify = d_emptyNotify ? + (prop::BVSatSolverInterface::Notify*) new MinisatEmptyNotify() : + (prop::BVSatSolverInterface::Notify*) new MinisatNotify(d_cnfStream, bv, this); + + d_satSolver->setNotify(notify); +} + +void TLazyBitblaster::setAbstraction(AbstractionModule* abs) { + d_abstraction = abs; +} + +TLazyBitblaster::~TLazyBitblaster() { + delete d_cnfStream; + delete d_nullRegistrar; + delete d_nullContext; + delete d_satSolver; +} + + +/** + * Bitblasts the atom, assigns it a marker literal, adding it to the SAT solver + * NOTE: duplicate clauses are not detected because of marker literal + * @param node the atom to be bitblasted + * + */ +void TLazyBitblaster::bbAtom(TNode node) { + node = node.getKind() == kind::NOT? node[0] : node; + + if (hasBBAtom(node)) { + return; + } + + // make sure it is marked as an atom + addAtom(node); + + Debug("bitvector-bitblast") << "Bitblasting node " << node <<"\n"; + ++d_statistics.d_numAtoms; + + /// if we are using bit-vector abstraction bit-blast the original interpretation + if (options::bvAbstraction() && + d_abstraction != NULL && + d_abstraction->isAbstraction(node)) { + // node must be of the form P(args) = bv1 + Node expansion = Rewriter::rewrite(d_abstraction->getInterpretation(node)); + + Node atom_bb; + if (expansion.getKind() == kind::CONST_BOOLEAN) { + atom_bb = expansion; + } else { + Assert (expansion.getKind() == kind::AND); + std::vector atoms; + for (unsigned i = 0; i < expansion.getNumChildren(); ++i) { + Node normalized_i = Rewriter::rewrite(expansion[i]); + Node atom_i = normalized_i.getKind() != kind::CONST_BOOLEAN ? + Rewriter::rewrite(d_atomBBStrategies[normalized_i.getKind()](normalized_i, this)) : + normalized_i; + atoms.push_back(atom_i); + } + atom_bb = utils::mkAnd(atoms); + } + Assert (!atom_bb.isNull()); + Node atom_definition = utils::mkNode(kind::IFF, node, atom_bb); + storeBBAtom(node, atom_bb); + d_cnfStream->convertAndAssert(atom_definition, false, false); + return; + } + + // the bitblasted definition of the atom + Node normalized = Rewriter::rewrite(node); + Node atom_bb = normalized.getKind() != kind::CONST_BOOLEAN ? + Rewriter::rewrite(d_atomBBStrategies[normalized.getKind()](normalized, this)) : + normalized; + // asserting that the atom is true iff the definition holds + Node atom_definition = utils::mkNode(kind::IFF, node, atom_bb); + storeBBAtom(node, atom_bb); + d_cnfStream->convertAndAssert(atom_definition, false, false); +} + +void TLazyBitblaster::storeBBAtom(TNode atom, Node atom_bb) { + // no need to store the definition for the lazy bit-blaster + d_bbAtoms.insert(atom); +} + +bool TLazyBitblaster::hasBBAtom(TNode atom) const { + return d_bbAtoms.find(atom) != d_bbAtoms.end(); +} + + +void TLazyBitblaster::makeVariable(TNode var, Bits& bits) { + Assert(bits.size() == 0); + for (unsigned i = 0; i < utils::getSize(var); ++i) { + bits.push_back(utils::mkBitOf(var, i)); + } + d_variables.insert(var); +} + +uint64_t TLazyBitblaster::computeAtomWeight(TNode node, NodeSet& seen) { + node = node.getKind() == kind::NOT? node[0] : node; + + Node atom_bb = Rewriter::rewrite(d_atomBBStrategies[node.getKind()](node, this)); + uint64_t size = utils::numNodes(atom_bb, seen); + return size; +} + +// cnf conversion ensures the atom represents itself +Node TLazyBitblaster::getBBAtom(TNode node) const { + return node; +} + +void TLazyBitblaster::bbTerm(TNode node, Bits& bits) { + + if (hasBBTerm(node)) { + getBBTerm(node, bits); + return; + } + + Debug("bitvector-bitblast") << "Bitblasting node " << node <<"\n"; + ++d_statistics.d_numTerms; + + d_termBBStrategies[node.getKind()] (node, bits,this); + + Assert (bits.size() == utils::getSize(node)); + + storeBBTerm(node, bits); +} +/// Public methods + +void TLazyBitblaster::addAtom(TNode atom) { + d_cnfStream->ensureLiteral(atom); + prop::SatLiteral lit = d_cnfStream->getLiteral(atom); + d_satSolver->addMarkerLiteral(lit); +} + +void TLazyBitblaster::explain(TNode atom, std::vector& explanation) { + prop::SatLiteral lit = d_cnfStream->getLiteral(atom); + + ++(d_statistics.d_numExplainedPropagations); + if (options::bvEagerExplanations()) { + Assert (d_explanations->find(lit) != d_explanations->end()); + const std::vector& literal_explanation = (*d_explanations)[lit].get(); + for (unsigned i = 0; i < literal_explanation.size(); ++i) { + explanation.push_back(d_cnfStream->getNode(literal_explanation[i])); + } + return; + } + + std::vector literal_explanation; + d_satSolver->explain(lit, literal_explanation); + for (unsigned i = 0; i < literal_explanation.size(); ++i) { + explanation.push_back(d_cnfStream->getNode(literal_explanation[i])); + } +} + + +/* + * Asserts the clauses corresponding to the atom to the Sat Solver + * by turning on the marker literal (i.e. setting it to false) + * @param node the atom to be asserted + * + */ + +bool TLazyBitblaster::propagate() { + return d_satSolver->propagate() == prop::SAT_VALUE_TRUE; +} + +bool TLazyBitblaster::assertToSat(TNode lit, bool propagate) { + // strip the not + TNode atom; + if (lit.getKind() == kind::NOT) { + atom = lit[0]; + } else { + atom = lit; + } + + Assert (hasBBAtom(atom)); + + prop::SatLiteral markerLit = d_cnfStream->getLiteral(atom); + + if(lit.getKind() == kind::NOT) { + markerLit = ~markerLit; + } + + Debug("bitvector-bb") << "TheoryBV::TLazyBitblaster::assertToSat asserting node: " << atom <<"\n"; + Debug("bitvector-bb") << "TheoryBV::TLazyBitblaster::assertToSat with literal: " << markerLit << "\n"; + + prop::SatValue ret = d_satSolver->assertAssumption(markerLit, propagate); + + d_assertedAtoms->push_back(markerLit); + + return ret == prop::SAT_VALUE_TRUE || ret == prop::SAT_VALUE_UNKNOWN; +} + +/** + * Calls the solve method for the Sat Solver. + * passing it the marker literals to be asserted + * + * @return true for sat, and false for unsat + */ + +bool TLazyBitblaster::solve() { + if (Trace.isOn("bitvector")) { + Trace("bitvector") << "TLazyBitblaster::solve() asserted atoms "; + context::CDList::const_iterator it = d_assertedAtoms->begin(); + for (; it != d_assertedAtoms->end(); ++it) { + Trace("bitvector") << " " << d_cnfStream->getNode(*it) << "\n"; + } + } + Debug("bitvector") << "TLazyBitblaster::solve() asserted atoms " << d_assertedAtoms->size() <<"\n"; + return prop::SAT_VALUE_TRUE == d_satSolver->solve(); +} + +prop::SatValue TLazyBitblaster::solveWithBudget(unsigned long budget) { + if (Trace.isOn("bitvector")) { + Trace("bitvector") << "TLazyBitblaster::solveWithBudget() asserted atoms "; + context::CDList::const_iterator it = d_assertedAtoms->begin(); + for (; it != d_assertedAtoms->end(); ++it) { + Trace("bitvector") << " " << d_cnfStream->getNode(*it) << "\n"; + } + } + Debug("bitvector") << "TLazyBitblaster::solveWithBudget() asserted atoms " << d_assertedAtoms->size() <<"\n"; + return d_satSolver->solve(budget); +} + + +void TLazyBitblaster::getConflict(std::vector& conflict) { + prop::SatClause conflictClause; + d_satSolver->getUnsatCore(conflictClause); + + for (unsigned i = 0; i < conflictClause.size(); i++) { + prop::SatLiteral lit = conflictClause[i]; + TNode atom = d_cnfStream->getNode(lit); + Node not_atom; + if (atom.getKind() == kind::NOT) { + not_atom = atom[0]; + } else { + not_atom = NodeManager::currentNM()->mkNode(kind::NOT, atom); + } + conflict.push_back(not_atom); + } +} + +TLazyBitblaster::Statistics::Statistics(const std::string& prefix) : + d_numTermClauses("theory::bv::"+prefix+"::NumberOfTermSatClauses", 0), + d_numAtomClauses("theory::bv::"+prefix+"::NumberOfAtomSatClauses", 0), + d_numTerms("theory::bv::"+prefix+"::NumberOfBitblastedTerms", 0), + d_numAtoms("theory::bv::"+prefix+"::NumberOfBitblastedAtoms", 0), + d_numExplainedPropagations("theory::bv::"+prefix+"::NumberOfExplainedPropagations", 0), + d_numBitblastingPropagations("theory::bv::"+prefix+"::NumberOfBitblastingPropagations", 0), + d_bitblastTimer("theory::bv::"+prefix+"::BitblastTimer") +{ + StatisticsRegistry::registerStat(&d_numTermClauses); + StatisticsRegistry::registerStat(&d_numAtomClauses); + StatisticsRegistry::registerStat(&d_numTerms); + StatisticsRegistry::registerStat(&d_numAtoms); + StatisticsRegistry::registerStat(&d_numExplainedPropagations); + StatisticsRegistry::registerStat(&d_numBitblastingPropagations); + StatisticsRegistry::registerStat(&d_bitblastTimer); +} + + +TLazyBitblaster::Statistics::~Statistics() { + StatisticsRegistry::unregisterStat(&d_numTermClauses); + StatisticsRegistry::unregisterStat(&d_numAtomClauses); + StatisticsRegistry::unregisterStat(&d_numTerms); + StatisticsRegistry::unregisterStat(&d_numAtoms); + StatisticsRegistry::unregisterStat(&d_numExplainedPropagations); + StatisticsRegistry::unregisterStat(&d_numBitblastingPropagations); + StatisticsRegistry::unregisterStat(&d_bitblastTimer); +} + +bool TLazyBitblaster::MinisatNotify::notify(prop::SatLiteral lit) { + if(options::bvEagerExplanations()) { + // compute explanation + if (d_lazyBB->d_explanations->find(lit) == d_lazyBB->d_explanations->end()) { + std::vector literal_explanation; + d_lazyBB->d_satSolver->explain(lit, literal_explanation); + d_lazyBB->d_explanations->insert(lit, literal_explanation); + } else { + // we propagated it at a lower level + return true; + } + } + ++(d_lazyBB->d_statistics.d_numBitblastingPropagations); + TNode atom = d_cnf->getNode(lit); + return d_bv->storePropagation(atom, SUB_BITBLAST); +} + +void TLazyBitblaster::MinisatNotify::notify(prop::SatClause& clause) { + if (clause.size() > 1) { + NodeBuilder<> lemmab(kind::OR); + for (unsigned i = 0; i < clause.size(); ++ i) { + lemmab << d_cnf->getNode(clause[i]); + } + Node lemma = lemmab; + d_bv->d_out->lemma(lemma); + } else { + d_bv->d_out->lemma(d_cnf->getNode(clause[0])); + } +} + +void TLazyBitblaster::MinisatNotify::safePoint() { + d_bv->d_out->safePoint(); +} + +EqualityStatus TLazyBitblaster::getEqualityStatus(TNode a, TNode b) { + + // We don't want to bit-blast every possibly expensive term for the sake of equality checking + if (hasBBTerm(a) && hasBBTerm(b)) { + + Bits a_bits, b_bits; + getBBTerm(a, a_bits); + getBBTerm(b, b_bits); + theory::EqualityStatus status = theory::EQUALITY_TRUE_IN_MODEL; + for (unsigned i = 0; i < a_bits.size(); ++ i) { + if (d_cnfStream->hasLiteral(a_bits[i]) && d_cnfStream->hasLiteral(b_bits[i])) { + prop::SatLiteral a_lit = d_cnfStream->getLiteral(a_bits[i]); + prop::SatValue a_lit_value = d_satSolver->value(a_lit); + if (a_lit_value != prop::SAT_VALUE_UNKNOWN) { + prop::SatLiteral b_lit = d_cnfStream->getLiteral(b_bits[i]); + prop::SatValue b_lit_value = d_satSolver->value(b_lit); + if (b_lit_value != prop::SAT_VALUE_UNKNOWN) { + if (a_lit_value != b_lit_value) { + return theory::EQUALITY_FALSE_IN_MODEL; + } + } else { + status = theory::EQUALITY_UNKNOWN; + } + } { + status = theory::EQUALITY_UNKNOWN; + } + } else { + status = theory::EQUALITY_UNKNOWN; + } + } + + return status; + + } else { + return theory::EQUALITY_UNKNOWN; + } +} + + +bool TLazyBitblaster::isSharedTerm(TNode node) { + return d_bv->d_sharedTermsSet.find(node) != d_bv->d_sharedTermsSet.end(); +} + +bool TLazyBitblaster::hasValue(TNode a) { + Assert (hasBBTerm(a)); + Bits bits; + getBBTerm(a, bits); + for (int i = bits.size() -1; i >= 0; --i) { + prop::SatValue bit_value; + if (d_cnfStream->hasLiteral(bits[i])) { + prop::SatLiteral bit = d_cnfStream->getLiteral(bits[i]); + bit_value = d_satSolver->value(bit); + if (bit_value == prop::SAT_VALUE_UNKNOWN) + return false; + } else { + return false; + } + } + return true; +} +/** + * Returns the value a is currently assigned to in the SAT solver + * or null if the value is completely unassigned. + * + * @param a + * @param fullModel whether to create a "full model," i.e., add + * constants to equivalence classes that don't already have them + * + * @return + */ +Node TLazyBitblaster::getVarValue(TNode a, bool fullModel) { + if (!hasBBTerm(a)) { + Assert(isSharedTerm(a)); + return Node(); + } + Bits bits; + getBBTerm(a, bits); + Integer value(0); + for (int i = bits.size() -1; i >= 0; --i) { + prop::SatValue bit_value; + if (d_cnfStream->hasLiteral(bits[i])) { + prop::SatLiteral bit = d_cnfStream->getLiteral(bits[i]); + bit_value = d_satSolver->value(bit); + Assert (bit_value != prop::SAT_VALUE_UNKNOWN); + } else { + // the bit is unconstrainted so we can give it an arbitrary value + bit_value = prop::SAT_VALUE_FALSE; + } + Integer bit_int = bit_value == prop::SAT_VALUE_TRUE ? Integer(1) : Integer(0); + value = value * 2 + bit_int; + } + return utils::mkConst(BitVector(bits.size(), value)); +} + +void TLazyBitblaster::collectModelInfo(TheoryModel* m, bool fullModel) { + TNodeSet::iterator it = d_variables.begin(); + for (; it!= d_variables.end(); ++it) { + TNode var = *it; + if (Theory::theoryOf(var) == theory::THEORY_BV || isSharedTerm(var)) { + Node const_value = getVarValue(var, fullModel); + if(const_value == Node()) { + if( fullModel ){ + // if the value is unassigned just set it to zero + const_value = utils::mkConst(BitVector(utils::getSize(var), 0u)); + } + } + if(const_value != Node()) { + Debug("bitvector-model") << "TLazyBitblaster::collectModelInfo (assert (= " + << var << " " + << const_value << "))\n"; + m->assertEquality(var, const_value, true); + } + } + } +} + +void TLazyBitblaster::clearSolver() { + Assert (d_ctx->getLevel() == 0); + delete d_satSolver; + delete d_cnfStream; + d_assertedAtoms->deleteSelf(); + d_assertedAtoms = new(true) context::CDList(d_ctx); + d_explanations->deleteSelf(); + d_explanations = new(true) ExplanationMap(d_ctx); + d_bbAtoms.clear(); + d_variables.clear(); + d_termCache.clear(); + + // recreate sat solver + d_satSolver = prop::SatSolverFactory::createMinisat(d_ctx); + d_cnfStream = new prop::TseitinCnfStream(d_satSolver, + new prop::NullRegistrar(), + new context::Context()); + + prop::BVSatSolverInterface::Notify* notify = d_emptyNotify ? + (prop::BVSatSolverInterface::Notify*) new MinisatEmptyNotify() : + (prop::BVSatSolverInterface::Notify*) new MinisatNotify(d_cnfStream, d_bv, this); + d_satSolver->setNotify(notify); +} diff --git a/src/theory/bv/lazy_bitblaster.h b/src/theory/bv/lazy_bitblaster.h deleted file mode 100644 index e11254dbb..000000000 --- a/src/theory/bv/lazy_bitblaster.h +++ /dev/null @@ -1,505 +0,0 @@ -/********************* */ -/*! \file lazy_bitblaster.h -** \verbatim -** Original author: Liana Hadarean -** Major contributors: none -** Minor contributors (to current version): lianah -** This file is part of the CVC4 project. -** Copyright (c) 2009-2013 New York University and The University of Iowa -** See the file COPYING in the top-level source directory for licensing -** information.\endverbatim -** -** \brief -** -** Bitblaster for the lazy bv solver. -**/ - -#include "cvc4_private.h" - -#ifndef __CVC4__LAZY__BITBLASTER_H -#define __CVC4__LAZY__BITBLASTER_H - - -#include "bitblaster_template.h" -#include "theory_bv_utils.h" -#include "theory/rewriter.h" -#include "prop/cnf_stream.h" -#include "prop/sat_solver.h" -#include "prop/sat_solver_factory.h" -#include "theory/bv/theory_bv.h" -#include "theory/bv/options.h" -#include "theory/theory_model.h" -#include "theory/bv/abstraction.h" - -namespace CVC4 { -namespace theory { -namespace bv { - -TLazyBitblaster::TLazyBitblaster(context::Context* c, bv::TheoryBV* bv, const std::string name, bool emptyNotify) - : TBitblaster() - , d_bv(bv) - , d_ctx(c) - , d_assertedAtoms(new(true) context::CDList(c)) - , d_explanations(new(true) ExplanationMap(c)) - , d_variables() - , d_bbAtoms() - , d_abstraction(NULL) - , d_emptyNotify(emptyNotify) - , d_name(name) - , d_statistics(name) { - d_satSolver = prop::SatSolverFactory::createMinisat(c, name); - d_nullRegistrar = new prop::NullRegistrar(); - d_nullContext = new context::Context(); - d_cnfStream = new prop::TseitinCnfStream(d_satSolver, - d_nullRegistrar, - d_nullContext); - - prop::BVSatSolverInterface::Notify* notify = d_emptyNotify ? - (prop::BVSatSolverInterface::Notify*) new MinisatEmptyNotify() : - (prop::BVSatSolverInterface::Notify*) new MinisatNotify(d_cnfStream, bv, this); - - d_satSolver->setNotify(notify); -} - -void TLazyBitblaster::setAbstraction(AbstractionModule* abs) { - d_abstraction = abs; -} - -TLazyBitblaster::~TLazyBitblaster() { - delete d_cnfStream; - delete d_nullRegistrar; - delete d_nullContext; - delete d_satSolver; -} - - -/** - * Bitblasts the atom, assigns it a marker literal, adding it to the SAT solver - * NOTE: duplicate clauses are not detected because of marker literal - * @param node the atom to be bitblasted - * - */ -void TLazyBitblaster::bbAtom(TNode node) { - node = node.getKind() == kind::NOT? node[0] : node; - - if (hasBBAtom(node)) { - return; - } - - // make sure it is marked as an atom - addAtom(node); - - Debug("bitvector-bitblast") << "Bitblasting node " << node <<"\n"; - ++d_statistics.d_numAtoms; - - /// if we are using bit-vector abstraction bit-blast the original interpretation - if (options::bvAbstraction() && - d_abstraction != NULL && - d_abstraction->isAbstraction(node)) { - // node must be of the form P(args) = bv1 - Node expansion = Rewriter::rewrite(d_abstraction->getInterpretation(node)); - - Node atom_bb; - if (expansion.getKind() == kind::CONST_BOOLEAN) { - atom_bb = expansion; - } else { - Assert (expansion.getKind() == kind::AND); - std::vector atoms; - for (unsigned i = 0; i < expansion.getNumChildren(); ++i) { - Node normalized_i = Rewriter::rewrite(expansion[i]); - Node atom_i = normalized_i.getKind() != kind::CONST_BOOLEAN ? - Rewriter::rewrite(d_atomBBStrategies[normalized_i.getKind()](normalized_i, this)) : - normalized_i; - atoms.push_back(atom_i); - } - atom_bb = utils::mkAnd(atoms); - } - Assert (!atom_bb.isNull()); - Node atom_definition = utils::mkNode(kind::IFF, node, atom_bb); - storeBBAtom(node, atom_bb); - d_cnfStream->convertAndAssert(atom_definition, false, false); - return; - } - - // the bitblasted definition of the atom - Node normalized = Rewriter::rewrite(node); - Node atom_bb = normalized.getKind() != kind::CONST_BOOLEAN ? - Rewriter::rewrite(d_atomBBStrategies[normalized.getKind()](normalized, this)) : - normalized; - // asserting that the atom is true iff the definition holds - Node atom_definition = utils::mkNode(kind::IFF, node, atom_bb); - storeBBAtom(node, atom_bb); - d_cnfStream->convertAndAssert(atom_definition, false, false); -} - -void TLazyBitblaster::storeBBAtom(TNode atom, Node atom_bb) { - // no need to store the definition for the lazy bit-blaster - d_bbAtoms.insert(atom); -} - -bool TLazyBitblaster::hasBBAtom(TNode atom) const { - return d_bbAtoms.find(atom) != d_bbAtoms.end(); -} - - -void TLazyBitblaster::makeVariable(TNode var, Bits& bits) { - Assert(bits.size() == 0); - for (unsigned i = 0; i < utils::getSize(var); ++i) { - bits.push_back(utils::mkBitOf(var, i)); - } - d_variables.insert(var); -} - -uint64_t TLazyBitblaster::computeAtomWeight(TNode node, NodeSet& seen) { - node = node.getKind() == kind::NOT? node[0] : node; - - Node atom_bb = Rewriter::rewrite(d_atomBBStrategies[node.getKind()](node, this)); - uint64_t size = utils::numNodes(atom_bb, seen); - return size; -} - -// cnf conversion ensures the atom represents itself -Node TLazyBitblaster::getBBAtom(TNode node) const { - return node; -} - -void TLazyBitblaster::bbTerm(TNode node, Bits& bits) { - - if (hasBBTerm(node)) { - getBBTerm(node, bits); - return; - } - - Debug("bitvector-bitblast") << "Bitblasting node " << node <<"\n"; - ++d_statistics.d_numTerms; - - d_termBBStrategies[node.getKind()] (node, bits,this); - - Assert (bits.size() == utils::getSize(node)); - - storeBBTerm(node, bits); -} -/// Public methods - -void TLazyBitblaster::addAtom(TNode atom) { - d_cnfStream->ensureLiteral(atom); - prop::SatLiteral lit = d_cnfStream->getLiteral(atom); - d_satSolver->addMarkerLiteral(lit); -} - -void TLazyBitblaster::explain(TNode atom, std::vector& explanation) { - prop::SatLiteral lit = d_cnfStream->getLiteral(atom); - - ++(d_statistics.d_numExplainedPropagations); - if (options::bvEagerExplanations()) { - Assert (d_explanations->find(lit) != d_explanations->end()); - const std::vector& literal_explanation = (*d_explanations)[lit].get(); - for (unsigned i = 0; i < literal_explanation.size(); ++i) { - explanation.push_back(d_cnfStream->getNode(literal_explanation[i])); - } - return; - } - - std::vector literal_explanation; - d_satSolver->explain(lit, literal_explanation); - for (unsigned i = 0; i < literal_explanation.size(); ++i) { - explanation.push_back(d_cnfStream->getNode(literal_explanation[i])); - } -} - - -/* - * Asserts the clauses corresponding to the atom to the Sat Solver - * by turning on the marker literal (i.e. setting it to false) - * @param node the atom to be asserted - * - */ - -bool TLazyBitblaster::propagate() { - return d_satSolver->propagate() == prop::SAT_VALUE_TRUE; -} - -bool TLazyBitblaster::assertToSat(TNode lit, bool propagate) { - // strip the not - TNode atom; - if (lit.getKind() == kind::NOT) { - atom = lit[0]; - } else { - atom = lit; - } - - Assert (hasBBAtom(atom)); - - prop::SatLiteral markerLit = d_cnfStream->getLiteral(atom); - - if(lit.getKind() == kind::NOT) { - markerLit = ~markerLit; - } - - Debug("bitvector-bb") << "TheoryBV::TLazyBitblaster::assertToSat asserting node: " << atom <<"\n"; - Debug("bitvector-bb") << "TheoryBV::TLazyBitblaster::assertToSat with literal: " << markerLit << "\n"; - - prop::SatValue ret = d_satSolver->assertAssumption(markerLit, propagate); - - d_assertedAtoms->push_back(markerLit); - - return ret == prop::SAT_VALUE_TRUE || ret == prop::SAT_VALUE_UNKNOWN; -} - -/** - * Calls the solve method for the Sat Solver. - * passing it the marker literals to be asserted - * - * @return true for sat, and false for unsat - */ - -bool TLazyBitblaster::solve() { - if (Trace.isOn("bitvector")) { - Trace("bitvector") << "TLazyBitblaster::solve() asserted atoms "; - context::CDList::const_iterator it = d_assertedAtoms->begin(); - for (; it != d_assertedAtoms->end(); ++it) { - Trace("bitvector") << " " << d_cnfStream->getNode(*it) << "\n"; - } - } - Debug("bitvector") << "TLazyBitblaster::solve() asserted atoms " << d_assertedAtoms->size() <<"\n"; - return prop::SAT_VALUE_TRUE == d_satSolver->solve(); -} - -prop::SatValue TLazyBitblaster::solveWithBudget(unsigned long budget) { - if (Trace.isOn("bitvector")) { - Trace("bitvector") << "TLazyBitblaster::solveWithBudget() asserted atoms "; - context::CDList::const_iterator it = d_assertedAtoms->begin(); - for (; it != d_assertedAtoms->end(); ++it) { - Trace("bitvector") << " " << d_cnfStream->getNode(*it) << "\n"; - } - } - Debug("bitvector") << "TLazyBitblaster::solveWithBudget() asserted atoms " << d_assertedAtoms->size() <<"\n"; - return d_satSolver->solve(budget); -} - - -void TLazyBitblaster::getConflict(std::vector& conflict) { - prop::SatClause conflictClause; - d_satSolver->getUnsatCore(conflictClause); - - for (unsigned i = 0; i < conflictClause.size(); i++) { - prop::SatLiteral lit = conflictClause[i]; - TNode atom = d_cnfStream->getNode(lit); - Node not_atom; - if (atom.getKind() == kind::NOT) { - not_atom = atom[0]; - } else { - not_atom = NodeManager::currentNM()->mkNode(kind::NOT, atom); - } - conflict.push_back(not_atom); - } -} - -TLazyBitblaster::Statistics::Statistics(const std::string& prefix) : - d_numTermClauses("theory::bv::"+prefix+"::NumberOfTermSatClauses", 0), - d_numAtomClauses("theory::bv::"+prefix+"::NumberOfAtomSatClauses", 0), - d_numTerms("theory::bv::"+prefix+"::NumberOfBitblastedTerms", 0), - d_numAtoms("theory::bv::"+prefix+"::NumberOfBitblastedAtoms", 0), - d_numExplainedPropagations("theory::bv::"+prefix+"::NumberOfExplainedPropagations", 0), - d_numBitblastingPropagations("theory::bv::"+prefix+"::NumberOfBitblastingPropagations", 0), - d_bitblastTimer("theory::bv::"+prefix+"::BitblastTimer") -{ - StatisticsRegistry::registerStat(&d_numTermClauses); - StatisticsRegistry::registerStat(&d_numAtomClauses); - StatisticsRegistry::registerStat(&d_numTerms); - StatisticsRegistry::registerStat(&d_numAtoms); - StatisticsRegistry::registerStat(&d_numExplainedPropagations); - StatisticsRegistry::registerStat(&d_numBitblastingPropagations); - StatisticsRegistry::registerStat(&d_bitblastTimer); -} - - -TLazyBitblaster::Statistics::~Statistics() { - StatisticsRegistry::unregisterStat(&d_numTermClauses); - StatisticsRegistry::unregisterStat(&d_numAtomClauses); - StatisticsRegistry::unregisterStat(&d_numTerms); - StatisticsRegistry::unregisterStat(&d_numAtoms); - StatisticsRegistry::unregisterStat(&d_numExplainedPropagations); - StatisticsRegistry::unregisterStat(&d_numBitblastingPropagations); - StatisticsRegistry::unregisterStat(&d_bitblastTimer); -} - -bool TLazyBitblaster::MinisatNotify::notify(prop::SatLiteral lit) { - if(options::bvEagerExplanations()) { - // compute explanation - if (d_lazyBB->d_explanations->find(lit) == d_lazyBB->d_explanations->end()) { - std::vector literal_explanation; - d_lazyBB->d_satSolver->explain(lit, literal_explanation); - d_lazyBB->d_explanations->insert(lit, literal_explanation); - } else { - // we propagated it at a lower level - return true; - } - } - ++(d_lazyBB->d_statistics.d_numBitblastingPropagations); - TNode atom = d_cnf->getNode(lit); - return d_bv->storePropagation(atom, SUB_BITBLAST); -} - -void TLazyBitblaster::MinisatNotify::notify(prop::SatClause& clause) { - if (clause.size() > 1) { - NodeBuilder<> lemmab(kind::OR); - for (unsigned i = 0; i < clause.size(); ++ i) { - lemmab << d_cnf->getNode(clause[i]); - } - Node lemma = lemmab; - d_bv->d_out->lemma(lemma); - } else { - d_bv->d_out->lemma(d_cnf->getNode(clause[0])); - } -} - -void TLazyBitblaster::MinisatNotify::safePoint() { - d_bv->d_out->safePoint(); -} - -EqualityStatus TLazyBitblaster::getEqualityStatus(TNode a, TNode b) { - - // We don't want to bit-blast every possibly expensive term for the sake of equality checking - if (hasBBTerm(a) && hasBBTerm(b)) { - - Bits a_bits, b_bits; - getBBTerm(a, a_bits); - getBBTerm(b, b_bits); - theory::EqualityStatus status = theory::EQUALITY_TRUE_IN_MODEL; - for (unsigned i = 0; i < a_bits.size(); ++ i) { - if (d_cnfStream->hasLiteral(a_bits[i]) && d_cnfStream->hasLiteral(b_bits[i])) { - prop::SatLiteral a_lit = d_cnfStream->getLiteral(a_bits[i]); - prop::SatValue a_lit_value = d_satSolver->value(a_lit); - if (a_lit_value != prop::SAT_VALUE_UNKNOWN) { - prop::SatLiteral b_lit = d_cnfStream->getLiteral(b_bits[i]); - prop::SatValue b_lit_value = d_satSolver->value(b_lit); - if (b_lit_value != prop::SAT_VALUE_UNKNOWN) { - if (a_lit_value != b_lit_value) { - return theory::EQUALITY_FALSE_IN_MODEL; - } - } else { - status = theory::EQUALITY_UNKNOWN; - } - } { - status = theory::EQUALITY_UNKNOWN; - } - } else { - status = theory::EQUALITY_UNKNOWN; - } - } - - return status; - - } else { - return theory::EQUALITY_UNKNOWN; - } -} - - -bool TLazyBitblaster::isSharedTerm(TNode node) { - return d_bv->d_sharedTermsSet.find(node) != d_bv->d_sharedTermsSet.end(); -} - -bool TLazyBitblaster::hasValue(TNode a) { - Assert (hasBBTerm(a)); - Bits bits; - getBBTerm(a, bits); - for (int i = bits.size() -1; i >= 0; --i) { - prop::SatValue bit_value; - if (d_cnfStream->hasLiteral(bits[i])) { - prop::SatLiteral bit = d_cnfStream->getLiteral(bits[i]); - bit_value = d_satSolver->value(bit); - if (bit_value == prop::SAT_VALUE_UNKNOWN) - return false; - } else { - return false; - } - } - return true; -} -/** - * Returns the value a is currently assigned to in the SAT solver - * or null if the value is completely unassigned. - * - * @param a - * @param fullModel whether to create a "full model," i.e., add - * constants to equivalence classes that don't already have them - * - * @return - */ -Node TLazyBitblaster::getVarValue(TNode a, bool fullModel) { - if (!hasBBTerm(a)) { - Assert(isSharedTerm(a)); - return Node(); - } - Bits bits; - getBBTerm(a, bits); - Integer value(0); - for (int i = bits.size() -1; i >= 0; --i) { - prop::SatValue bit_value; - if (d_cnfStream->hasLiteral(bits[i])) { - prop::SatLiteral bit = d_cnfStream->getLiteral(bits[i]); - bit_value = d_satSolver->value(bit); - Assert (bit_value != prop::SAT_VALUE_UNKNOWN); - } else { - // the bit is unconstrainted so we can give it an arbitrary value - bit_value = prop::SAT_VALUE_FALSE; - } - Integer bit_int = bit_value == prop::SAT_VALUE_TRUE ? Integer(1) : Integer(0); - value = value * 2 + bit_int; - } - return utils::mkConst(BitVector(bits.size(), value)); -} - -void TLazyBitblaster::collectModelInfo(TheoryModel* m, bool fullModel) { - TNodeSet::iterator it = d_variables.begin(); - for (; it!= d_variables.end(); ++it) { - TNode var = *it; - if (Theory::theoryOf(var) == theory::THEORY_BV || isSharedTerm(var)) { - Node const_value = getVarValue(var, fullModel); - if(const_value == Node()) { - if( fullModel ){ - // if the value is unassigned just set it to zero - const_value = utils::mkConst(BitVector(utils::getSize(var), 0u)); - } - } - if(const_value != Node()) { - Debug("bitvector-model") << "TLazyBitblaster::collectModelInfo (assert (= " - << var << " " - << const_value << "))\n"; - m->assertEquality(var, const_value, true); - } - } - } -} - -void TLazyBitblaster::clearSolver() { - Assert (d_ctx->getLevel() == 0); - delete d_satSolver; - delete d_cnfStream; - d_assertedAtoms->deleteSelf(); - d_assertedAtoms = new(true) context::CDList(d_ctx); - d_explanations->deleteSelf(); - d_explanations = new(true) ExplanationMap(d_ctx); - d_bbAtoms.clear(); - d_variables.clear(); - d_termCache.clear(); - - // recreate sat solver - d_satSolver = prop::SatSolverFactory::createMinisat(d_ctx); - d_cnfStream = new prop::TseitinCnfStream(d_satSolver, - new prop::NullRegistrar(), - new context::Context()); - - prop::BVSatSolverInterface::Notify* notify = d_emptyNotify ? - (prop::BVSatSolverInterface::Notify*) new MinisatEmptyNotify() : - (prop::BVSatSolverInterface::Notify*) new MinisatNotify(d_cnfStream, d_bv, this); - d_satSolver->setNotify(notify); -} - -} /*bv namespace */ -} /* theory namespace */ -} /* CVC4 namespace*/ - -#endif diff --git a/test/unit/theory/theory_bv_white.h b/test/unit/theory/theory_bv_white.h index dd65fc8e4..64dd680ae 100644 --- a/test/unit/theory/theory_bv_white.h +++ b/test/unit/theory/theory_bv_white.h @@ -22,7 +22,7 @@ #include "smt/smt_engine.h" #include "smt/smt_engine_scope.h" #include "theory/bv/theory_bv.h" -#include "theory/bv/eager_bitblaster.h" +#include "theory/bv/bitblaster_template.h" #include "expr/node.h" #include "expr/node_manager.h" #include "context/context.h" -- cgit v1.2.3 From 1a41e26473ff12108eb6700da3d386ffa9e731bd Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Fri, 20 Jun 2014 20:00:22 -0400 Subject: Slightly-improved kinds documentation for builtin, Boolean, arrays, strings, and arith. --- src/theory/arith/kinds | 31 ++++++++-------- src/theory/arrays/kinds | 8 ++-- src/theory/booleans/kinds | 14 +++---- src/theory/builtin/kinds | 51 +++++++++++++------------- src/theory/builtin/theory_builtin_type_rules.h | 5 ++- src/theory/strings/kinds | 9 +++-- 6 files changed, 61 insertions(+), 57 deletions(-) (limited to 'src/theory') diff --git a/src/theory/arith/kinds b/src/theory/arith/kinds index a8a4047ca..45470180b 100644 --- a/src/theory/arith/kinds +++ b/src/theory/arith/kinds @@ -12,39 +12,38 @@ properties check propagate ppStaticLearn presolve notifyRestart rewriter ::CVC4::theory::arith::ArithRewriter "theory/arith/arith_rewriter.h" - -operator PLUS 2: "arithmetic addition" -operator MULT 2: "arithmetic multiplication" +operator PLUS 2: "arithmetic addition (N-ary)" +operator MULT 2: "arithmetic multiplication (N-ary)" operator MINUS 2 "arithmetic binary subtraction operator" operator UMINUS 1 "arithmetic unary negation" -operator DIVISION 2 "real division (user symbol)" +operator DIVISION 2 "real division, division by 0 undefined (user symbol)" operator DIVISION_TOTAL 2 "real division with interpreted division by 0 (internal symbol)" -operator INTS_DIVISION 2 "ints division (user symbol)" -operator INTS_DIVISION_TOTAL 2 "ints division with interpreted division by 0 (internal symbol)" -operator INTS_MODULUS 2 "ints modulus (user symbol)" -operator INTS_MODULUS_TOTAL 2 "ints modulus with interpreted division by 0 (internal symbol)" +operator INTS_DIVISION 2 "integer division, division by 0 undefined (user symbol)" +operator INTS_DIVISION_TOTAL 2 "integer division with interpreted division by 0 (internal symbol)" +operator INTS_MODULUS 2 "integer modulus, division by 0 undefined (user symbol)" +operator INTS_MODULUS_TOTAL 2 "integer modulus with interpreted division by 0 (internal symbol)" operator ABS 1 "absolute value" -parameterized DIVISIBLE DIVISIBLE_OP 1 "divisibility-by-k predicate" +parameterized DIVISIBLE DIVISIBLE_OP 1 "divisibility-by-k predicate; first parameter is a DIVISIBLE_OP, second is integer term" operator POW 2 "arithmetic power" constant DIVISIBLE_OP \ ::CVC4::Divisible \ ::CVC4::DivisibleHashFunction \ "util/divisible.h" \ - "operator for the divisibility-by-k predicate" + "operator for the divisibility-by-k predicate; payload is an instance of the CVC4::Divisible class" sort REAL_TYPE \ Cardinality::REALS \ well-founded \ "NodeManager::currentNM()->mkConst(Rational(0))" \ "expr/node_manager.h" \ - "Real type" + "real type" sort INTEGER_TYPE \ Cardinality::INTEGERS \ well-founded \ "NodeManager::currentNM()->mkConst(Rational(0))" \ "expr/node_manager.h" \ - "Integer type" + "integer type" constant SUBRANGE_TYPE \ ::CVC4::SubrangeBounds \ @@ -63,7 +62,7 @@ constant CONST_RATIONAL \ ::CVC4::Rational \ ::CVC4::RationalHashFunction \ "util/rational.h" \ - "a multiple-precision rational constant" + "a multiple-precision rational constant; payload is an instance of the CVC4::Rational class" enumerator REAL_TYPE \ "::CVC4::theory::arith::RationalEnumerator" \ @@ -80,9 +79,9 @@ operator LEQ 2 "less than or equal, x <= y" operator GT 2 "greater than, x > y" operator GEQ 2 "greater than or equal, x >= y" -operator IS_INTEGER 1 "term is integer" -operator TO_INTEGER 1 "cast term to integer" -operator TO_REAL 1 "cast term to real" +operator IS_INTEGER 1 "term-is-integer predicate (parameter is a real-sorted term)" +operator TO_INTEGER 1 "convert term to integer by the floor function (parameter is a real-sorted term)" +operator TO_REAL 1 "cast term to real (parameter is an integer-sorted term; this is a no-op in CVC4, as integer is a subtype of real)" typerule PLUS ::CVC4::theory::arith::ArithOperatorTypeRule typerule MULT ::CVC4::theory::arith::ArithOperatorTypeRule diff --git a/src/theory/arrays/kinds b/src/theory/arrays/kinds index a731d3677..0bc973de9 100644 --- a/src/theory/arrays/kinds +++ b/src/theory/arrays/kinds @@ -26,20 +26,20 @@ enumerator ARRAY_TYPE \ "theory/arrays/type_enumerator.h" # select a i is a[i] -operator SELECT 2 "array select" +operator SELECT 2 "array select; first parameter is an array term, second is the selection index" # store a i e is a[i] <= e -operator STORE 3 "array store" +operator STORE 3 "array store; first parameter is an array term, second is the store index, third is the term to store at the index" # storeall t e is \all i in indexType(t) <= e constant STORE_ALL \ ::CVC4::ArrayStoreAll \ ::CVC4::ArrayStoreAllHashFunction \ "util/array_store_all.h" \ - "array store-all" + "array store-all; payload is an instance of the CVC4::ArrayStoreAll class (this is not supported by arrays decision procedure yet, but it is used for returned array models)" # used internally by array theory -operator ARR_TABLE_FUN 4 "array table function (internal symbol)" +operator ARR_TABLE_FUN 4 "array table function (internal-only symbol)" typerule SELECT ::CVC4::theory::arrays::ArraySelectTypeRule typerule STORE ::CVC4::theory::arrays::ArrayStoreTypeRule diff --git a/src/theory/booleans/kinds b/src/theory/booleans/kinds index 4d748ca59..ad45e3cbb 100644 --- a/src/theory/booleans/kinds +++ b/src/theory/booleans/kinds @@ -22,19 +22,19 @@ constant CONST_BOOLEAN \ bool \ ::CVC4::BoolHashFunction \ "util/bool.h" \ - "truth and falsity" + "truth and falsity; payload is a (C++) bool" enumerator BOOLEAN_TYPE \ "::CVC4::theory::booleans::BooleanEnumerator" \ "theory/booleans/type_enumerator.h" operator NOT 1 "logical not" -operator AND 2: "logical and" -operator IFF 2 "logical equivalence" -operator IMPLIES 2 "logical implication" -operator OR 2: "logical or" -operator XOR 2 "exclusive or" -operator ITE 3 "if-then-else" +operator AND 2: "logical and (N-ary)" +operator IFF 2 "logical equivalence (exactly two parameters)" +operator IMPLIES 2 "logical implication (exactly two parameters)" +operator OR 2: "logical or (N-ary)" +operator XOR 2 "exclusive or (exactly two parameters)" +operator ITE 3 "if-then-else, used for both Boolean and term ITE constructs; first parameter is (Boolean-sorted) condition, second is 'then', third is 'else' and these two parameters must have same base sort" typerule CONST_BOOLEAN ::CVC4::theory::boolean::BooleanTypeRule diff --git a/src/theory/builtin/kinds b/src/theory/builtin/kinds index d140d1990..508106106 100644 --- a/src/theory/builtin/kinds +++ b/src/theory/builtin/kinds @@ -246,19 +246,18 @@ typechecker "theory/builtin/theory_builtin_type_rules.h" properties stable-infinite -# Rewriter responisble for all the terms of the theory +# Rewriter responsible for all the terms of the theory rewriter ::CVC4::theory::builtin::TheoryBuiltinRewriter "theory/builtin/theory_builtin_rewriter.h" sort BUILTIN_OPERATOR_TYPE \ Cardinality::INTEGERS \ not-well-founded \ - "Built in type for built in operators" + "the type for built-in operators" variable SORT_TAG "sort tag" -parameterized SORT_TYPE SORT_TAG 0: "sort type" +parameterized SORT_TYPE SORT_TAG 0: "specifies types of user-declared 'uninterpreted' sorts" # This is really "unknown" cardinality, but maybe this will be good -# enough (for now) ? Once we support quantifiers, maybe reconsider -# this.. +# enough (for now) ? cardinality SORT_TYPE "Cardinality(Cardinality::INTEGERS)" well-founded SORT_TYPE \ "::CVC4::theory::builtin::SortProperties::isWellFounded(%TYPE%)" \ @@ -268,7 +267,7 @@ constant UNINTERPRETED_CONSTANT \ ::CVC4::UninterpretedConstant \ ::CVC4::UninterpretedConstantHashFunction \ "util/uninterpreted_constant.h" \ - "The kind of expressions representing uninterpreted constants" + "the kind of expressions representing uninterpreted constants; payload is an instance of the CVC4::UninterpretedConstant class (used in models)" typerule UNINTERPRETED_CONSTANT ::CVC4::theory::builtin::UninterpretedConstantTypeRule enumerator SORT_TYPE \ ::CVC4::theory::builtin::UninterpretedSortEnumerator \ @@ -278,7 +277,7 @@ constant ABSTRACT_VALUE \ ::CVC4::AbstractValue \ ::CVC4::AbstractValueHashFunction \ "util/abstract_value.h" \ - "The kind of expressions representing abstract values (other than uninterpreted sort constants)" + "the kind of expressions representing abstract values (other than uninterpreted sort constants); payload is an instance of the CVC4::AbstractValue class (used in models)" typerule ABSTRACT_VALUE ::CVC4::theory::builtin::AbstractValueTypeRule # A kind representing "inlined" operators defined with OPERATOR @@ -289,39 +288,41 @@ constant BUILTIN \ ::CVC4::Kind \ ::CVC4::kind::KindHashFunction \ "expr/kind.h" \ - "The kind of expressions representing built-in operators" + "the kind of expressions representing built-in operators" -variable FUNCTION "function" -parameterized APPLY FUNCTION 0: "defined function application" +variable FUNCTION "a defined function" +parameterized APPLY FUNCTION 0: "application of a defined function" -operator EQUAL 2 "equality" -operator DISTINCT 2: "disequality" -variable VARIABLE "variable" -variable BOUND_VARIABLE "bound variable" -variable SKOLEM "skolem var" -operator SEXPR 0: "a symbolic expression" +operator EQUAL 2 "equality (two parameters only, sorts must match)" +operator DISTINCT 2: "disequality (N-ary, sorts must match)" +variable VARIABLE "a variable (not permitted in bindings)" +variable BOUND_VARIABLE "a bound variable (permitted in bindings and the associated lambda and quantifier bodies only)" +variable SKOLEM "a Skolem variable (internal only)" +operator SEXPR 0: "a symbolic expression (any arity)" -operator LAMBDA 2 "lambda" -operator MU 2 "mu" +operator LAMBDA 2 "a lambda expression; first parameter is a BOUND_VAR_LIST, second is lambda body" -parameterized CHAIN CHAIN_OP 2: "chained operator" +## for co-datatypes, not yet supported +# operator MU 2 "mu" + +parameterized CHAIN CHAIN_OP 2: "chained operator (N-ary), turned into a conjuction of binary applications of the operator on adjoining parameters; first parameter is a CHAIN_OP representing a binary operator, rest are arguments to that operator" constant CHAIN_OP \ ::CVC4::Chain \ ::CVC4::ChainHashFunction \ "util/chain.h" \ - "the chained operator" + "the chained operator; payload is an instance of the CVC4::Chain class" constant TYPE_CONSTANT \ ::CVC4::TypeConstant \ ::CVC4::TypeConstantHashFunction \ "expr/kind.h" \ - "basic types" -operator FUNCTION_TYPE 2: "function type" + "a representation for basic types" +operator FUNCTION_TYPE 2: "a function type" cardinality FUNCTION_TYPE \ "::CVC4::theory::builtin::FunctionProperties::computeCardinality(%TYPE%)" \ "theory/builtin/theory_builtin_type_rules.h" well-founded FUNCTION_TYPE false -operator SEXPR_TYPE 0: "symbolic expression type" +operator SEXPR_TYPE 0: "the type of a symbolic expression" cardinality SEXPR_TYPE \ "::CVC4::theory::builtin::SExprProperties::computeCardinality(%TYPE%)" \ "theory/builtin/theory_builtin_type_rules.h" @@ -335,7 +336,7 @@ typerule EQUAL ::CVC4::theory::builtin::EqualityTypeRule typerule DISTINCT ::CVC4::theory::builtin::DistinctTypeRule typerule SEXPR ::CVC4::theory::builtin::SExprTypeRule typerule LAMBDA ::CVC4::theory::builtin::LambdaTypeRule -typerule MU ::CVC4::theory::builtin::MuTypeRule +#typerule MU ::CVC4::theory::builtin::MuTypeRule typerule CHAIN ::CVC4::theory::builtin::ChainTypeRule typerule CHAIN_OP ::CVC4::theory::builtin::ChainedOperatorTypeRule @@ -343,7 +344,7 @@ constant SUBTYPE_TYPE \ ::CVC4::Predicate \ ::CVC4::PredicateHashFunction \ "util/predicate.h" \ - "predicate subtype" + "predicate subtype; payload is an instance of the CVC4::Predicate class" cardinality SUBTYPE_TYPE \ "::CVC4::theory::builtin::SubtypeProperties::computeCardinality(%TYPE%)" \ "theory/builtin/theory_builtin_type_rules.h" diff --git a/src/theory/builtin/theory_builtin_type_rules.h b/src/theory/builtin/theory_builtin_type_rules.h index 3c8953e15..aba194d95 100644 --- a/src/theory/builtin/theory_builtin_type_rules.h +++ b/src/theory/builtin/theory_builtin_type_rules.h @@ -164,6 +164,8 @@ public: } };/* class LambdaTypeRule */ +/* For co-datatypes, not yet supported-- +** class MuTypeRule { public: inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check) { @@ -180,7 +182,8 @@ public: TypeNode rangeType = n[1].getType(check); return nodeManager->mkFunctionType(argTypes, rangeType); } -};/* class MuTypeRule */ +}; +**/ class ChainTypeRule { public: diff --git a/src/theory/strings/kinds b/src/theory/strings/kinds index 48e9957d4..3134fcab0 100644 --- a/src/theory/strings/kinds +++ b/src/theory/strings/kinds @@ -1,4 +1,7 @@ -# kinds [for strings theory] +# kinds -*- sh -*- +# +# For documentation on this file format, please refer to +# src/theory/builtin/kinds. # theory THEORY_STRINGS ::CVC4::theory::strings::TheoryStrings "theory/strings/theory_strings.h" @@ -9,8 +12,7 @@ rewriter ::CVC4::theory::strings::TheoryStringsRewriter "theory/strings/theory_s typechecker "theory/strings/theory_strings_type_rules.h" - -operator STRING_CONCAT 2: "string concat" +operator STRING_CONCAT 2: "string concat (N-ary)" operator STRING_IN_REGEXP 2 "membership" operator STRING_LENGTH 1 "string length" operator STRING_SUBSTR 3 "string substr (user symbol)" @@ -97,7 +99,6 @@ typerule REGEXP_LOOP ::CVC4::theory::strings::RegExpLoopTypeRule typerule STRING_TO_REGEXP ::CVC4::theory::strings::StringToRegExpTypeRule - typerule STRING_CONCAT ::CVC4::theory::strings::StringConcatTypeRule typerule STRING_LENGTH ::CVC4::theory::strings::StringLengthTypeRule typerule STRING_SUBSTR ::CVC4::theory::strings::StringSubstrTypeRule -- cgit v1.2.3 From 44d05f7def63e5f675f80dab8829c5759db7e065 Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Fri, 20 Jun 2014 19:59:48 -0400 Subject: Sets kinds documentation --- src/theory/sets/kinds | 8 ++++---- src/theory/sets/theory_sets_type_rules.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/theory') diff --git a/src/theory/sets/kinds b/src/theory/sets/kinds index 12f114fc0..799261634 100644 --- a/src/theory/sets/kinds +++ b/src/theory/sets/kinds @@ -19,7 +19,7 @@ constant EMPTYSET \ ::CVC4::EmptySet \ ::CVC4::EmptySetHashFunction \ "util/emptyset.h" \ - "empty set" + "the empty set constant; payload is an instance of the CVC4::EmptySet class" # the type operator SET_TYPE 1 "set type" @@ -38,9 +38,9 @@ enumerator SET_TYPE \ operator UNION 2 "set union" operator INTERSECTION 2 "set intersection" operator SETMINUS 2 "set subtraction" -operator SUBSET 2 "subset" -operator MEMBER 2 "set membership" -operator SET_SINGLETON 1 "singleton set" +operator SUBSET 2 "subset predicate; first parameter a subset of second" +operator MEMBER 2 "set membership predicate; first parameter a member of second" +operator SET_SINGLETON 1 "the set of the single element given as a parameter" typerule UNION ::CVC4::theory::sets::SetsBinaryOperatorTypeRule typerule INTERSECTION ::CVC4::theory::sets::SetsBinaryOperatorTypeRule diff --git a/src/theory/sets/theory_sets_type_rules.h b/src/theory/sets/theory_sets_type_rules.h index 3b2acd956..eff81622d 100644 --- a/src/theory/sets/theory_sets_type_rules.h +++ b/src/theory/sets/theory_sets_type_rules.h @@ -105,7 +105,7 @@ struct MemberTypeRule { } return nodeManager->booleanType(); } -};/* struct SetInTypeRule */ +};/* struct MemberTypeRule */ struct SetSingletonTypeRule { inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check) @@ -118,7 +118,7 @@ struct SetSingletonTypeRule { Assert(n.getKind() == kind::SET_SINGLETON); return n[0].isConst(); } -};/* struct SetInTypeRule */ +};/* struct SetSingletonTypeRule */ struct EmptySetTypeRule { inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check) @@ -128,7 +128,7 @@ struct EmptySetTypeRule { Type setType = emptySet.getType(); return TypeNode::fromType(setType); } -}; +};/* struct EmptySetTypeRule */ struct SetsProperties { @@ -146,7 +146,7 @@ struct SetsProperties { Assert(type.isSet()); return NodeManager::currentNM()->mkConst(EmptySet(type.toType())); } -}; +};/* struct SetsProperties */ }/* CVC4::theory::sets namespace */ }/* CVC4::theory namespace */ -- cgit v1.2.3 From bfbe1d5c50547a6040bec1e9f07d47185838aeee Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Sat, 21 Jun 2014 21:13:12 -0400 Subject: Fix compiler warnings in BV-related code (unused vars mostly). --- src/prop/bvminisat/bvminisat.cpp | 1 - src/prop/bvminisat/bvminisat.h | 1 - src/theory/bv/bv_inequality_graph.h | 6 ------ 3 files changed, 8 deletions(-) (limited to 'src/theory') diff --git a/src/prop/bvminisat/bvminisat.cpp b/src/prop/bvminisat/bvminisat.cpp index 46b521e6b..7322cd0fa 100644 --- a/src/prop/bvminisat/bvminisat.cpp +++ b/src/prop/bvminisat/bvminisat.cpp @@ -26,7 +26,6 @@ BVMinisatSatSolver::BVMinisatSatSolver(context::Context* mainSatContext, const s : context::ContextNotifyObj(mainSatContext, false), d_minisat(new BVMinisat::SimpSolver(mainSatContext)), d_minisatNotify(0), - d_solveCount(0), d_assertionsCount(0), d_assertionsRealCount(mainSatContext, 0), d_lastPropagation(mainSatContext, 0), diff --git a/src/prop/bvminisat/bvminisat.h b/src/prop/bvminisat/bvminisat.h index 568d89f7f..f9d0fbd6a 100644 --- a/src/prop/bvminisat/bvminisat.h +++ b/src/prop/bvminisat/bvminisat.h @@ -55,7 +55,6 @@ private: BVMinisat::SimpSolver* d_minisat; MinisatNotify* d_minisatNotify; - unsigned d_solveCount; unsigned d_assertionsCount; context::CDO d_assertionsRealCount; context::CDO d_lastPropagation; diff --git a/src/theory/bv/bv_inequality_graph.h b/src/theory/bv/bv_inequality_graph.h index 9a898ebe6..4a6757871 100644 --- a/src/theory/bv/bv_inequality_graph.h +++ b/src/theory/bv/bv_inequality_graph.h @@ -39,9 +39,6 @@ extern const ReasonId AxiomReasonId; class InequalityGraph : public context::ContextNotifyObj{ - - context::Context* d_context; - struct InequalityEdge { TermId next; ReasonId reason; @@ -126,7 +123,6 @@ class InequalityGraph : public context::ContextNotifyObj{ context::CDO d_inConflict; std::vector d_conflict; - bool d_signed; ModelValues d_modelValues; void initializeModelValue(TNode node); @@ -214,12 +210,10 @@ public: InequalityGraph(context::Context* c, bool s = false) : ContextNotifyObj(c), - d_context(c), d_ineqNodes(), d_ineqEdges(), d_inConflict(c, false), d_conflict(), - d_signed(s), d_modelValues(c), d_disequalities(c), d_disequalitiesAlreadySplit(), -- cgit v1.2.3 From bc7b92859698a0b23aa20dc8811be8bbe84e164e Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Sat, 21 Jun 2014 21:12:36 -0400 Subject: Fix compiler warnings (mostly unused variables). --- src/compat/cvc3_compat.cpp | 5 ++++- src/proof/proof_manager.h | 2 +- src/prop/minisat/minisat.cpp | 1 - src/prop/minisat/minisat.h | 3 --- src/prop/theory_proxy.h | 4 ---- src/theory/shared_terms_database.cpp | 1 - src/theory/shared_terms_database.h | 3 --- src/theory/substitutions.h | 4 ---- 8 files changed, 5 insertions(+), 18 deletions(-) (limited to 'src/theory') diff --git a/src/compat/cvc3_compat.cpp b/src/compat/cvc3_compat.cpp index b4ab57283..37d4c503d 100644 --- a/src/compat/cvc3_compat.cpp +++ b/src/compat/cvc3_compat.cpp @@ -416,6 +416,8 @@ bool Expr::isAtomicFormula() const { case CVC4::kind::IFF: case CVC4::kind::IMPLIES: return false; + default: + ; /* fall through */ } for (Expr::iterator k = begin(), kend=end(); k != kend; ++k) { if (!CVC3::Expr(*k).isAtomic()) { @@ -450,8 +452,9 @@ bool Expr::isBoolConnective() const { case CVC4::kind::XOR: case CVC4::kind::ITE: return true; + default: + return false; } - return false; } bool Expr::isPropLiteral() const { diff --git a/src/proof/proof_manager.h b/src/proof/proof_manager.h index ab8a7b2bc..02bc07847 100644 --- a/src/proof/proof_manager.h +++ b/src/proof/proof_manager.h @@ -86,7 +86,7 @@ class ProofManager { VarSet d_propVars; Proof* d_fullProof; - ProofFormat d_format; + ProofFormat d_format; // used for now only in debug builds protected: std::string d_logic; diff --git a/src/prop/minisat/minisat.cpp b/src/prop/minisat/minisat.cpp index c4fe58fd7..e4956ecc8 100644 --- a/src/prop/minisat/minisat.cpp +++ b/src/prop/minisat/minisat.cpp @@ -29,7 +29,6 @@ using namespace CVC4::prop; MinisatSatSolver::MinisatSatSolver() : d_minisat(NULL), - d_theoryProxy(NULL), d_context(NULL) {} diff --git a/src/prop/minisat/minisat.h b/src/prop/minisat/minisat.h index 201879eb0..a919bbcc4 100644 --- a/src/prop/minisat/minisat.h +++ b/src/prop/minisat/minisat.h @@ -30,9 +30,6 @@ class MinisatSatSolver : public DPLLSatSolverInterface { /** The SatSolver used */ Minisat::SimpSolver* d_minisat; - /** The SatSolver uses this to communicate with the theories */ - TheoryProxy* d_theoryProxy; - /** Context we will be using to synchronize the sat solver */ context::Context* d_context; diff --git a/src/prop/theory_proxy.h b/src/prop/theory_proxy.h index 92c81616b..f07f5487e 100644 --- a/src/prop/theory_proxy.h +++ b/src/prop/theory_proxy.h @@ -57,9 +57,6 @@ class TheoryProxy { /** The theory engine we are using */ TheoryEngine* d_theoryEngine; - /** Context we will be using to synchronzie the sat solver */ - context::Context* d_context; - /** Queue of asserted facts */ context::CDQueue d_queue; @@ -135,7 +132,6 @@ inline TheoryProxy::TheoryProxy(PropEngine* propEngine, d_cnfStream(cnfStream), d_decisionEngine(decisionEngine), d_theoryEngine(theoryEngine), - d_context(context), d_queue(context) {} diff --git a/src/theory/shared_terms_database.cpp b/src/theory/shared_terms_database.cpp index 3a767b5c3..7669a9914 100644 --- a/src/theory/shared_terms_database.cpp +++ b/src/theory/shared_terms_database.cpp @@ -23,7 +23,6 @@ using namespace theory; SharedTermsDatabase::SharedTermsDatabase(TheoryEngine* theoryEngine, context::Context* context) : ContextNotifyObj(context) -, d_context(context) , d_statSharedTerms("theory::shared_terms", 0) , d_addedSharedTermsSize(context, 0) , d_termsToTheories(context) diff --git a/src/theory/shared_terms_database.h b/src/theory/shared_terms_database.h index f5724f488..dba904cdf 100644 --- a/src/theory/shared_terms_database.h +++ b/src/theory/shared_terms_database.h @@ -39,9 +39,6 @@ public: private: - /** The context */ - context::Context* d_context; - /** Some statistics */ IntStat d_statSharedTerms; diff --git a/src/theory/substitutions.h b/src/theory/substitutions.h index 8572a6abd..48b8fa7e8 100644 --- a/src/theory/substitutions.h +++ b/src/theory/substitutions.h @@ -53,9 +53,6 @@ private: typedef std::hash_map NodeCache; - /** The context within which this SubstitutionMap was constructed. */ - context::Context* d_context; - /** The variables, in order of addition */ NodeMap d_substitutions; @@ -98,7 +95,6 @@ private: public: SubstitutionMap(context::Context* context, bool substituteUnderQuantifiers = true, bool solvedForm = false) : - d_context(context), d_substitutions(context), d_substitutionCache(), d_substituteUnderQuantifiers(substituteUnderQuantifiers), -- cgit v1.2.3 From b8ddf766460bfcf475e08ff52c889246e78f76cc Mon Sep 17 00:00:00 2001 From: Kshitij Bansal Date: Sun, 22 Jun 2014 01:17:27 -0400 Subject: Renaming of SMT2 operator names, kinds for set theory * SET_SINGLETON kind renamed to just SINGLETON * "setenum" smt2 opertor renamed to "singleton"[1] * "in" smt2 operator renamed to "member"[2] [1] It was anyhow accepting exactly one argument, so was bit misleading to call set enumerator. [2] The corresponding kind was called MEMBER, so this will also make them consistent. Only inconsistency now is for subset: kind is called SUBSET but operator is called "subseteq". --- examples/sets-translate/sets_translate.cpp | 2 +- src/parser/smt2/smt2.cpp | 4 +- src/printer/smt2/smt2_printer.cpp | 6 +- src/theory/quantifiers/term_database.cpp | 2 +- src/theory/quantifiers/trigger.cpp | 2 +- src/theory/sets/expr_patterns.h | 4 +- src/theory/sets/kinds | 8 +- src/theory/sets/theory_sets_private.cpp | 12 +- src/theory/sets/theory_sets_rewriter.cpp | 12 +- src/theory/sets/theory_sets_type_enumerator.h | 2 +- src/theory/sets/theory_sets_type_rules.h | 8 +- test/regress/regress0/bug567.smt2 | 4 +- .../regress0/sets/copy_check_heap_access_33_4.smt2 | 18 +- test/regress/regress0/sets/emptyset.smt2 | 2 +- test/regress/regress0/sets/eqtest.smt2 | 4 +- test/regress/regress0/sets/error2.smt2 | 2 +- .../sets/feb3/ListElts.hs.fqout.cvc4.317.smt2 | 4 +- test/regress/regress0/sets/fuzz14418.smt2 | 26 +-- test/regress/regress0/sets/fuzz15201.smt2 | 54 ++--- test/regress/regress0/sets/fuzz31811.smt2 | 18 +- .../sets/jan24/deepmeas0.hs.fqout.cvc4.47.smt2 | 4 +- .../sets/jan24/deepmeas0.hs.fqout.small.smt2 | 6 +- .../regress0/sets/jan24/insert_invariant_37_2.smt2 | 218 ++++++++++----------- .../sets/jan24/remove_check_free_31_6.smt2 | 58 +++--- .../sets/jan27/ListConcat.hs.fqout.cvc4.177.smt2 | 4 +- .../sets/jan27/ListElem.hs.fqout.cvc4.38.smt2 | 4 +- .../sets/jan27/deepmeas0.hs.fqout.cvc4.41.smt2 | 4 +- .../jan28/TalkingAboutSets.hs.fqout.cvc4.3577.smt2 | 4 +- .../sets/jan30/UniqueZipper.hs.fqout.cvc4.10.smt2 | 4 +- .../jan30/UniqueZipper.hs.fqout.cvc4.1832.smt2 | 4 +- .../jan30/UniqueZipper.hs.fqout.minimized10.smt2 | 6 +- .../jan30/UniqueZipper.hs.fqout.minimized1832.smt2 | 6 +- .../UniqueZipper.hs.1030minimized.cvc4.smt2 | 4 +- .../UniqueZipper.hs.1030minimized2.cvc4.smt2 | 4 +- .../mar2014/lemmabug-ListElts317minimized.smt2 | 14 +- .../regress0/sets/mar2014/sharing-preregister.smt2 | 4 +- test/regress/regress0/sets/mar2014/small.smt2 | 6 +- test/regress/regress0/sets/mar2014/smaller.smt2 | 4 +- .../sets/rec_copy_loop_check_heap_access_43_4.smt2 | 18 +- test/regress/regress0/sets/setel-eq.smt2 | 4 +- test/regress/regress0/sets/setofsets-disequal.smt2 | 80 ++++---- test/regress/regress0/sets/sets-equal.smt2 | 6 +- test/regress/regress0/sets/sets-inter.smt2 | 6 +- test/regress/regress0/sets/sets-new.smt2 | 10 +- test/regress/regress0/sets/sets-sample.smt2 | 16 +- test/regress/regress0/sets/sets-sharing.smt2 | 4 +- test/regress/regress0/sets/sets-union.smt2 | 6 +- test/regress/regress0/sets/sharingbug.smt2 | 6 +- test/regress/regress0/sets/union-1a-flip.smt2 | 4 +- test/regress/regress0/sets/union-1a.smt2 | 4 +- test/regress/regress0/sets/union-1b-flip.smt2 | 4 +- test/regress/regress0/sets/union-1b.smt2 | 4 +- test/regress/regress0/sets/union-2.smt2 | 6 +- 53 files changed, 365 insertions(+), 365 deletions(-) (limited to 'src/theory') diff --git a/examples/sets-translate/sets_translate.cpp b/examples/sets-translate/sets_translate.cpp index e23b7cec2..5257915b0 100644 --- a/examples/sets-translate/sets_translate.cpp +++ b/examples/sets-translate/sets_translate.cpp @@ -127,7 +127,7 @@ class Mapper { << " ( (x " << elementType << ") )" << " " << name << "" << " (store emptyset" << elementTypeAsString << " x true) )" << endl; - setoperators[ make_pair(t, kind::SET_SINGLETON) ] = + setoperators[ make_pair(t, kind::SINGLETON) ] = em->mkVar( std::string("setenum") + elementTypeAsString, em->mkFunctionType( elementType, t ) ); diff --git a/src/parser/smt2/smt2.cpp b/src/parser/smt2/smt2.cpp index 5baa0b16f..a0d759cc2 100644 --- a/src/parser/smt2/smt2.cpp +++ b/src/parser/smt2/smt2.cpp @@ -150,8 +150,8 @@ void Smt2::addTheory(Theory theory) { addOperator(kind::INTERSECTION, "intersection"); addOperator(kind::SETMINUS, "setminus"); addOperator(kind::SUBSET, "subseteq"); - addOperator(kind::MEMBER, "in"); - addOperator(kind::SET_SINGLETON, "setenum"); + addOperator(kind::MEMBER, "member"); + addOperator(kind::SINGLETON, "singleton"); break; case THEORY_DATATYPES: diff --git a/src/printer/smt2/smt2_printer.cpp b/src/printer/smt2/smt2_printer.cpp index 95f35a5a6..dbdc65ba9 100644 --- a/src/printer/smt2/smt2_printer.cpp +++ b/src/printer/smt2/smt2_printer.cpp @@ -409,7 +409,7 @@ void Smt2Printer::toStream(std::ostream& out, TNode n, case kind::SUBSET: case kind::MEMBER: case kind::SET_TYPE: - case kind::SET_SINGLETON: out << smtKindString(k) << " "; break; + case kind::SINGLETON: out << smtKindString(k) << " "; break; // datatypes case kind::APPLY_TYPE_ASCRIPTION: { @@ -610,9 +610,9 @@ static string smtKindString(Kind k) throw() { case kind::INTERSECTION: return "intersection"; case kind::SETMINUS: return "setminus"; case kind::SUBSET: return "subseteq"; - case kind::MEMBER: return "in"; + case kind::MEMBER: return "member"; case kind::SET_TYPE: return "Set"; - case kind::SET_SINGLETON: return "setenum"; + case kind::SINGLETON: return "singleton"; default: ; /* fall through */ } diff --git a/src/theory/quantifiers/term_database.cpp b/src/theory/quantifiers/term_database.cpp index 9f25b0825..2c309899d 100644 --- a/src/theory/quantifiers/term_database.cpp +++ b/src/theory/quantifiers/term_database.cpp @@ -74,7 +74,7 @@ unsigned TermDb::getNumGroundTerms( Node f ) { Node TermDb::getOperator( Node n ) { //return n.getOperator(); Kind k = n.getKind(); - if( k==SELECT || k==STORE || k==UNION || k==INTERSECTION || k==SUBSET || k==SETMINUS || k==MEMBER || k==SET_SINGLETON ){ + if( k==SELECT || k==STORE || k==UNION || k==INTERSECTION || k==SUBSET || k==SETMINUS || k==MEMBER || k==SINGLETON ){ //since it is parametric, use a particular one as op TypeNode tn = n[0].getType(); Node op = n.getOperator(); diff --git a/src/theory/quantifiers/trigger.cpp b/src/theory/quantifiers/trigger.cpp index 77a4efff5..0d8f2c06d 100644 --- a/src/theory/quantifiers/trigger.cpp +++ b/src/theory/quantifiers/trigger.cpp @@ -330,7 +330,7 @@ bool Trigger::isAtomicTrigger( Node n ){ bool Trigger::isAtomicTriggerKind( Kind k ) { return k==APPLY_UF || k==SELECT || k==STORE || k==APPLY_CONSTRUCTOR || k==APPLY_SELECTOR_TOTAL || k==APPLY_TESTER || - k==UNION || k==INTERSECTION || k==SUBSET || k==SETMINUS || k==MEMBER || k==SET_SINGLETON; + k==UNION || k==INTERSECTION || k==SUBSET || k==SETMINUS || k==MEMBER || k==SINGLETON; } bool Trigger::isSimpleTrigger( Node n ){ diff --git a/src/theory/sets/expr_patterns.h b/src/theory/sets/expr_patterns.h index bc5b6b9e0..93307d227 100644 --- a/src/theory/sets/expr_patterns.h +++ b/src/theory/sets/expr_patterns.h @@ -44,8 +44,8 @@ static Node MEMBER(TNode a, TNode b) { return NodeManager::currentNM()->mkNode(kind::MEMBER, a, b); } -static Node SET_SINGLETON(TNode a) { - return NodeManager::currentNM()->mkNode(kind::SET_SINGLETON, a); +static Node SINGLETON(TNode a) { + return NodeManager::currentNM()->mkNode(kind::SINGLETON, a); } static Node EQUAL(TNode a, TNode b) { diff --git a/src/theory/sets/kinds b/src/theory/sets/kinds index 799261634..06d3be5a0 100644 --- a/src/theory/sets/kinds +++ b/src/theory/sets/kinds @@ -22,7 +22,7 @@ constant EMPTYSET \ "the empty set constant; payload is an instance of the CVC4::EmptySet class" # the type -operator SET_TYPE 1 "set type" +operator SET_TYPE 1 "set type, takes as parameter the type of the elements" cardinality SET_TYPE \ "::CVC4::theory::sets::SetsProperties::computeCardinality(%TYPE%)" \ "theory/sets/theory_sets_type_rules.h" @@ -40,19 +40,19 @@ operator INTERSECTION 2 "set intersection" operator SETMINUS 2 "set subtraction" operator SUBSET 2 "subset predicate; first parameter a subset of second" operator MEMBER 2 "set membership predicate; first parameter a member of second" -operator SET_SINGLETON 1 "the set of the single element given as a parameter" +operator SINGLETON 1 "the set of the single element given as a parameter" typerule UNION ::CVC4::theory::sets::SetsBinaryOperatorTypeRule typerule INTERSECTION ::CVC4::theory::sets::SetsBinaryOperatorTypeRule typerule SETMINUS ::CVC4::theory::sets::SetsBinaryOperatorTypeRule typerule SUBSET ::CVC4::theory::sets::SubsetTypeRule typerule MEMBER ::CVC4::theory::sets::MemberTypeRule -typerule SET_SINGLETON ::CVC4::theory::sets::SetSingletonTypeRule +typerule SINGLETON ::CVC4::theory::sets::SingletonTypeRule typerule EMPTYSET ::CVC4::theory::sets::EmptySetTypeRule construle UNION ::CVC4::theory::sets::SetsBinaryOperatorTypeRule construle INTERSECTION ::CVC4::theory::sets::SetsBinaryOperatorTypeRule construle SETMINUS ::CVC4::theory::sets::SetsBinaryOperatorTypeRule -construle SET_SINGLETON ::CVC4::theory::sets::SetSingletonTypeRule +construle SINGLETON ::CVC4::theory::sets::SingletonTypeRule endtheory diff --git a/src/theory/sets/theory_sets_private.cpp b/src/theory/sets/theory_sets_private.cpp index f768bd62d..c06f1bd5e 100644 --- a/src/theory/sets/theory_sets_private.cpp +++ b/src/theory/sets/theory_sets_private.cpp @@ -225,7 +225,7 @@ void TheorySetsPrivate::assertMemebership(TNode fact, TNode reason, bool learnt) if(S.getKind() == kind::UNION || S.getKind() == kind::INTERSECTION || S.getKind() == kind::SETMINUS || - S.getKind() == kind::SET_SINGLETON) { + S.getKind() == kind::SINGLETON) { doSettermPropagation(x, S); if(d_conflict) return; }// propagation: children @@ -276,7 +276,7 @@ void TheorySetsPrivate::doSettermPropagation(TNode x, TNode S) left_literal = MEMBER(x, S[0]) ; right_literal = NOT( MEMBER(x, S[1]) ); break; - case kind::SET_SINGLETON: { + case kind::SINGLETON: { Node atom = MEMBER(x, S); if(holds(atom, true)) { learnLiteral(EQUAL(x, S[0]), true, atom); @@ -535,9 +535,9 @@ Node TheorySetsPrivate::elementsToShape(Elements elements, TypeNode setType) con return nm->mkConst(EmptySet(nm->toType(setType))); } else { Elements::iterator it = elements.begin(); - Node cur = SET_SINGLETON(*it); + Node cur = SINGLETON(*it); while( ++it != elements.end() ) { - cur = nm->mkNode(kind::UNION, cur, SET_SINGLETON(*it)); + cur = nm->mkNode(kind::UNION, cur, SINGLETON(*it)); } return cur; } @@ -948,7 +948,7 @@ void TheorySetsPrivate::preRegisterTerm(TNode node) d_equalityEngine.addTriggerTerm(node, THEORY_SETS); // d_equalityEngine.addTerm(node); } - if(node.getKind() == kind::SET_SINGLETON) { + if(node.getKind() == kind::SINGLETON) { Node true_node = NodeManager::currentNM()->mkConst(true); learnLiteral(MEMBER(node[0], node), true, true_node); //intentional fallthrough @@ -1125,7 +1125,7 @@ void TheorySetsPrivate::TermInfoManager::pushToSettermPropagationQueue if(S.getKind() == kind::UNION || S.getKind() == kind::INTERSECTION || S.getKind() == kind::SETMINUS || - S.getKind() == kind::SET_SINGLETON) { + S.getKind() == kind::SINGLETON) { d_theory.d_settermPropagationQueue.push_back(std::make_pair(x, S)); }// propagation: children diff --git a/src/theory/sets/theory_sets_rewriter.cpp b/src/theory/sets/theory_sets_rewriter.cpp index 7b02c1bfb..ce469cc0c 100644 --- a/src/theory/sets/theory_sets_rewriter.cpp +++ b/src/theory/sets/theory_sets_rewriter.cpp @@ -32,11 +32,11 @@ bool checkConstantMembership(TNode elementTerm, TNode setTerm) return false; } - if(setTerm.getKind() == kind::SET_SINGLETON) { + if(setTerm.getKind() == kind::SINGLETON) { return elementTerm == setTerm[0]; } - Assert(setTerm.getKind() == kind::UNION && setTerm[1].getKind() == kind::SET_SINGLETON, + Assert(setTerm.getKind() == kind::UNION && setTerm[1].getKind() == kind::SINGLETON, "kind was %d, term: %s", setTerm.getKind(), setTerm.toString().c_str()); return elementTerm == setTerm[1][0] || checkConstantMembership(elementTerm, setTerm[0]); @@ -44,7 +44,7 @@ bool checkConstantMembership(TNode elementTerm, TNode setTerm) // switch(setTerm.getKind()) { // case kind::EMPTYSET: // return false; - // case kind::SET_SINGLETON: + // case kind::SINGLETON: // return elementTerm == setTerm[0]; // case kind::UNION: // return checkConstantMembership(elementTerm, setTerm[0]) || @@ -195,7 +195,7 @@ const Elements& collectConstantElements(TNode setterm, SettermElementsMap& sette case kind::EMPTYSET: /* assign emptyset, which is default */ break; - case kind::SET_SINGLETON: + case kind::SINGLETON: Assert(setterm[0].isConst()); cur.insert(TheorySetsRewriter::preRewrite(setterm[0]).node); break; @@ -220,10 +220,10 @@ Node elementsToNormalConstant(Elements elements, } else { Elements::iterator it = elements.begin(); - Node cur = nm->mkNode(kind::SET_SINGLETON, *it); + Node cur = nm->mkNode(kind::SINGLETON, *it); while( ++it != elements.end() ) { cur = nm->mkNode(kind::UNION, cur, - nm->mkNode(kind::SET_SINGLETON, *it)); + nm->mkNode(kind::SINGLETON, *it)); } return cur; } diff --git a/src/theory/sets/theory_sets_type_enumerator.h b/src/theory/sets/theory_sets_type_enumerator.h index 2f4cc6a2f..97fbfe94f 100644 --- a/src/theory/sets/theory_sets_type_enumerator.h +++ b/src/theory/sets/theory_sets_type_enumerator.h @@ -76,7 +76,7 @@ public: Assert(d_index == 0 || d_index == 1); if(d_index == 1) { - n = d_nm->mkNode(kind::SET_SINGLETON, *(*(d_constituentVec[0]))); + n = d_nm->mkNode(kind::SINGLETON, *(*(d_constituentVec[0]))); } // for (unsigned i = 0; i < d_indexVec.size(); ++i) { diff --git a/src/theory/sets/theory_sets_type_rules.h b/src/theory/sets/theory_sets_type_rules.h index eff81622d..2267ee22a 100644 --- a/src/theory/sets/theory_sets_type_rules.h +++ b/src/theory/sets/theory_sets_type_rules.h @@ -107,18 +107,18 @@ struct MemberTypeRule { } };/* struct MemberTypeRule */ -struct SetSingletonTypeRule { +struct SingletonTypeRule { inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check) throw (TypeCheckingExceptionPrivate, AssertionException) { - Assert(n.getKind() == kind::SET_SINGLETON); + Assert(n.getKind() == kind::SINGLETON); return nodeManager->mkSetType(n[0].getType(check)); } inline static bool computeIsConst(NodeManager* nodeManager, TNode n) { - Assert(n.getKind() == kind::SET_SINGLETON); + Assert(n.getKind() == kind::SINGLETON); return n[0].isConst(); } -};/* struct SetSingletonTypeRule */ +};/* struct SingletonTypeRule */ struct EmptySetTypeRule { inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check) diff --git a/test/regress/regress0/bug567.smt2 b/test/regress/regress0/bug567.smt2 index 265d456b6..109940090 100644 --- a/test/regress/regress0/bug567.smt2 +++ b/test/regress/regress0/bug567.smt2 @@ -27,7 +27,7 @@ (assert (forall ((l4 List0) (e1 Int)) (! (= (buggySortedIns e1 l4) (ite (is-Nil l4) (Cons e1 Nil) (ite (<= (head0 l4) e1) (Cons (head0 l4) (buggySortedIns e1 (tail0 l4))) (Cons e1 l4)))) :pattern ((buggySortedIns e1 l4))))) (assert (forall ((l3 List0) (e Int)) (! (= (sortedIns e l3) (ite (is-Nil l3) (Cons e Nil) (ite (<= (head0 l3) e) (Cons (head0 l3) (sortedIns e (tail0 l3))) (Cons e l3)))) :pattern ((sortedIns e l3))))) (assert (forall ((l5 List0)) (! (= (sort l5) (ite (is-Nil l5) Nil (sortedIns (head0 l5) (sort (tail0 l5))))) :pattern ((sort l5))))) -(assert (forall ((l1 List0)) (! (= (contents l1) (ite (is-Nil l1) (as emptyset (Set Int)) (union (contents (tail0 l1)) (setenum (head0 l1))))) :pattern ((contents l1))))) +(assert (forall ((l1 List0)) (! (= (contents l1) (ite (is-Nil l1) (as emptyset (Set Int)) (union (contents (tail0 l1)) (singleton (head0 l1))))) :pattern ((contents l1))))) @@ -42,7 +42,7 @@ (pop) (push) -(assert (forall ((l4 List0) (e1 Int)) (not (let ((result2 (ite (is-Nil l4) (Cons e1 Nil) (ite (<= (head0 l4) e1) (Cons (head0 l4) (buggySortedIns e1 (tail0 l4))) (Cons e1 l4))))) (and (= (contents result2) (union (contents l4) (setenum e1))) (isSorted result2) (= (size result2) (+ (size l4) 1))))))) +(assert (forall ((l4 List0) (e1 Int)) (not (let ((result2 (ite (is-Nil l4) (Cons e1 Nil) (ite (<= (head0 l4) e1) (Cons (head0 l4) (buggySortedIns e1 (tail0 l4))) (Cons e1 l4))))) (and (= (contents result2) (union (contents l4) (singleton e1))) (isSorted result2) (= (size result2) (+ (size l4) 1))))))) (check-sat) (pop) diff --git a/test/regress/regress0/sets/copy_check_heap_access_33_4.smt2 b/test/regress/regress0/sets/copy_check_heap_access_33_4.smt2 index 9ba2d84d3..b4ddfec41 100644 --- a/test/regress/regress0/sets/copy_check_heap_access_33_4.smt2 +++ b/test/regress/regress0/sets/copy_check_heap_access_33_4.smt2 @@ -46,15 +46,15 @@ (assert (! (forall ((l1 Loc) (l2 Loc)) (or (not Axiom_1$0) (or (<= (read$0 data$0 l1) (read$0 data$0 l2)) - (not (Btwn$0 next$0 l1 l2 null$0)) (not (in l1 sk_?X_4$0)) - (not (in l2 sk_?X_4$0))))) + (not (Btwn$0 next$0 l1 l2 null$0)) (not (member l1 sk_?X_4$0)) + (not (member l2 sk_?X_4$0))))) :named sortedness_3)) (assert (! (= (read$1 next$0 null$0) null$0) :named read_null_1)) -(assert (! (not (in tmp_2$0 Alloc$0)) :named new_31_11)) +(assert (! (not (member tmp_2$0 Alloc$0)) :named new_31_11)) -(assert (! (not (in null$0 Alloc$0)) :named initial_footprint_of_copy_23_11_2)) +(assert (! (not (member null$0 Alloc$0)) :named initial_footprint_of_copy_23_11_2)) (assert (! (not (= lst$0 null$0)) :named if_else_26_6)) @@ -67,7 +67,7 @@ (assert (! (= cp_2$0 res_1$0) :named assign_32_4)) -(assert (! (= FP_1$0 (union FP$0 (setenum tmp_2$0))) :named assign_31_11)) +(assert (! (= FP_1$0 (union FP$0 (singleton tmp_2$0))) :named assign_31_11)) (assert (! (or (and (Btwn$0 next$0 lst$0 null$0 null$0) Axiom_1$0) (not (slseg_struct$0 sk_?X_4$0 data$0 next$0 lst$0 null$0))) @@ -76,13 +76,13 @@ (assert (! (forall ((l1 Loc)) (or (and (Btwn$0 next$0 lst$0 l1 null$0) - (in l1 (slseg_domain$0 data$0 next$0 lst$0 null$0)) + (member l1 (slseg_domain$0 data$0 next$0 lst$0 null$0)) (not (= l1 null$0))) (and (or (= l1 null$0) (not (Btwn$0 next$0 lst$0 l1 null$0))) - (not (in l1 (slseg_domain$0 data$0 next$0 lst$0 null$0)))))) + (not (member l1 (slseg_domain$0 data$0 next$0 lst$0 null$0)))))) :named slseg_footprint_2)) -(assert (! (not (in curr_2$0 FP_1$0)) :named check_heap_access_33_4)) +(assert (! (not (member curr_2$0 FP_1$0)) :named check_heap_access_33_4)) (assert (! (not (= tmp_2$0 null$0)) :named new_31_11_1)) @@ -99,7 +99,7 @@ (assert (! (= FP_Caller_1$0 (setminus FP_Caller$0 FP$0)) :named assign_26_2_1)) -(assert (! (= Alloc_1$0 (union Alloc$0 (setenum tmp_2$0))) :named assign_31_11_1)) +(assert (! (= Alloc_1$0 (union Alloc$0 (singleton tmp_2$0))) :named assign_31_11_1)) (assert (! (forall ((?x Loc)) (Btwn$0 next$0 ?x ?x ?x)) :named btwn_refl_1)) diff --git a/test/regress/regress0/sets/emptyset.smt2 b/test/regress/regress0/sets/emptyset.smt2 index 47fc25661..2b2322d46 100644 --- a/test/regress/regress0/sets/emptyset.smt2 +++ b/test/regress/regress0/sets/emptyset.smt2 @@ -1,4 +1,4 @@ (set-logic ALL_SUPPORTED) (set-info :status unsat) -(assert (in 5 (as emptyset (Set Int) ))) +(assert (member 5 (as emptyset (Set Int) ))) (check-sat) diff --git a/test/regress/regress0/sets/eqtest.smt2 b/test/regress/regress0/sets/eqtest.smt2 index 02577b00a..cb816a306 100644 --- a/test/regress/regress0/sets/eqtest.smt2 +++ b/test/regress/regress0/sets/eqtest.smt2 @@ -10,8 +10,8 @@ (declare-fun H () (Set Int) ) (declare-fun I () (Set Int) ) (declare-fun x () Int) -(assert (in x (intersection (union A B) C))) -(assert (not (in x G))) +(assert (member x (intersection (union A B) C))) +(assert (not (member x G))) (assert (= (union A B) D)) (assert (= C (intersection E F))) (assert (and (= F H) (= G H) (= H I))) diff --git a/test/regress/regress0/sets/error2.smt2 b/test/regress/regress0/sets/error2.smt2 index ac678c552..0b8c5ab65 100644 --- a/test/regress/regress0/sets/error2.smt2 +++ b/test/regress/regress0/sets/error2.smt2 @@ -1,4 +1,4 @@ (set-logic QF_ALL_SUPPORTED) (set-info :status unsat) -(assert (= (as emptyset (Set Int)) (setenum 5))) +(assert (= (as emptyset (Set Int)) (singleton 5))) (check-sat) diff --git a/test/regress/regress0/sets/feb3/ListElts.hs.fqout.cvc4.317.smt2 b/test/regress/regress0/sets/feb3/ListElts.hs.fqout.cvc4.317.smt2 index 7a8661e4d..87cb9b73d 100644 --- a/test/regress/regress0/sets/feb3/ListElts.hs.fqout.cvc4.317.smt2 +++ b/test/regress/regress0/sets/feb3/ListElts.hs.fqout.cvc4.317.smt2 @@ -4,8 +4,8 @@ (define-sort Elt () Int) (define-sort mySet () (Set Elt )) (define-fun smt_set_emp () mySet (as emptyset mySet)) -(define-fun smt_set_mem ((x Elt) (s mySet)) Bool (in x s)) -(define-fun smt_set_add ((s mySet) (x Elt)) mySet (union s (setenum x))) +(define-fun smt_set_mem ((x Elt) (s mySet)) Bool (member x s)) +(define-fun smt_set_add ((s mySet) (x Elt)) mySet (union s (singleton x))) (define-fun smt_set_cup ((s1 mySet) (s2 mySet)) mySet (union s1 s2)) (define-fun smt_set_cap ((s1 mySet) (s2 mySet)) mySet (intersection s1 s2)) ;(define-fun smt_set_com ((s mySet)) mySet ((_ map not) s)) diff --git a/test/regress/regress0/sets/fuzz14418.smt2 b/test/regress/regress0/sets/fuzz14418.smt2 index d5a49c601..e7a7be97a 100644 --- a/test/regress/regress0/sets/fuzz14418.smt2 +++ b/test/regress/regress0/sets/fuzz14418.smt2 @@ -36,19 +36,19 @@ (let ((e16 (f1 e14 v1 v4))) (let ((e17 (intersection e16 e15))) (let ((e18 (f1 v4 e15 v2))) -(let ((e19 (ite (p1 e13) (setenum 1) (setenum 0)))) -(let ((e20 (in v0 e17))) -(let ((e21 (in e7 e16))) -(let ((e22 (in e10 e16))) -(let ((e23 (in e8 e17))) -(let ((e24 (in e9 e14))) -(let ((e25 (in e8 e16))) -(let ((e26 (in v0 e13))) -(let ((e27 (in e12 v4))) -(let ((e28 (in e8 e14))) -(let ((e29 (in e8 v1))) -(let ((e30 (in e10 e13))) -(let ((e31 (in e7 e13))) +(let ((e19 (ite (p1 e13) (singleton 1) (singleton 0)))) +(let ((e20 (member v0 e17))) +(let ((e21 (member e7 e16))) +(let ((e22 (member e10 e16))) +(let ((e23 (member e8 e17))) +(let ((e24 (member e9 e14))) +(let ((e25 (member e8 e16))) +(let ((e26 (member v0 e13))) +(let ((e27 (member e12 v4))) +(let ((e28 (member e8 e14))) +(let ((e29 (member e8 v1))) +(let ((e30 (member e10 e13))) +(let ((e31 (member e7 e13))) (let ((e32 (f1 e13 e13 e13))) (let ((e33 (f1 e18 v4 e17))) (let ((e34 (f1 v2 v2 e15))) diff --git a/test/regress/regress0/sets/fuzz15201.smt2 b/test/regress/regress0/sets/fuzz15201.smt2 index 8ddeb36d2..650c0ead1 100644 --- a/test/regress/regress0/sets/fuzz15201.smt2 +++ b/test/regress/regress0/sets/fuzz15201.smt2 @@ -33,37 +33,37 @@ (let ((e20 (intersection e17 e18))) (let ((e21 (intersection v1 e16))) (let ((e22 (setminus e20 e16))) -(let ((e23 (ite (p1 v2 e18 e21) (setenum 1) (setenum 0)))) +(let ((e23 (ite (p1 v2 e18 e21) (singleton 1) (singleton 0)))) (let ((e24 (setminus e17 e23))) (let ((e25 (union v2 e22))) (let ((e26 (union e24 e18))) -(let ((e27 (ite (p1 e20 e19 e25) (setenum 1) (setenum 0)))) +(let ((e27 (ite (p1 e20 e19 e25) (singleton 1) (singleton 0)))) (let ((e28 (f1 e20))) -(let ((e29 (in e14 e17))) -(let ((e30 (in e13 e23))) -(let ((e31 (in e11 e25))) -(let ((e32 (in e6 v1))) -(let ((e33 (in e9 v1))) -(let ((e34 (in v0 e28))) -(let ((e35 (in e9 e16))) -(let ((e36 (in e4 e17))) -(let ((e37 (in e9 e18))) -(let ((e38 (in e14 e25))) -(let ((e39 (in e14 v2))) -(let ((e40 (in v0 v1))) -(let ((e41 (in e4 e16))) -(let ((e42 (in e15 e21))) -(let ((e43 (in e7 e22))) -(let ((e44 (in e11 v2))) -(let ((e45 (in e14 e22))) -(let ((e46 (in e11 e16))) -(let ((e47 (in e15 e22))) -(let ((e48 (in e10 e23))) -(let ((e49 (in e4 e21))) -(let ((e50 (in e5 e28))) -(let ((e51 (in e6 e28))) -(let ((e52 (in v0 e22))) -(let ((e53 (in e14 e20))) +(let ((e29 (member e14 e17))) +(let ((e30 (member e13 e23))) +(let ((e31 (member e11 e25))) +(let ((e32 (member e6 v1))) +(let ((e33 (member e9 v1))) +(let ((e34 (member v0 e28))) +(let ((e35 (member e9 e16))) +(let ((e36 (member e4 e17))) +(let ((e37 (member e9 e18))) +(let ((e38 (member e14 e25))) +(let ((e39 (member e14 v2))) +(let ((e40 (member v0 v1))) +(let ((e41 (member e4 e16))) +(let ((e42 (member e15 e21))) +(let ((e43 (member e7 e22))) +(let ((e44 (member e11 v2))) +(let ((e45 (member e14 e22))) +(let ((e46 (member e11 e16))) +(let ((e47 (member e15 e22))) +(let ((e48 (member e10 e23))) +(let ((e49 (member e4 e21))) +(let ((e50 (member e5 e28))) +(let ((e51 (member e6 e28))) +(let ((e52 (member v0 e22))) +(let ((e53 (member e14 e20))) (let ((e54 (f1 e21))) (let ((e55 (f1 e28))) (let ((e56 (f1 e27))) diff --git a/test/regress/regress0/sets/fuzz31811.smt2 b/test/regress/regress0/sets/fuzz31811.smt2 index 799dda0e2..536d62d3d 100644 --- a/test/regress/regress0/sets/fuzz31811.smt2 +++ b/test/regress/regress0/sets/fuzz31811.smt2 @@ -26,27 +26,27 @@ (let ((e8 (* e6 (- e5)))) (let ((e9 (ite (p0 e7 v0 e6) 1 0))) (let ((e10 (f0 v0 e8 e8))) -(let ((e11 (ite (p1 v1) (setenum 1) (setenum 0)))) +(let ((e11 (ite (p1 v1) (singleton 1) (singleton 0)))) (let ((e12 (union v3 v3))) (let ((e13 (intersection v3 v1))) -(let ((e14 (ite (p1 v3) (setenum 1) (setenum 0)))) +(let ((e14 (ite (p1 v3) (singleton 1) (singleton 0)))) (let ((e15 (intersection v2 e14))) -(let ((e16 (ite (p1 e11) (setenum 1) (setenum 0)))) -(let ((e17 (ite (p1 v4) (setenum 1) (setenum 0)))) +(let ((e16 (ite (p1 e11) (singleton 1) (singleton 0)))) +(let ((e17 (ite (p1 v4) (singleton 1) (singleton 0)))) (let ((e18 (union e15 v2))) -(let ((e19 (ite (p1 e16) (setenum 1) (setenum 0)))) +(let ((e19 (ite (p1 e16) (singleton 1) (singleton 0)))) (let ((e20 (intersection e18 v3))) (let ((e21 (setminus v4 e12))) (let ((e22 (union v3 v2))) (let ((e23 (setminus e12 v4))) (let ((e24 (setminus v3 e16))) (let ((e25 (intersection e19 e20))) -(let ((e26 (ite (p1 e15) (setenum 1) (setenum 0)))) +(let ((e26 (ite (p1 e15) (singleton 1) (singleton 0)))) (let ((e27 (setminus e17 e15))) (let ((e28 (f1 e23 e12))) -(let ((e29 (in e10 e16))) -(let ((e30 (in e10 v1))) -(let ((e31 (in e7 e19))) +(let ((e29 (member e10 e16))) +(let ((e30 (member e10 v1))) +(let ((e31 (member e7 e19))) (let ((e32 (f1 e12 e12))) (let ((e33 (f1 e16 e25))) (let ((e34 (f1 v1 e27))) diff --git a/test/regress/regress0/sets/jan24/deepmeas0.hs.fqout.cvc4.47.smt2 b/test/regress/regress0/sets/jan24/deepmeas0.hs.fqout.cvc4.47.smt2 index b90563199..bc919673d 100644 --- a/test/regress/regress0/sets/jan24/deepmeas0.hs.fqout.cvc4.47.smt2 +++ b/test/regress/regress0/sets/jan24/deepmeas0.hs.fqout.cvc4.47.smt2 @@ -3,8 +3,8 @@ (define-sort Elt () Int) (define-sort mySet () (Set Elt )) (define-fun smt_set_emp () mySet (as emptyset mySet)) -(define-fun smt_set_mem ((x Elt) (s mySet)) Bool (in x s)) -(define-fun smt_set_add ((s mySet) (x Elt)) mySet (union s (setenum x))) +(define-fun smt_set_mem ((x Elt) (s mySet)) Bool (member x s)) +(define-fun smt_set_add ((s mySet) (x Elt)) mySet (union s (singleton x))) (define-fun smt_set_cup ((s1 mySet) (s2 mySet)) mySet (union s1 s2)) (define-fun smt_set_cap ((s1 mySet) (s2 mySet)) mySet (intersection s1 s2)) diff --git a/test/regress/regress0/sets/jan24/deepmeas0.hs.fqout.small.smt2 b/test/regress/regress0/sets/jan24/deepmeas0.hs.fqout.small.smt2 index 204af2f2d..652307645 100644 --- a/test/regress/regress0/sets/jan24/deepmeas0.hs.fqout.small.smt2 +++ b/test/regress/regress0/sets/jan24/deepmeas0.hs.fqout.small.smt2 @@ -7,12 +7,12 @@ (declare-fun S () (Set Int)) (declare-fun T () (Set Int)) -(assert (in x S)) +(assert (member x S)) -(assert (= S (union T (setenum y)))) +(assert (= S (union T (singleton y)))) (assert (not (= x y))) -(assert (not (in x T))) +(assert (not (member x T))) (check-sat) diff --git a/test/regress/regress0/sets/jan24/insert_invariant_37_2.smt2 b/test/regress/regress0/sets/jan24/insert_invariant_37_2.smt2 index ad0a7e464..4a588aeb6 100644 --- a/test/regress/regress0/sets/jan24/insert_invariant_37_2.smt2 +++ b/test/regress/regress0/sets/jan24/insert_invariant_37_2.smt2 @@ -61,13 +61,13 @@ (assert (! (forall ((l1 Loc) (l2 Loc)) (or (not Axiom$0) (or (= l1 l2) (< (read$0 data$0 l1) (read$0 data$0 l2)) - (not (Btwn$0 next$0 l1 l2 null$0)) (not (in l1 sk_?X$0)) - (not (in l2 sk_?X$0))))) + (not (Btwn$0 next$0 l1 l2 null$0)) (not (member l1 sk_?X$0)) + (not (member l2 sk_?X$0))))) :named strict_sortedness)) (assert (! (forall ((l1 Loc)) (or (= l1 null$0) - (in (read$0 data$0 l1) + (member (read$0 data$0 l1) (sorted_set_c$0 data$0 next$0 lst$0 null$0)) (not (Btwn$0 next$0 lst$0 l1 null$0)))) :named sorted_set_1)) @@ -78,7 +78,7 @@ (witness$0 (read$0 data$0 curr_2$0) (sorted_set_c$0 data$0 next$0 lst$0 null$0)) null$0) - (in (read$0 data$0 curr_2$0) + (member (read$0 data$0 curr_2$0) (sorted_set_c$0 data$0 next$0 lst$0 null$0))) (or (and @@ -86,12 +86,12 @@ (read$0 data$0 (witness$0 (read$0 data$0 curr_2$0) (sorted_set_c$0 data$0 next$0 lst$0 null$0)))) - (in + (member (witness$0 (read$0 data$0 curr_2$0) (sorted_set_c$0 data$0 next$0 lst$0 null$0)) (sorted_set_domain$0 data$0 next$0 lst$0 null$0))) (not - (in (read$0 data$0 curr_2$0) + (member (read$0 data$0 curr_2$0) (sorted_set_c$0 data$0 next$0 lst$0 null$0))))) :named sorted_set_2)) @@ -101,7 +101,7 @@ (witness$0 (read$0 data$0 prev_2$0) (sorted_set_c$0 data$0 next$0 lst$0 null$0)) null$0) - (in (read$0 data$0 prev_2$0) + (member (read$0 data$0 prev_2$0) (sorted_set_c$0 data$0 next$0 lst$0 null$0))) (or (and @@ -109,12 +109,12 @@ (read$0 data$0 (witness$0 (read$0 data$0 prev_2$0) (sorted_set_c$0 data$0 next$0 lst$0 null$0)))) - (in + (member (witness$0 (read$0 data$0 prev_2$0) (sorted_set_c$0 data$0 next$0 lst$0 null$0)) (sorted_set_domain$0 data$0 next$0 lst$0 null$0))) (not - (in (read$0 data$0 prev_2$0) + (member (read$0 data$0 prev_2$0) (sorted_set_c$0 data$0 next$0 lst$0 null$0))))) :named sorted_set_2_1)) @@ -124,7 +124,7 @@ (witness$0 (read$0 data$0 sk_l1$0) (sorted_set_c$0 data$0 next$0 lst$0 null$0)) null$0) - (in (read$0 data$0 sk_l1$0) + (member (read$0 data$0 sk_l1$0) (sorted_set_c$0 data$0 next$0 lst$0 null$0))) (or (and @@ -132,12 +132,12 @@ (read$0 data$0 (witness$0 (read$0 data$0 sk_l1$0) (sorted_set_c$0 data$0 next$0 lst$0 null$0)))) - (in + (member (witness$0 (read$0 data$0 sk_l1$0) (sorted_set_c$0 data$0 next$0 lst$0 null$0)) (sorted_set_domain$0 data$0 next$0 lst$0 null$0))) (not - (in (read$0 data$0 sk_l1$0) + (member (read$0 data$0 sk_l1$0) (sorted_set_c$0 data$0 next$0 lst$0 null$0))))) :named sorted_set_2_2)) @@ -147,7 +147,7 @@ (witness$0 (read$0 data$0 sk_l1_1$0) (sorted_set_c$0 data$0 next$0 lst$0 null$0)) null$0) - (in (read$0 data$0 sk_l1_1$0) + (member (read$0 data$0 sk_l1_1$0) (sorted_set_c$0 data$0 next$0 lst$0 null$0))) (or (and @@ -155,12 +155,12 @@ (read$0 data$0 (witness$0 (read$0 data$0 sk_l1_1$0) (sorted_set_c$0 data$0 next$0 lst$0 null$0)))) - (in + (member (witness$0 (read$0 data$0 sk_l1_1$0) (sorted_set_c$0 data$0 next$0 lst$0 null$0)) (sorted_set_domain$0 data$0 next$0 lst$0 null$0))) (not - (in (read$0 data$0 sk_l1_1$0) + (member (read$0 data$0 sk_l1_1$0) (sorted_set_c$0 data$0 next$0 lst$0 null$0))))) :named sorted_set_2_3)) @@ -170,7 +170,7 @@ (witness$0 (read$0 data$0 sk_l2$0) (sorted_set_c$0 data$0 next$0 lst$0 null$0)) null$0) - (in (read$0 data$0 sk_l2$0) + (member (read$0 data$0 sk_l2$0) (sorted_set_c$0 data$0 next$0 lst$0 null$0))) (or (and @@ -178,12 +178,12 @@ (read$0 data$0 (witness$0 (read$0 data$0 sk_l2$0) (sorted_set_c$0 data$0 next$0 lst$0 null$0)))) - (in + (member (witness$0 (read$0 data$0 sk_l2$0) (sorted_set_c$0 data$0 next$0 lst$0 null$0)) (sorted_set_domain$0 data$0 next$0 lst$0 null$0))) (not - (in (read$0 data$0 sk_l2$0) + (member (read$0 data$0 sk_l2$0) (sorted_set_c$0 data$0 next$0 lst$0 null$0))))) :named sorted_set_2_4)) @@ -193,7 +193,7 @@ (witness$0 (read$0 data$0 sk_l2_1$0) (sorted_set_c$0 data$0 next$0 lst$0 null$0)) null$0) - (in (read$0 data$0 sk_l2_1$0) + (member (read$0 data$0 sk_l2_1$0) (sorted_set_c$0 data$0 next$0 lst$0 null$0))) (or (and @@ -201,12 +201,12 @@ (read$0 data$0 (witness$0 (read$0 data$0 sk_l2_1$0) (sorted_set_c$0 data$0 next$0 lst$0 null$0)))) - (in + (member (witness$0 (read$0 data$0 sk_l2_1$0) (sorted_set_c$0 data$0 next$0 lst$0 null$0)) (sorted_set_domain$0 data$0 next$0 lst$0 null$0))) (not - (in (read$0 data$0 sk_l2_1$0) + (member (read$0 data$0 sk_l2_1$0) (sorted_set_c$0 data$0 next$0 lst$0 null$0))))) :named sorted_set_2_5)) @@ -215,18 +215,18 @@ (= (witness$0 sk_?e$0 (sorted_set_c$0 data$0 next$0 lst$0 null$0)) null$0) - (in sk_?e$0 (sorted_set_c$0 data$0 next$0 lst$0 null$0))) + (member sk_?e$0 (sorted_set_c$0 data$0 next$0 lst$0 null$0))) (or (and (= sk_?e$0 (read$0 data$0 (witness$0 sk_?e$0 (sorted_set_c$0 data$0 next$0 lst$0 null$0)))) - (in + (member (witness$0 sk_?e$0 (sorted_set_c$0 data$0 next$0 lst$0 null$0)) (sorted_set_domain$0 data$0 next$0 lst$0 null$0))) - (not (in sk_?e$0 (sorted_set_c$0 data$0 next$0 lst$0 null$0))))) + (not (member sk_?e$0 (sorted_set_c$0 data$0 next$0 lst$0 null$0))))) :named sorted_set_2_6)) (assert (! (and @@ -235,30 +235,30 @@ (witness$0 sk_?e_3$0 (sorted_set_c$0 data$0 next$0 lst$0 null$0)) null$0) - (in sk_?e_3$0 (sorted_set_c$0 data$0 next$0 lst$0 null$0))) + (member sk_?e_3$0 (sorted_set_c$0 data$0 next$0 lst$0 null$0))) (or (and (= sk_?e_3$0 (read$0 data$0 (witness$0 sk_?e_3$0 (sorted_set_c$0 data$0 next$0 lst$0 null$0)))) - (in + (member (witness$0 sk_?e_3$0 (sorted_set_c$0 data$0 next$0 lst$0 null$0)) (sorted_set_domain$0 data$0 next$0 lst$0 null$0))) - (not (in sk_?e_3$0 (sorted_set_c$0 data$0 next$0 lst$0 null$0))))) + (not (member sk_?e_3$0 (sorted_set_c$0 data$0 next$0 lst$0 null$0))))) :named sorted_set_2_7)) (assert (! (forall ((l1 Loc)) (or (= l1 null$0) - (in (read$0 data$0 l1) + (member (read$0 data$0 l1) (sorted_set_c$0 data$0 next$0 curr_2$0 null$0)) (not (Btwn$0 next$0 curr_2$0 l1 null$0)))) :named sorted_set_1_1)) (assert (! (forall ((l1 Loc)) (or (= l1 curr_2$0) - (in (read$0 data$0 l1) + (member (read$0 data$0 l1) (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0)) (not (Btwn$0 next$0 lst$0 l1 curr_2$0)))) :named sorted_set_1_2)) @@ -269,7 +269,7 @@ (witness$0 (read$0 data$0 curr_2$0) (sorted_set_c$0 data$0 next$0 curr_2$0 null$0)) null$0) - (in (read$0 data$0 curr_2$0) + (member (read$0 data$0 curr_2$0) (sorted_set_c$0 data$0 next$0 curr_2$0 null$0))) (or (and @@ -277,12 +277,12 @@ (read$0 data$0 (witness$0 (read$0 data$0 curr_2$0) (sorted_set_c$0 data$0 next$0 curr_2$0 null$0)))) - (in + (member (witness$0 (read$0 data$0 curr_2$0) (sorted_set_c$0 data$0 next$0 curr_2$0 null$0)) (sorted_set_domain$0 data$0 next$0 curr_2$0 null$0))) (not - (in (read$0 data$0 curr_2$0) + (member (read$0 data$0 curr_2$0) (sorted_set_c$0 data$0 next$0 curr_2$0 null$0))))) :named sorted_set_2_8)) @@ -292,7 +292,7 @@ (witness$0 (read$0 data$0 prev_2$0) (sorted_set_c$0 data$0 next$0 curr_2$0 null$0)) null$0) - (in (read$0 data$0 prev_2$0) + (member (read$0 data$0 prev_2$0) (sorted_set_c$0 data$0 next$0 curr_2$0 null$0))) (or (and @@ -300,12 +300,12 @@ (read$0 data$0 (witness$0 (read$0 data$0 prev_2$0) (sorted_set_c$0 data$0 next$0 curr_2$0 null$0)))) - (in + (member (witness$0 (read$0 data$0 prev_2$0) (sorted_set_c$0 data$0 next$0 curr_2$0 null$0)) (sorted_set_domain$0 data$0 next$0 curr_2$0 null$0))) (not - (in (read$0 data$0 prev_2$0) + (member (read$0 data$0 prev_2$0) (sorted_set_c$0 data$0 next$0 curr_2$0 null$0))))) :named sorted_set_2_9)) @@ -315,7 +315,7 @@ (witness$0 (read$0 data$0 sk_l1$0) (sorted_set_c$0 data$0 next$0 curr_2$0 null$0)) null$0) - (in (read$0 data$0 sk_l1$0) + (member (read$0 data$0 sk_l1$0) (sorted_set_c$0 data$0 next$0 curr_2$0 null$0))) (or (and @@ -323,12 +323,12 @@ (read$0 data$0 (witness$0 (read$0 data$0 sk_l1$0) (sorted_set_c$0 data$0 next$0 curr_2$0 null$0)))) - (in + (member (witness$0 (read$0 data$0 sk_l1$0) (sorted_set_c$0 data$0 next$0 curr_2$0 null$0)) (sorted_set_domain$0 data$0 next$0 curr_2$0 null$0))) (not - (in (read$0 data$0 sk_l1$0) + (member (read$0 data$0 sk_l1$0) (sorted_set_c$0 data$0 next$0 curr_2$0 null$0))))) :named sorted_set_2_10)) @@ -338,7 +338,7 @@ (witness$0 (read$0 data$0 sk_l1_1$0) (sorted_set_c$0 data$0 next$0 curr_2$0 null$0)) null$0) - (in (read$0 data$0 sk_l1_1$0) + (member (read$0 data$0 sk_l1_1$0) (sorted_set_c$0 data$0 next$0 curr_2$0 null$0))) (or (and @@ -346,12 +346,12 @@ (read$0 data$0 (witness$0 (read$0 data$0 sk_l1_1$0) (sorted_set_c$0 data$0 next$0 curr_2$0 null$0)))) - (in + (member (witness$0 (read$0 data$0 sk_l1_1$0) (sorted_set_c$0 data$0 next$0 curr_2$0 null$0)) (sorted_set_domain$0 data$0 next$0 curr_2$0 null$0))) (not - (in (read$0 data$0 sk_l1_1$0) + (member (read$0 data$0 sk_l1_1$0) (sorted_set_c$0 data$0 next$0 curr_2$0 null$0))))) :named sorted_set_2_11)) @@ -361,7 +361,7 @@ (witness$0 (read$0 data$0 sk_l2$0) (sorted_set_c$0 data$0 next$0 curr_2$0 null$0)) null$0) - (in (read$0 data$0 sk_l2$0) + (member (read$0 data$0 sk_l2$0) (sorted_set_c$0 data$0 next$0 curr_2$0 null$0))) (or (and @@ -369,12 +369,12 @@ (read$0 data$0 (witness$0 (read$0 data$0 sk_l2$0) (sorted_set_c$0 data$0 next$0 curr_2$0 null$0)))) - (in + (member (witness$0 (read$0 data$0 sk_l2$0) (sorted_set_c$0 data$0 next$0 curr_2$0 null$0)) (sorted_set_domain$0 data$0 next$0 curr_2$0 null$0))) (not - (in (read$0 data$0 sk_l2$0) + (member (read$0 data$0 sk_l2$0) (sorted_set_c$0 data$0 next$0 curr_2$0 null$0))))) :named sorted_set_2_12)) @@ -384,7 +384,7 @@ (witness$0 (read$0 data$0 sk_l2_1$0) (sorted_set_c$0 data$0 next$0 curr_2$0 null$0)) null$0) - (in (read$0 data$0 sk_l2_1$0) + (member (read$0 data$0 sk_l2_1$0) (sorted_set_c$0 data$0 next$0 curr_2$0 null$0))) (or (and @@ -392,12 +392,12 @@ (read$0 data$0 (witness$0 (read$0 data$0 sk_l2_1$0) (sorted_set_c$0 data$0 next$0 curr_2$0 null$0)))) - (in + (member (witness$0 (read$0 data$0 sk_l2_1$0) (sorted_set_c$0 data$0 next$0 curr_2$0 null$0)) (sorted_set_domain$0 data$0 next$0 curr_2$0 null$0))) (not - (in (read$0 data$0 sk_l2_1$0) + (member (read$0 data$0 sk_l2_1$0) (sorted_set_c$0 data$0 next$0 curr_2$0 null$0))))) :named sorted_set_2_13)) @@ -407,18 +407,18 @@ (witness$0 sk_?e$0 (sorted_set_c$0 data$0 next$0 curr_2$0 null$0)) null$0) - (in sk_?e$0 (sorted_set_c$0 data$0 next$0 curr_2$0 null$0))) + (member sk_?e$0 (sorted_set_c$0 data$0 next$0 curr_2$0 null$0))) (or (and (= sk_?e$0 (read$0 data$0 (witness$0 sk_?e$0 (sorted_set_c$0 data$0 next$0 curr_2$0 null$0)))) - (in + (member (witness$0 sk_?e$0 (sorted_set_c$0 data$0 next$0 curr_2$0 null$0)) (sorted_set_domain$0 data$0 next$0 curr_2$0 null$0))) - (not (in sk_?e$0 (sorted_set_c$0 data$0 next$0 curr_2$0 null$0))))) + (not (member sk_?e$0 (sorted_set_c$0 data$0 next$0 curr_2$0 null$0))))) :named sorted_set_2_14)) (assert (! (and @@ -427,19 +427,19 @@ (witness$0 sk_?e_3$0 (sorted_set_c$0 data$0 next$0 curr_2$0 null$0)) null$0) - (in sk_?e_3$0 (sorted_set_c$0 data$0 next$0 curr_2$0 null$0))) + (member sk_?e_3$0 (sorted_set_c$0 data$0 next$0 curr_2$0 null$0))) (or (and (= sk_?e_3$0 (read$0 data$0 (witness$0 sk_?e_3$0 (sorted_set_c$0 data$0 next$0 curr_2$0 null$0)))) - (in + (member (witness$0 sk_?e_3$0 (sorted_set_c$0 data$0 next$0 curr_2$0 null$0)) (sorted_set_domain$0 data$0 next$0 curr_2$0 null$0))) (not - (in sk_?e_3$0 + (member sk_?e_3$0 (sorted_set_c$0 data$0 next$0 curr_2$0 null$0))))) :named sorted_set_2_15)) @@ -449,7 +449,7 @@ (witness$0 (read$0 data$0 curr_2$0) (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0)) null$0) - (in (read$0 data$0 curr_2$0) + (member (read$0 data$0 curr_2$0) (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0))) (or (and @@ -457,12 +457,12 @@ (read$0 data$0 (witness$0 (read$0 data$0 curr_2$0) (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0)))) - (in + (member (witness$0 (read$0 data$0 curr_2$0) (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0)) (sorted_set_domain$0 data$0 next$0 lst$0 curr_2$0))) (not - (in (read$0 data$0 curr_2$0) + (member (read$0 data$0 curr_2$0) (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0))))) :named sorted_set_2_16)) @@ -472,7 +472,7 @@ (witness$0 (read$0 data$0 prev_2$0) (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0)) null$0) - (in (read$0 data$0 prev_2$0) + (member (read$0 data$0 prev_2$0) (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0))) (or (and @@ -480,12 +480,12 @@ (read$0 data$0 (witness$0 (read$0 data$0 prev_2$0) (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0)))) - (in + (member (witness$0 (read$0 data$0 prev_2$0) (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0)) (sorted_set_domain$0 data$0 next$0 lst$0 curr_2$0))) (not - (in (read$0 data$0 prev_2$0) + (member (read$0 data$0 prev_2$0) (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0))))) :named sorted_set_2_17)) @@ -495,7 +495,7 @@ (witness$0 (read$0 data$0 sk_l1$0) (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0)) null$0) - (in (read$0 data$0 sk_l1$0) + (member (read$0 data$0 sk_l1$0) (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0))) (or (and @@ -503,12 +503,12 @@ (read$0 data$0 (witness$0 (read$0 data$0 sk_l1$0) (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0)))) - (in + (member (witness$0 (read$0 data$0 sk_l1$0) (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0)) (sorted_set_domain$0 data$0 next$0 lst$0 curr_2$0))) (not - (in (read$0 data$0 sk_l1$0) + (member (read$0 data$0 sk_l1$0) (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0))))) :named sorted_set_2_18)) @@ -518,7 +518,7 @@ (witness$0 (read$0 data$0 sk_l1_1$0) (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0)) null$0) - (in (read$0 data$0 sk_l1_1$0) + (member (read$0 data$0 sk_l1_1$0) (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0))) (or (and @@ -526,12 +526,12 @@ (read$0 data$0 (witness$0 (read$0 data$0 sk_l1_1$0) (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0)))) - (in + (member (witness$0 (read$0 data$0 sk_l1_1$0) (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0)) (sorted_set_domain$0 data$0 next$0 lst$0 curr_2$0))) (not - (in (read$0 data$0 sk_l1_1$0) + (member (read$0 data$0 sk_l1_1$0) (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0))))) :named sorted_set_2_19)) @@ -541,7 +541,7 @@ (witness$0 (read$0 data$0 sk_l2$0) (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0)) null$0) - (in (read$0 data$0 sk_l2$0) + (member (read$0 data$0 sk_l2$0) (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0))) (or (and @@ -549,12 +549,12 @@ (read$0 data$0 (witness$0 (read$0 data$0 sk_l2$0) (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0)))) - (in + (member (witness$0 (read$0 data$0 sk_l2$0) (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0)) (sorted_set_domain$0 data$0 next$0 lst$0 curr_2$0))) (not - (in (read$0 data$0 sk_l2$0) + (member (read$0 data$0 sk_l2$0) (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0))))) :named sorted_set_2_20)) @@ -564,7 +564,7 @@ (witness$0 (read$0 data$0 sk_l2_1$0) (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0)) null$0) - (in (read$0 data$0 sk_l2_1$0) + (member (read$0 data$0 sk_l2_1$0) (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0))) (or (and @@ -572,12 +572,12 @@ (read$0 data$0 (witness$0 (read$0 data$0 sk_l2_1$0) (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0)))) - (in + (member (witness$0 (read$0 data$0 sk_l2_1$0) (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0)) (sorted_set_domain$0 data$0 next$0 lst$0 curr_2$0))) (not - (in (read$0 data$0 sk_l2_1$0) + (member (read$0 data$0 sk_l2_1$0) (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0))))) :named sorted_set_2_21)) @@ -587,18 +587,18 @@ (witness$0 sk_?e$0 (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0)) null$0) - (in sk_?e$0 (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0))) + (member sk_?e$0 (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0))) (or (and (= sk_?e$0 (read$0 data$0 (witness$0 sk_?e$0 (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0)))) - (in + (member (witness$0 sk_?e$0 (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0)) (sorted_set_domain$0 data$0 next$0 lst$0 curr_2$0))) - (not (in sk_?e$0 (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0))))) + (not (member sk_?e$0 (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0))))) :named sorted_set_2_22)) (assert (! (and @@ -607,19 +607,19 @@ (witness$0 sk_?e_3$0 (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0)) null$0) - (in sk_?e_3$0 (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0))) + (member sk_?e_3$0 (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0))) (or (and (= sk_?e_3$0 (read$0 data$0 (witness$0 sk_?e_3$0 (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0)))) - (in + (member (witness$0 sk_?e_3$0 (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0)) (sorted_set_domain$0 data$0 next$0 lst$0 curr_2$0))) (not - (in sk_?e_3$0 (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0))))) + (member sk_?e_3$0 (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0))))) :named sorted_set_2_23)) (assert (! (= (read$1 next$0 null$0) null$0) :named read_null)) @@ -627,26 +627,26 @@ (assert (! (forall ((l1 Loc)) (or (and (Btwn$0 next$0 lst$0 l1 null$0) - (in l1 (sorted_set_domain$0 data$0 next$0 lst$0 null$0)) + (member l1 (sorted_set_domain$0 data$0 next$0 lst$0 null$0)) (not (= l1 null$0))) (and (or (= l1 null$0) (not (Btwn$0 next$0 lst$0 l1 null$0))) (not - (in l1 + (member l1 (sorted_set_domain$0 data$0 next$0 lst$0 null$0)))))) :named sorted_set_footprint)) -(assert (! (or (in sk_?e_3$0 c2_2$0) - (and (in sk_?e_2$0 sk_FP_1$0) (not (in sk_?e_2$0 FP$0))) - (and (in sk_?e_3$0 (union c1_2$0 c2_2$0)) - (not (in sk_?e_3$0 content$0))) - (and (in sk_?e_3$0 c1_2$0) +(assert (! (or (member sk_?e_3$0 c2_2$0) + (and (member sk_?e_2$0 sk_FP_1$0) (not (member sk_?e_2$0 FP$0))) + (and (member sk_?e_3$0 (union c1_2$0 c2_2$0)) + (not (member sk_?e_3$0 content$0))) + (and (member sk_?e_3$0 c1_2$0) (not - (in sk_?e_3$0 + (member sk_?e_3$0 (sorted_set_c$0 data$0 next$0 curr_2$0 null$0)))) - (and (in sk_?e_3$0 content$0) - (not (in sk_?e_3$0 (union c1_2$0 c2_2$0)))) - (and (in sk_?e_3$0 (sorted_set_c$0 data$0 next$0 curr_2$0 null$0)) - (not (in sk_?e_3$0 c1_2$0))) + (and (member sk_?e_3$0 content$0) + (not (member sk_?e_3$0 (union c1_2$0 c2_2$0)))) + (and (member sk_?e_3$0 (sorted_set_c$0 data$0 next$0 curr_2$0 null$0)) + (not (member sk_?e_3$0 c1_2$0))) (and (not (= curr_2$0 null$0)) (not (= prev_2$0 null$0)) (not (< (read$0 data$0 prev_2$0) (read$0 data$0 curr_2$0)))) (not (= curr_2$0 lst$0)) (not (= prev_2$0 null$0)) @@ -685,8 +685,8 @@ (assert (! (or (sorted_set_struct$0 sk_?X_3$0 data$0 next$0 curr_2$0 null$0 c1_2$0) (not (Btwn$0 next$0 curr_2$0 null$0 null$0)) - (! (and (Btwn$0 next$0 sk_l1$0 sk_l2$0 null$0) (in sk_l1$0 sk_?X_3$0) - (in sk_l2$0 sk_?X_3$0) (not (= sk_l1$0 sk_l2$0)) + (! (and (Btwn$0 next$0 sk_l1$0 sk_l2$0 null$0) (member sk_l1$0 sk_?X_3$0) + (member sk_l2$0 sk_?X_3$0) (not (= sk_l1$0 sk_l2$0)) (not (< (read$0 data$0 sk_l1$0) (read$0 data$0 sk_l2$0)))) :named strict_sortedness_1)) :named unnamed_1)) @@ -694,47 +694,47 @@ (assert (! (forall ((l1 Loc)) (or (and (Btwn$0 next$0 lst$0 l1 curr_2$0) - (in l1 + (member l1 (sorted_set_domain$0 data$0 next$0 lst$0 curr_2$0)) (not (= l1 curr_2$0))) (and (or (= l1 curr_2$0) (not (Btwn$0 next$0 lst$0 l1 curr_2$0))) (not - (in l1 + (member l1 (sorted_set_domain$0 data$0 next$0 lst$0 curr_2$0)))))) :named sorted_set_footprint_1)) (assert (! (forall ((l1 Loc)) (or (and (Btwn$0 next$0 curr_2$0 l1 null$0) - (in l1 + (member l1 (sorted_set_domain$0 data$0 next$0 curr_2$0 null$0)) (not (= l1 null$0))) (and (or (= l1 null$0) (not (Btwn$0 next$0 curr_2$0 l1 null$0))) (not - (in l1 + (member l1 (sorted_set_domain$0 data$0 next$0 curr_2$0 null$0)))))) :named sorted_set_footprint_2)) -(assert (! (not (in null$0 Alloc$0)) :named initial_footprint_of_insert_27_11_1)) +(assert (! (not (member null$0 Alloc$0)) :named initial_footprint_of_insert_27_11_1)) (assert (! (or (= prev_2$0 curr_2$0) - (in sk_?e_1$0 (intersection sk_?X_4$0 sk_?X_3$0)) - (and (in sk_?e_1$0 sk_FP$0) (not (in sk_?e_1$0 FP$0))) - (and (in sk_?e$0 (union c1_2$0 c2_2$0)) (not (in sk_?e$0 content$0))) - (and (in sk_?e$0 c1_2$0) - (not (in sk_?e$0 (sorted_set_c$0 data$0 next$0 curr_2$0 null$0)))) - (and (in sk_?e$0 c2_2$0) - (not (in sk_?e$0 (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0)))) - (and (in sk_?e$0 content$0) (not (in sk_?e$0 (union c1_2$0 c2_2$0)))) - (and (in sk_?e$0 (sorted_set_c$0 data$0 next$0 curr_2$0 null$0)) - (not (in sk_?e$0 c1_2$0))) - (and (in sk_?e$0 (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0)) - (not (in sk_?e$0 c2_2$0))) + (member sk_?e_1$0 (intersection sk_?X_4$0 sk_?X_3$0)) + (and (member sk_?e_1$0 sk_FP$0) (not (member sk_?e_1$0 FP$0))) + (and (member sk_?e$0 (union c1_2$0 c2_2$0)) (not (member sk_?e$0 content$0))) + (and (member sk_?e$0 c1_2$0) + (not (member sk_?e$0 (sorted_set_c$0 data$0 next$0 curr_2$0 null$0)))) + (and (member sk_?e$0 c2_2$0) + (not (member sk_?e$0 (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0)))) + (and (member sk_?e$0 content$0) (not (member sk_?e$0 (union c1_2$0 c2_2$0)))) + (and (member sk_?e$0 (sorted_set_c$0 data$0 next$0 curr_2$0 null$0)) + (not (member sk_?e$0 c1_2$0))) + (and (member sk_?e$0 (sorted_set_c$0 data$0 next$0 lst$0 curr_2$0)) + (not (member sk_?e$0 c2_2$0))) (and (not (= curr_2$0 null$0)) (not (= prev_2$0 null$0)) (not (< (read$0 data$0 prev_2$0) (read$0 data$0 curr_2$0)))) (not (= (read$1 next$0 prev_2$0) curr_2$0)) @@ -772,7 +772,7 @@ (assert (! (or (sorted_set_struct$0 sk_?X_5$0 data$0 next$0 lst$0 curr_2$0 c2_2$0) (not (Btwn$0 next$0 lst$0 curr_2$0 curr_2$0)) (! (and (Btwn$0 next$0 sk_l1_1$0 sk_l2_1$0 curr_2$0) - (in sk_l1_1$0 sk_?X_5$0) (in sk_l2_1$0 sk_?X_5$0) + (member sk_l1_1$0 sk_?X_5$0) (member sk_l2_1$0 sk_?X_5$0) (not (= sk_l1_1$0 sk_l2_1$0)) (not (< (read$0 data$0 sk_l1_1$0) (read$0 data$0 sk_l2_1$0)))) :named strict_sortedness_2)) diff --git a/test/regress/regress0/sets/jan24/remove_check_free_31_6.smt2 b/test/regress/regress0/sets/jan24/remove_check_free_31_6.smt2 index c1c65cea5..c10b14f2b 100644 --- a/test/regress/regress0/sets/jan24/remove_check_free_31_6.smt2 +++ b/test/regress/regress0/sets/jan24/remove_check_free_31_6.smt2 @@ -76,22 +76,22 @@ :named btwn_step_10)) (assert (! (forall ((?f FldLoc)) - (or (in (ep$0 ?f sk_?X_30$0 null$0) sk_?X_30$0) + (or (member (ep$0 ?f sk_?X_30$0 null$0) sk_?X_30$0) (= null$0 (ep$0 ?f sk_?X_30$0 null$0)))) :named entry-point3_10)) (assert (! (forall ((?f FldLoc)) - (or (in (ep$0 ?f sk_?X_30$0 lst_1$0) sk_?X_30$0) + (or (member (ep$0 ?f sk_?X_30$0 lst_1$0) sk_?X_30$0) (= lst_1$0 (ep$0 ?f sk_?X_30$0 lst_1$0)))) :named entry-point3_11)) (assert (! (forall ((?f FldLoc)) - (or (in (ep$0 ?f sk_?X_30$0 curr_3$0) sk_?X_30$0) + (or (member (ep$0 ?f sk_?X_30$0 curr_3$0) sk_?X_30$0) (= curr_3$0 (ep$0 ?f sk_?X_30$0 curr_3$0)))) :named entry-point3_12)) (assert (! (forall ((?f FldLoc)) - (or (in (ep$0 ?f sk_?X_30$0 tmp_2$0) sk_?X_30$0) + (or (member (ep$0 ?f sk_?X_30$0 tmp_2$0) sk_?X_30$0) (= tmp_2$0 (ep$0 ?f sk_?X_30$0 tmp_2$0)))) :named entry-point3_13)) @@ -117,42 +117,42 @@ (assert (! (forall ((?f FldLoc) (?y Loc)) (or (Btwn$0 ?f null$0 (ep$0 ?f sk_?X_30$0 null$0) ?y) - (not (Btwn$0 ?f null$0 ?y ?y)) (not (in ?y sk_?X_30$0)))) + (not (Btwn$0 ?f null$0 ?y ?y)) (not (member ?y sk_?X_30$0)))) :named entry-point4_10)) (assert (! (forall ((?f FldLoc) (?y Loc)) (or (Btwn$0 ?f lst_1$0 (ep$0 ?f sk_?X_30$0 lst_1$0) ?y) - (not (Btwn$0 ?f lst_1$0 ?y ?y)) (not (in ?y sk_?X_30$0)))) + (not (Btwn$0 ?f lst_1$0 ?y ?y)) (not (member ?y sk_?X_30$0)))) :named entry-point4_11)) (assert (! (forall ((?f FldLoc) (?y Loc)) (or (Btwn$0 ?f curr_3$0 (ep$0 ?f sk_?X_30$0 curr_3$0) ?y) - (not (Btwn$0 ?f curr_3$0 ?y ?y)) (not (in ?y sk_?X_30$0)))) + (not (Btwn$0 ?f curr_3$0 ?y ?y)) (not (member ?y sk_?X_30$0)))) :named entry-point4_12)) (assert (! (forall ((?f FldLoc) (?y Loc)) (or (Btwn$0 ?f tmp_2$0 (ep$0 ?f sk_?X_30$0 tmp_2$0) ?y) - (not (Btwn$0 ?f tmp_2$0 ?y ?y)) (not (in ?y sk_?X_30$0)))) + (not (Btwn$0 ?f tmp_2$0 ?y ?y)) (not (member ?y sk_?X_30$0)))) :named entry-point4_13)) (assert (! (forall ((?f FldLoc) (?y Loc)) - (or (not (Btwn$0 ?f null$0 ?y ?y)) (not (in ?y sk_?X_30$0)) - (in (ep$0 ?f sk_?X_30$0 null$0) sk_?X_30$0))) + (or (not (Btwn$0 ?f null$0 ?y ?y)) (not (member ?y sk_?X_30$0)) + (member (ep$0 ?f sk_?X_30$0 null$0) sk_?X_30$0))) :named entry-point2_10)) (assert (! (forall ((?f FldLoc) (?y Loc)) - (or (not (Btwn$0 ?f lst_1$0 ?y ?y)) (not (in ?y sk_?X_30$0)) - (in (ep$0 ?f sk_?X_30$0 lst_1$0) sk_?X_30$0))) + (or (not (Btwn$0 ?f lst_1$0 ?y ?y)) (not (member ?y sk_?X_30$0)) + (member (ep$0 ?f sk_?X_30$0 lst_1$0) sk_?X_30$0))) :named entry-point2_11)) (assert (! (forall ((?f FldLoc) (?y Loc)) - (or (not (Btwn$0 ?f curr_3$0 ?y ?y)) (not (in ?y sk_?X_30$0)) - (in (ep$0 ?f sk_?X_30$0 curr_3$0) sk_?X_30$0))) + (or (not (Btwn$0 ?f curr_3$0 ?y ?y)) (not (member ?y sk_?X_30$0)) + (member (ep$0 ?f sk_?X_30$0 curr_3$0) sk_?X_30$0))) :named entry-point2_12)) (assert (! (forall ((?f FldLoc) (?y Loc)) - (or (not (Btwn$0 ?f tmp_2$0 ?y ?y)) (not (in ?y sk_?X_30$0)) - (in (ep$0 ?f sk_?X_30$0 tmp_2$0) sk_?X_30$0))) + (or (not (Btwn$0 ?f tmp_2$0 ?y ?y)) (not (member ?y sk_?X_30$0)) + (member (ep$0 ?f sk_?X_30$0 tmp_2$0) sk_?X_30$0))) :named entry-point2_13)) (assert (! (= (read$0 (write$0 next$0 curr_3$0 (read$0 next$0 tmp_2$0)) curr_3$0) @@ -181,28 +181,28 @@ (assert (! (forall ((l1 Loc)) (or (and (Btwn$0 next$0 lst$0 l1 curr_2$0) - (in l1 (lseg_domain$0 next$0 lst$0 curr_2$0)) + (member l1 (lseg_domain$0 next$0 lst$0 curr_2$0)) (not (= l1 curr_2$0))) (and (or (= l1 curr_2$0) (not (Btwn$0 next$0 lst$0 l1 curr_2$0))) - (not (in l1 (lseg_domain$0 next$0 lst$0 curr_2$0)))))) + (not (member l1 (lseg_domain$0 next$0 lst$0 curr_2$0)))))) :named lseg_footprint_20)) (assert (! (forall ((l1 Loc)) (or (and (Btwn$0 next$0 curr_3$0 l1 null$0) - (in l1 (lseg_domain$0 next$0 curr_3$0 null$0)) + (member l1 (lseg_domain$0 next$0 curr_3$0 null$0)) (not (= l1 null$0))) (and (or (= l1 null$0) (not (Btwn$0 next$0 curr_3$0 l1 null$0))) - (not (in l1 (lseg_domain$0 next$0 curr_3$0 null$0)))))) + (not (member l1 (lseg_domain$0 next$0 curr_3$0 null$0)))))) :named lseg_footprint_21)) -(assert (! (not (in tmp_2$0 FP_2$0)) :named check_free_31_6)) +(assert (! (not (member tmp_2$0 FP_2$0)) :named check_free_31_6)) -(assert (! (not (in null$0 Alloc$0)) :named framecondition_of_remove_loop_18_4_15)) +(assert (! (not (member null$0 Alloc$0)) :named framecondition_of_remove_loop_18_4_15)) (assert (! (not (= lst$0 null$0)) :named if_else_13_6_4)) @@ -263,35 +263,35 @@ (assert (! (forall ((l1 Loc)) (or (and (Btwn$0 next$0 lst_1$0 l1 curr_3$0) - (in l1 (lseg_domain$0 next$0 lst_1$0 curr_3$0)) + (member l1 (lseg_domain$0 next$0 lst_1$0 curr_3$0)) (not (= l1 curr_3$0))) (and (or (= l1 curr_3$0) (not (Btwn$0 next$0 lst_1$0 l1 curr_3$0))) - (not (in l1 (lseg_domain$0 next$0 lst_1$0 curr_3$0)))))) + (not (member l1 (lseg_domain$0 next$0 lst_1$0 curr_3$0)))))) :named lseg_footprint_22)) (assert (! (forall ((l1 Loc)) (or (and (Btwn$0 next$0 lst$0 l1 null$0) - (in l1 (lseg_domain$0 next$0 lst$0 null$0)) + (member l1 (lseg_domain$0 next$0 lst$0 null$0)) (not (= l1 null$0))) (and (or (= l1 null$0) (not (Btwn$0 next$0 lst$0 l1 null$0))) - (not (in l1 (lseg_domain$0 next$0 lst$0 null$0)))))) + (not (member l1 (lseg_domain$0 next$0 lst$0 null$0)))))) :named lseg_footprint_23)) (assert (! (forall ((l1 Loc)) (or (and (Btwn$0 next$0 curr_2$0 l1 null$0) - (in l1 (lseg_domain$0 next$0 curr_2$0 null$0)) + (member l1 (lseg_domain$0 next$0 curr_2$0 null$0)) (not (= l1 null$0))) (and (or (= l1 null$0) (not (Btwn$0 next$0 curr_2$0 l1 null$0))) - (not (in l1 (lseg_domain$0 next$0 curr_2$0 null$0)))))) + (not (member l1 (lseg_domain$0 next$0 curr_2$0 null$0)))))) :named lseg_footprint_24)) -(assert (! (not (in null$0 Alloc$0)) :named initial_footprint_of_remove_10_11_11)) +(assert (! (not (member null$0 Alloc$0)) :named initial_footprint_of_remove_10_11_11)) (assert (! (not (= tmp_2$0 null$0)) :named if_else_28_8_2)) diff --git a/test/regress/regress0/sets/jan27/ListConcat.hs.fqout.cvc4.177.smt2 b/test/regress/regress0/sets/jan27/ListConcat.hs.fqout.cvc4.177.smt2 index 7fea3435e..f055a8e1c 100644 --- a/test/regress/regress0/sets/jan27/ListConcat.hs.fqout.cvc4.177.smt2 +++ b/test/regress/regress0/sets/jan27/ListConcat.hs.fqout.cvc4.177.smt2 @@ -3,8 +3,8 @@ (define-sort Elt () Int) (define-sort mySet () (Set Elt )) (define-fun smt_set_emp () mySet (as emptyset mySet)) -(define-fun smt_set_mem ((x Elt) (s mySet)) Bool (in x s)) -(define-fun smt_set_add ((s mySet) (x Elt)) mySet (union s (setenum x))) +(define-fun smt_set_mem ((x Elt) (s mySet)) Bool (member x s)) +(define-fun smt_set_add ((s mySet) (x Elt)) mySet (union s (singleton x))) (define-fun smt_set_cup ((s1 mySet) (s2 mySet)) mySet (union s1 s2)) (define-fun smt_set_cap ((s1 mySet) (s2 mySet)) mySet (intersection s1 s2)) ;(define-fun smt_set_com ((s mySet)) mySet ((_ map not) s)) diff --git a/test/regress/regress0/sets/jan27/ListElem.hs.fqout.cvc4.38.smt2 b/test/regress/regress0/sets/jan27/ListElem.hs.fqout.cvc4.38.smt2 index 6c32bb578..81b8794e5 100644 --- a/test/regress/regress0/sets/jan27/ListElem.hs.fqout.cvc4.38.smt2 +++ b/test/regress/regress0/sets/jan27/ListElem.hs.fqout.cvc4.38.smt2 @@ -9,8 +9,8 @@ (define-sort Elt () Int) (define-sort mySet () (Set Elt )) (define-fun smt_set_emp () mySet (as emptyset mySet)) -(define-fun smt_set_mem ((x Elt) (s mySet)) Bool (in x s)) -(define-fun smt_set_add ((s mySet) (x Elt)) mySet (union s (setenum x))) +(define-fun smt_set_mem ((x Elt) (s mySet)) Bool (member x s)) +(define-fun smt_set_add ((s mySet) (x Elt)) mySet (union s (singleton x))) (define-fun smt_set_cup ((s1 mySet) (s2 mySet)) mySet (union s1 s2)) (define-fun smt_set_cap ((s1 mySet) (s2 mySet)) mySet (intersection s1 s2)) ;(define-fun smt_set_com ((s mySet)) mySet ((_ map not) s)) diff --git a/test/regress/regress0/sets/jan27/deepmeas0.hs.fqout.cvc4.41.smt2 b/test/regress/regress0/sets/jan27/deepmeas0.hs.fqout.cvc4.41.smt2 index 0aa6c88ae..8b84c9153 100644 --- a/test/regress/regress0/sets/jan27/deepmeas0.hs.fqout.cvc4.41.smt2 +++ b/test/regress/regress0/sets/jan27/deepmeas0.hs.fqout.cvc4.41.smt2 @@ -4,8 +4,8 @@ (define-sort Elt () Int) (define-sort mySet () (Set Elt )) (define-fun smt_set_emp () mySet (as emptyset mySet)) -(define-fun smt_set_mem ((x Elt) (s mySet)) Bool (in x s)) -(define-fun smt_set_add ((s mySet) (x Elt)) mySet (union s (setenum x))) +(define-fun smt_set_mem ((x Elt) (s mySet)) Bool (member x s)) +(define-fun smt_set_add ((s mySet) (x Elt)) mySet (union s (singleton x))) (define-fun smt_set_cup ((s1 mySet) (s2 mySet)) mySet (union s1 s2)) (define-fun smt_set_cap ((s1 mySet) (s2 mySet)) mySet (intersection s1 s2)) ;(define-fun smt_set_com ((s mySet)) mySet ((_ map not) s)) diff --git a/test/regress/regress0/sets/jan28/TalkingAboutSets.hs.fqout.cvc4.3577.smt2 b/test/regress/regress0/sets/jan28/TalkingAboutSets.hs.fqout.cvc4.3577.smt2 index d0fda8b86..ac5fdf48d 100644 --- a/test/regress/regress0/sets/jan28/TalkingAboutSets.hs.fqout.cvc4.3577.smt2 +++ b/test/regress/regress0/sets/jan28/TalkingAboutSets.hs.fqout.cvc4.3577.smt2 @@ -4,8 +4,8 @@ (define-sort Elt () Int) (define-sort mySet () (Set Elt )) (define-fun smt_set_emp () mySet (as emptyset mySet)) -(define-fun smt_set_mem ((x Elt) (s mySet)) Bool (in x s)) -(define-fun smt_set_add ((s mySet) (x Elt)) mySet (union s (setenum x))) +(define-fun smt_set_mem ((x Elt) (s mySet)) Bool (member x s)) +(define-fun smt_set_add ((s mySet) (x Elt)) mySet (union s (singleton x))) (define-fun smt_set_cup ((s1 mySet) (s2 mySet)) mySet (union s1 s2)) (define-fun smt_set_cap ((s1 mySet) (s2 mySet)) mySet (intersection s1 s2)) ;(define-fun smt_set_com ((s mySet)) mySet ((_ map not) s)) diff --git a/test/regress/regress0/sets/jan30/UniqueZipper.hs.fqout.cvc4.10.smt2 b/test/regress/regress0/sets/jan30/UniqueZipper.hs.fqout.cvc4.10.smt2 index f37a8ccfe..e17911327 100644 --- a/test/regress/regress0/sets/jan30/UniqueZipper.hs.fqout.cvc4.10.smt2 +++ b/test/regress/regress0/sets/jan30/UniqueZipper.hs.fqout.cvc4.10.smt2 @@ -3,8 +3,8 @@ (define-sort Elt () Int) (define-sort mySet () (Set Elt )) (define-fun smt_set_emp () mySet (as emptyset mySet)) -(define-fun smt_set_mem ((x Elt) (s mySet)) Bool (in x s)) -(define-fun smt_set_add ((s mySet) (x Elt)) mySet (union s (setenum x))) +(define-fun smt_set_mem ((x Elt) (s mySet)) Bool (member x s)) +(define-fun smt_set_add ((s mySet) (x Elt)) mySet (union s (singleton x))) (define-fun smt_set_cup ((s1 mySet) (s2 mySet)) mySet (union s1 s2)) (define-fun smt_set_cap ((s1 mySet) (s2 mySet)) mySet (intersection s1 s2)) (define-fun smt_set_dif ((s1 mySet) (s2 mySet)) mySet (setminus s1 s2)) diff --git a/test/regress/regress0/sets/jan30/UniqueZipper.hs.fqout.cvc4.1832.smt2 b/test/regress/regress0/sets/jan30/UniqueZipper.hs.fqout.cvc4.1832.smt2 index 59cc1a00e..bea016683 100644 --- a/test/regress/regress0/sets/jan30/UniqueZipper.hs.fqout.cvc4.1832.smt2 +++ b/test/regress/regress0/sets/jan30/UniqueZipper.hs.fqout.cvc4.1832.smt2 @@ -3,8 +3,8 @@ (define-sort Elt () Int) (define-sort mySet () (Set Elt )) (define-fun smt_set_emp () mySet (as emptyset mySet)) -(define-fun smt_set_mem ((x Elt) (s mySet)) Bool (in x s)) -(define-fun smt_set_add ((s mySet) (x Elt)) mySet (union s (setenum x))) +(define-fun smt_set_mem ((x Elt) (s mySet)) Bool (member x s)) +(define-fun smt_set_add ((s mySet) (x Elt)) mySet (union s (singleton x))) (define-fun smt_set_cup ((s1 mySet) (s2 mySet)) mySet (union s1 s2)) (define-fun smt_set_cap ((s1 mySet) (s2 mySet)) mySet (intersection s1 s2)) ;(define-fun smt_set_com ((s mySet)) mySet ((_ map not) s)) diff --git a/test/regress/regress0/sets/jan30/UniqueZipper.hs.fqout.minimized10.smt2 b/test/regress/regress0/sets/jan30/UniqueZipper.hs.fqout.minimized10.smt2 index 5fa5101f0..df659f0fb 100644 --- a/test/regress/regress0/sets/jan30/UniqueZipper.hs.fqout.minimized10.smt2 +++ b/test/regress/regress0/sets/jan30/UniqueZipper.hs.fqout.minimized10.smt2 @@ -8,12 +8,12 @@ ; What was going on? ; ; The solver was unable to reason that (emptyset) cannot equal -; (setenum 0). There were no membership predicates anywhere, just +; (singleton 0). There were no membership predicates anywhere, just ; equalities. ; ; Fix ; -; Add the propagation rule: (true) => (in x (setenum x)) +; Add the propagation rule: (true) => (member x (singleton x)) (declare-fun z3f70 (Int) (Set Int)) (declare-fun z3v85 () Int) @@ -21,7 +21,7 @@ (declare-fun z3v87 () Int) (declare-fun z3v90 () Int) -(assert (= (z3f70 z3v90) (union (z3f70 z3v85) (union (as emptyset (Set Int)) (setenum z3v86))))) +(assert (= (z3f70 z3v90) (union (z3f70 z3v85) (union (as emptyset (Set Int)) (singleton z3v86))))) (assert (= (z3f70 z3v90) (z3f70 z3v87))) (assert (= (as emptyset (Set Int)) (z3f70 z3v87))) (check-sat) diff --git a/test/regress/regress0/sets/jan30/UniqueZipper.hs.fqout.minimized1832.smt2 b/test/regress/regress0/sets/jan30/UniqueZipper.hs.fqout.minimized1832.smt2 index d01b7468e..af67a69a7 100644 --- a/test/regress/regress0/sets/jan30/UniqueZipper.hs.fqout.minimized1832.smt2 +++ b/test/regress/regress0/sets/jan30/UniqueZipper.hs.fqout.minimized1832.smt2 @@ -9,10 +9,10 @@ (declare-fun T () (Set Int)) (declare-fun x () Int) -(assert (or (not (= S smt_set_emp)) (in x T))) +(assert (or (not (= S smt_set_emp)) (member x T))) (assert (= smt_set_emp - (ite (in x T) - (union (union smt_set_emp (setenum x)) S) + (ite (member x T) + (union (union smt_set_emp (singleton x)) S) S))) (check-sat) diff --git a/test/regress/regress0/sets/mar2014/UniqueZipper.hs.1030minimized.cvc4.smt2 b/test/regress/regress0/sets/mar2014/UniqueZipper.hs.1030minimized.cvc4.smt2 index e6f187331..9175a8723 100644 --- a/test/regress/regress0/sets/mar2014/UniqueZipper.hs.1030minimized.cvc4.smt2 +++ b/test/regress/regress0/sets/mar2014/UniqueZipper.hs.1030minimized.cvc4.smt2 @@ -3,8 +3,8 @@ (define-sort Elt () Int) (define-sort mySet () (Set Elt )) (define-fun smt_set_emp () mySet (as emptyset mySet)) -(define-fun smt_set_mem ((x Elt) (s mySet)) Bool (in x s)) -(define-fun smt_set_add ((s mySet) (x Elt)) mySet (union s (setenum x))) +(define-fun smt_set_mem ((x Elt) (s mySet)) Bool (member x s)) +(define-fun smt_set_add ((s mySet) (x Elt)) mySet (union s (singleton x))) (define-fun smt_set_cup ((s1 mySet) (s2 mySet)) mySet (union s1 s2)) (define-fun smt_set_cap ((s1 mySet) (s2 mySet)) mySet (intersection s1 s2)) (define-fun smt_set_dif ((s1 mySet) (s2 mySet)) mySet (setminus s1 s2)) diff --git a/test/regress/regress0/sets/mar2014/UniqueZipper.hs.1030minimized2.cvc4.smt2 b/test/regress/regress0/sets/mar2014/UniqueZipper.hs.1030minimized2.cvc4.smt2 index b8a27b967..81117134c 100644 --- a/test/regress/regress0/sets/mar2014/UniqueZipper.hs.1030minimized2.cvc4.smt2 +++ b/test/regress/regress0/sets/mar2014/UniqueZipper.hs.1030minimized2.cvc4.smt2 @@ -3,8 +3,8 @@ (define-sort Elt () Int) (define-sort mySet () (Set Elt )) (define-fun smt_set_emp () mySet (as emptyset mySet)) -(define-fun smt_set_mem ((x Elt) (s mySet)) Bool (in x s)) -(define-fun smt_set_add ((s mySet) (x Elt)) mySet (union s (setenum x))) +(define-fun smt_set_mem ((x Elt) (s mySet)) Bool (member x s)) +(define-fun smt_set_add ((s mySet) (x Elt)) mySet (union s (singleton x))) (define-fun smt_set_cup ((s1 mySet) (s2 mySet)) mySet (union s1 s2)) (define-fun smt_set_cap ((s1 mySet) (s2 mySet)) mySet (intersection s1 s2)) (define-fun smt_set_dif ((s1 mySet) (s2 mySet)) mySet (setminus s1 s2)) diff --git a/test/regress/regress0/sets/mar2014/lemmabug-ListElts317minimized.smt2 b/test/regress/regress0/sets/mar2014/lemmabug-ListElts317minimized.smt2 index 1ea3ea6b5..1e848695d 100644 --- a/test/regress/regress0/sets/mar2014/lemmabug-ListElts317minimized.smt2 +++ b/test/regress/regress0/sets/mar2014/lemmabug-ListElts317minimized.smt2 @@ -1,7 +1,7 @@ ; EXPECT: sat ; Observed behavior: -; --check-model failed for set-term (union (z3f69 z3v151) (setenum z3v143)) +; --check-model failed for set-term (union (z3f69 z3v151) (singleton z3v143)) ; with different set of elements in the model for representative and the node ; itself. ; @@ -24,8 +24,8 @@ (define-sort Elt () Int) (define-sort mySet () (Set Elt )) (define-fun smt_set_emp () mySet (as emptyset mySet)) -(define-fun smt_set_mem ((x Elt) (s mySet)) Bool (in x s)) -(define-fun smt_set_add ((s mySet) (x Elt)) mySet (union s (setenum x))) +(define-fun smt_set_mem ((x Elt) (s mySet)) Bool (member x s)) +(define-fun smt_set_add ((s mySet) (x Elt)) mySet (union s (singleton x))) (define-fun smt_set_cup ((s1 mySet) (s2 mySet)) mySet (union s1 s2)) (define-fun smt_set_cap ((s1 mySet) (s2 mySet)) mySet (intersection s1 s2)) ;(define-fun smt_set_com ((s mySet)) mySet ((_ map not) s)) @@ -69,16 +69,16 @@ (z3f69 z3v140)))) (assert (= (z3f69 z3v152) - (smt_set_cup (setenum z3v143) (z3f69 z3v151)))) + (smt_set_cup (singleton z3v143) (z3f69 z3v151)))) (assert (= (z3f70 z3v152) - (smt_set_cup (setenum z3v143) (z3f70 z3v151)))) + (smt_set_cup (singleton z3v143) (z3f70 z3v151)))) (assert (and (= (z3f69 z3v142) - (smt_set_cup (setenum z3v143) (z3f69 z3v141))) + (smt_set_cup (singleton z3v143) (z3f69 z3v141))) (= (z3f70 z3v142) - (smt_set_cup (setenum z3v143) (z3f70 z3v141))) + (smt_set_cup (singleton z3v143) (z3f70 z3v141))) (= z3v142 (z3f92 z3v143 z3v141)) (= z3v142 z3v144) (= (z3f62 z3v61) z3v61) diff --git a/test/regress/regress0/sets/mar2014/sharing-preregister.smt2 b/test/regress/regress0/sets/mar2014/sharing-preregister.smt2 index dc42abfa2..61af2124d 100644 --- a/test/regress/regress0/sets/mar2014/sharing-preregister.smt2 +++ b/test/regress/regress0/sets/mar2014/sharing-preregister.smt2 @@ -5,8 +5,8 @@ (declare-fun b () Int) (declare-fun x () (Set Int)) (declare-fun y () (Set Int)) -(assert (= x (setenum a))) -(assert (= y (setenum b))) +(assert (= x (singleton a))) +(assert (= y (singleton b))) (assert (not (= x y))) (assert (and (< 1 a) (< a 3) (< 1 b) (< b 3))) (check-sat) diff --git a/test/regress/regress0/sets/mar2014/small.smt2 b/test/regress/regress0/sets/mar2014/small.smt2 index 838a27919..896b13219 100644 --- a/test/regress/regress0/sets/mar2014/small.smt2 +++ b/test/regress/regress0/sets/mar2014/small.smt2 @@ -10,9 +10,9 @@ (declare-fun z () Int) (declare-fun a () (Set Int)) (declare-fun b () (Set Int)) -(assert (in x (union a b))) -(assert (not (in y a))) -(assert (not (in z b))) +(assert (member x (union a b))) +(assert (not (member y a))) +(assert (not (member z b))) (assert (= z y)) (assert (= x y)) (check-sat) diff --git a/test/regress/regress0/sets/mar2014/smaller.smt2 b/test/regress/regress0/sets/mar2014/smaller.smt2 index 876311de8..22e029b69 100644 --- a/test/regress/regress0/sets/mar2014/smaller.smt2 +++ b/test/regress/regress0/sets/mar2014/smaller.smt2 @@ -9,7 +9,7 @@ (declare-fun y () Int) (declare-fun a () (Set Int)) (declare-fun b () (Set Int)) -(assert (in x (union a b))) -(assert (not (in y a))) +(assert (member x (union a b))) +(assert (not (member y a))) (assert (= x y)) (check-sat) diff --git a/test/regress/regress0/sets/rec_copy_loop_check_heap_access_43_4.smt2 b/test/regress/regress0/sets/rec_copy_loop_check_heap_access_43_4.smt2 index 57d5d72ca..e5defb2ac 100644 --- a/test/regress/regress0/sets/rec_copy_loop_check_heap_access_43_4.smt2 +++ b/test/regress/regress0/sets/rec_copy_loop_check_heap_access_43_4.smt2 @@ -45,15 +45,15 @@ (assert (! (forall ((l1 Loc)) (or (and (Btwn$0 next$0 curr$0 l1 null$0) - (in l1 (lseg_domain$0 next$0 curr$0 null$0)) + (member l1 (lseg_domain$0 next$0 curr$0 null$0)) (not (= l1 null$0))) (and (or (= l1 null$0) (not (Btwn$0 next$0 curr$0 l1 null$0))) - (not (in l1 (lseg_domain$0 next$0 curr$0 null$0)))))) + (not (member l1 (lseg_domain$0 next$0 curr$0 null$0)))))) :named lseg_footprint_14)) -(assert (! (not (in tmp_1$0 Alloc$0)) :named new_42_10)) +(assert (! (not (member tmp_1$0 Alloc$0)) :named new_42_10)) -(assert (! (not (in null$0 Alloc$0)) +(assert (! (not (member null$0 Alloc$0)) :named initial_footprint_of_rec_copy_loop_34_11_4)) (assert (! (not (= curr$0 null$0)) :named if_else_37_6)) @@ -73,7 +73,7 @@ (assert (! (= FP_Caller_2$0 (setminus FP_Caller$0 FP$0)) :named assign_37_2_2)) -(assert (! (= Alloc_2$0 (union Alloc$0 (setenum tmp_1$0))) :named assign_42_10)) +(assert (! (= Alloc_2$0 (union Alloc$0 (singleton tmp_1$0))) :named assign_42_10)) (assert (! (or (Btwn$0 next$0 cp$0 null$0 null$0) (not (lseg_struct$0 sk_?X_38$0 next$0 cp$0 null$0))) @@ -82,13 +82,13 @@ (assert (! (forall ((l1 Loc)) (or (and (Btwn$0 next$0 cp$0 l1 null$0) - (in l1 (lseg_domain$0 next$0 cp$0 null$0)) + (member l1 (lseg_domain$0 next$0 cp$0 null$0)) (not (= l1 null$0))) (and (or (= l1 null$0) (not (Btwn$0 next$0 cp$0 l1 null$0))) - (not (in l1 (lseg_domain$0 next$0 cp$0 null$0)))))) + (not (member l1 (lseg_domain$0 next$0 cp$0 null$0)))))) :named lseg_footprint_15)) -(assert (! (not (in cp_1$0 FP_3$0)) :named check_heap_access_43_4)) +(assert (! (not (member cp_1$0 FP_3$0)) :named check_heap_access_43_4)) (assert (! (not (= tmp_1$0 null$0)) :named new_42_10_1)) @@ -109,7 +109,7 @@ (assert (! (= cp_1$0 tmp_1$0) :named assign_42_4)) -(assert (! (= FP_3$0 (union FP$0 (setenum tmp_1$0))) :named assign_42_10_1)) +(assert (! (= FP_3$0 (union FP$0 (singleton tmp_1$0))) :named assign_42_10_1)) (assert (! (or (Btwn$0 next$0 curr$0 null$0 null$0) (not (lseg_struct$0 sk_?X_37$0 next$0 curr$0 null$0))) diff --git a/test/regress/regress0/sets/setel-eq.smt2 b/test/regress/regress0/sets/setel-eq.smt2 index 8ed9a2e57..b5d85c7e8 100644 --- a/test/regress/regress0/sets/setel-eq.smt2 +++ b/test/regress/regress0/sets/setel-eq.smt2 @@ -4,7 +4,7 @@ (declare-fun T () (Set Int)) (declare-fun x () Int) (declare-fun y () Int) -(assert (in y S)) -(assert (not (in x (union S T)))) +(assert (member y S)) +(assert (not (member x (union S T)))) (assert (= x y)) (check-sat) diff --git a/test/regress/regress0/sets/setofsets-disequal.smt2 b/test/regress/regress0/sets/setofsets-disequal.smt2 index 907e074fe..18ad053d6 100644 --- a/test/regress/regress0/sets/setofsets-disequal.smt2 +++ b/test/regress/regress0/sets/setofsets-disequal.smt2 @@ -11,52 +11,52 @@ (assert (not (= S (as emptyset myset)))) ; 1 element is S -(assert (not (= S (setenum (as emptyset (Set (_ BitVec 1))))))) -(assert (not (= S (setenum (setenum (_ bv0 1)) )))) -(assert (not (= S (setenum (setenum (_ bv1 1)) )))) -(assert (not (= S (setenum (union (setenum (_ bv0 1)) - (setenum (_ bv1 1))))))) +(assert (not (= S (singleton (as emptyset (Set (_ BitVec 1))))))) +(assert (not (= S (singleton (singleton (_ bv0 1)) )))) +(assert (not (= S (singleton (singleton (_ bv1 1)) )))) +(assert (not (= S (singleton (union (singleton (_ bv0 1)) + (singleton (_ bv1 1))))))) ; 2 elements in S -(assert (not (= S (union (setenum (as emptyset (Set (_ BitVec 1)))) - (setenum (setenum (_ bv0 1)))) ))) -(assert (not (= S (union (setenum (as emptyset (Set (_ BitVec 1)))) - (setenum (setenum (_ bv1 1))))))) -(assert (not (= S (union (setenum (as emptyset (Set (_ BitVec 1)))) - (setenum (union (setenum (_ bv0 1)) - (setenum (_ bv1 1)))))))) -(assert (not (= S (union (setenum (union (setenum (_ bv0 1)) - (setenum (_ bv1 1)))) - (setenum (setenum (_ bv0 1)))) ))) -(assert (not (= S (union (setenum (setenum (_ bv0 1))) - (setenum (setenum (_ bv1 1)))) ))) -(assert (not (= S (union (setenum (union (setenum (_ bv0 1)) - (setenum (_ bv1 1)))) - (setenum (setenum (_ bv1 1))))))) +(assert (not (= S (union (singleton (as emptyset (Set (_ BitVec 1)))) + (singleton (singleton (_ bv0 1)))) ))) +(assert (not (= S (union (singleton (as emptyset (Set (_ BitVec 1)))) + (singleton (singleton (_ bv1 1))))))) +(assert (not (= S (union (singleton (as emptyset (Set (_ BitVec 1)))) + (singleton (union (singleton (_ bv0 1)) + (singleton (_ bv1 1)))))))) +(assert (not (= S (union (singleton (union (singleton (_ bv0 1)) + (singleton (_ bv1 1)))) + (singleton (singleton (_ bv0 1)))) ))) +(assert (not (= S (union (singleton (singleton (_ bv0 1))) + (singleton (singleton (_ bv1 1)))) ))) +(assert (not (= S (union (singleton (union (singleton (_ bv0 1)) + (singleton (_ bv1 1)))) + (singleton (singleton (_ bv1 1))))))) ; 3 elements in S -(assert (not (= S (union (setenum (setenum (_ bv1 1))) - (union (setenum (as emptyset (Set (_ BitVec 1)))) - (setenum (setenum (_ bv0 1))))) ))) -(assert (not (= S (union (setenum (union (setenum (_ bv0 1)) - (setenum (_ bv1 1)))) - (union (setenum (as emptyset (Set (_ BitVec 1)))) - (setenum (setenum (_ bv1 1))))) ))) -(assert (not (= S (union (setenum (union (setenum (_ bv0 1)) - (setenum (_ bv1 1)))) - (union (setenum (setenum (_ bv0 1))) - (setenum (setenum (_ bv1 1))))) ))) -(assert (not (= S (union (setenum (union (setenum (_ bv0 1)) - (setenum (_ bv1 1)))) - (union (setenum (as emptyset (Set (_ BitVec 1)))) - (setenum (setenum (_ bv0 1))))) ))) +(assert (not (= S (union (singleton (singleton (_ bv1 1))) + (union (singleton (as emptyset (Set (_ BitVec 1)))) + (singleton (singleton (_ bv0 1))))) ))) +(assert (not (= S (union (singleton (union (singleton (_ bv0 1)) + (singleton (_ bv1 1)))) + (union (singleton (as emptyset (Set (_ BitVec 1)))) + (singleton (singleton (_ bv1 1))))) ))) +(assert (not (= S (union (singleton (union (singleton (_ bv0 1)) + (singleton (_ bv1 1)))) + (union (singleton (singleton (_ bv0 1))) + (singleton (singleton (_ bv1 1))))) ))) +(assert (not (= S (union (singleton (union (singleton (_ bv0 1)) + (singleton (_ bv1 1)))) + (union (singleton (as emptyset (Set (_ BitVec 1)))) + (singleton (singleton (_ bv0 1))))) ))) ; 4 elements in S -(assert (not (= S (union (setenum (union (setenum (_ bv0 1)) - (setenum (_ bv1 1)))) - (union (setenum (setenum (_ bv1 1))) - (union (setenum (as emptyset (Set (_ BitVec 1)))) - (setenum (setenum (_ bv0 1)))))) ))) +(assert (not (= S (union (singleton (union (singleton (_ bv0 1)) + (singleton (_ bv1 1)))) + (union (singleton (singleton (_ bv1 1))) + (union (singleton (as emptyset (Set (_ BitVec 1)))) + (singleton (singleton (_ bv0 1)))))) ))) (check-sat) diff --git a/test/regress/regress0/sets/sets-equal.smt2 b/test/regress/regress0/sets/sets-equal.smt2 index a2ce4b3c2..8fd29a244 100644 --- a/test/regress/regress0/sets/sets-equal.smt2 +++ b/test/regress/regress0/sets/sets-equal.smt2 @@ -6,9 +6,9 @@ (assert (= x y)) (declare-fun a () (Set Int)) (declare-fun b () (Set Int)) -(assert (not (in x a))) -(assert (in y (union a b))) +(assert (not (member x a))) +(assert (member y (union a b))) (assert (= x z)) -(assert (not (in z a))) +(assert (not (member z a))) (assert (= a b)) (check-sat) diff --git a/test/regress/regress0/sets/sets-inter.smt2 b/test/regress/regress0/sets/sets-inter.smt2 index 0f5e41864..d3d8a9044 100644 --- a/test/regress/regress0/sets/sets-inter.smt2 +++ b/test/regress/regress0/sets/sets-inter.smt2 @@ -4,8 +4,8 @@ (declare-fun a () (Set Int)) (declare-fun b () (Set Int)) (declare-fun x () Int) -;(assert (not (in x a))) -(assert (in x (intersection a b))) -(assert (not (in x b))) +;(assert (not (member x a))) +(assert (member x (intersection a b))) +(assert (not (member x b))) (check-sat) (exit) diff --git a/test/regress/regress0/sets/sets-new.smt2 b/test/regress/regress0/sets/sets-new.smt2 index accb09799..0f43ee10d 100644 --- a/test/regress/regress0/sets/sets-new.smt2 +++ b/test/regress/regress0/sets/sets-new.smt2 @@ -6,11 +6,11 @@ (declare-fun A () SetInt) (declare-fun B () SetInt) (declare-fun x () Int) -(assert (in x (union A B))) +(assert (member x (union A B))) -(assert (not (in x (intersection A B)))) -(assert (not (in x (setminus A B)))) -;(assert (not (in x (setminus B A)))) -;(assert (in x B)) +(assert (not (member x (intersection A B)))) +(assert (not (member x (setminus A B)))) +;(assert (not (member x (setminus B A)))) +;(assert (member x B)) (check-sat) diff --git a/test/regress/regress0/sets/sets-sample.smt2 b/test/regress/regress0/sets/sets-sample.smt2 index 1bd0eb396..4838c6cf2 100644 --- a/test/regress/regress0/sets/sets-sample.smt2 +++ b/test/regress/regress0/sets/sets-sample.smt2 @@ -12,14 +12,14 @@ (declare-fun b () (Set Int)) (declare-fun c () (Set Int)) (declare-fun e () Int) -(assert (= a (setenum 5))) +(assert (= a (singleton 5))) (assert (= c (union a b) )) (assert (not (= c (intersection a b) ))) (assert (= c (setminus a b) )) (assert (subseteq a b)) -(assert (in e c)) -(assert (in e a)) -(assert (in e (intersection a b))) +(assert (member e c)) +(assert (member e a)) +(assert (member e (intersection a b))) (check-sat) (pop 1) @@ -41,8 +41,8 @@ (declare-fun e2 () Int) (assert (= x y)) (assert (= e1 e2)) -(assert (in e1 x)) -(assert (not (in e2 y))) +(assert (member e1 x)) +(assert (not (member e2 y))) (check-sat) (pop 1) @@ -55,8 +55,8 @@ (declare-fun e2 () Int) (assert (= x y)) (assert (= e1 e2)) -(assert (in e1 (union x z))) -(assert (not (in e2 (union y z)))) +(assert (member e1 (union x z))) +(assert (not (member e2 (union y z)))) (check-sat) (pop 1) diff --git a/test/regress/regress0/sets/sets-sharing.smt2 b/test/regress/regress0/sets/sets-sharing.smt2 index d2a94fdf4..caada9606 100644 --- a/test/regress/regress0/sets/sets-sharing.smt2 +++ b/test/regress/regress0/sets/sets-sharing.smt2 @@ -4,8 +4,8 @@ (declare-fun S () (Set Int)) (declare-fun x () Int) -(assert (in (+ 5 x) S)) -(assert (not (in 9 S))) +(assert (member (+ 5 x) S)) +(assert (not (member 9 S))) (assert (= x 4)) (check-sat) diff --git a/test/regress/regress0/sets/sets-union.smt2 b/test/regress/regress0/sets/sets-union.smt2 index 656a0bc88..56ba520dc 100644 --- a/test/regress/regress0/sets/sets-union.smt2 +++ b/test/regress/regress0/sets/sets-union.smt2 @@ -6,10 +6,10 @@ (declare-fun a () (Set Int)) (declare-fun b () (Set Int)) (declare-fun x () Int) -(assert (not (in x a))) -(assert (in x (union a b))) +(assert (not (member x a))) +(assert (member x (union a b))) (check-sat) ;(get-model) -(assert (not (in x b))) +(assert (not (member x b))) (check-sat) (exit) diff --git a/test/regress/regress0/sets/sharingbug.smt2 b/test/regress/regress0/sets/sharingbug.smt2 index b2b61f739..b388bb534 100644 --- a/test/regress/regress0/sets/sharingbug.smt2 +++ b/test/regress/regress0/sets/sharingbug.smt2 @@ -23,9 +23,9 @@ (let ((e12 (* (- e4) e7))) (let ((e13 (- e10))) (let ((e14 (f0 e5 e7 e6))) -(let ((e15 (in v0 v1))) -(let ((e16 (in e12 v2))) -(let ((e17 (in e14 v1))) +(let ((e15 (member v0 v1))) +(let ((e16 (member e12 v2))) +(let ((e17 (member e14 v1))) (let ((e18 (f1 v3))) (let ((e19 (f1 v2))) (let ((e20 (f1 v1))) diff --git a/test/regress/regress0/sets/union-1a-flip.smt2 b/test/regress/regress0/sets/union-1a-flip.smt2 index 7bbe442e1..6a73c5b91 100644 --- a/test/regress/regress0/sets/union-1a-flip.smt2 +++ b/test/regress/regress0/sets/union-1a-flip.smt2 @@ -8,9 +8,9 @@ (declare-fun A () (Set Int)) (declare-fun B () (Set Int)) (declare-fun x () Int) -(assert (in x A)) +(assert (member x A)) (push 1) -(assert (not (in x (union A B)))) +(assert (not (member x (union A B)))) (check-sat) (pop 1) (check-sat) diff --git a/test/regress/regress0/sets/union-1a.smt2 b/test/regress/regress0/sets/union-1a.smt2 index b594ac74d..8636cb220 100644 --- a/test/regress/regress0/sets/union-1a.smt2 +++ b/test/regress/regress0/sets/union-1a.smt2 @@ -8,9 +8,9 @@ (declare-fun A () (Set Int)) (declare-fun B () (Set Int)) (declare-fun x () Int) -(assert (not (in x (union A B)))) +(assert (not (member x (union A B)))) (push 1) -(assert (in x A)) +(assert (member x A)) (check-sat) (pop 1) (check-sat) diff --git a/test/regress/regress0/sets/union-1b-flip.smt2 b/test/regress/regress0/sets/union-1b-flip.smt2 index 72c544553..e2b19b31a 100644 --- a/test/regress/regress0/sets/union-1b-flip.smt2 +++ b/test/regress/regress0/sets/union-1b-flip.smt2 @@ -8,9 +8,9 @@ (declare-fun A () (Set Int)) (declare-fun B () (Set Int)) (declare-fun x () Int) -(assert (in x B)) +(assert (member x B)) (push 1) -(assert (not (in x (union A B)))) +(assert (not (member x (union A B)))) (check-sat) (pop 1) (check-sat) diff --git a/test/regress/regress0/sets/union-1b.smt2 b/test/regress/regress0/sets/union-1b.smt2 index 85fce759c..c354923c9 100644 --- a/test/regress/regress0/sets/union-1b.smt2 +++ b/test/regress/regress0/sets/union-1b.smt2 @@ -8,9 +8,9 @@ (declare-fun A () (Set Int)) (declare-fun B () (Set Int)) (declare-fun x () Int) -(assert (not (in x (union A B)))) +(assert (not (member x (union A B)))) (push 1) -(assert (in x B)) +(assert (member x B)) (check-sat) (pop 1) (check-sat) diff --git a/test/regress/regress0/sets/union-2.smt2 b/test/regress/regress0/sets/union-2.smt2 index e5e96be5a..6e2933975 100644 --- a/test/regress/regress0/sets/union-2.smt2 +++ b/test/regress/regress0/sets/union-2.smt2 @@ -6,7 +6,7 @@ (declare-fun B () (Set Int)) (declare-fun x () Int) (declare-fun y () Int) -(assert (in x (union A B))) -(assert (not (in y A))) -(assert (not (in y B))) +(assert (member x (union A B))) +(assert (not (member y A))) +(assert (not (member y B))) (check-sat) -- cgit v1.2.3 From 7736abe3b9c898033737865f033cc5cfe0f7922f Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Tue, 24 Jun 2014 01:40:17 -0400 Subject: Squashed commit of the following: * Fix a bug in intersection * merging... * add delayed length lemmas * PreRegisterTerm is changed. * Bug fix for string-opt2 * PreRegisterTerm is changed. * add delayed length lemmas * Bug fix for string-opt2 * PreRegisterTerm is changed. * Bug fix for string-opt2 * PreRegisterTerm is changed. * Bug fix for string-opt2 * PreRegisterTerm is changed. --- src/theory/strings/regexp_operation.cpp | 11 + src/theory/strings/theory_strings.cpp | 574 ++++++++++++++++++-------------- src/theory/strings/theory_strings.h | 15 +- 3 files changed, 351 insertions(+), 249 deletions(-) (limited to 'src/theory') diff --git a/src/theory/strings/regexp_operation.cpp b/src/theory/strings/regexp_operation.cpp index 18df0f759..092c7e166 100644 --- a/src/theory/strings/regexp_operation.cpp +++ b/src/theory/strings/regexp_operation.cpp @@ -1220,6 +1220,17 @@ Node RegExpOpr::intersectInternal( Node r1, Node r2, std::map< unsigned, std::se cset.clear(); firstChars(r1, cset, vset); std::vector< Node > vec_nodes; + Node delta_exp; + int flag = delta(r1, delta_exp); + int flag2 = delta(r2, delta_exp); + if(flag != 2 && flag2 != 2) { + if(flag == 1 && flag2 == 1) { + vec_nodes.push_back(d_emptySingleton); + } else { + //TODO + spflag = true; + } + } for(std::set::const_iterator itr = cset.begin(); itr != cset.end(); itr++) { CVC4::String c( CVC4::String::convertUnsignedIntToChar(*itr) ); diff --git a/src/theory/strings/theory_strings.cpp b/src/theory/strings/theory_strings.cpp index 0f9def3ea..f3134789f 100644 --- a/src/theory/strings/theory_strings.cpp +++ b/src/theory/strings/theory_strings.cpp @@ -43,7 +43,7 @@ TheoryStrings::TheoryStrings(context::Context* c, context::UserContext* u, Outpu d_nf_pairs(c), d_loop_antec(u), d_length_intro_vars(u), - d_prereg_cached(u), + d_registed_terms_cache(u), d_length_nodes(u), d_length_inst(u), d_str_pos_ctn(c), @@ -249,7 +249,7 @@ Node TheoryStrings::explain( TNode literal ){ void TheoryStrings::presolve() { - Trace("strings-presolve") << "TheoryStrings::Presolving : get fmf options " << (options::stringFMF() ? "true" : "false") << std::endl; + Debug("strings-presolve") << "TheoryStrings::Presolving : get fmf options " << (options::stringFMF() ? "true" : "false") << std::endl; d_opt_fmf = options::stringFMF(); } @@ -273,14 +273,16 @@ void TheoryStrings::collectModelInfo( TheoryModel* m, bool fullModel ) { //step 1 : get all values for known lengths std::vector< Node > lts_values; std::map< unsigned, bool > values_used; - for( unsigned i=0; i0 ) Trace("strings-model") << ", "; + for( unsigned j=0; j0 ) { + Trace("strings-model") << ", "; + } Trace("strings-model") << col[i][j]; } Trace("strings-model") << " } (length is " << lts[i] << ")" << std::endl; - if( lts[i].isConst() ){ + if( lts[i].isConst() ) { lts_values.push_back( lts[i] ); unsigned lvalue = lts[i].getConst().getNumerator().toUnsignedInt(); values_used[ lvalue ] = true; @@ -388,19 +390,7 @@ void TheoryStrings::collectModelInfo( TheoryModel* m, bool fullModel ) { m->assertEquality( nodes[i], cc, true ); } } - Trace("strings-model") << "String Model : Assigned." << std::endl; - //check for negative contains - /* - Trace("strings-model") << "String Model : Check Neg Contains, size = " << d_str_neg_ctn.size() << std::endl; - for( unsigned i=0; igetValue(x); - //Node yv = m->getValue(y); - //Trace("strings-model") << "String Model : Check Neg contains Value: ~contains(" << xv << ", " << yv << ")." << std::endl; - } - */ + //Trace("strings-model") << "String Model : Assigned." << std::endl; Trace("strings-model") << "String Model : Finished." << std::endl; } @@ -408,8 +398,9 @@ void TheoryStrings::collectModelInfo( TheoryModel* m, bool fullModel ) { // MAIN SOLVER ///////////////////////////////////////////////////////////////////////////// +/* void TheoryStrings::preRegisterTerm(TNode n) { - if(d_prereg_cached.find(n) == d_prereg_cached.end()) { + if(d_registed_terms_cache.find(n) == d_registed_terms_cache.end()) { Debug("strings-prereg") << "TheoryStrings::preRegisterTerm() " << n << endl; //collectTerms( n ); switch (n.getKind()) { @@ -466,7 +457,39 @@ void TheoryStrings::preRegisterTerm(TNode n) { } } } - d_prereg_cached.insert(n); + d_registed_terms_cache.insert(n); + } +} +*/ + +void TheoryStrings::preRegisterTerm(TNode n) { + if( d_registed_terms_cache.find(n) == d_registed_terms_cache.end() ) { + switch( n.getKind() ) { + case kind::EQUAL: + d_equalityEngine.addTriggerEquality(n); + break; + case kind::STRING_IN_REGEXP: + d_equalityEngine.addTriggerPredicate(n); + break; + //case kind::STRING_SUBSTR_TOTAL: + default: { + if( n.getType().isString() ) { + registerTerm(n); + // FMF + if( n.getKind() == kind::VARIABLE && options::stringFMF() ) { + d_input_vars.insert(n); + } + } + if (n.getType().isBoolean()) { + // Get triggered for both equal and dis-equal + d_equalityEngine.addTriggerPredicate(n); + } else { + // Function applications/predicates + d_equalityEngine.addTerm(n); + } + } + } + d_registed_terms_cache.insert(n); } } @@ -486,12 +509,10 @@ Node TheoryStrings::expandDefinition(LogicRequest &logicRequest, Node node) { } Node lenxgti = NodeManager::currentNM()->mkNode( kind::GT, NodeManager::currentNM()->mkNode( kind::STRING_LENGTH, node[0] ), node[1] ); - Node zero = NodeManager::currentNM()->mkConst( ::CVC4::Rational(0) ); - Node t1greq0 = NodeManager::currentNM()->mkNode( kind::GEQ, node[1], zero); + Node t1greq0 = NodeManager::currentNM()->mkNode( kind::GEQ, node[1], d_zero); Node cond = Rewriter::rewrite( NodeManager::currentNM()->mkNode( kind::AND, lenxgti, t1greq0 )); - Node one = NodeManager::currentNM()->mkConst( ::CVC4::Rational(1) ); - Node totalf = NodeManager::currentNM()->mkNode(kind::STRING_SUBSTR_TOTAL, node[0], node[1], one); - Node uf = NodeManager::currentNM()->mkNode(kind::APPLY_UF, d_ufSubstr, node[0], node[1], one); + Node totalf = NodeManager::currentNM()->mkNode(kind::STRING_SUBSTR_TOTAL, node[0], node[1], d_one); + Node uf = NodeManager::currentNM()->mkNode(kind::APPLY_UF, d_ufSubstr, node[0], node[1], d_one); return NodeManager::currentNM()->mkNode( kind::ITE, cond, totalf, uf ); break; } @@ -511,9 +532,8 @@ Node TheoryStrings::expandDefinition(LogicRequest &logicRequest, Node node) { Node lenxgti = NodeManager::currentNM()->mkNode( kind::GEQ, NodeManager::currentNM()->mkNode( kind::STRING_LENGTH, node[0] ), NodeManager::currentNM()->mkNode( kind::PLUS, node[1], node[2] ) ); - Node zero = NodeManager::currentNM()->mkConst( ::CVC4::Rational(0) ); - Node t1geq0 = NodeManager::currentNM()->mkNode(kind::GEQ, node[1], zero); - Node t2geq0 = NodeManager::currentNM()->mkNode(kind::GEQ, node[2], zero); + Node t1geq0 = NodeManager::currentNM()->mkNode(kind::GEQ, node[1], d_zero); + Node t2geq0 = NodeManager::currentNM()->mkNode(kind::GEQ, node[2], d_zero); Node cond = Rewriter::rewrite( NodeManager::currentNM()->mkNode( kind::AND, lenxgti, t1geq0, t2geq0 )); Node totalf = NodeManager::currentNM()->mkNode(kind::STRING_SUBSTR_TOTAL, node[0], node[1], node[2]); Node uf = NodeManager::currentNM()->mkNode(kind::APPLY_UF, d_ufSubstr, node[0], node[1], node[2]); @@ -530,8 +550,6 @@ Node TheoryStrings::expandDefinition(LogicRequest &logicRequest, Node node) { void TheoryStrings::check(Effort e) { - //Assert( d_pending.empty() ); - bool polarity; TNode atom; @@ -574,32 +592,36 @@ void TheoryStrings::check(Effort e) { } } doPendingFacts(); + d_terms_cache.clear(); bool addedLemma = false; if( e == EFFORT_FULL && !d_conflict ) { - addedLemma = checkSimple(); - Trace("strings-process") << "Done simple checking, addedLemma = " << addedLemma << ", d_conflict = " << d_conflict << std::endl; - if( !addedLemma ) { - addedLemma = checkNormalForms(); - Trace("strings-process") << "Done check normal forms, addedLemma = " << addedLemma << ", d_conflict = " << d_conflict << std::endl; - if(!d_conflict && !addedLemma) { - addedLemma = checkLengthsEqc(); - Trace("strings-process") << "Done check lengths, addedLemma = " << addedLemma << ", d_conflict = " << d_conflict << std::endl; + //addedLemma = checkSimple(); + //Trace("strings-process") << "Done simple checking, addedLemma = " << addedLemma << ", d_conflict = " << d_conflict << std::endl; + //if( !addedLemma ) { + addedLemma = checkNormalForms(); + Trace("strings-process") << "Done check normal forms, addedLemma = " << addedLemma << ", d_conflict = " << d_conflict << std::endl; if(!d_conflict && !addedLemma) { - addedLemma = checkContains(); - Trace("strings-process") << "Done check contain constraints, addedLemma = " << addedLemma << ", d_conflict = " << d_conflict << std::endl; - if( !d_conflict && !addedLemma ) { - addedLemma = checkMemberships(); - Trace("strings-process") << "Done check membership constraints, addedLemma = " << addedLemma << ", d_conflict = " << d_conflict << std::endl; + addedLemma = checkLengthsEqc(); + Trace("strings-process") << "Done check lengths, addedLemma = " << addedLemma << ", d_conflict = " << d_conflict << std::endl; + if(!d_conflict && !addedLemma) { + addedLemma = checkContains(); + Trace("strings-process") << "Done check contain constraints, addedLemma = " << addedLemma << ", d_conflict = " << d_conflict << std::endl; if( !d_conflict && !addedLemma ) { - addedLemma = checkCardinality(); - Trace("strings-process") << "Done check cardinality, addedLemma = " << addedLemma << ", d_conflict = " << d_conflict << std::endl; + addedLemma = checkMemberships(); + Trace("strings-process") << "Done check membership constraints, addedLemma = " << addedLemma << ", d_conflict = " << d_conflict << std::endl; + if( !d_conflict && !addedLemma ) { + addedLemma = checkCardinality(); + Trace("strings-process") << "Done check cardinality, addedLemma = " << addedLemma << ", d_conflict = " << d_conflict << std::endl; + } } } } - } + //} } + if(!d_conflict && !d_terms_cache.empty()) { + appendTermLemma(); } Trace("strings-check") << "Theory of strings, done check : " << e << std::endl; Assert( d_pending.empty() ); @@ -629,7 +651,7 @@ TheoryStrings::EqcInfo * TheoryStrings::getOrMakeEqcInfo( Node eqc, bool doMake /** Conflict when merging two constants */ void TheoryStrings::conflict(TNode a, TNode b){ if( !d_conflict ){ - Trace("strings-conflict-debug") << "Making conflict..." << std::endl; + Debug("strings-conflict") << "Making conflict..." << std::endl; d_conflict = true; Node conflictNode; if (a.getKind() == kind::CONST_BOOLEAN) { @@ -727,6 +749,8 @@ void TheoryStrings::assertPendingFact(Node fact, Node exp) { if (atom.getKind() == kind::EQUAL) { for( unsigned j=0; j<2; j++ ) { if( !d_equalityEngine.hasTerm( atom[j] ) ) { + //TODO: check!!! + registerTerm( atom[j] ); d_equalityEngine.addTerm( atom[j] ); } } @@ -762,6 +786,7 @@ void TheoryStrings::doPendingFacts() { d_pending.clear(); d_pending_exp.clear(); } + void TheoryStrings::doPendingLemmas() { if( !d_conflict && !d_lemma_cache.empty() ){ for( unsigned i=0; i & visited, std } //successfully computed normal form if( nf.size()!=1 || nf[0]!=d_emptyString ) { - for( unsigned r=0; rmkNode( kind::EQUAL, n[i], nr ) ); + nf_exp_n.push_back( n[i].eqNode( nr ) ); } if( !nresult ) { //Trace("strings-process-debug") << "....Caused already asserted @@ -871,7 +898,7 @@ bool TheoryStrings::getNormalForms(Node &eqc, std::vector< Node > & visited, std } } if( !result ) { - Trace("strings-process-debug") << "Will have cycle lemma at higher level!!!!!!!!!!!!!!!!" << std::endl; + Trace("strings-process-debug") << "Will have cycle lemma at higher level!" << std::endl; //we have a normal form that will cause a component lemma at a higher level normal_forms.clear(); normal_forms_exp.clear(); @@ -880,7 +907,7 @@ bool TheoryStrings::getNormalForms(Node &eqc, std::vector< Node > & visited, std normal_forms.push_back(nf_n); normal_forms_exp.push_back(nf_exp_n); normal_form_src.push_back(n); - if( !result ){ + if( !result ) { return false; } } else { @@ -901,35 +928,41 @@ bool TheoryStrings::getNormalForms(Node &eqc, std::vector< Node > & visited, std } // Test the result - if( !normal_forms.empty() ) { - Trace("strings-solve") << "--- Normal forms for equivlance class " << eqc << " : " << std::endl; - for( unsigned i=0; i0) Trace("strings-solve") << ", "; - Trace("strings-solve") << normal_forms[i][j]; - } - Trace("strings-solve") << std::endl; - Trace("strings-solve") << " Explanation is : "; - if(normal_forms_exp[i].size() == 0) { - Trace("strings-solve") << "NONE"; - } else { - for( unsigned j=0; j0) Trace("strings-solve") << " AND "; - Trace("strings-solve") << normal_forms_exp[i][j]; + if(Trace.isOn("strings-solve")) { + if( !normal_forms.empty() ) { + Trace("strings-solve") << "--- Normal forms for equivlance class " << eqc << " : " << std::endl; + for( unsigned i=0; i0) { + Trace("strings-solve") << ", "; + } + Trace("strings-solve") << normal_forms[i][j]; } + Trace("strings-solve") << std::endl; + Trace("strings-solve") << " Explanation is : "; + if(normal_forms_exp[i].size() == 0) { + Trace("strings-solve") << "NONE"; + } else { + for( unsigned j=0; j0) { + Trace("strings-solve") << " AND "; + } + Trace("strings-solve") << normal_forms_exp[i][j]; + } + } + Trace("strings-solve") << std::endl; } - Trace("strings-solve") << std::endl; + } else { + //std::vector< Node > nf; + //nf.push_back( eqc ); + //normal_forms.push_back(nf); + //std::vector< Node > nf_exp_def; + //normal_forms_exp.push_back(nf_exp_def); + //normal_form_src.push_back(eqc); + Trace("strings-solve") << "--- Single normal form for equivalence class " << eqc << std::endl; } - } else { - //std::vector< Node > nf; - //nf.push_back( eqc ); - //normal_forms.push_back(nf); - //std::vector< Node > nf_exp_def; - //normal_forms_exp.push_back(nf_exp_def); - //normal_form_src.push_back(eqc); - Trace("strings-solve") << "--- Single normal form for equivalence class " << eqc << std::endl; } return true; } @@ -1046,10 +1079,10 @@ bool TheoryStrings::processLoop(std::vector< Node > &antec, //require that x is non-empty if( !areDisequal( normal_forms[loop_n_index][loop_index], d_emptyString ) ){ //try to make normal_forms[loop_n_index][loop_index] equal to empty to avoid loop - sendSplit( normal_forms[loop_n_index][loop_index], d_emptyString, "Loop-X-E-Split" ); + sendSplit( normal_forms[loop_n_index][loop_index], d_emptyString, "Len-Split(Loop-X)" ); } else if( !areDisequal( t_yz, d_emptyString ) && t_yz.getKind()!=kind::CONST_STRING ) { //try to make normal_forms[loop_n_index][loop_index] equal to empty to avoid loop - sendSplit( t_yz, d_emptyString, "Loop-YZ-E-SPlit" ); + sendSplit( t_yz, d_emptyString, "Len-Split(Loop-YZ)" ); } else { //need to break antec.push_back( normal_forms[loop_n_index][loop_index].eqNode( d_emptyString ).negate() ); @@ -1091,7 +1124,7 @@ bool TheoryStrings::processLoop(std::vector< Node > &antec, restr = mkConcat( z, y ); cc = Rewriter::rewrite(s_zy.eqNode( mkConcat( v2 ) )); } else { - cc = Rewriter::rewrite(s_zy.eqNode( NodeManager::currentNM()->mkNode(kind::STRING_CONCAT, z, y) )); + cc = Rewriter::rewrite(s_zy.eqNode( mkConcat( z, y) )); } if(cc == d_false) { continue; @@ -1107,14 +1140,13 @@ bool TheoryStrings::processLoop(std::vector< Node > &antec, } conc = vconc.size()==0 ? Node::null() : vconc.size()==1 ? vconc[0] : NodeManager::currentNM()->mkNode(kind::OR, vconc); } else { - Trace("strings-loop") << "Strings::Loop: Normal Breaking." << std::endl; + Trace("strings-loop") << "Strings::Loop: Normal Loop Breaking." << std::endl; //right - Node sk_w= NodeManager::currentNM()->mkSkolem( "w_loop", normal_forms[other_n_index][other_index].getType(), "created for loop detection split" ); - Node sk_y= NodeManager::currentNM()->mkSkolem( "y_loop", normal_forms[other_n_index][other_index].getType(), "created for loop detection split" ); - Node sk_z= NodeManager::currentNM()->mkSkolem( "z_loop", normal_forms[other_n_index][other_index].getType(), "created for loop detection split" ); - d_statistics.d_new_skolems += 3; + Node sk_w= mkSkolemS( "w_loop" ); + Node sk_y= mkSkolemS( "y_loop", 1 ); + Node sk_z= mkSkolemS( "z_loop" ); //t1 * ... * tn = y * z - Node conc1 = t_yz.eqNode( NodeManager::currentNM()->mkNode( kind::STRING_CONCAT, sk_y, sk_z ) ); + Node conc1 = t_yz.eqNode( mkConcat( sk_y, sk_z ) ); // s1 * ... * sk = z * y * r vec_r.insert(vec_r.begin(), sk_y); vec_r.insert(vec_r.begin(), sk_z); @@ -1128,8 +1160,8 @@ bool TheoryStrings::processLoop(std::vector< Node > &antec, std::vector< Node > vec_conc; vec_conc.push_back(conc1); vec_conc.push_back(conc2); vec_conc.push_back(conc3); vec_conc.push_back(str_in_re); - vec_conc.push_back(sk_y.eqNode(d_emptyString).negate()); - conc = NodeManager::currentNM()->mkNode( kind::AND, vec_conc );//, len_x_gt_len_y + //vec_conc.push_back(sk_y.eqNode(d_emptyString).negate());//by mkskolems + conc = NodeManager::currentNM()->mkNode( kind::AND, vec_conc ); } // normal case //set its antecedant to ant, to say when it is relevant @@ -1137,11 +1169,7 @@ bool TheoryStrings::processLoop(std::vector< Node > &antec, d_regexp_ant[str_in_re] = ant; } - //if(conc.isNull() || conc == d_false || conc.getKind() == kind::OR) { - sendLemma( ant, conc, "LOOP-BREAK" ); - //} else { - //sendInfer( ant, conc, "LOOP-BREAK" ); - //} + sendLemma( ant, conc, "F-LOOP" ); ++(d_statistics.d_loop_lemmas); //we will be done @@ -1208,7 +1236,7 @@ bool TheoryStrings::processNEqc(std::vector< std::vector< Node > > &normal_forms Node length_eq = NodeManager::currentNM()->mkNode( kind::EQUAL, length_term_i, length_term_j ); Trace("strings-solve-debug") << "Non-simple Case 1 : string lengths neither equal nor disequal" << std::endl; //try to make the lengths equal via splitting on demand - sendSplit( length_term_i, length_term_j, "Length" ); + sendSplit( length_term_i, length_term_j, "Len-Split(Diseq)" ); length_eq = Rewriter::rewrite( length_eq ); d_pending_req_phase[ length_eq ] = true; return true; @@ -1251,98 +1279,37 @@ bool TheoryStrings::processNEqc(std::vector< std::vector< Node > > &normal_forms Node other_str = normal_forms[nconst_k][nconst_index_k]; Assert( other_str.getKind()!=kind::CONST_STRING, "Other string is not constant." ); Assert( other_str.getKind()!=kind::STRING_CONCAT, "Other string is not CONCAT." ); - antec.insert(antec.end(), curr_exp.begin(), curr_exp.end() ); - //Opt - bool optflag = false; - if( normal_forms[nconst_k].size() > nconst_index_k + 1 && - normal_forms[nconst_k][nconst_index_k + 1].isConst() ) { - CVC4::String stra = const_str.getConst(); - CVC4::String strb = normal_forms[nconst_k][nconst_index_k + 1].getConst(); + if( !areDisequal(other_str, d_emptyString) ) { + sendSplit( other_str, d_emptyString, "Len-Split(CST)" ); + } else { + Assert(areDisequal(other_str, d_emptyString), "CST Split on empty Var"); + antec.insert( antec.end(), curr_exp.begin(), curr_exp.end() ); + Node xnz = other_str.eqNode(d_emptyString).negate(); + antec.push_back( xnz ); + Node ant = mkExplain( antec ); + Node sk = mkSkolemS( "c_spt" ); Node conc; - Node sk = NodeManager::currentNM()->mkSkolem( "sopt", NodeManager::currentNM()->stringType(), "created for string sp" ); - if(stra == strb) { - conc = other_str.eqNode( d_emptyString ); + if( normal_forms[nconst_k].size() > nconst_index_k + 1 && + normal_forms[nconst_k][nconst_index_k + 1].isConst() ) { + CVC4::String stra = const_str.getConst(); + CVC4::String strb = normal_forms[nconst_k][nconst_index_k + 1].getConst(); CVC4::String stra1 = stra.substr(1); - std::size_t p = stra1.overlap(strb); - Node eq = p==0? other_str.eqNode( mkConcat(const_str, sk) ) - : other_str.eqNode( mkConcat(NodeManager::currentNM()->mkConst( stra.substr(0, stra.size() - p) ), sk) ); - conc = NodeManager::currentNM()->mkNode(kind::OR, conc, eq); - Trace("strings-csp") << "Case 1: EQ " << stra << " = " << strb << std::endl; - } else if(stra.size() == 1) { - conc = other_str.eqNode( mkConcat(const_str, sk) ); - if(strb.size()>0 && stra[0] == strb[0]) { - conc = NodeManager::currentNM()->mkNode(kind::OR, conc, other_str.eqNode(d_emptyString)); - } - Trace("strings-csp") << "Case 8: Single Char " << stra << " vs " << strb << std::endl; + size_t p = stra.size() - stra1.overlap(strb); + size_t p2 = stra1.find(strb); + p = p2==std::string::npos? p : ( p>p2+1? p2+1 : p ); + Node prea = p==stra.size()? const_str : NodeManager::currentNM()->mkConst(stra.substr(0, p)); + conc = other_str.eqNode( mkConcat(prea, sk) ); + Trace("strings-csp") << "Const Split: " << prea << " is removed from " << stra << " due to " << strb << std::endl; } else { - CVC4::String fc = strb.substr(0, 1); - std::size_t p; - if((p=stra.find(fc)) != std::string::npos) { - if( (p = stra.find(strb)) == std::string::npos ) { - if((p = stra.overlap(strb)) == 0) { - conc = other_str.eqNode( mkConcat(const_str, sk) ); - Trace("strings-csp") << "Case 2: No Substr/Overlap " << stra << " vs " << strb << std::endl; - } else { - conc = other_str.eqNode( mkConcat(NodeManager::currentNM()->mkConst( stra.substr(0, stra.size() - p) ), sk) ); - Trace("strings-csp") << "Case 3: No Substr but Overlap " << stra << " vs " << strb << std::endl; - } - } else { - if(p == 0) { - conc = other_str.eqNode( d_emptyString ); - CVC4::String stra1 = stra.substr(1); - if((p = stra1.find(strb)) != std::string::npos) { - Node eq = other_str.eqNode( mkConcat(NodeManager::currentNM()->mkConst( stra.substr(0, p + 1) ), sk) ); - conc = NodeManager::currentNM()->mkNode(kind::OR, conc, eq); - Trace("strings-csp") << "Case 4: Substr at beginning only " << stra << " vs " << strb << std::endl; - } else { - p = stra1.overlap(strb); - Node eq = p==0? other_str.eqNode( mkConcat(const_str, sk) ) - : other_str.eqNode( mkConcat(NodeManager::currentNM()->mkConst( stra.substr(0, stra.size() - p) ), sk) ); - conc = NodeManager::currentNM()->mkNode(kind::OR, conc, eq); - Trace("strings-csp") << "Case 5: Substr again " << stra << " vs " << strb << std::endl; - } - } else { - conc = other_str.eqNode( mkConcat(NodeManager::currentNM()->mkConst( stra.substr(0, p - 1) ), sk) ); - Trace("strings-csp") << "Case 6: Substr not at beginning " << stra << " vs " << strb << std::endl; - } - } - } else { - conc = other_str.eqNode( mkConcat(const_str, sk) ); - Trace("strings-csp") << "Case 7: No intersection " << stra << " vs " << strb << std::endl; - } + // normal v/c split + Node firstChar = const_str.getConst().size() == 1 ? const_str : + NodeManager::currentNM()->mkConst( const_str.getConst().substr(0, 1) ); + conc = other_str.eqNode( mkConcat(firstChar, sk) ); + Trace("strings-csp") << "Const Split: " << firstChar << " is removed from " << const_str << " (normal) " << std::endl; } - Node ant = mkExplain( antec ); - conc = Rewriter::rewrite( conc ); - //if(conc.getKind() == kind::OR) { - sendLemma(ant, conc, "CST-EPS-Split"); - //} else { - // sendInfer(ant, conc, "CST-EPS"); - //} - optflag = true; - /* - if( stra.find(fc) == std::string::npos || - (stra.find(strb) == std::string::npos && - !stra.overlap(strb)) ) { - Node sk = NodeManager::currentNM()->mkSkolem( "sopt", NodeManager::currentNM()->stringType(), "created for string sp" ); - Node eq = other_str.eqNode( mkConcat(const_str, sk) ); - Node ant = mkExplain( antec ); - sendLemma(ant, eq, "CST-EPS"); - optflag = true; - }*/ - } - if(!optflag) { - Node firstChar = const_str.getConst().size() == 1 ? const_str : - NodeManager::currentNM()->mkConst( const_str.getConst().substr(0, 1) ); - //split the string - Node eq1 = Rewriter::rewrite( other_str.eqNode( d_emptyString ) ); - Node eq2 = mkSplitEq( "c_spt", "created for v/c split", other_str, firstChar, false ); - d_pending_req_phase[ eq1 ] = true; - conc = NodeManager::currentNM()->mkNode( kind::OR, eq1, eq2 ); - Trace("strings-solve-debug") << "Break normal form constant/variable " << std::endl; - Node ant = mkExplain( antec ); - sendLemma( ant, conc, "CST-SPLIT" ); - ++(d_statistics.d_eq_splits); + conc = Rewriter::rewrite( conc ); + sendLemma(ant, conc, "S-Split(CST-P)"); } return true; } else { @@ -1367,13 +1334,14 @@ bool TheoryStrings::processNEqc(std::vector< std::vector< Node > > &normal_forms } } - Node eq1 = mkSplitEq( "v_spt_l", "created for v/v split", normal_forms[i][index_i], normal_forms[j][index_j], true ); - Node eq2 = mkSplitEq( "v_spt_r", "created for v/v split", normal_forms[j][index_j], normal_forms[i][index_i], true ); - conc = NodeManager::currentNM()->mkNode( kind::OR, eq1, eq2 ); + Node sk = mkSkolemS( "v_spt", 1 ); + Node eq1 = normal_forms[i][index_i].eqNode( mkConcat(normal_forms[j][index_j], sk) ); + Node eq2 = normal_forms[j][index_j].eqNode( mkConcat(normal_forms[i][index_i], sk) ); + conc = Rewriter::rewrite(NodeManager::currentNM()->mkNode( kind::OR, eq1, eq2 )); Node ant = mkExplain( antec, antec_new_lits ); - sendLemma( ant, conc, "VAR-SPLIT" ); - ++(d_statistics.d_eq_splits); + sendLemma( ant, conc, "S-Split(VAR)" ); + //++(d_statistics.d_eq_splits); return true; } } @@ -1493,6 +1461,7 @@ bool TheoryStrings::processSimpleNEq( std::vector< std::vector< Node > > &normal conc = eqn[0].eqNode( eqn[1] ); Node ant = mkExplain( antec ); sendLemma( ant, conc, "ENDPOINT" ); + //sendInfer( ant, conc, "ENDPOINT" ); return true; }else{ index_i = normal_forms[i].size(); @@ -1557,6 +1526,7 @@ bool TheoryStrings::normalizeEquivalenceClass( Node eqc, std::vector< Node > & v for( unsigned i=0; i conc; - Node sk1 = NodeManager::currentNM()->mkSkolem( "x_dsplit", ni.getType(), "created for disequality normalization" ); - Node sk2 = NodeManager::currentNM()->mkSkolem( "y_dsplit", ni.getType(), "created for disequality normalization" ); - Node sk3 = NodeManager::currentNM()->mkSkolem( "z_dsplit", ni.getType(), "created for disequality normalization" ); - d_statistics.d_new_skolems += 3; - //Node nemp = sk1.eqNode(d_emptyString).negate(); + Node sk1 = mkSkolemS( "x_dsplit" ); + Node sk2 = mkSkolemS( "y_dsplit" ); + Node sk3 = mkSkolemS( "z_dsplit", 1 ); + //Node nemp = sk3.eqNode(d_emptyString).negate(); //conc.push_back(nemp); - //nemp = sk2.eqNode(d_emptyString).negate(); - //conc.push_back(nemp); - Node nemp = sk3.eqNode(d_emptyString).negate(); - conc.push_back(nemp); Node lsk1 = getLength( sk1 ); conc.push_back( lsk1.eqNode( li ) ); Node lsk2 = getLength( sk2 ); @@ -1693,14 +1658,14 @@ bool TheoryStrings::processDeq( Node ni, Node nj ) { Assert( !areDisequal( i, j ) ); //splitting on demand : try to make them disequal Node eq = i.eqNode( j ); - sendSplit( i, j, "D-EQL-Split" ); + sendSplit( i, j, "S-Split(DEQL)" ); eq = Rewriter::rewrite( eq ); d_pending_req_phase[ eq ] = false; return true; }else{ //splitting on demand : try to make lengths equal Node eq = li.eqNode( lj ); - sendSplit( li, lj, "D-UNK-Split" ); + sendSplit( li, lj, "D-Split" ); eq = Rewriter::rewrite( eq ); d_pending_req_phase[ eq ] = true; return true; @@ -1749,6 +1714,7 @@ int TheoryStrings::processSimpleDeq( std::vector< Node >& nfi, std::vector< Node Node conc = cc.size()==1 ? cc[0] : NodeManager::currentNM()->mkNode( kind::AND, cc ); conc = Rewriter::rewrite( conc ); sendLemma(mkExplain( ant ), conc, "Disequality Normalize Empty"); + //sendInfer(mkExplain( ant ), conc, "Disequality Normalize Empty"); return -1; } else { Node i = nfi[index]; @@ -1844,6 +1810,73 @@ bool TheoryStrings::isNormalFormPair2( Node n1, Node n2 ) { return false; } +bool TheoryStrings::registerTerm( Node n ) { + if(d_registed_terms_cache.find(n) == d_registed_terms_cache.end()) { + Debug("strings-register") << "TheoryStrings::registerTerm() " << n << endl; + if(n.getType().isString()) { + if(n.getKind() == kind::STRING_SUBSTR_TOTAL) { + Node lenxgti = NodeManager::currentNM()->mkNode( kind::GEQ, + NodeManager::currentNM()->mkNode( kind::STRING_LENGTH, n[0] ), + NodeManager::currentNM()->mkNode( kind::PLUS, n[1], n[2] ) ); + Node t1geq0 = NodeManager::currentNM()->mkNode(kind::GEQ, n[1], d_zero); + Node t2geq0 = NodeManager::currentNM()->mkNode(kind::GT, n[2], d_zero); + Node cond = Rewriter::rewrite( NodeManager::currentNM()->mkNode( kind::AND, lenxgti, t1geq0, t2geq0 )); + Node sk1 = mkSkolemS( "ss1", 2 ); + Node sk3 = mkSkolemS( "ss3", 2 ); + Node x_eq_123 = n[0].eqNode( NodeManager::currentNM()->mkNode( kind::STRING_CONCAT, sk1, n, sk3 ) ); + Node len_sk1_eq_i = n[1].eqNode( NodeManager::currentNM()->mkNode( kind::STRING_LENGTH, sk1 ) ); + Node lenc = n[2].eqNode( NodeManager::currentNM()->mkNode( kind::STRING_LENGTH, n ) ); + Node lemma = Rewriter::rewrite(NodeManager::currentNM()->mkNode(kind::ITE, cond, + NodeManager::currentNM()->mkNode( kind::AND, x_eq_123, len_sk1_eq_i, lenc ), + n.eqNode(d_emptyString))); + Trace("strings-lemma") << "Strings::Lemma SUBSTR : " << lemma << std::endl; + d_out->lemma(lemma); + } + if( n.getKind()!=kind::STRING_CONCAT && n.getKind()!=kind::CONST_STRING ) { + if( d_length_intro_vars.find(n)==d_length_intro_vars.end() ) { + Node n_len = NodeManager::currentNM()->mkNode( kind::STRING_LENGTH, n); + Node n_len_eq_z = n_len.eqNode( d_zero ); + n_len_eq_z = Rewriter::rewrite( n_len_eq_z ); + Node n_len_geq_zero = NodeManager::currentNM()->mkNode( kind::OR, n_len_eq_z, + NodeManager::currentNM()->mkNode( kind::GT, n_len, d_zero) ); + Trace("strings-lemma") << "Strings::Lemma LENGTH >= 0 : " << n_len_geq_zero << std::endl; + ++(d_statistics.d_splits); + d_out->lemma(n_len_geq_zero); + d_out->requirePhase( n_len_eq_z, true ); + d_length_intro_vars.insert(n); + } + } else { + if( d_length_nodes.find(n)==d_length_nodes.end() ) { + Node sk = mkSkolemS("lsym", 2); + Node eq = Rewriter::rewrite( sk.eqNode(n) ); + Trace("strings-lemma") << "Strings::Lemma LENGTH Term : " << eq << std::endl; + d_out->lemma(eq); + Node skl = NodeManager::currentNM()->mkNode( kind::STRING_LENGTH, sk ); + Node lsum; + if( n.getKind() == kind::STRING_CONCAT ) { + std::vector node_vec; + for( unsigned i=0; imkNode( kind::STRING_LENGTH, n[i] ); + node_vec.push_back(lni); + } + lsum = NodeManager::currentNM()->mkNode( kind::PLUS, node_vec ); + } else if( n.getKind() == kind::CONST_STRING ) { + lsum = NodeManager::currentNM()->mkConst( ::CVC4::Rational( n.getConst().size() ) ); + } + Node ceq = Rewriter::rewrite( skl.eqNode( lsum ) ); + Trace("strings-lemma") << "Strings::Lemma LENGTH : " << ceq << std::endl; + d_out->lemma(ceq); + } + } + d_registed_terms_cache.insert(n); + return true; + } else { + AlwaysAssert(false, "String Terms only in registerTerm."); + } + } + return false; +} + void TheoryStrings::sendLemma( Node ant, Node conc, const char * c ) { if( conc.isNull() || conc == d_false ) { d_out->conflict(ant); @@ -1884,12 +1917,60 @@ void TheoryStrings::sendSplit( Node a, Node b, const char * c, bool preq ) { } Node TheoryStrings::mkConcat( Node n1, Node n2 ) { - return Rewriter::rewrite( NodeManager::currentNM()->mkNode( kind::STRING_CONCAT, n1, n2 ) ); + Node ret = Rewriter::rewrite( NodeManager::currentNM()->mkNode( kind::STRING_CONCAT, n1, n2 ) ); + collectTerm(ret); + return ret; +} + +Node TheoryStrings::mkConcat( Node n1, Node n2, Node n3 ) { + Node ret = Rewriter::rewrite( NodeManager::currentNM()->mkNode( kind::STRING_CONCAT, n1, n2, n3 ) ); + collectTerm(ret); + return ret; +} + +Node TheoryStrings::mkConcat( const std::vector< Node >& c ) { + Node ret = Rewriter::rewrite( c.size()>1 ? NodeManager::currentNM()->mkNode( kind::STRING_CONCAT, c ) + : ( c.size()==1 ? c[0] : d_emptyString ) ); + collectTerm(ret); + return ret; +} + +//isLenSplit: 0-yes, 1-no, 2-ignore +Node TheoryStrings::mkSkolemS( const char *c, int isLenSplit ) { + Node n = NodeManager::currentNM()->mkSkolem( c, NodeManager::currentNM()->stringType(), "string sko" ); + ++(d_statistics.d_new_skolems); + if(isLenSplit == 0) { + Node n_len = NodeManager::currentNM()->mkNode( kind::STRING_LENGTH, n); + Node n_len_eq_z = n_len.eqNode( d_zero ); + n_len_eq_z = Rewriter::rewrite( n_len_eq_z ); + Node n_len_geq_zero = NodeManager::currentNM()->mkNode( kind::OR, n_len_eq_z, + NodeManager::currentNM()->mkNode( kind::GT, n_len, d_zero) ); + Trace("strings-lemma") << "Strings::Lemma LENGTH >= 0 : " << n_len_geq_zero << std::endl; + ++(d_statistics.d_splits); + d_out->lemma(n_len_geq_zero); + d_out->requirePhase( n_len_eq_z, true ); + } else if(isLenSplit == 1) { + d_equalityEngine.assertEquality(n.eqNode(d_emptyString), false, d_true); + Node len_n_gt_z = NodeManager::currentNM()->mkNode(kind::GT, + NodeManager::currentNM()->mkNode(kind::STRING_LENGTH, n), d_zero); + Trace("strings-lemma") << "Strings::Lemma SK-NON-ZERO : " << len_n_gt_z << std::endl; + d_out->lemma(len_n_gt_z); + } + d_length_intro_vars.insert(n); + return n; } -Node TheoryStrings::mkConcat( std::vector< Node >& c ) { - Node cc = c.size()>1 ? NodeManager::currentNM()->mkNode( kind::STRING_CONCAT, c ) : ( c.size()==1 ? c[0] : d_emptyString ); - return Rewriter::rewrite( cc ); +void TheoryStrings::collectTerm( Node n ) { + if(d_registed_terms_cache.find(n) == d_registed_terms_cache.end()) { + d_terms_cache.push_back(n); + } +} + +void TheoryStrings::appendTermLemma() { + for(std::vector< Node >::const_iterator it=d_terms_cache.begin(); + it!=d_terms_cache.begin();it++) { + registerTerm(*it); + } } Node TheoryStrings::mkExplain( std::vector< Node >& a ) { @@ -1902,7 +1983,7 @@ Node TheoryStrings::mkExplain( std::vector< Node >& a, std::vector< Node >& an ) for( unsigned i=0; i& a, std::vector< Node >& an ) if( exp ) { unsigned ps = antec_exp.size(); explain(a[i], antec_exp); - Trace("strings-solve-debug") << "Done, explanation was : " << std::endl; + Debug("strings-explain") << "Done, explanation was : " << std::endl; for( unsigned j=ps; jmkNode( kind::STRING_CONCAT, nf ); + nf_term = mkConcat( nf ); } nf_term = Rewriter::rewrite( nf_term ); Trace("strings-debug") << "Make nf_term_exp..." << std::endl; @@ -2113,7 +2194,7 @@ bool TheoryStrings::checkNormalForms() { //Trace("strings-debug") << "Merge because of normal form : " << eqc << " and " << nf_to_eqc[nf_term] << " both have normal form " << nf_term << std::endl; //two equivalence classes have same normal form, merge Node eq_exp = Rewriter::rewrite( NodeManager::currentNM()->mkNode( kind::AND, nf_term_exp, eqc_to_exp[nf_to_eqc[nf_term]] ) ); - Node eq = NodeManager::currentNM()->mkNode( kind::EQUAL, eqc, nf_to_eqc[nf_term] ); + Node eq = eqc.eqNode( nf_to_eqc[nf_term] ); sendInfer( eq_exp, eq, "Normal_Form" ); //d_equalityEngine.assertEquality( eq, true, eq_exp ); } else { @@ -2124,13 +2205,16 @@ bool TheoryStrings::checkNormalForms() { Trace("strings-process") << "Done verifying normal forms are the same for " << eqc << std::endl; } - Trace("strings-nf-debug") << "**** Normal forms are : " << std::endl; - for( std::map< Node, Node >::iterator it = nf_to_eqc.begin(); it != nf_to_eqc.end(); ++it ){ - Trace("strings-nf-debug") << " normal_form(" << it->second << ") = " << it->first << std::endl; + if(Debug.isOn("strings-nf")) { + Debug("strings-nf") << "**** Normal forms are : " << std::endl; + for( std::map< Node, Node >::iterator it = nf_to_eqc.begin(); it != nf_to_eqc.end(); ++it ){ + Debug("strings-nf") << " normal_form(" << it->second << ") = " << it->first << std::endl; + } + Debug("strings-nf") << std::endl; } - Trace("strings-nf-debug") << std::endl; - addedFact = !d_pending.empty(); - doPendingFacts(); + + addedFact = !d_pending.empty(); + doPendingFacts(); } while ( !d_conflict && d_lemma_cache.empty() && addedFact ); //process disequalities between equivalence classes @@ -2532,7 +2616,7 @@ bool TheoryStrings::checkMemberships() { vec_s2.push_back(x[s2i]); } Node s1 = x[0]; - Node s2 = vec_s2.size()==1? vec_s2[0]: NodeManager::currentNM()->mkNode(kind::STRING_CONCAT, vec_s2); + Node s2 = mkConcat(vec_s2); for(unsigned int i=0; imkNode(kind::STRING_IN_REGEXP, s1, vec_can[i].first); Node m2 = NodeManager::currentNM()->mkNode(kind::STRING_IN_REGEXP, s2, vec_can[i].second); @@ -2633,17 +2717,17 @@ bool TheoryStrings::checkMemberships() { }else{ Trace("strings-regexp-debug") << "Case 2\n"; std::vector< Node > conc_c; - Node s11 = NodeManager::currentNM()->mkSkolem( "s11", NodeManager::currentNM()->stringType(), "created for re" ); - Node s12 = NodeManager::currentNM()->mkSkolem( "s12", NodeManager::currentNM()->stringType(), "created for re" ); - Node s21 = NodeManager::currentNM()->mkSkolem( "s21", NodeManager::currentNM()->stringType(), "created for re" ); - Node s22 = NodeManager::currentNM()->mkSkolem( "s22", NodeManager::currentNM()->stringType(), "created for re" ); - conc = p1.eqNode(NodeManager::currentNM()->mkNode(kind::STRING_CONCAT, s11, s12)); + Node s11 = mkSkolemS( "s11" ); + Node s12 = mkSkolemS( "s12" ); + Node s21 = mkSkolemS( "s21" ); + Node s22 = mkSkolemS( "s22" ); + conc = p1.eqNode( mkConcat(s11, s12) ); conc_c.push_back(conc); - conc = p2.eqNode(NodeManager::currentNM()->mkNode(kind::STRING_CONCAT, s21, s22)); + conc = p2.eqNode( mkConcat(s21, s22) ); conc_c.push_back(conc); conc = NodeManager::currentNM()->mkNode(kind::STRING_IN_REGEXP, s11, r); conc_c.push_back(conc); - conc = NodeManager::currentNM()->mkNode(kind::STRING_IN_REGEXP, NodeManager::currentNM()->mkNode(kind::STRING_CONCAT, s12, s21), r[0]); + conc = NodeManager::currentNM()->mkNode(kind::STRING_IN_REGEXP, mkConcat(s12, s21), r[0]); conc_c.push_back(conc); conc = NodeManager::currentNM()->mkNode(kind::STRING_IN_REGEXP, s22, r); conc_c.push_back(conc); @@ -2675,7 +2759,7 @@ bool TheoryStrings::checkMemberships() { Node s21 = NodeManager::currentNM()->mkNode(kind::STRING_SUBSTR_TOTAL, p2, d_zero, bj); Node s22 = NodeManager::currentNM()->mkNode(kind::STRING_SUBSTR_TOTAL, p2, bj, NodeManager::currentNM()->mkNode(kind::MINUS, len2, bj)); Node cc1 = NodeManager::currentNM()->mkNode(kind::STRING_IN_REGEXP, s11, r).negate(); - Node cc2 = NodeManager::currentNM()->mkNode(kind::STRING_IN_REGEXP, NodeManager::currentNM()->mkNode(kind::STRING_CONCAT, s12, s21), r[0]).negate(); + Node cc2 = NodeManager::currentNM()->mkNode(kind::STRING_IN_REGEXP, mkConcat(s12, s21), r[0]).negate(); Node cc3 = NodeManager::currentNM()->mkNode(kind::STRING_IN_REGEXP, s22, r).negate(); conc = NodeManager::currentNM()->mkNode(kind::OR, cc1, cc2, cc3); conc = NodeManager::currentNM()->mkNode(kind::IMPLIES, g1, conc); @@ -2808,10 +2892,9 @@ bool TheoryStrings::checkPosContains() { Node s = atom[1]; if( !areEqual( s, d_emptyString ) && !areEqual( s, x ) ) { if(d_pos_ctn_cached.find(atom) == d_pos_ctn_cached.end()) { - Node sk1 = NodeManager::currentNM()->mkSkolem( "sc1", s.getType(), "created for contain" ); - Node sk2 = NodeManager::currentNM()->mkSkolem( "sc2", s.getType(), "created for contain" ); - d_statistics.d_new_skolems += 2; - Node eq = Rewriter::rewrite( x.eqNode( NodeManager::currentNM()->mkNode( kind::STRING_CONCAT, sk1, s, sk2 ) ) ); + Node sk1 = mkSkolemS( "sc1" ); + Node sk2 = mkSkolemS( "sc2" ); + Node eq = Rewriter::rewrite( x.eqNode( mkConcat( sk1, s, sk2 ) ) ); sendLemma( atom, eq, "POS-INC" ); addedLemma = true; d_pos_ctn_cached.insert( atom ); @@ -2977,6 +3060,7 @@ bool TheoryStrings::deriveRegExp( Node x, Node r, Node ant ) { CVC4::String c = s.substr(i, 1); Node dc2; int rt = d_regexp_opr.derivativeS(dc, c, dc2); + dc = dc2; if(rt == 0) { //TODO } else if(rt == 2) { @@ -2996,17 +3080,17 @@ bool TheoryStrings::deriveRegExp( Node x, Node r, Node ant ) { for(unsigned int i=1; imkNode( kind::STRING_CONCAT, vec_nodes ); + Node left = mkConcat( vec_nodes ); left = Rewriter::rewrite( left ); conc = NodeManager::currentNM()->mkNode( kind::STRING_IN_REGEXP, left, dc ); - std::vector< Node > sdc; + /*std::vector< Node > sdc; d_regexp_opr.simplify(conc, sdc, true); if(sdc.size() == 1) { conc = sdc[0]; } else { conc = Rewriter::rewrite(NodeManager::currentNM()->mkNode(kind::AND, conc)); - } + }*/ } } sendLemma(ant, conc, "RegExp-Derive"); @@ -3204,19 +3288,15 @@ void TheoryStrings::assertNode( Node lit ) { } Node TheoryStrings::mkSplitEq( const char * c, const char * info, Node lhs, Node rhs, bool lgtZero ) { - Node sk = NodeManager::currentNM()->mkSkolem( c, NodeManager::currentNM()->stringType(), info ); - d_statistics.d_new_skolems += 1; + Node sk = mkSkolemS( c, (lgtZero?1:0) ); //NodeManager::currentNM()->mkSkolem( c, NodeManager::currentNM()->stringType(), info ); Node cc = mkConcat( rhs, sk ); - //if(rhs.isConst()) { - // d_length_inst[cc] = lhs; - //} - Node eq = lhs.eqNode( cc ); - eq = Rewriter::rewrite( eq ); + Node eq = Rewriter::rewrite( lhs.eqNode( cc ) ); + /* if( lgtZero ) { - Node sk_gt_zero = NodeManager::currentNM()->mkNode( kind::EQUAL, sk, d_emptyString).negate(); + Node sk_gt_zero = sk.eqNode(d_emptyString).negate(); Trace("strings-lemma") << "Strings::Lemma SK-NON-EMPTY: " << sk_gt_zero << std::endl; d_lemma_cache.push_back( sk_gt_zero ); - } + }*/ return eq; } @@ -3245,4 +3325,4 @@ TheoryStrings::Statistics::~Statistics(){ }/* CVC4::theory::strings namespace */ }/* CVC4::theory namespace */ -}/* CVC4 namespace */ +}/* CVC4 namespace */ \ No newline at end of file diff --git a/src/theory/strings/theory_strings.h b/src/theory/strings/theory_strings.h index 2a33b400e..de5f62b1a 100644 --- a/src/theory/strings/theory_strings.h +++ b/src/theory/strings/theory_strings.h @@ -164,7 +164,11 @@ private: NodeSet d_loop_antec; NodeSet d_length_intro_vars; // preReg cache - NodeSet d_prereg_cached; + NodeSet d_registed_terms_cache; + // term cache + std::vector< Node > d_terms_cache; + void collectTerm( Node n ); + void appendTermLemma(); ///////////////////////////////////////////////////////////////////////////// // MODEL GENERATION @@ -271,12 +275,19 @@ protected: void doPendingFacts(); void doPendingLemmas(); + //register term + bool registerTerm( Node n ); + //send lemma void sendLemma( Node ant, Node conc, const char * c ); void sendInfer( Node eq_exp, Node eq, const char * c ); void sendSplit( Node a, Node b, const char * c, bool preq = true ); /** mkConcat **/ inline Node mkConcat( Node n1, Node n2 ); - inline Node mkConcat( std::vector< Node >& c ); + inline Node mkConcat( Node n1, Node n2, Node n3 ); + inline Node mkConcat( const std::vector< Node >& c ); + //mkSkolem + inline Node mkSkolemS(const char * c, int isLenSplit = 0); + //inline Node mkSkolemI(const char * c); /** mkExplain **/ Node mkExplain( std::vector< Node >& a ); Node mkExplain( std::vector< Node >& a, std::vector< Node >& an ); -- cgit v1.2.3 From 7346e80b4f443b2449a0d211b657e2929e065d62 Mon Sep 17 00:00:00 2001 From: Tim King Date: Tue, 24 Jun 2014 16:46:09 -0400 Subject: Fixing a soundness bug in arithmetic and a roubustness problem in rings. --- src/theory/arith/arith_ite_utils.cpp | 19 +++++++++++++++++-- src/theory/arith/theory_arith_private.cpp | 13 +++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) (limited to 'src/theory') diff --git a/src/theory/arith/arith_ite_utils.cpp b/src/theory/arith/arith_ite_utils.cpp index d5dcae726..d3702ccd8 100644 --- a/src/theory/arith/arith_ite_utils.cpp +++ b/src/theory/arith/arith_ite_utils.cpp @@ -308,6 +308,9 @@ void ArithIteUtils::addImplications(Node x, Node y){ // (=> (not x) y) // (=> (not y) x) + x = Rewriter::rewrite(x); + y = Rewriter::rewrite(y); + Node xneg = x.negate(); Node yneg = y.negate(); d_implies[xneg].insert(y); @@ -369,9 +372,21 @@ bool ArithIteUtils::solveBinOr(TNode binor){ Assert(binor[0].getKind() == kind::EQUAL); Assert(binor[1].getKind() == kind::EQUAL); + //Node n = Node n = applySubstitutions(binor); + if(n != binor){ + n = Rewriter::rewrite(n); + + if(!(n.getKind() == kind::OR && + n.getNumChildren() == 2 && + n[0].getKind() == kind::EQUAL && + n[1].getKind() == kind::EQUAL)){ + return false; + } + } + Assert(n.getKind() == kind::OR); - Assert(binor.getNumChildren() == 2); + Assert(n.getNumChildren() == 2); TNode l = n[0]; TNode r = n[1]; @@ -416,7 +431,7 @@ bool ArithIteUtils::solveBinOr(TNode binor){ NodeManager* nm = NodeManager::currentNM(); - Node cnd = findIteCnd(binor[0], binor[1]); + Node cnd = findIteCnd(l, r); Node sk = nm->mkSkolem("deor", nm->booleanType()); Node ite = sk.iteNode(otherL, otherR); diff --git a/src/theory/arith/theory_arith_private.cpp b/src/theory/arith/theory_arith_private.cpp index b2eec924c..0fa9e79f2 100644 --- a/src/theory/arith/theory_arith_private.cpp +++ b/src/theory/arith/theory_arith_private.cpp @@ -2965,6 +2965,19 @@ void TheoryArithPrivate::solveInteger(Theory::Effort effortLevel){ if(mipRes == MipClosed){ d_likelyIntegerInfeasible = true; replayLog(approx); + + if(!anyConflict()){ + //start up simplex + d_partialModel.stopQueueingBoundCounts(); + UpdateTrackingCallback utcb(&d_linEq); + d_partialModel.processBoundsQueue(utcb); + d_linEq.startTrackingBoundCounts(); + //call simplex + solveRelaxationOrPanic(effortLevel); + // shutdown simplex + d_linEq.stopTrackingBoundCounts(); + d_partialModel.startQueueingBoundCounts(); + } } if(!(anyConflict() || !d_approxCuts.empty())){ turnOffApproxFor(options::replayNumericFailurePenalty()); -- cgit v1.2.3 From 7e5245639848594e5ff72a5104c340defe4aac7c Mon Sep 17 00:00:00 2001 From: Tim King Date: Tue, 24 Jun 2014 19:19:58 -0400 Subject: Alternative lazier heuristic for assertion rewriting. --- src/theory/arith/arith_ite_utils.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/theory') diff --git a/src/theory/arith/arith_ite_utils.cpp b/src/theory/arith/arith_ite_utils.cpp index d3702ccd8..fa631a527 100644 --- a/src/theory/arith/arith_ite_utils.cpp +++ b/src/theory/arith/arith_ite_utils.cpp @@ -308,9 +308,6 @@ void ArithIteUtils::addImplications(Node x, Node y){ // (=> (not x) y) // (=> (not y) x) - x = Rewriter::rewrite(x); - y = Rewriter::rewrite(y); - Node xneg = x.negate(); Node yneg = y.negate(); d_implies[xneg].insert(y); @@ -431,7 +428,7 @@ bool ArithIteUtils::solveBinOr(TNode binor){ NodeManager* nm = NodeManager::currentNM(); - Node cnd = findIteCnd(l, r); + Node cnd = findIteCnd(binor[0], binor[1]); Node sk = nm->mkSkolem("deor", nm->booleanType()); Node ite = sk.iteNode(otherL, otherR); -- cgit v1.2.3 From b1e7d97356e2926d67a4208168e7b6017d7f77ed Mon Sep 17 00:00:00 2001 From: Tim King Date: Wed, 25 Jun 2014 10:46:40 -0400 Subject: Fixing the previous bugfix. --- src/theory/arith/theory_arith_private.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'src/theory') diff --git a/src/theory/arith/theory_arith_private.cpp b/src/theory/arith/theory_arith_private.cpp index 0fa9e79f2..d3178c34f 100644 --- a/src/theory/arith/theory_arith_private.cpp +++ b/src/theory/arith/theory_arith_private.cpp @@ -2147,6 +2147,9 @@ bool TheoryArithPrivate::replayLog(ApproximateSimplex* approx){ d_currentPropagationList.resize(enteringPropN); } + /* It is not clear what the d_qflraStatus is at this point */ + d_qflraStatus = Result::SAT_UNKNOWN; + Assert(d_replayVariables.empty()); Assert(d_replayConstraints.empty()); @@ -2289,6 +2292,7 @@ void TheoryArithPrivate::tryBranchCut(ApproximateSimplex* approx, int nid, Branc SimplexDecisionProcedure& simplex = selectSimplex(true); simplex.findModel(false); + // Can change d_qflraStatus d_linEq.stopTrackingBoundCounts(); d_partialModel.startQueueingBoundCounts(); @@ -2564,6 +2568,7 @@ std::vector TheoryArithPrivate::replayLogRec(ApproximateSimplex SimplexDecisionProcedure& simplex = selectSimplex(true); simplex.findModel(false); + // can change d_qflraStatus d_linEq.stopTrackingBoundCounts(); d_partialModel.startQueueingBoundCounts(); @@ -2965,18 +2970,10 @@ void TheoryArithPrivate::solveInteger(Theory::Effort effortLevel){ if(mipRes == MipClosed){ d_likelyIntegerInfeasible = true; replayLog(approx); + AlwaysAssert(anyConflict() || d_qflraStatus != Result::SAT); if(!anyConflict()){ - //start up simplex - d_partialModel.stopQueueingBoundCounts(); - UpdateTrackingCallback utcb(&d_linEq); - d_partialModel.processBoundsQueue(utcb); - d_linEq.startTrackingBoundCounts(); - //call simplex - solveRelaxationOrPanic(effortLevel); - // shutdown simplex - d_linEq.stopTrackingBoundCounts(); - d_partialModel.startQueueingBoundCounts(); + solveRealRelaxation(effortLevel); } } if(!(anyConflict() || !d_approxCuts.empty())){ -- cgit v1.2.3 From 2996101cac0fa61ae332fe63463f811e4af61b01 Mon Sep 17 00:00:00 2001 From: Kshitij Bansal Date: Mon, 23 Jun 2014 11:41:23 -0400 Subject: mv default care graph function inside the theory implementation --- src/theory/sets/theory_sets.cpp | 18 +++++++++------ src/theory/sets/theory_sets.h | 6 +++-- src/theory/sets/theory_sets_private.cpp | 41 +++++++++++++++++++++++++++++---- src/theory/sets/theory_sets_private.h | 2 ++ 4 files changed, 53 insertions(+), 14 deletions(-) (limited to 'src/theory') diff --git a/src/theory/sets/theory_sets.cpp b/src/theory/sets/theory_sets.cpp index c230b9ac5..5d5e1f9ee 100644 --- a/src/theory/sets/theory_sets.cpp +++ b/src/theory/sets/theory_sets.cpp @@ -34,10 +34,6 @@ TheorySets::~TheorySets() { delete d_internal; } -void TheorySets::setMasterEqualityEngine(eq::EqualityEngine* eq) { - d_internal->setMasterEqualityEngine(eq); -} - void TheorySets::addSharedTerm(TNode n) { d_internal->addSharedTerm(n); } @@ -50,8 +46,8 @@ void TheorySets::collectModelInfo(TheoryModel* m, bool fullModel) { d_internal->collectModelInfo(m, fullModel); } -void TheorySets::propagate(Effort e) { - d_internal->propagate(e); +void TheorySets::computeCareGraph() { + d_internal->computeCareGraph(); } Node TheorySets::explain(TNode node) { @@ -59,7 +55,15 @@ Node TheorySets::explain(TNode node) { } void TheorySets::preRegisterTerm(TNode node) { - return d_internal->preRegisterTerm(node); + d_internal->preRegisterTerm(node); +} + +void TheorySets::propagate(Effort e) { + d_internal->propagate(e); +} + +void TheorySets::setMasterEqualityEngine(eq::EqualityEngine* eq) { + d_internal->setMasterEqualityEngine(eq); } }/* CVC4::theory::sets namespace */ diff --git a/src/theory/sets/theory_sets.h b/src/theory/sets/theory_sets.h index 6ff41d5f5..84d91de72 100644 --- a/src/theory/sets/theory_sets.h +++ b/src/theory/sets/theory_sets.h @@ -48,14 +48,14 @@ public: ~TheorySets(); - void setMasterEqualityEngine(eq::EqualityEngine* eq); - void addSharedTerm(TNode); void check(Effort); void collectModelInfo(TheoryModel*, bool fullModel); + void computeCareGraph(); + Node explain(TNode); std::string identify() const { return "THEORY_SETS"; } @@ -64,6 +64,8 @@ public: void propagate(Effort); + void setMasterEqualityEngine(eq::EqualityEngine* eq); + };/* class TheorySets */ }/* CVC4::theory::sets namespace */ diff --git a/src/theory/sets/theory_sets_private.cpp b/src/theory/sets/theory_sets_private.cpp index c06f1bd5e..0a7ecd14e 100644 --- a/src/theory/sets/theory_sets_private.cpp +++ b/src/theory/sets/theory_sets_private.cpp @@ -408,6 +408,42 @@ void TheorySetsPrivate::learnLiteral(TNode atom, bool polarity, Node reason) { }/*TheorySetsPrivate::learnLiteral(...)*/ +/************************ Sharing ************************/ +/************************ Sharing ************************/ +/************************ Sharing ************************/ + +void TheorySetsPrivate::addSharedTerm(TNode n) { + Debug("sets") << "[sets] ThoerySetsPrivate::addSharedTerm( " << n << ")" << std::endl; + d_equalityEngine.addTriggerTerm(n, THEORY_SETS); +} + + +void TheorySetsPrivate::computeCareGraph() { + Debug("sharing") << "Theory::computeCareGraph<" << d_external.identify() << ">()" << endl; + for (unsigned i = 0; i < d_external.d_sharedTerms.size(); ++ i) { + TNode a = d_external.d_sharedTerms[i]; + TypeNode aType = a.getType(); + for (unsigned j = i + 1; j < d_external.d_sharedTerms.size(); ++ j) { + TNode b = d_external.d_sharedTerms[j]; + if (b.getType() != aType) { + // We don't care about the terms of different types + continue; + } + switch (d_external.d_valuation.getEqualityStatus(a, b)) { + case EQUALITY_TRUE_AND_PROPAGATED: + case EQUALITY_FALSE_AND_PROPAGATED: + // If we know about it, we should have propagated it, so we can skip + break; + default: + // Let's split on it + d_external.addCarePair(a, b); + break; + } + } + } +} + + /******************** Model generation ********************/ /******************** Model generation ********************/ /******************** Model generation ********************/ @@ -886,11 +922,6 @@ void TheorySetsPrivate::setMasterEqualityEngine(eq::EqualityEngine* eq) { d_equalityEngine.setMasterEqualityEngine(eq); } -void TheorySetsPrivate::addSharedTerm(TNode n) { - Debug("sets") << "[sets] ThoerySetsPrivate::addSharedTerm( " << n << ")" << std::endl; - d_equalityEngine.addTriggerTerm(n, THEORY_SETS); -} - void TheorySetsPrivate::conflict(TNode a, TNode b) { if (a.getKind() == kind::CONST_BOOLEAN) { diff --git a/src/theory/sets/theory_sets_private.h b/src/theory/sets/theory_sets_private.h index 90dec7c0b..e5d7beb2c 100644 --- a/src/theory/sets/theory_sets_private.h +++ b/src/theory/sets/theory_sets_private.h @@ -56,6 +56,8 @@ public: void collectModelInfo(TheoryModel*, bool fullModel); + void computeCareGraph(); + Node explain(TNode); void preRegisterTerm(TNode node); -- cgit v1.2.3 From c57e0640f56ce5286870f27c9f1a9af6dd7e757f Mon Sep 17 00:00:00 2001 From: Kshitij Bansal Date: Tue, 24 Jun 2014 12:15:42 -0400 Subject: fix sets eager lemmas --- src/theory/sets/options | 4 ++-- src/theory/sets/theory_sets_private.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/theory') diff --git a/src/theory/sets/options b/src/theory/sets/options index dc6c6e907..1c95e78e4 100644 --- a/src/theory/sets/options +++ b/src/theory/sets/options @@ -8,7 +8,7 @@ module SETS "theory/sets/options.h" Sets option setsPropagate --sets-propagate bool :default true determines whether to propagate learnt facts to Theory Engine / SAT solver -option setsEagerLemmas --sets-eager-lemmas bool :default false - if true, will add lemmas even if not at FULL_EFFORT +option setsEagerLemmas --sets-eager-lemmas bool :default true + add lemmas even at regular effort endmodule diff --git a/src/theory/sets/theory_sets_private.cpp b/src/theory/sets/theory_sets_private.cpp index 0a7ecd14e..be2b48f81 100644 --- a/src/theory/sets/theory_sets_private.cpp +++ b/src/theory/sets/theory_sets_private.cpp @@ -97,7 +97,7 @@ void TheorySetsPrivate::check(Theory::Effort level) { Debug("sets") << "[sets] is complete = " << isComplete() << std::endl; } - if( (Theory::EFFORT_FULL || options::setsEagerLemmas() ) && !isComplete()) { + if( (level == Theory::EFFORT_FULL || options::setsEagerLemmas() ) && !isComplete()) { d_external.d_out->lemma(getLemma()); return; } -- cgit v1.2.3 From 119b84b19612ee21147d191dad13dc1c507f3047 Mon Sep 17 00:00:00 2001 From: Clark Barrett Date: Fri, 27 Jun 2014 10:29:28 -0700 Subject: Fix for bug543 --- src/theory/arrays/theory_arrays.cpp | 13 +++++++------ test/regress/regress0/Makefile.am | 1 + test/regress/regress0/bug543.smt2 | 20 ++++++++++++++++++++ 3 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 test/regress/regress0/bug543.smt2 (limited to 'src/theory') diff --git a/src/theory/arrays/theory_arrays.cpp b/src/theory/arrays/theory_arrays.cpp index 7569b3e93..caeae891f 100644 --- a/src/theory/arrays/theory_arrays.cpp +++ b/src/theory/arrays/theory_arrays.cpp @@ -727,7 +727,7 @@ void TheoryArrays::collectModelInfo( TheoryModel* m, bool fullModel ) termSet.insert(r); } else if (!computeRep) { - arrays.push_back(eqc); + arrays.push_back(n); computeRep = true; } } @@ -818,15 +818,16 @@ void TheoryArrays::collectModelInfo( TheoryModel* m, bool fullModel ) // Loop through all array equivalence classes that need a representative computed for (size_t i=0; ibegin() != defaultValuesSet.getSet(valueType)->end()); @@ -840,7 +841,7 @@ void TheoryArrays::collectModelInfo( TheoryModel* m, bool fullModel ) } // Build the STORE_ALL term with the default value - rep = nm->mkConst(ArrayStoreAll(n.getType().toType(), rep.toExpr())); + rep = nm->mkConst(ArrayStoreAll(nrep.getType().toType(), rep.toExpr())); } else { std::hash_map::iterator it = d_skolemCache.find(n); @@ -854,7 +855,7 @@ void TheoryArrays::collectModelInfo( TheoryModel* m, bool fullModel ) } // For each read, require that the rep stores the right value - vector& reads = selects[n]; + vector& reads = selects[nrep]; for (unsigned j = 0; j < reads.size(); ++j) { rep = nm->mkNode(kind::STORE, rep, reads[j][1], reads[j]); } diff --git a/test/regress/regress0/Makefile.am b/test/regress/regress0/Makefile.am index 3c9ec7eb0..d65fd20c5 100644 --- a/test/regress/regress0/Makefile.am +++ b/test/regress/regress0/Makefile.am @@ -156,6 +156,7 @@ BUG_TESTS = \ bug522.smt2 \ bug528a.smt2 \ bug541.smt2 \ + bug543.smt2 \ bug544.smt2 \ bug548a.smt2 \ bug567.smt2 diff --git a/test/regress/regress0/bug543.smt2 b/test/regress/regress0/bug543.smt2 new file mode 100644 index 000000000..9155de7a9 --- /dev/null +++ b/test/regress/regress0/bug543.smt2 @@ -0,0 +1,20 @@ +; COMMAND-LINE: --incremental +; EXPECT: sat +(set-option :produce-models true) +(set-logic QF_ALL_SUPPORTED) +(declare-fun _substvar_1807_ () Bool) +(declare-fun local_id_x$1 () (_ BitVec 32)) +(declare-fun local_id_x$2 () (_ BitVec 32)) +(declare-fun $$_ZZ19bitonic_sort_kernelPfjjE7sh_data@5 () (Array Bool (Array (_ BitVec 32) (_ BitVec 32)))) +(declare-fun $$_ZZ19bitonic_sort_kernelPfjjE7sh_data () (Array Bool (Array (_ BitVec 32) (_ BitVec 32)))) +(declare-fun $0$1@2 () (_ BitVec 32)) +(declare-fun $$_ZZ19bitonic_sort_kernelPfjjE7sh_data@0 () (Array Bool (Array (_ BitVec 32) (_ BitVec 32)))) +(declare-fun v1$1@0 () (_ BitVec 32)) +(declare-fun $$_ZZ19bitonic_sort_kernelPfjjE7sh_data@1 () (Array Bool (Array (_ BitVec 32) (_ BitVec 32)))) +(declare-fun v1$2@0 () (_ BitVec 32)) +(assert (not (= #b1 #b0))) +(define-fun $_Z19bitonic_sort_kernelPfjj () Bool (=> true (let ((__partitioned_block_$truebb_0$7_correct (=> true (=> true (=> (and true true (= $$_ZZ19bitonic_sort_kernelPfjjE7sh_data@5 (store $$_ZZ19bitonic_sort_kernelPfjjE7sh_data true (store (select $$_ZZ19bitonic_sort_kernelPfjjE7sh_data true) local_id_x$1 $0$1@2))) true true) false))))) (let ((inline$_UPDATE_WRITE_READ_BENIGN_FLAG_$$_ZZ19bitonic_sort_kernelPfjjE7sh_data$1$_UPDATE_BENIGN_FLAG_correct (=> true (=> true __partitioned_block_$truebb_0$7_correct)))) (let ((inline$_LOG_WRITE_$$_ZZ19bitonic_sort_kernelPfjjE7sh_data$1$_LOG_WRITE_correct (=> true (=> true inline$_UPDATE_WRITE_READ_BENIGN_FLAG_$$_ZZ19bitonic_sort_kernelPfjjE7sh_data$1$_UPDATE_BENIGN_FLAG_correct)))) (let ((inline$_LOG_WRITE_$$_ZZ19bitonic_sort_kernelPfjjE7sh_data$1$Entry_correct (=> true (=> true inline$_LOG_WRITE_$$_ZZ19bitonic_sort_kernelPfjjE7sh_data$1$_LOG_WRITE_correct)))) (let ((inline$$bugle_barrier$1$anon8_Then_correct (=> true (=> true inline$_LOG_WRITE_$$_ZZ19bitonic_sort_kernelPfjjE7sh_data$1$Entry_correct)))) (let ((inline$$bugle_barrier$1$anon3_correct (=> true (=> true (=> true (=> true inline$$bugle_barrier$1$anon8_Then_correct)))))) (let ((inline$$bugle_barrier$1$anon7_Then_correct (=> true (=> true inline$$bugle_barrier$1$anon3_correct)))) (let ((inline$$bugle_barrier$1$anon6_Else_correct (=> true (=> true (=> true (=> true inline$$bugle_barrier$1$anon7_Then_correct)))))) (let ((inline$$bugle_barrier$1$Entry_correct (=> true (=> true (=> true inline$$bugle_barrier$1$anon6_Else_correct))))) (let ((__partitioned_block_$truebb_0$4_correct (=> true (=> true (=> true inline$$bugle_barrier$1$Entry_correct))))) (let ((inline$_LOG_READ_$$_ZZ19bitonic_sort_kernelPfjjE7sh_data$4$_LOG_READ_correct (=> true (=> true __partitioned_block_$truebb_0$4_correct)))) (let ((inline$_LOG_READ_$$_ZZ19bitonic_sort_kernelPfjjE7sh_data$4$Entry_correct (=> true (=> true (=> true inline$_LOG_READ_$$_ZZ19bitonic_sort_kernelPfjjE7sh_data$4$_LOG_READ_correct))))) (let ((__partitioned_block_$truebb_0$3_correct (=> true (=> true (=> true inline$_LOG_READ_$$_ZZ19bitonic_sort_kernelPfjjE7sh_data$4$Entry_correct))))) (let ((inline$_LOG_READ_$$_ZZ19bitonic_sort_kernelPfjjE7sh_data$3$_LOG_READ_correct (=> true (=> true __partitioned_block_$truebb_0$3_correct)))) (let ((inline$_LOG_READ_$$_ZZ19bitonic_sort_kernelPfjjE7sh_data$3$Entry_correct (=> true (=> true inline$_LOG_READ_$$_ZZ19bitonic_sort_kernelPfjjE7sh_data$3$_LOG_READ_correct)))) (let ((__partitioned_block_$truebb_0$2_correct (=> true (=> true inline$_LOG_READ_$$_ZZ19bitonic_sort_kernelPfjjE7sh_data$3$Entry_correct)))) (let ((inline$_LOG_READ_$$_ZZ19bitonic_sort_kernelPfjjE7sh_data$2$_LOG_READ_correct (=> true (=> true __partitioned_block_$truebb_0$2_correct)))) (let ((inline$_LOG_READ_$$_ZZ19bitonic_sort_kernelPfjjE7sh_data$2$Entry_correct (=> true (=> true (=> true inline$_LOG_READ_$$_ZZ19bitonic_sort_kernelPfjjE7sh_data$2$_LOG_READ_correct))))) (let ((__partitioned_block_$truebb_0$1_correct (=> true (=> true (=> true inline$_LOG_READ_$$_ZZ19bitonic_sort_kernelPfjjE7sh_data$2$Entry_correct))))) (let ((inline$_LOG_READ_$$_ZZ19bitonic_sort_kernelPfjjE7sh_data$1$_LOG_READ_correct (=> true (=> true __partitioned_block_$truebb_0$1_correct)))) (let ((inline$_LOG_READ_$$_ZZ19bitonic_sort_kernelPfjjE7sh_data$1$Entry_correct (=> true (=> true (=> true inline$_LOG_READ_$$_ZZ19bitonic_sort_kernelPfjjE7sh_data$1$_LOG_READ_correct))))) (let ((__partitioned_block_$truebb_0_correct (=> true (=> true inline$_LOG_READ_$$_ZZ19bitonic_sort_kernelPfjjE7sh_data$1$Entry_correct)))) (let (($1_correct (=> true (=> true (=> true (=> true (=> true __partitioned_block_$truebb_0_correct))))))) (let ((__partitioned_block_$0_0$4_correct (=> true (=> true (=> true (=> true (=> true (=> true (=> true (and _substvar_1807_ (=> true (=> true (=> true (=> true (=> true (=> true (=> true (=> true (=> true (=> true (=> true (=> true (=> true (=> true (=> true (=> true (=> true (=> true $1_correct)))))))))))))))))))))))))))) (let ((inline$$bugle_barrier$0$Return_correct (=> true (=> true __partitioned_block_$0_0$4_correct)))) (let ((inline$$bugle_barrier$0$anon8_Else_correct (=> true (=> true inline$$bugle_barrier$0$Return_correct)))) (let ((inline$$bugle_barrier$0$anon3_correct (=> true (=> true (=> true (=> true inline$$bugle_barrier$0$anon8_Else_correct)))))) (let ((inline$$bugle_barrier$0$anon7_Then_correct (=> true (=> true inline$$bugle_barrier$0$anon3_correct)))) (let ((inline$$bugle_barrier$0$anon6_Else_correct (=> true (=> true (=> true (=> true inline$$bugle_barrier$0$anon7_Then_correct)))))) (let ((inline$$bugle_barrier$0$Entry_correct (=> true (=> true (=> true inline$$bugle_barrier$0$anon6_Else_correct))))) (let ((__partitioned_block_$0_0$3_correct (=> true (=> true (=> (and true true (= $$_ZZ19bitonic_sort_kernelPfjjE7sh_data@0 (store $$_ZZ19bitonic_sort_kernelPfjjE7sh_data true (store (select $$_ZZ19bitonic_sort_kernelPfjjE7sh_data true) local_id_x$1 v1$1@0))) (= $$_ZZ19bitonic_sort_kernelPfjjE7sh_data@1 (store $$_ZZ19bitonic_sort_kernelPfjjE7sh_data@0 false (store (select $$_ZZ19bitonic_sort_kernelPfjjE7sh_data@0 false) local_id_x$2 v1$2@0))) true) inline$$bugle_barrier$0$Entry_correct))))) (let ((inline$_UPDATE_WRITE_READ_BENIGN_FLAG_$$_ZZ19bitonic_sort_kernelPfjjE7sh_data$0$_UPDATE_BENIGN_FLAG_correct (=> true (=> true __partitioned_block_$0_0$3_correct)))) (let ((inline$_LOG_WRITE_$$_ZZ19bitonic_sort_kernelPfjjE7sh_data$0$_LOG_WRITE_correct (=> true (=> true inline$_UPDATE_WRITE_READ_BENIGN_FLAG_$$_ZZ19bitonic_sort_kernelPfjjE7sh_data$0$_UPDATE_BENIGN_FLAG_correct)))) (let ((inline$_LOG_WRITE_$$_ZZ19bitonic_sort_kernelPfjjE7sh_data$0$Entry_correct (=> true (=> true inline$_LOG_WRITE_$$_ZZ19bitonic_sort_kernelPfjjE7sh_data$0$_LOG_WRITE_correct)))) (let ((__partitioned_block_$0_0$1_correct (=> true (=> true (=> true inline$_LOG_WRITE_$$_ZZ19bitonic_sort_kernelPfjjE7sh_data$0$Entry_correct))))) (let ((inline$_LOG_READ_$$data$0$_LOG_READ_correct (=> true (=> true __partitioned_block_$0_0$1_correct)))) (let ((inline$_LOG_READ_$$data$0$Entry_correct (=> true (=> true inline$_LOG_READ_$$data$0$_LOG_READ_correct)))) (let ((__partitioned_block_$0_0_correct (=> true (=> true (=> true inline$_LOG_READ_$$data$0$Entry_correct))))) (let ((PreconditionGeneratedEntry_correct (=> true (=> true (=> true __partitioned_block_$0_0_correct))))) PreconditionGeneratedEntry_correct))))))))))))))))))))))))))))))))))))))))) +(push 1) +(assert (not (=> true $_Z19bitonic_sort_kernelPfjj))) +(check-sat) + -- cgit v1.2.3 From a1c1b38e42f16ba942ddb029409a942907ed0d24 Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Sat, 28 Jun 2014 16:04:27 -0400 Subject: Fix bug in datatypes options specification --- src/theory/datatypes/options | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/theory') diff --git a/src/theory/datatypes/options b/src/theory/datatypes/options index fcf36648d..5fc59b549 100644 --- a/src/theory/datatypes/options +++ b/src/theory/datatypes/options @@ -11,7 +11,7 @@ module DATATYPES "theory/datatypes/options.h" Datatypes theory # cdr( nil ) has no set value. expert-option dtRewriteErrorSel --dt-rewrite-error-sel bool :default false rewrite incorrectly applied selectors to arbitrary ground term -option dtForceAssignment /--dt-force-assignment bool :default false :read-write +option dtForceAssignment --dt-force-assignment bool :default false :read-write force the datatypes solver to give specific values to all datatypes terms before answering sat endmodule -- cgit v1.2.3 From f4d031742d969c689d38c0756a5026a434ef89b3 Mon Sep 17 00:00:00 2001 From: Kshitij Bansal Date: Sun, 29 Jun 2014 18:44:40 -0400 Subject: sets: "insert" operator MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit newâ„¢! support for (insert (X (Set X)) (Set X) :right-associative) from the finte sets theory prosoal. e.g., (insert 1 2 3 4 (singleton 5)) --- src/parser/smt2/smt2.cpp | 1 + src/printer/smt2/smt2_printer.cpp | 1 + src/theory/sets/kinds | 3 +++ src/theory/sets/theory_sets_rewriter.cpp | 9 +++++++++ src/theory/sets/theory_sets_type_rules.h | 28 ++++++++++++++++++++++++++++ test/regress/regress0/sets/Makefile.am | 1 + test/regress/regress0/sets/insert.smt2 | 7 +++++++ 7 files changed, 50 insertions(+) create mode 100644 test/regress/regress0/sets/insert.smt2 (limited to 'src/theory') diff --git a/src/parser/smt2/smt2.cpp b/src/parser/smt2/smt2.cpp index 3f1e59e6d..0c4b1258f 100644 --- a/src/parser/smt2/smt2.cpp +++ b/src/parser/smt2/smt2.cpp @@ -152,6 +152,7 @@ void Smt2::addTheory(Theory theory) { addOperator(kind::SUBSET, "subset"); addOperator(kind::MEMBER, "member"); addOperator(kind::SINGLETON, "singleton"); + addOperator(kind::INSERT, "insert"); break; case THEORY_DATATYPES: diff --git a/src/printer/smt2/smt2_printer.cpp b/src/printer/smt2/smt2_printer.cpp index 3c0f4ebc5..bc2cb1ec9 100644 --- a/src/printer/smt2/smt2_printer.cpp +++ b/src/printer/smt2/smt2_printer.cpp @@ -613,6 +613,7 @@ static string smtKindString(Kind k) throw() { case kind::MEMBER: return "member"; case kind::SET_TYPE: return "Set"; case kind::SINGLETON: return "singleton"; + case kind::INSERT: return "insert"; default: ; /* fall through */ } diff --git a/src/theory/sets/kinds b/src/theory/sets/kinds index 06d3be5a0..39e7883c6 100644 --- a/src/theory/sets/kinds +++ b/src/theory/sets/kinds @@ -41,6 +41,7 @@ operator SETMINUS 2 "set subtraction" operator SUBSET 2 "subset predicate; first parameter a subset of second" operator MEMBER 2 "set membership predicate; first parameter a member of second" operator SINGLETON 1 "the set of the single element given as a parameter" +operator INSERT 2: "set obtained by inserting elements (first N-1 parameters) into a set (the last parameter)" typerule UNION ::CVC4::theory::sets::SetsBinaryOperatorTypeRule typerule INTERSECTION ::CVC4::theory::sets::SetsBinaryOperatorTypeRule @@ -49,10 +50,12 @@ typerule SUBSET ::CVC4::theory::sets::SubsetTypeRule typerule MEMBER ::CVC4::theory::sets::MemberTypeRule typerule SINGLETON ::CVC4::theory::sets::SingletonTypeRule typerule EMPTYSET ::CVC4::theory::sets::EmptySetTypeRule +typerule INSERT ::CVC4::theory::sets::InsertTypeRule construle UNION ::CVC4::theory::sets::SetsBinaryOperatorTypeRule construle INTERSECTION ::CVC4::theory::sets::SetsBinaryOperatorTypeRule construle SETMINUS ::CVC4::theory::sets::SetsBinaryOperatorTypeRule construle SINGLETON ::CVC4::theory::sets::SingletonTypeRule +construle INSERT ::CVC4::theory::sets::InsertTypeRule endtheory diff --git a/src/theory/sets/theory_sets_rewriter.cpp b/src/theory/sets/theory_sets_rewriter.cpp index ce469cc0c..8716d1065 100644 --- a/src/theory/sets/theory_sets_rewriter.cpp +++ b/src/theory/sets/theory_sets_rewriter.cpp @@ -239,6 +239,15 @@ RewriteResponse TheorySetsRewriter::preRewrite(TNode node) { return RewriteResponse(REWRITE_DONE, nm->mkConst(true)); // Further optimization, if constants but differing ones + if(node.getKind() == kind::INSERT) { + Node insertedElements = nm->mkNode(kind::SINGLETON, node[0]); + size_t setNodeIndex = node.getNumChildren()-1; + for(size_t i = 1; i < setNodeIndex; ++i) { + insertedElements = nm->mkNode(kind::UNION, insertedElements, nm->mkNode(kind::SINGLETON, node[i])); + } + return RewriteResponse(REWRITE_AGAIN, nm->mkNode(kind::UNION, insertedElements, node[setNodeIndex])); + }//kind::INSERT + if(node.getType().isSet() && node.isConst()) { //rewrite set to normal form SettermElementsMap setTermElementsMap; // cache diff --git a/src/theory/sets/theory_sets_type_rules.h b/src/theory/sets/theory_sets_type_rules.h index 2267ee22a..fa1183e07 100644 --- a/src/theory/sets/theory_sets_type_rules.h +++ b/src/theory/sets/theory_sets_type_rules.h @@ -130,6 +130,34 @@ struct EmptySetTypeRule { } };/* struct EmptySetTypeRule */ +struct InsertTypeRule { + inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check) + throw (TypeCheckingExceptionPrivate, AssertionException) { + Assert(n.getKind() == kind::INSERT); + size_t numChildren = n.getNumChildren(); + Assert( numChildren >= 2 ); + TypeNode setType = n[numChildren-1].getType(check); + if( check ) { + if(!setType.isSet()) { + throw TypeCheckingExceptionPrivate(n, "inserting into a non-set"); + } + for(size_t i = 0; i < numChildren-1; ++i) { + TypeNode elementType = n[i].getType(check); + if(elementType != setType.getSetElementType()) { + throw TypeCheckingExceptionPrivate + (n, "type of element should be same as element type of set being inserted into"); + } + } + } + return setType; + } + + inline static bool computeIsConst(NodeManager* nodeManager, TNode n) { + Assert(n.getKind() == kind::INSERT); + return n[0].isConst() && n[1].isConst(); + } +};/* struct InsertTypeRule */ + struct SetsProperties { inline static Cardinality computeCardinality(TypeNode type) { diff --git a/test/regress/regress0/sets/Makefile.am b/test/regress/regress0/sets/Makefile.am index ccedc7596..9536dfac1 100644 --- a/test/regress/regress0/sets/Makefile.am +++ b/test/regress/regress0/sets/Makefile.am @@ -44,6 +44,7 @@ TESTS = \ error1.smt2 \ error2.smt2 \ eqtest.smt2 \ + insert.smt2 \ fuzz14418.smt2 \ fuzz15201.smt2 \ fuzz31811.smt2 \ diff --git a/test/regress/regress0/sets/insert.smt2 b/test/regress/regress0/sets/insert.smt2 new file mode 100644 index 000000000..3a7b18179 --- /dev/null +++ b/test/regress/regress0/sets/insert.smt2 @@ -0,0 +1,7 @@ +(set-option :produce-models true) +(set-logic QF_UFLIA_SETS) +(set-info :status sat) +(declare-fun X () (Set Int)) +(assert (= X (insert 1 2 (singleton 3)))) +(check-sat) +;(get-model) -- cgit v1.2.3 From fa53ae111cd314f455456a884f1247bb9b8e2c7b Mon Sep 17 00:00:00 2001 From: Kshitij Bansal Date: Mon, 30 Jun 2014 10:53:52 -0400 Subject: Use FS as the set-logic string for theory of sets --- examples/api/sets.cpp | 4 ++++ src/theory/logic_info.cpp | 6 +++--- test/regress/regress0/sets/copy_check_heap_access_33_4.smt2 | 2 +- test/regress/regress0/sets/error1.smt2 | 2 +- test/regress/regress0/sets/fuzz14418.smt2 | 2 +- test/regress/regress0/sets/fuzz15201.smt2 | 2 +- test/regress/regress0/sets/fuzz31811.smt2 | 2 +- test/regress/regress0/sets/insert.smt2 | 2 +- test/regress/regress0/sets/jan24/insert_invariant_37_2.smt2 | 2 +- test/regress/regress0/sets/jan24/remove_check_free_31_6.smt2 | 2 +- test/regress/regress0/sets/mar2014/sharing-preregister.smt2 | 2 +- test/regress/regress0/sets/mar2014/small.smt2 | 2 +- test/regress/regress0/sets/mar2014/smaller.smt2 | 2 +- .../regress/regress0/sets/rec_copy_loop_check_heap_access_43_4.smt2 | 2 +- test/regress/regress0/sets/setofsets-disequal.smt2 | 2 +- test/regress/regress0/sets/sets-disequal.smt2 | 2 +- test/regress/regress0/sets/sets-testlemma-ints.smt2 | 2 +- test/regress/regress0/sets/sets-testlemma-reals.smt2 | 2 +- test/regress/regress0/sets/sets-testlemma.smt2 | 2 +- test/regress/regress0/sets/sharingbug.smt2 | 2 +- 20 files changed, 25 insertions(+), 21 deletions(-) (limited to 'src/theory') diff --git a/examples/api/sets.cpp b/examples/api/sets.cpp index 79168e06a..7390eefe0 100644 --- a/examples/api/sets.cpp +++ b/examples/api/sets.cpp @@ -26,6 +26,10 @@ int main() { ExprManager em; SmtEngine smt(&em); + // Optionally, set the logic. We need at least UF for equality predicate, + // integers (LIA) and sets (FS). + smt.setLogic("QF_UFLIAFS"); + // Produce models smt.setOption("produce-models", true); diff --git a/src/theory/logic_info.cpp b/src/theory/logic_info.cpp index 78f4996b8..bc2f1286b 100644 --- a/src/theory/logic_info.cpp +++ b/src/theory/logic_info.cpp @@ -129,7 +129,7 @@ std::string LogicInfo::getLogicString() const { ++seen; } if(d_theories[THEORY_SETS]) { - ss << "_SETS"; + ss << "FS"; ++seen; } @@ -272,9 +272,9 @@ void LogicInfo::setLogicString(std::string logicString) throw(IllegalArgumentExc arithNonLinear(); p += 4; } - if(!strncmp(p, "_SETS", 5)) { + if(!strncmp(p, "FS", 2)) { enableTheory(THEORY_SETS); - p += 5; + p += 2; } } } diff --git a/test/regress/regress0/sets/copy_check_heap_access_33_4.smt2 b/test/regress/regress0/sets/copy_check_heap_access_33_4.smt2 index b4ddfec41..9af45c2dd 100644 --- a/test/regress/regress0/sets/copy_check_heap_access_33_4.smt2 +++ b/test/regress/regress0/sets/copy_check_heap_access_33_4.smt2 @@ -1,7 +1,7 @@ ; COMMAND-LINE: --full-saturate-quant ; EXPECT: unsat (set-option :print-success false) -(set-logic AUFLIA_SETS) +(set-logic AUFLIAFS) (set-info :status unsat) (declare-sort Loc 0) (define-sort SetLoc () (Set Loc)) diff --git a/test/regress/regress0/sets/error1.smt2 b/test/regress/regress0/sets/error1.smt2 index 1241b117f..bf1822305 100644 --- a/test/regress/regress0/sets/error1.smt2 +++ b/test/regress/regress0/sets/error1.smt2 @@ -1,5 +1,5 @@ ; EXPECT: sat -(set-logic QF_UFLIA_SETS) +(set-logic QF_UFLIAFS) (set-info :status sat) (declare-fun A () (Set Int)) (declare-fun C () (Set Int)) diff --git a/test/regress/regress0/sets/fuzz14418.smt2 b/test/regress/regress0/sets/fuzz14418.smt2 index e7a7be97a..24679749c 100644 --- a/test/regress/regress0/sets/fuzz14418.smt2 +++ b/test/regress/regress0/sets/fuzz14418.smt2 @@ -11,7 +11,7 @@ (set-info :smt-lib-version 2.0) (set-info :category "random") (set-info :status sat) -(set-logic QF_UFLIA_SETS) +(set-logic QF_UFLIAFS) (define-sort Element () Int) (declare-fun f0 ( Int) Int) (declare-fun f1 ( (Set Element) (Set Element) (Set Element)) (Set Element)) diff --git a/test/regress/regress0/sets/fuzz15201.smt2 b/test/regress/regress0/sets/fuzz15201.smt2 index 650c0ead1..e12b74d18 100644 --- a/test/regress/regress0/sets/fuzz15201.smt2 +++ b/test/regress/regress0/sets/fuzz15201.smt2 @@ -4,7 +4,7 @@ (set-info :smt-lib-version 2.0) (set-info :category "random") (set-info :status sat) -(set-logic QF_UFLIA_SETS) +(set-logic QF_UFLIAFS) (define-sort Element () Int) (declare-fun f0 ( Int) Int) (declare-fun f1 ( (Set Element)) (Set Element)) diff --git a/test/regress/regress0/sets/fuzz31811.smt2 b/test/regress/regress0/sets/fuzz31811.smt2 index 536d62d3d..5e7c032ea 100644 --- a/test/regress/regress0/sets/fuzz31811.smt2 +++ b/test/regress/regress0/sets/fuzz31811.smt2 @@ -9,7 +9,7 @@ (set-info :smt-lib-version 2.0) (set-info :category "random") (set-info :status sat) -(set-logic QF_UFLIA_SETS) +(set-logic QF_UFLIAFS) (define-sort Element () Int) (declare-fun f0 ( Int Int Int) Int) (declare-fun f1 ( (Set Element) (Set Element)) (Set Element)) diff --git a/test/regress/regress0/sets/insert.smt2 b/test/regress/regress0/sets/insert.smt2 index 3a7b18179..b4936a32b 100644 --- a/test/regress/regress0/sets/insert.smt2 +++ b/test/regress/regress0/sets/insert.smt2 @@ -1,5 +1,5 @@ (set-option :produce-models true) -(set-logic QF_UFLIA_SETS) +(set-logic QF_UFLIAFS) (set-info :status sat) (declare-fun X () (Set Int)) (assert (= X (insert 1 2 (singleton 3)))) diff --git a/test/regress/regress0/sets/jan24/insert_invariant_37_2.smt2 b/test/regress/regress0/sets/jan24/insert_invariant_37_2.smt2 index 4a588aeb6..2ef07f920 100644 --- a/test/regress/regress0/sets/jan24/insert_invariant_37_2.smt2 +++ b/test/regress/regress0/sets/jan24/insert_invariant_37_2.smt2 @@ -1,5 +1,5 @@ (set-option :print-success false) -(set-logic AUFLIA_SETS) +(set-logic AUFLIAFS) (set-info :status unsat) (declare-sort Loc 0) (define-sort SetLoc () (Set Loc)) diff --git a/test/regress/regress0/sets/jan24/remove_check_free_31_6.smt2 b/test/regress/regress0/sets/jan24/remove_check_free_31_6.smt2 index c10b14f2b..2bf2d4c62 100644 --- a/test/regress/regress0/sets/jan24/remove_check_free_31_6.smt2 +++ b/test/regress/regress0/sets/jan24/remove_check_free_31_6.smt2 @@ -1,5 +1,5 @@ (set-option :print-success false) -(set-logic AUFLIA_SETS) +(set-logic AUFLIAFS) (set-info :status unsat) (declare-sort Loc 0) (define-sort SetLoc () (Set Loc)) diff --git a/test/regress/regress0/sets/mar2014/sharing-preregister.smt2 b/test/regress/regress0/sets/mar2014/sharing-preregister.smt2 index 61af2124d..d851ca35e 100644 --- a/test/regress/regress0/sets/mar2014/sharing-preregister.smt2 +++ b/test/regress/regress0/sets/mar2014/sharing-preregister.smt2 @@ -1,5 +1,5 @@ ; EXPECT: unsat -(set-logic QF_UFLIA_SETS) +(set-logic QF_UFLIAFS) (set-info :status sat) (declare-fun a () Int) (declare-fun b () Int) diff --git a/test/regress/regress0/sets/mar2014/small.smt2 b/test/regress/regress0/sets/mar2014/small.smt2 index 896b13219..635c7959d 100644 --- a/test/regress/regress0/sets/mar2014/small.smt2 +++ b/test/regress/regress0/sets/mar2014/small.smt2 @@ -4,7 +4,7 @@ ; demostrates core issue with UniqueZipper.hs.1030minimized.cvc4.smt2 ; unlike original benchmark, this is unsat. -(set-logic QF_UFLIA_SETS) +(set-logic QF_UFLIAFS) (declare-fun x () Int) (declare-fun y () Int) (declare-fun z () Int) diff --git a/test/regress/regress0/sets/mar2014/smaller.smt2 b/test/regress/regress0/sets/mar2014/smaller.smt2 index 22e029b69..d6565205b 100644 --- a/test/regress/regress0/sets/mar2014/smaller.smt2 +++ b/test/regress/regress0/sets/mar2014/smaller.smt2 @@ -4,7 +4,7 @@ ; demostrates core issue with UniqueZipper.hs.1030minimized.cvc4.smt2 ; fails check-model, even though answer is correct -(set-logic QF_UFLIA_SETS) +(set-logic QF_UFLIAFS) (declare-fun x () Int) (declare-fun y () Int) (declare-fun a () (Set Int)) diff --git a/test/regress/regress0/sets/rec_copy_loop_check_heap_access_43_4.smt2 b/test/regress/regress0/sets/rec_copy_loop_check_heap_access_43_4.smt2 index e5defb2ac..61fbee11d 100644 --- a/test/regress/regress0/sets/rec_copy_loop_check_heap_access_43_4.smt2 +++ b/test/regress/regress0/sets/rec_copy_loop_check_heap_access_43_4.smt2 @@ -1,5 +1,5 @@ (set-option :print-success false) -(set-logic AUFLIA_SETS) +(set-logic AUFLIAFS) (set-info :status unsat) (declare-sort Loc 0) (define-sort SetLoc () (Set Loc)) diff --git a/test/regress/regress0/sets/setofsets-disequal.smt2 b/test/regress/regress0/sets/setofsets-disequal.smt2 index 18ad053d6..1702aab27 100644 --- a/test/regress/regress0/sets/setofsets-disequal.smt2 +++ b/test/regress/regress0/sets/setofsets-disequal.smt2 @@ -1,7 +1,7 @@ ; On a production build (as of 2014-05-16), takes several minutes ; to finish (2967466 decisions). -(set-logic QF_BV_SETS) +(set-logic QF_BVFS) (set-info :status unsat) (define-sort myset () (Set (Set (_ BitVec 1)))) diff --git a/test/regress/regress0/sets/sets-disequal.smt2 b/test/regress/regress0/sets/sets-disequal.smt2 index 65f55f3a6..3acf77108 100644 --- a/test/regress/regress0/sets/sets-disequal.smt2 +++ b/test/regress/regress0/sets/sets-disequal.smt2 @@ -3,7 +3,7 @@ ; EXPECT: sat ; EXPECT: unsat ; EXIT: 0 -(set-logic QF_BV_SETS) +(set-logic QF_BVFS) (declare-fun S1 () (Set (_ BitVec 1))) (declare-fun S2 () (Set (_ BitVec 1))) (declare-fun S3 () (Set (_ BitVec 1))) diff --git a/test/regress/regress0/sets/sets-testlemma-ints.smt2 b/test/regress/regress0/sets/sets-testlemma-ints.smt2 index 9dd257401..e68520cbf 100644 --- a/test/regress/regress0/sets/sets-testlemma-ints.smt2 +++ b/test/regress/regress0/sets/sets-testlemma-ints.smt2 @@ -1,5 +1,5 @@ ; EXPECT: sat -(set-logic QF_UFLIA_SETS) +(set-logic QF_UFLIAFS) (set-info :status sat) (declare-fun x () (Set Int)) (declare-fun y () (Set Int)) diff --git a/test/regress/regress0/sets/sets-testlemma-reals.smt2 b/test/regress/regress0/sets/sets-testlemma-reals.smt2 index 16e7780b4..bc18235f0 100644 --- a/test/regress/regress0/sets/sets-testlemma-reals.smt2 +++ b/test/regress/regress0/sets/sets-testlemma-reals.smt2 @@ -1,5 +1,5 @@ ; EXPECT: sat -(set-logic QF_UFLRA_SETS) +(set-logic QF_UFLRAFS) (set-info :status sat) (declare-fun x () (Set Real)) (declare-fun y () (Set Real)) diff --git a/test/regress/regress0/sets/sets-testlemma.smt2 b/test/regress/regress0/sets/sets-testlemma.smt2 index 183f54242..aee8c5937 100644 --- a/test/regress/regress0/sets/sets-testlemma.smt2 +++ b/test/regress/regress0/sets/sets-testlemma.smt2 @@ -1,5 +1,5 @@ ; EXPECT: sat -(set-logic QF_UFBV_SETS) +(set-logic QF_UFBVFS) (set-info :status sat) (declare-fun x () (Set (_ BitVec 2))) (declare-fun y () (Set (_ BitVec 2))) diff --git a/test/regress/regress0/sets/sharingbug.smt2 b/test/regress/regress0/sets/sharingbug.smt2 index b388bb534..b87579816 100644 --- a/test/regress/regress0/sets/sharingbug.smt2 +++ b/test/regress/regress0/sets/sharingbug.smt2 @@ -2,7 +2,7 @@ (set-info :smt-lib-version 2.0) (set-info :category "random") (set-info :status sat) -(set-logic QF_UFLIA_SETS) +(set-logic QF_UFLIAFS) (define-sort Element () Int) (declare-fun f0 ( Int Int Int) Int) (declare-fun f1 ( (Set Element)) (Set Element)) -- cgit v1.2.3 From 8ad7662ef9676f895c1a1ca2ff07a264bee28d24 Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Tue, 1 Jul 2014 14:47:24 -0400 Subject: Update copyrights. --- examples/SimpleVC.java | 2 +- examples/SimpleVCCompat.java | 2 +- examples/api/bitvectors.cpp | 2 +- examples/api/bitvectors_and_arrays.cpp | 2 +- examples/api/combination.cpp | 2 +- examples/api/datatypes.cpp | 2 +- examples/api/helloworld.cpp | 4 +-- examples/api/java/BitVectors.java | 2 +- examples/api/java/BitVectorsAndArrays.java | 2 +- examples/api/java/CVC4Streams.java | 2 +- examples/api/java/Combination.java | 2 +- examples/api/java/Datatypes.java | 2 +- examples/api/java/HelloWorld.java | 2 +- examples/api/java/LinearArith.java | 2 +- examples/api/java/PipedInput.java | 2 +- examples/api/linear_arith.cpp | 2 +- examples/hashsmt/sha1.hpp | 2 +- examples/hashsmt/sha1_collision.cpp | 6 ++--- examples/hashsmt/sha1_inversion.cpp | 4 +-- examples/hashsmt/word.cpp | 2 +- examples/hashsmt/word.h | 6 ++--- examples/nra-translate/normalize.cpp | 2 +- examples/nra-translate/smt2info.cpp | 2 +- examples/nra-translate/smt2todreal.cpp | 2 +- examples/nra-translate/smt2toisat.cpp | 2 +- examples/nra-translate/smt2tomathematica.cpp | 2 +- examples/nra-translate/smt2toqepcad.cpp | 2 +- examples/nra-translate/smt2toredlog.cpp | 2 +- examples/sets-translate/sets_translate.cpp | 4 +-- examples/simple_vc_compat_c.c | 2 +- examples/simple_vc_compat_cxx.cpp | 2 +- examples/simple_vc_cxx.cpp | 2 +- src/bindings/java_iterator_adapter.h | 2 +- src/bindings/java_stream_adapters.h | 2 +- src/bindings/swig.h | 2 +- src/compat/cvc3_compat.cpp | 4 +-- src/compat/cvc3_compat.h | 2 +- src/context/cdchunk_list.h | 2 +- src/context/cddense_set.h | 2 +- src/context/cdhashmap.h | 4 +-- src/context/cdhashmap_forward.h | 2 +- src/context/cdhashset.h | 4 +-- src/context/cdhashset_forward.h | 2 +- src/context/cdinsert_hashmap.h | 2 +- src/context/cdinsert_hashmap_forward.h | 2 +- src/context/cdlist.h | 4 +-- src/context/cdlist_forward.h | 2 +- src/context/cdmaybe.h | 2 +- src/context/cdo.h | 2 +- src/context/cdqueue.h | 2 +- src/context/cdtrail_hashmap.h | 2 +- src/context/cdtrail_hashmap_forward.h | 2 +- src/context/cdtrail_queue.h | 2 +- src/context/cdvector.h | 6 ++--- src/context/context.cpp | 2 +- src/context/context.h | 2 +- src/context/context_mm.cpp | 2 +- src/context/context_mm.h | 2 +- src/context/stacking_map.h | 2 +- src/context/stacking_vector.h | 2 +- src/decision/decision_engine.cpp | 2 +- src/decision/decision_engine.h | 2 +- src/decision/decision_mode.cpp | 2 +- src/decision/decision_mode.h | 2 +- src/decision/decision_strategy.h | 2 +- src/decision/justification_heuristic.cpp | 2 +- src/decision/justification_heuristic.h | 2 +- src/decision/options_handlers.h | 2 +- src/expr/attribute.cpp | 2 +- src/expr/attribute.h | 2 +- src/expr/attribute_internals.h | 2 +- src/expr/attribute_unique_id.h | 4 +-- src/expr/command.cpp | 2 +- src/expr/command.h | 2 +- src/expr/convenience_node_builders.h | 2 +- src/expr/expr_manager_scope.h | 2 +- src/expr/expr_manager_template.cpp | 2 +- src/expr/expr_manager_template.h | 4 +-- src/expr/expr_stream.h | 2 +- src/expr/expr_template.cpp | 6 ++--- src/expr/expr_template.h | 2 +- src/expr/kind_map.h | 2 +- src/expr/kind_template.h | 2 +- src/expr/metakind_template.h | 2 +- src/expr/node.cpp | 2 +- src/expr/node.h | 2 +- src/expr/node_builder.h | 2 +- src/expr/node_manager.cpp | 4 +-- src/expr/node_manager.h | 4 +-- src/expr/node_manager_attributes.h | 2 +- src/expr/node_self_iterator.h | 2 +- src/expr/node_value.cpp | 2 +- src/expr/node_value.h | 2 +- src/expr/options_handlers.h | 2 +- src/expr/pickle_data.cpp | 2 +- src/expr/pickle_data.h | 2 +- src/expr/pickler.cpp | 2 +- src/expr/pickler.h | 2 +- src/expr/symbol_table.cpp | 2 +- src/expr/symbol_table.h | 2 +- src/expr/type.cpp | 4 +-- src/expr/type.h | 4 +-- src/expr/type_checker.h | 2 +- src/expr/type_checker_template.cpp | 2 +- src/expr/type_node.cpp | 6 ++--- src/expr/type_node.h | 4 +-- src/expr/type_properties_template.h | 2 +- src/expr/variable_type_map.h | 2 +- src/include/cvc4.h | 2 +- src/include/cvc4_private.h | 2 +- src/include/cvc4_private_library.h | 2 +- src/include/cvc4_public.h | 2 +- src/include/cvc4parser_private.h | 2 +- src/include/cvc4parser_public.h | 2 +- src/lib/clock_gettime.c | 2 +- src/lib/clock_gettime.h | 2 +- src/lib/ffs.c | 2 +- src/lib/ffs.h | 2 +- src/lib/replacements.h | 2 +- src/lib/strtok_r.c | 2 +- src/lib/strtok_r.h | 2 +- src/main/command_executor.cpp | 6 ++--- src/main/command_executor.h | 2 +- src/main/command_executor_portfolio.cpp | 4 +-- src/main/command_executor_portfolio.h | 2 +- src/main/driver_unified.cpp | 2 +- src/main/interactive_shell.cpp | 4 +-- src/main/interactive_shell.h | 2 +- src/main/main.cpp | 2 +- src/main/main.h | 2 +- src/main/options_handlers.h | 4 +-- src/main/portfolio.cpp | 2 +- src/main/portfolio.h | 6 ++--- src/main/portfolio_util.cpp | 2 +- src/main/portfolio_util.h | 2 +- src/main/util.cpp | 2 +- src/options/base_options_handlers.h | 4 +-- src/options/base_options_template.cpp | 2 +- src/options/base_options_template.h | 2 +- src/options/option_exception.h | 2 +- src/options/options_holder_template.h | 2 +- src/options/options_template.cpp | 2 +- src/parser/antlr_input.cpp | 4 +-- src/parser/antlr_input.h | 2 +- src/parser/antlr_line_buffered_input.cpp | 2 +- src/parser/antlr_line_buffered_input.h | 2 +- src/parser/antlr_tracing.h | 2 +- src/parser/bounded_token_buffer.cpp | 2 +- src/parser/bounded_token_buffer.h | 2 +- src/parser/bounded_token_factory.cpp | 2 +- src/parser/bounded_token_factory.h | 2 +- src/parser/cvc/Cvc.g | 4 +-- src/parser/cvc/cvc_input.cpp | 2 +- src/parser/cvc/cvc_input.h | 2 +- src/parser/input.cpp | 2 +- src/parser/input.h | 2 +- src/parser/memory_mapped_input_buffer.cpp | 2 +- src/parser/memory_mapped_input_buffer.h | 2 +- src/parser/parser.cpp | 4 +-- src/parser/parser.h | 4 +-- src/parser/parser_builder.cpp | 2 +- src/parser/parser_builder.h | 2 +- src/parser/parser_exception.h | 2 +- src/parser/smt1/Smt1.g | 2 +- src/parser/smt1/smt1.cpp | 2 +- src/parser/smt1/smt1.h | 4 +-- src/parser/smt1/smt1_input.cpp | 2 +- src/parser/smt1/smt1_input.h | 2 +- src/parser/smt2/Smt2.g | 4 +-- src/parser/smt2/smt2.cpp | 6 ++--- src/parser/smt2/smt2.h | 4 +-- src/parser/smt2/smt2_input.cpp | 2 +- src/parser/smt2/smt2_input.h | 2 +- src/parser/tptp/Tptp.g | 2 +- src/parser/tptp/tptp.cpp | 2 +- src/parser/tptp/tptp.h | 2 +- src/parser/tptp/tptp_input.cpp | 2 +- src/parser/tptp/tptp_input.h | 2 +- src/printer/ast/ast_printer.cpp | 2 +- src/printer/ast/ast_printer.h | 2 +- src/printer/cvc/cvc_printer.cpp | 2 +- src/printer/cvc/cvc_printer.h | 2 +- src/printer/dagification_visitor.cpp | 2 +- src/printer/dagification_visitor.h | 2 +- src/printer/modes.cpp | 6 ++--- src/printer/modes.h | 6 ++--- src/printer/options_handlers.h | 4 +-- src/printer/printer.cpp | 2 +- src/printer/printer.h | 2 +- src/printer/smt1/smt1_printer.cpp | 2 +- src/printer/smt1/smt1_printer.h | 2 +- src/printer/smt2/smt2_printer.cpp | 6 ++--- src/printer/smt2/smt2_printer.h | 2 +- src/printer/tptp/tptp_printer.cpp | 2 +- src/printer/tptp/tptp_printer.h | 2 +- src/proof/cnf_proof.cpp | 2 +- src/proof/cnf_proof.h | 6 ++--- src/proof/proof.h | 2 +- src/proof/proof_manager.cpp | 2 +- src/proof/proof_manager.h | 6 ++--- src/proof/sat_proof.cpp | 6 ++--- src/proof/sat_proof.h | 6 ++--- src/proof/theory_proof.cpp | 4 +-- src/proof/theory_proof.h | 6 ++--- src/prop/cnf_stream.cpp | 2 +- src/prop/cnf_stream.h | 2 +- src/prop/options_handlers.h | 2 +- src/prop/prop_engine.cpp | 2 +- src/prop/prop_engine.h | 2 +- src/prop/sat_solver.h | 2 +- src/prop/sat_solver_factory.cpp | 4 +-- src/prop/sat_solver_factory.h | 2 +- src/prop/sat_solver_registry.cpp | 2 +- src/prop/sat_solver_registry.h | 2 +- src/prop/sat_solver_types.h | 2 +- src/prop/theory_proxy.cpp | 2 +- src/prop/theory_proxy.h | 2 +- src/smt/boolean_terms.cpp | 4 +-- src/smt/boolean_terms.h | 2 +- src/smt/command_list.cpp | 2 +- src/smt/command_list.h | 2 +- src/smt/logic_exception.h | 2 +- src/smt/logic_request.cpp | 17 +++++++++++++ src/smt/logic_request.h | 4 +-- src/smt/modal_exception.h | 2 +- src/smt/model_postprocessor.cpp | 2 +- src/smt/model_postprocessor.h | 2 +- src/smt/options_handlers.h | 4 +-- src/smt/simplification_mode.cpp | 2 +- src/smt/simplification_mode.h | 2 +- src/smt/smt_engine.cpp | 4 +-- src/smt/smt_engine.h | 4 +-- src/smt/smt_engine_check_proof.cpp | 2 +- src/smt/smt_engine_scope.cpp | 2 +- src/smt/smt_engine_scope.h | 2 +- src/smt/smt_options_template.cpp | 2 +- src/theory/arith/approx_simplex.cpp | 2 +- src/theory/arith/approx_simplex.h | 2 +- src/theory/arith/arith_heuristic_pivot_rule.cpp | 2 +- src/theory/arith/arith_heuristic_pivot_rule.h | 2 +- src/theory/arith/arith_ite_utils.cpp | 17 +++++++++++++ src/theory/arith/arith_ite_utils.h | 17 +++++++++++++ src/theory/arith/arith_propagation_mode.cpp | 2 +- src/theory/arith/arith_propagation_mode.h | 2 +- src/theory/arith/arith_rewriter.cpp | 2 +- src/theory/arith/arith_rewriter.h | 2 +- src/theory/arith/arith_static_learner.cpp | 6 ++--- src/theory/arith/arith_static_learner.h | 2 +- src/theory/arith/arith_unate_lemma_mode.cpp | 2 +- src/theory/arith/arith_unate_lemma_mode.h | 2 +- src/theory/arith/arith_utilities.h | 2 +- src/theory/arith/arithvar.cpp | 2 +- src/theory/arith/arithvar.h | 2 +- src/theory/arith/arithvar_node_map.h | 2 +- src/theory/arith/attempt_solution_simplex.cpp | 2 +- src/theory/arith/attempt_solution_simplex.h | 4 +-- src/theory/arith/bound_counts.h | 2 +- src/theory/arith/callbacks.cpp | 2 +- src/theory/arith/callbacks.h | 2 +- src/theory/arith/congruence_manager.cpp | 2 +- src/theory/arith/congruence_manager.h | 6 ++--- src/theory/arith/constraint.cpp | 2 +- src/theory/arith/constraint.h | 2 +- src/theory/arith/constraint_forward.h | 2 +- src/theory/arith/cut_log.cpp | 17 +++++++++++++ src/theory/arith/cut_log.h | 17 +++++++++++++ src/theory/arith/delta_rational.cpp | 2 +- src/theory/arith/delta_rational.h | 2 +- src/theory/arith/dio_solver.cpp | 2 +- src/theory/arith/dio_solver.h | 2 +- src/theory/arith/dual_simplex.cpp | 4 +-- src/theory/arith/dual_simplex.h | 4 +-- src/theory/arith/error_set.cpp | 2 +- src/theory/arith/error_set.h | 2 +- src/theory/arith/fc_simplex.cpp | 4 +-- src/theory/arith/fc_simplex.h | 2 +- src/theory/arith/linear_equality.cpp | 2 +- src/theory/arith/linear_equality.h | 2 +- src/theory/arith/matrix.cpp | 2 +- src/theory/arith/matrix.h | 2 +- src/theory/arith/normal_form.cpp | 2 +- src/theory/arith/normal_form.h | 2 +- src/theory/arith/options_handlers.h | 4 +-- src/theory/arith/partial_model.cpp | 2 +- src/theory/arith/partial_model.h | 2 +- src/theory/arith/simplex.cpp | 2 +- src/theory/arith/simplex.h | 2 +- src/theory/arith/simplex_update.cpp | 4 +-- src/theory/arith/simplex_update.h | 2 +- src/theory/arith/soi_simplex.cpp | 2 +- src/theory/arith/soi_simplex.h | 2 +- src/theory/arith/tableau.cpp | 2 +- src/theory/arith/tableau.h | 2 +- src/theory/arith/tableau_sizes.cpp | 2 +- src/theory/arith/tableau_sizes.h | 2 +- src/theory/arith/theory_arith.cpp | 4 +-- src/theory/arith/theory_arith.h | 4 +-- src/theory/arith/theory_arith_private.cpp | 4 +-- src/theory/arith/theory_arith_private.h | 4 +-- src/theory/arith/theory_arith_private_forward.h | 2 +- src/theory/arith/theory_arith_type_rules.h | 2 +- src/theory/arith/type_enumerator.h | 2 +- src/theory/arrays/array_info.cpp | 2 +- src/theory/arrays/array_info.h | 2 +- src/theory/arrays/static_fact_manager.cpp | 2 +- src/theory/arrays/static_fact_manager.h | 2 +- src/theory/arrays/theory_arrays.cpp | 4 +-- src/theory/arrays/theory_arrays.h | 2 +- src/theory/arrays/theory_arrays_rewriter.cpp | 2 +- src/theory/arrays/theory_arrays_rewriter.h | 2 +- src/theory/arrays/theory_arrays_type_rules.h | 2 +- src/theory/arrays/type_enumerator.h | 2 +- src/theory/arrays/union_find.cpp | 2 +- src/theory/arrays/union_find.h | 2 +- src/theory/atom_requests.cpp | 2 +- src/theory/atom_requests.h | 2 +- .../booleans/boolean_term_conversion_mode.cpp | 2 +- src/theory/booleans/boolean_term_conversion_mode.h | 2 +- src/theory/booleans/circuit_propagator.cpp | 2 +- src/theory/booleans/circuit_propagator.h | 2 +- src/theory/booleans/options_handlers.h | 2 +- src/theory/booleans/theory_bool.cpp | 2 +- src/theory/booleans/theory_bool.h | 2 +- src/theory/booleans/theory_bool_rewriter.cpp | 2 +- src/theory/booleans/theory_bool_rewriter.h | 2 +- src/theory/booleans/theory_bool_type_rules.h | 2 +- src/theory/booleans/type_enumerator.h | 2 +- src/theory/builtin/theory_builtin.cpp | 2 +- src/theory/builtin/theory_builtin.h | 2 +- src/theory/builtin/theory_builtin_rewriter.cpp | 2 +- src/theory/builtin/theory_builtin_rewriter.h | 2 +- src/theory/builtin/theory_builtin_type_rules.h | 4 +-- src/theory/builtin/type_enumerator.h | 2 +- src/theory/bv/abstraction.cpp | 26 +++++++++---------- src/theory/bv/abstraction.h | 8 +++--- src/theory/bv/aig_bitblaster.cpp | 4 +-- src/theory/bv/bitblast_mode.cpp | 2 +- src/theory/bv/bitblast_mode.h | 2 +- src/theory/bv/bitblast_strategies_template.h | 8 +++--- src/theory/bv/bitblast_utils.h | 4 +-- src/theory/bv/bitblaster_template.h | 6 ++--- src/theory/bv/bv_eager_solver.cpp | 8 +++--- src/theory/bv/bv_eager_solver.h | 6 ++--- src/theory/bv/bv_inequality_graph.cpp | 2 +- src/theory/bv/bv_inequality_graph.h | 2 +- src/theory/bv/bv_quick_check.cpp | 4 +-- src/theory/bv/bv_quick_check.h | 4 +-- src/theory/bv/bv_subtheory.h | 2 +- src/theory/bv/bv_subtheory_algebraic.cpp | 29 +++++++++++----------- src/theory/bv/bv_subtheory_algebraic.h | 26 +++++++++---------- src/theory/bv/bv_subtheory_bitblast.cpp | 6 ++--- src/theory/bv/bv_subtheory_bitblast.h | 6 ++--- src/theory/bv/bv_subtheory_core.cpp | 2 +- src/theory/bv/bv_subtheory_core.h | 2 +- src/theory/bv/bv_subtheory_inequality.cpp | 2 +- src/theory/bv/bv_subtheory_inequality.h | 4 +-- src/theory/bv/bv_to_bool.cpp | 4 +-- src/theory/bv/bv_to_bool.h | 2 +- src/theory/bv/bvintropow2.cpp | 17 +++++++++++++ src/theory/bv/bvintropow2.h | 17 +++++++++++++ src/theory/bv/cd_set_collection.h | 2 +- src/theory/bv/eager_bitblaster.cpp | 4 +-- src/theory/bv/lazy_bitblaster.cpp | 26 +++++++++---------- src/theory/bv/options_handlers.h | 2 +- src/theory/bv/slicer.cpp | 2 +- src/theory/bv/slicer.h | 2 +- src/theory/bv/theory_bv.cpp | 24 ++++++++---------- src/theory/bv/theory_bv.h | 4 +-- src/theory/bv/theory_bv_rewrite_rules.h | 2 +- .../theory_bv_rewrite_rules_constant_evaluation.h | 2 +- src/theory/bv/theory_bv_rewrite_rules_core.h | 2 +- .../bv/theory_bv_rewrite_rules_normalization.h | 2 +- .../theory_bv_rewrite_rules_operator_elimination.h | 2 +- .../bv/theory_bv_rewrite_rules_simplification.h | 6 ++--- src/theory/bv/theory_bv_rewriter.cpp | 2 +- src/theory/bv/theory_bv_rewriter.h | 2 +- src/theory/bv/theory_bv_type_rules.h | 2 +- src/theory/bv/theory_bv_utils.cpp | 10 ++++---- src/theory/bv/theory_bv_utils.h | 4 +-- src/theory/bv/type_enumerator.h | 2 +- src/theory/datatypes/datatypes_rewriter.h | 4 +-- src/theory/datatypes/theory_datatypes.cpp | 2 +- src/theory/datatypes/theory_datatypes.h | 2 +- src/theory/datatypes/theory_datatypes_type_rules.h | 2 +- src/theory/datatypes/type_enumerator.h | 2 +- src/theory/decision_attributes.h | 2 +- src/theory/example/ecdata.cpp | 2 +- src/theory/example/ecdata.h | 2 +- src/theory/example/theory_uf_tim.cpp | 2 +- src/theory/example/theory_uf_tim.h | 2 +- src/theory/idl/idl_assertion.cpp | 2 +- src/theory/idl/idl_assertion.h | 2 +- src/theory/idl/idl_assertion_db.cpp | 2 +- src/theory/idl/idl_assertion_db.h | 2 +- src/theory/idl/idl_model.cpp | 2 +- src/theory/idl/idl_model.h | 2 +- src/theory/idl/theory_idl.cpp | 2 +- src/theory/idl/theory_idl.h | 2 +- src/theory/interrupted.h | 2 +- src/theory/ite_utilities.cpp | 4 +-- src/theory/ite_utilities.h | 4 +-- src/theory/logic_info.cpp | 4 +-- src/theory/logic_info.h | 4 +-- src/theory/options_handlers.h | 2 +- src/theory/output_channel.h | 2 +- src/theory/quantifiers/ambqi_builder.cpp | 4 +-- src/theory/quantifiers/ambqi_builder.h | 4 +-- src/theory/quantifiers/bounded_integers.cpp | 4 +-- src/theory/quantifiers/bounded_integers.h | 2 +- src/theory/quantifiers/candidate_generator.cpp | 2 +- src/theory/quantifiers/candidate_generator.h | 2 +- src/theory/quantifiers/first_order_model.cpp | 4 +-- src/theory/quantifiers/first_order_model.h | 2 +- src/theory/quantifiers/first_order_reasoning.cpp | 2 +- src/theory/quantifiers/first_order_reasoning.h | 2 +- src/theory/quantifiers/full_model_check.cpp | 4 +-- src/theory/quantifiers/inst_gen.cpp | 2 +- src/theory/quantifiers/inst_gen.h | 2 +- src/theory/quantifiers/inst_match.cpp | 4 +-- src/theory/quantifiers/inst_match.h | 6 ++--- src/theory/quantifiers/inst_match_generator.cpp | 2 +- src/theory/quantifiers/inst_match_generator.h | 2 +- src/theory/quantifiers/inst_strategy_cbqi.cpp | 2 +- src/theory/quantifiers/inst_strategy_cbqi.h | 2 +- .../quantifiers/inst_strategy_e_matching.cpp | 2 +- src/theory/quantifiers/inst_strategy_e_matching.h | 2 +- src/theory/quantifiers/instantiation_engine.cpp | 4 +-- src/theory/quantifiers/instantiation_engine.h | 4 +-- src/theory/quantifiers/macros.cpp | 4 +-- src/theory/quantifiers/macros.h | 2 +- src/theory/quantifiers/model_builder.cpp | 2 +- src/theory/quantifiers/model_builder.h | 2 +- src/theory/quantifiers/model_engine.cpp | 2 +- src/theory/quantifiers/model_engine.h | 2 +- src/theory/quantifiers/modes.cpp | 2 +- src/theory/quantifiers/modes.h | 2 +- src/theory/quantifiers/options_handlers.h | 2 +- src/theory/quantifiers/qinterval_builder.cpp | 4 +-- src/theory/quantifiers/qinterval_builder.h | 4 +-- src/theory/quantifiers/quant_conflict_find.cpp | 4 +-- src/theory/quantifiers/quant_conflict_find.h | 4 +-- src/theory/quantifiers/quant_util.cpp | 2 +- src/theory/quantifiers/quant_util.h | 2 +- src/theory/quantifiers/quantifiers_attributes.cpp | 2 +- src/theory/quantifiers/quantifiers_attributes.h | 2 +- src/theory/quantifiers/quantifiers_rewriter.cpp | 2 +- src/theory/quantifiers/quantifiers_rewriter.h | 2 +- src/theory/quantifiers/relevant_domain.cpp | 2 +- src/theory/quantifiers/relevant_domain.h | 2 +- src/theory/quantifiers/rewrite_engine.cpp | 2 +- src/theory/quantifiers/rewrite_engine.h | 2 +- src/theory/quantifiers/symmetry_breaking.cpp | 4 +-- src/theory/quantifiers/symmetry_breaking.h | 2 +- src/theory/quantifiers/term_database.cpp | 4 +-- src/theory/quantifiers/term_database.h | 4 +-- src/theory/quantifiers/theory_quantifiers.cpp | 2 +- src/theory/quantifiers/theory_quantifiers.h | 2 +- .../quantifiers/theory_quantifiers_type_rules.h | 4 +-- src/theory/quantifiers/trigger.cpp | 4 +-- src/theory/quantifiers/trigger.h | 2 +- src/theory/quantifiers_engine.cpp | 2 +- src/theory/quantifiers_engine.h | 2 +- src/theory/rep_set.cpp | 4 +-- src/theory/rep_set.h | 2 +- src/theory/rewriter.cpp | 2 +- src/theory/rewriter.h | 2 +- src/theory/rewriter_attributes.h | 2 +- src/theory/rewriter_tables_template.h | 2 +- src/theory/sets/expr_patterns.h | 2 +- src/theory/sets/options_handlers.h | 17 +++++++++++++ src/theory/sets/scrutinize.h | 2 +- src/theory/sets/term_info.h | 2 +- src/theory/sets/theory_sets.cpp | 2 +- src/theory/sets/theory_sets.h | 2 +- src/theory/sets/theory_sets_private.cpp | 4 +-- src/theory/sets/theory_sets_private.h | 4 +-- src/theory/sets/theory_sets_rewriter.cpp | 2 +- src/theory/sets/theory_sets_rewriter.h | 2 +- src/theory/sets/theory_sets_type_enumerator.h | 17 +++++++++++++ src/theory/sets/theory_sets_type_rules.h | 4 +-- src/theory/shared_terms_database.cpp | 2 +- src/theory/shared_terms_database.h | 2 +- src/theory/strings/regexp_operation.cpp | 5 ++-- src/theory/strings/regexp_operation.h | 4 +-- src/theory/strings/theory_strings.cpp | 6 ++--- src/theory/strings/theory_strings.h | 4 +-- src/theory/strings/theory_strings_preprocess.cpp | 6 ++--- src/theory/strings/theory_strings_preprocess.h | 2 +- src/theory/strings/theory_strings_rewriter.cpp | 2 +- src/theory/strings/theory_strings_rewriter.h | 2 +- src/theory/strings/theory_strings_type_rules.h | 4 +-- src/theory/strings/type_enumerator.h | 2 +- src/theory/substitutions.cpp | 2 +- src/theory/substitutions.h | 2 +- src/theory/term_registration_visitor.cpp | 2 +- src/theory/term_registration_visitor.h | 2 +- src/theory/theory.cpp | 6 ++--- src/theory/theory.h | 6 ++--- src/theory/theory_engine.cpp | 4 +-- src/theory/theory_engine.h | 6 ++--- src/theory/theory_model.cpp | 4 +-- src/theory/theory_model.h | 2 +- src/theory/theory_registrar.h | 2 +- src/theory/theory_test_utils.h | 2 +- src/theory/theory_traits_template.h | 2 +- src/theory/theoryof_mode.h | 2 +- src/theory/type_enumerator.h | 2 +- src/theory/type_enumerator_template.cpp | 2 +- src/theory/uf/equality_engine.cpp | 4 +-- src/theory/uf/equality_engine.h | 4 +-- src/theory/uf/equality_engine_types.h | 4 +-- src/theory/uf/options_handlers.h | 2 +- src/theory/uf/symmetry_breaker.cpp | 2 +- src/theory/uf/symmetry_breaker.h | 2 +- src/theory/uf/theory_uf.cpp | 2 +- src/theory/uf/theory_uf.h | 2 +- src/theory/uf/theory_uf_model.cpp | 2 +- src/theory/uf/theory_uf_model.h | 2 +- src/theory/uf/theory_uf_rewriter.h | 2 +- src/theory/uf/theory_uf_strong_solver.cpp | 2 +- src/theory/uf/theory_uf_strong_solver.h | 2 +- src/theory/uf/theory_uf_type_rules.h | 2 +- src/theory/unconstrained_simplifier.cpp | 4 +-- src/theory/unconstrained_simplifier.h | 4 +-- src/theory/valuation.h | 2 +- src/util/abstract_value.cpp | 2 +- src/util/abstract_value.h | 2 +- src/util/array.h | 2 +- src/util/array_store_all.cpp | 2 +- src/util/array_store_all.h | 2 +- src/util/ascription_type.h | 2 +- src/util/backtrackable.h | 2 +- src/util/bin_heap.h | 2 +- src/util/bitvector.h | 2 +- src/util/bool.h | 2 +- src/util/boolean_simplification.cpp | 2 +- src/util/boolean_simplification.h | 2 +- src/util/cache.h | 2 +- src/util/cardinality.cpp | 2 +- src/util/cardinality.h | 2 +- src/util/chain.h | 2 +- src/util/channel.h | 2 +- src/util/cvc4_assert.cpp | 2 +- src/util/cvc4_assert.h | 2 +- src/util/datatype.cpp | 2 +- src/util/datatype.h | 6 ++--- src/util/debug.h | 2 +- src/util/dense_map.h | 4 +-- src/util/didyoumean_test.cpp | 17 +++++++++++++ src/util/divisible.cpp | 2 +- src/util/divisible.h | 2 +- src/util/dump.cpp | 2 +- src/util/dump.h | 2 +- src/util/dynamic_array.h | 2 +- src/util/emptyset.cpp | 17 +++++++++++++ src/util/emptyset.h | 2 +- src/util/exception.cpp | 2 +- src/util/exception.h | 2 +- src/util/gmp_util.h | 2 +- src/util/hash.h | 2 +- src/util/index.h | 2 +- src/util/integer.h.in | 2 +- src/util/integer_cln_imp.cpp | 17 +++++++++++++ src/util/integer_cln_imp.h | 2 +- src/util/integer_gmp_imp.cpp | 4 +-- src/util/integer_gmp_imp.h | 2 +- src/util/ite_removal.cpp | 6 ++--- src/util/ite_removal.h | 6 ++--- src/util/language.cpp | 2 +- src/util/language.h | 2 +- src/util/lemma_input_channel.h | 2 +- src/util/lemma_output_channel.h | 2 +- src/util/matcher.h | 2 +- src/util/maybe.h | 4 +-- src/util/model.cpp | 2 +- src/util/model.h | 2 +- src/util/nary_builder.cpp | 2 +- src/util/nary_builder.h | 2 +- src/util/node_visitor.h | 2 +- src/util/ntuple.h | 2 +- src/util/output.cpp | 2 +- src/util/output.h | 2 +- src/util/predicate.cpp | 2 +- src/util/predicate.h | 2 +- src/util/proof.h | 2 +- src/util/rational.h.in | 2 +- src/util/rational_cln_imp.cpp | 2 +- src/util/rational_cln_imp.h | 2 +- src/util/rational_gmp_imp.cpp | 2 +- src/util/rational_gmp_imp.h | 2 +- src/util/record.cpp | 2 +- src/util/record.h | 2 +- src/util/recursion_breaker.h | 2 +- src/util/regexp.cpp | 6 ++--- src/util/regexp.h | 2 +- src/util/result.cpp | 2 +- src/util/result.h | 2 +- src/util/sexpr.cpp | 2 +- src/util/sexpr.h | 2 +- src/util/sort_inference.cpp | 4 +-- src/util/sort_inference.h | 2 +- src/util/statistics.cpp | 2 +- src/util/statistics.h | 2 +- src/util/statistics_registry.cpp | 6 ++--- src/util/statistics_registry.h | 4 +-- src/util/subrange_bound.h | 2 +- src/util/tls.h.in | 2 +- src/util/trans_closure.cpp | 2 +- src/util/trans_closure.h | 2 +- src/util/tuple.h | 2 +- src/util/uninterpreted_constant.cpp | 2 +- src/util/uninterpreted_constant.h | 2 +- src/util/utility.h | 2 +- test/system/CVC4JavaTest.java | 2 +- test/system/boilerplate.cpp | 2 +- test/system/cvc3_george.cpp | 2 +- test/system/cvc3_george.h | 2 +- test/system/cvc3_main.cpp | 2 +- test/system/ouroborous.cpp | 2 +- test/system/smt2_compliance.cpp | 2 +- test/system/statistics.cpp | 2 +- test/system/two_smt_engines.cpp | 2 +- test/unit/context/cdlist_black.h | 2 +- test/unit/context/cdlist_context_memory_black.h | 2 +- test/unit/context/cdmap_black.h | 2 +- test/unit/context/cdmap_white.h | 2 +- test/unit/context/cdo_black.h | 2 +- test/unit/context/cdvector_black.h | 2 +- test/unit/context/context_black.h | 2 +- test/unit/context/context_mm_black.h | 2 +- test/unit/context/context_white.h | 2 +- test/unit/context/stacking_map_black.h | 2 +- test/unit/context/stacking_vector_black.h | 2 +- test/unit/expr/attribute_black.h | 2 +- test/unit/expr/attribute_white.h | 2 +- test/unit/expr/expr_manager_public.h | 2 +- test/unit/expr/expr_public.h | 2 +- test/unit/expr/kind_black.h | 2 +- test/unit/expr/kind_map_black.h | 2 +- test/unit/expr/node_black.h | 2 +- test/unit/expr/node_builder_black.h | 2 +- test/unit/expr/node_manager_black.h | 2 +- test/unit/expr/node_manager_white.h | 2 +- test/unit/expr/node_self_iterator_black.h | 2 +- test/unit/expr/node_white.h | 2 +- test/unit/expr/symbol_table_black.h | 2 +- test/unit/expr/type_cardinality_public.h | 2 +- test/unit/expr/type_node_white.h | 2 +- test/unit/main/interactive_shell_black.h | 2 +- test/unit/memory.h | 2 +- test/unit/parser/parser_black.h | 2 +- test/unit/parser/parser_builder_black.h | 2 +- test/unit/prop/cnf_stream_white.h | 2 +- test/unit/theory/logic_info_white.h | 4 +-- test/unit/theory/stacking_map_black.h | 2 +- test/unit/theory/theory_arith_white.h | 4 +-- test/unit/theory/theory_black.h | 4 +-- test/unit/theory/theory_bv_white.h | 4 +-- test/unit/theory/theory_engine_white.h | 2 +- test/unit/theory/theory_white.h | 2 +- test/unit/theory/type_enumerator_white.h | 2 +- test/unit/util/array_store_all_black.h | 2 +- test/unit/util/assert_white.h | 2 +- test/unit/util/bitvector_black.h | 2 +- test/unit/util/boolean_simplification_black.h | 2 +- test/unit/util/cardinality_public.h | 2 +- test/unit/util/configuration_black.h | 2 +- test/unit/util/datatype_black.h | 2 +- test/unit/util/exception_black.h | 2 +- test/unit/util/integer_black.h | 2 +- test/unit/util/integer_white.h | 2 +- test/unit/util/output_black.h | 2 +- test/unit/util/rational_black.h | 2 +- test/unit/util/rational_white.h | 2 +- test/unit/util/recursion_breaker_black.h | 2 +- test/unit/util/stats_black.h | 4 +-- test/unit/util/subrange_bound_white.h | 2 +- test/unit/util/trans_closure_black.h | 2 +- 678 files changed, 1112 insertions(+), 912 deletions(-) mode change 100755 => 100644 src/theory/quantifiers/ambqi_builder.cpp mode change 100755 => 100644 src/theory/quantifiers/ambqi_builder.h mode change 100755 => 100644 src/theory/quantifiers/qinterval_builder.cpp mode change 100755 => 100644 src/theory/quantifiers/qinterval_builder.h mode change 100755 => 100644 src/theory/quantifiers/quant_conflict_find.cpp mode change 100755 => 100644 src/theory/quantifiers/quant_conflict_find.h (limited to 'src/theory') diff --git a/examples/SimpleVC.java b/examples/SimpleVC.java index bfe1b6f5c..a82303116 100644 --- a/examples/SimpleVC.java +++ b/examples/SimpleVC.java @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/examples/SimpleVCCompat.java b/examples/SimpleVCCompat.java index c028834c9..f4f615c7b 100644 --- a/examples/SimpleVCCompat.java +++ b/examples/SimpleVCCompat.java @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/examples/api/bitvectors.cpp b/examples/api/bitvectors.cpp index 09bf9c299..f21037628 100644 --- a/examples/api/bitvectors.cpp +++ b/examples/api/bitvectors.cpp @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/examples/api/bitvectors_and_arrays.cpp b/examples/api/bitvectors_and_arrays.cpp index 57bf78ca3..14135fc90 100644 --- a/examples/api/bitvectors_and_arrays.cpp +++ b/examples/api/bitvectors_and_arrays.cpp @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/examples/api/combination.cpp b/examples/api/combination.cpp index 4533e35e1..333ecb58d 100644 --- a/examples/api/combination.cpp +++ b/examples/api/combination.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/examples/api/datatypes.cpp b/examples/api/datatypes.cpp index dea83a95a..463cf9534 100644 --- a/examples/api/datatypes.cpp +++ b/examples/api/datatypes.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/examples/api/helloworld.cpp b/examples/api/helloworld.cpp index 4c62874b8..b94c46318 100644 --- a/examples/api/helloworld.cpp +++ b/examples/api/helloworld.cpp @@ -2,10 +2,10 @@ /*! \file helloworld.cpp ** \verbatim ** Original author: Tim King - ** Major contributors: none + ** Major contributors: Kshitij Bansal ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/examples/api/java/BitVectors.java b/examples/api/java/BitVectors.java index 946c221b6..42250a399 100644 --- a/examples/api/java/BitVectors.java +++ b/examples/api/java/BitVectors.java @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/examples/api/java/BitVectorsAndArrays.java b/examples/api/java/BitVectorsAndArrays.java index 5ad7fdc48..aa13726c8 100644 --- a/examples/api/java/BitVectorsAndArrays.java +++ b/examples/api/java/BitVectorsAndArrays.java @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/examples/api/java/CVC4Streams.java b/examples/api/java/CVC4Streams.java index b619b053e..9c8bad688 100644 --- a/examples/api/java/CVC4Streams.java +++ b/examples/api/java/CVC4Streams.java @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/examples/api/java/Combination.java b/examples/api/java/Combination.java index b529f6316..5dbb0f2ac 100644 --- a/examples/api/java/Combination.java +++ b/examples/api/java/Combination.java @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/examples/api/java/Datatypes.java b/examples/api/java/Datatypes.java index 9406031c1..d38f5738a 100644 --- a/examples/api/java/Datatypes.java +++ b/examples/api/java/Datatypes.java @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/examples/api/java/HelloWorld.java b/examples/api/java/HelloWorld.java index 803a03f40..7674a8e88 100644 --- a/examples/api/java/HelloWorld.java +++ b/examples/api/java/HelloWorld.java @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/examples/api/java/LinearArith.java b/examples/api/java/LinearArith.java index 582c2ab21..271e08ad9 100644 --- a/examples/api/java/LinearArith.java +++ b/examples/api/java/LinearArith.java @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/examples/api/java/PipedInput.java b/examples/api/java/PipedInput.java index de71eb769..b393ca33f 100644 --- a/examples/api/java/PipedInput.java +++ b/examples/api/java/PipedInput.java @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/examples/api/linear_arith.cpp b/examples/api/linear_arith.cpp index 87f9d8a5b..22d65ad10 100644 --- a/examples/api/linear_arith.cpp +++ b/examples/api/linear_arith.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/examples/hashsmt/sha1.hpp b/examples/hashsmt/sha1.hpp index f033822c2..9e665e701 100644 --- a/examples/hashsmt/sha1.hpp +++ b/examples/hashsmt/sha1.hpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/examples/hashsmt/sha1_collision.cpp b/examples/hashsmt/sha1_collision.cpp index b517f1b03..ad3705a94 100644 --- a/examples/hashsmt/sha1_collision.cpp +++ b/examples/hashsmt/sha1_collision.cpp @@ -1,11 +1,11 @@ /********************* */ -/*! \file sha1smt.cpp +/*! \file sha1_collision.cpp ** \verbatim ** Original author: Dejan Jovanovic - ** Major contributors: Morgan Deters + ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/examples/hashsmt/sha1_inversion.cpp b/examples/hashsmt/sha1_inversion.cpp index 720ef52b4..51267ba06 100644 --- a/examples/hashsmt/sha1_inversion.cpp +++ b/examples/hashsmt/sha1_inversion.cpp @@ -1,11 +1,11 @@ /********************* */ -/*! \file sha1smt.cpp +/*! \file sha1_inversion.cpp ** \verbatim ** Original author: Dejan Jovanovic ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/examples/hashsmt/word.cpp b/examples/hashsmt/word.cpp index 3035983d9..2e638f64f 100644 --- a/examples/hashsmt/word.cpp +++ b/examples/hashsmt/word.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/examples/hashsmt/word.h b/examples/hashsmt/word.h index dd1c2dc38..d7a866fc3 100644 --- a/examples/hashsmt/word.h +++ b/examples/hashsmt/word.h @@ -2,10 +2,10 @@ /*! \file word.h ** \verbatim ** Original author: Dejan Jovanovic - ** Major contributors: Morgan Deters - ** Minor contributors (to current version): none + ** Major contributors: none + ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/examples/nra-translate/normalize.cpp b/examples/nra-translate/normalize.cpp index c3985ebf4..2dd450c4e 100644 --- a/examples/nra-translate/normalize.cpp +++ b/examples/nra-translate/normalize.cpp @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/examples/nra-translate/smt2info.cpp b/examples/nra-translate/smt2info.cpp index 9154232d8..a2c12f05d 100644 --- a/examples/nra-translate/smt2info.cpp +++ b/examples/nra-translate/smt2info.cpp @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/examples/nra-translate/smt2todreal.cpp b/examples/nra-translate/smt2todreal.cpp index a19b83c6c..4413c480a 100644 --- a/examples/nra-translate/smt2todreal.cpp +++ b/examples/nra-translate/smt2todreal.cpp @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/examples/nra-translate/smt2toisat.cpp b/examples/nra-translate/smt2toisat.cpp index d9da7c0d4..eae77e1ce 100644 --- a/examples/nra-translate/smt2toisat.cpp +++ b/examples/nra-translate/smt2toisat.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/examples/nra-translate/smt2tomathematica.cpp b/examples/nra-translate/smt2tomathematica.cpp index 1bd6c5a55..3158243a5 100644 --- a/examples/nra-translate/smt2tomathematica.cpp +++ b/examples/nra-translate/smt2tomathematica.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/examples/nra-translate/smt2toqepcad.cpp b/examples/nra-translate/smt2toqepcad.cpp index e733d9e0e..cb4855a38 100644 --- a/examples/nra-translate/smt2toqepcad.cpp +++ b/examples/nra-translate/smt2toqepcad.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/examples/nra-translate/smt2toredlog.cpp b/examples/nra-translate/smt2toredlog.cpp index b6d6ec35e..71d7229af 100644 --- a/examples/nra-translate/smt2toredlog.cpp +++ b/examples/nra-translate/smt2toredlog.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/examples/sets-translate/sets_translate.cpp b/examples/sets-translate/sets_translate.cpp index 14df2fac0..d214b6ab8 100644 --- a/examples/sets-translate/sets_translate.cpp +++ b/examples/sets-translate/sets_translate.cpp @@ -1,8 +1,8 @@ /********************* */ -/*! \file sets-translate.cpp +/*! \file sets_translate.cpp ** \verbatim ** Original author: Kshitij Bansal - ** Major contributors: None + ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. ** Copyright (c) 2009-2014 New York University and The University of Iowa diff --git a/examples/simple_vc_compat_c.c b/examples/simple_vc_compat_c.c index 8421cc274..5aa2d70e1 100644 --- a/examples/simple_vc_compat_c.c +++ b/examples/simple_vc_compat_c.c @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/examples/simple_vc_compat_cxx.cpp b/examples/simple_vc_compat_cxx.cpp index be6c4cb7a..c86470171 100644 --- a/examples/simple_vc_compat_cxx.cpp +++ b/examples/simple_vc_compat_cxx.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/examples/simple_vc_cxx.cpp b/examples/simple_vc_cxx.cpp index 5b1f36f40..a7b9c8359 100644 --- a/examples/simple_vc_cxx.cpp +++ b/examples/simple_vc_cxx.cpp @@ -5,7 +5,7 @@ ** Major contributors: Dejan Jovanovic ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/bindings/java_iterator_adapter.h b/src/bindings/java_iterator_adapter.h index 4e09f910a..473e056f9 100644 --- a/src/bindings/java_iterator_adapter.h +++ b/src/bindings/java_iterator_adapter.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/bindings/java_stream_adapters.h b/src/bindings/java_stream_adapters.h index f3546613c..b4a311ad0 100644 --- a/src/bindings/java_stream_adapters.h +++ b/src/bindings/java_stream_adapters.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/bindings/swig.h b/src/bindings/swig.h index 2fa6ba4f0..790873ef6 100644 --- a/src/bindings/swig.h +++ b/src/bindings/swig.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/compat/cvc3_compat.cpp b/src/compat/cvc3_compat.cpp index 37d4c503d..51b0c6083 100644 --- a/src/compat/cvc3_compat.cpp +++ b/src/compat/cvc3_compat.cpp @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Morgan Deters ** Major contributors: none - ** Minor contributors (to current version): Tim King, Dejan Jovanovic, Tianyi Liang + ** Minor contributors (to current version): Andrew Reynolds, Tim King, Dejan Jovanovic, Tianyi Liang ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/compat/cvc3_compat.h b/src/compat/cvc3_compat.h index a43da5aa3..0fa4a7ce5 100644 --- a/src/compat/cvc3_compat.h +++ b/src/compat/cvc3_compat.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Francois Bobot ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/context/cdchunk_list.h b/src/context/cdchunk_list.h index 2f9652397..16aa32176 100644 --- a/src/context/cdchunk_list.h +++ b/src/context/cdchunk_list.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/context/cddense_set.h b/src/context/cddense_set.h index c19a2400a..e717adaee 100644 --- a/src/context/cddense_set.h +++ b/src/context/cddense_set.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/context/cdhashmap.h b/src/context/cdhashmap.h index 4d2b8570f..02f3d855c 100644 --- a/src/context/cdhashmap.h +++ b/src/context/cdhashmap.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Dejan Jovanovic ** Major contributors: Morgan Deters - ** Minor contributors (to current version): Tim King + ** Minor contributors (to current version): Kshitij Bansal, Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/context/cdhashmap_forward.h b/src/context/cdhashmap_forward.h index 346dba47c..23346435a 100644 --- a/src/context/cdhashmap_forward.h +++ b/src/context/cdhashmap_forward.h @@ -5,7 +5,7 @@ ** Major contributors: Tim King, Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/context/cdhashset.h b/src/context/cdhashset.h index 18a39754e..548aa95d1 100644 --- a/src/context/cdhashset.h +++ b/src/context/cdhashset.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Dejan Jovanovic ** Major contributors: Tim King, Morgan Deters - ** Minor contributors (to current version): Francois Bobot + ** Minor contributors (to current version): Francois Bobot, Kshitij Bansal ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/context/cdhashset_forward.h b/src/context/cdhashset_forward.h index 011e41111..e96387c06 100644 --- a/src/context/cdhashset_forward.h +++ b/src/context/cdhashset_forward.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/context/cdinsert_hashmap.h b/src/context/cdinsert_hashmap.h index f834e6b5f..1c8f94143 100644 --- a/src/context/cdinsert_hashmap.h +++ b/src/context/cdinsert_hashmap.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/context/cdinsert_hashmap_forward.h b/src/context/cdinsert_hashmap_forward.h index 817899400..184b27a3d 100644 --- a/src/context/cdinsert_hashmap_forward.h +++ b/src/context/cdinsert_hashmap_forward.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/context/cdlist.h b/src/context/cdlist.h index 51f1dbfa7..7c673a4be 100644 --- a/src/context/cdlist.h +++ b/src/context/cdlist.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Morgan Deters ** Major contributors: Tim King - ** Minor contributors (to current version): Francois Bobot + ** Minor contributors (to current version): Kshitij Bansal, Francois Bobot ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/context/cdlist_forward.h b/src/context/cdlist_forward.h index dea2096fd..dd4213f64 100644 --- a/src/context/cdlist_forward.h +++ b/src/context/cdlist_forward.h @@ -5,7 +5,7 @@ ** Major contributors: Tim King ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/context/cdmaybe.h b/src/context/cdmaybe.h index db913d82a..d47f617a9 100644 --- a/src/context/cdmaybe.h +++ b/src/context/cdmaybe.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/context/cdo.h b/src/context/cdo.h index 496af7815..5fa0a4d8b 100644 --- a/src/context/cdo.h +++ b/src/context/cdo.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Clark Barrett, Francois Bobot ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/context/cdqueue.h b/src/context/cdqueue.h index 2f8f5b628..0e57a7cdb 100644 --- a/src/context/cdqueue.h +++ b/src/context/cdqueue.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Francois Bobot, Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/context/cdtrail_hashmap.h b/src/context/cdtrail_hashmap.h index b34650f44..f4220ef43 100644 --- a/src/context/cdtrail_hashmap.h +++ b/src/context/cdtrail_hashmap.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/context/cdtrail_hashmap_forward.h b/src/context/cdtrail_hashmap_forward.h index 2bbe32e80..2bfb32539 100644 --- a/src/context/cdtrail_hashmap_forward.h +++ b/src/context/cdtrail_hashmap_forward.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/context/cdtrail_queue.h b/src/context/cdtrail_queue.h index 10645a5b7..dff68a161 100644 --- a/src/context/cdtrail_queue.h +++ b/src/context/cdtrail_queue.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/context/cdvector.h b/src/context/cdvector.h index 64e916680..30699670f 100644 --- a/src/context/cdvector.h +++ b/src/context/cdvector.h @@ -2,10 +2,10 @@ /*! \file cdvector.h ** \verbatim ** Original author: Tim King - ** Major contributors: none - ** Minor contributors (to current version): Morgan Deters + ** Major contributors: Morgan Deters + ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/context/context.cpp b/src/context/context.cpp index f5efadf6f..c427e89c9 100644 --- a/src/context/context.cpp +++ b/src/context/context.cpp @@ -5,7 +5,7 @@ ** Major contributors: Clark Barrett ** Minor contributors (to current version): Dejan Jovanovic ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/context/context.h b/src/context/context.h index 0285d47a8..02d82a6d3 100644 --- a/src/context/context.h +++ b/src/context/context.h @@ -5,7 +5,7 @@ ** Major contributors: Clark Barrett ** Minor contributors (to current version): Tim King, Dejan Jovanovic ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/context/context_mm.cpp b/src/context/context_mm.cpp index 5945effe9..e7b234a95 100644 --- a/src/context/context_mm.cpp +++ b/src/context/context_mm.cpp @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/context/context_mm.h b/src/context/context_mm.h index b580d86d5..4594ac253 100644 --- a/src/context/context_mm.h +++ b/src/context/context_mm.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/context/stacking_map.h b/src/context/stacking_map.h index af78aa9d0..4ce1b2d33 100644 --- a/src/context/stacking_map.h +++ b/src/context/stacking_map.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Dejan Jovanovic ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/context/stacking_vector.h b/src/context/stacking_vector.h index 4aa45e9cc..578a2e3ae 100644 --- a/src/context/stacking_vector.h +++ b/src/context/stacking_vector.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Dejan Jovanovic ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/decision/decision_engine.cpp b/src/decision/decision_engine.cpp index 073a3ff6b..c3b2f28ac 100644 --- a/src/decision/decision_engine.cpp +++ b/src/decision/decision_engine.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Tim King, Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/decision/decision_engine.h b/src/decision/decision_engine.h index 8173c7269..bfd28e113 100644 --- a/src/decision/decision_engine.h +++ b/src/decision/decision_engine.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Clark Barrett, Dejan Jovanovic, Morgan Deters, Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/decision/decision_mode.cpp b/src/decision/decision_mode.cpp index dfbd035f7..912089179 100644 --- a/src/decision/decision_mode.cpp +++ b/src/decision/decision_mode.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/decision/decision_mode.h b/src/decision/decision_mode.h index 3c5d98340..fb01c587b 100644 --- a/src/decision/decision_mode.h +++ b/src/decision/decision_mode.h @@ -5,7 +5,7 @@ ** Major contributors: Kshitij Bansal ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/decision/decision_strategy.h b/src/decision/decision_strategy.h index 7f6f30a0a..e4df8d4af 100644 --- a/src/decision/decision_strategy.h +++ b/src/decision/decision_strategy.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/decision/justification_heuristic.cpp b/src/decision/justification_heuristic.cpp index dc57fd5f9..ffff6952f 100644 --- a/src/decision/justification_heuristic.cpp +++ b/src/decision/justification_heuristic.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/decision/justification_heuristic.h b/src/decision/justification_heuristic.h index 2969c4b86..a6bc68ce5 100644 --- a/src/decision/justification_heuristic.h +++ b/src/decision/justification_heuristic.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Tim King, Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/decision/options_handlers.h b/src/decision/options_handlers.h index a8931aecb..723fb243c 100644 --- a/src/decision/options_handlers.h +++ b/src/decision/options_handlers.h @@ -5,7 +5,7 @@ ** Major contributors: Kshitij Bansal ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/expr/attribute.cpp b/src/expr/attribute.cpp index cde261463..2cd884bba 100644 --- a/src/expr/attribute.cpp +++ b/src/expr/attribute.cpp @@ -5,7 +5,7 @@ ** Major contributors: Dejan Jovanovic, Tim King ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/expr/attribute.h b/src/expr/attribute.h index d203b75ad..0bca760ef 100644 --- a/src/expr/attribute.h +++ b/src/expr/attribute.h @@ -5,7 +5,7 @@ ** Major contributors: Tim King ** Minor contributors (to current version): Christopher L. Conway, Dejan Jovanovic ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/expr/attribute_internals.h b/src/expr/attribute_internals.h index 0a3d389e7..dae11fd74 100644 --- a/src/expr/attribute_internals.h +++ b/src/expr/attribute_internals.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Dejan Jovanovic, Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/expr/attribute_unique_id.h b/src/expr/attribute_unique_id.h index 3a52d7a89..45dc368a5 100644 --- a/src/expr/attribute_unique_id.h +++ b/src/expr/attribute_unique_id.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Tim King ** Major contributors: none - ** Minor contributors (to current version): none + ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/expr/command.cpp b/src/expr/command.cpp index 23a2b74c2..16484a320 100644 --- a/src/expr/command.cpp +++ b/src/expr/command.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Kshitij Bansal, Dejan Jovanovic, Andrew Reynolds, Francois Bobot ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/expr/command.h b/src/expr/command.h index c3d0363bb..606618d21 100644 --- a/src/expr/command.h +++ b/src/expr/command.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Kshitij Bansal, Christopher L. Conway, Dejan Jovanovic, Francois Bobot, Andrew Reynolds ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/expr/convenience_node_builders.h b/src/expr/convenience_node_builders.h index 93b8d460d..0c3b690b2 100644 --- a/src/expr/convenience_node_builders.h +++ b/src/expr/convenience_node_builders.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/expr/expr_manager_scope.h b/src/expr/expr_manager_scope.h index ea5452eac..a8e8f04be 100644 --- a/src/expr/expr_manager_scope.h +++ b/src/expr/expr_manager_scope.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/expr/expr_manager_template.cpp b/src/expr/expr_manager_template.cpp index 147ad3723..7ce51ecdd 100644 --- a/src/expr/expr_manager_template.cpp +++ b/src/expr/expr_manager_template.cpp @@ -5,7 +5,7 @@ ** Major contributors: Dejan Jovanovic, Christopher L. Conway ** Minor contributors (to current version): Kshitij Bansal, Andrew Reynolds ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/expr/expr_manager_template.h b/src/expr/expr_manager_template.h index f5e01d545..49094c593 100644 --- a/src/expr/expr_manager_template.h +++ b/src/expr/expr_manager_template.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Morgan Deters ** Major contributors: Dejan Jovanovic - ** Minor contributors (to current version): Andrew Reynolds, Tim King, Christopher L. Conway + ** Minor contributors (to current version): Andrew Reynolds, Kshitij Bansal, Tim King, Christopher L. Conway ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/expr/expr_stream.h b/src/expr/expr_stream.h index edfa4ba07..20977011c 100644 --- a/src/expr/expr_stream.h +++ b/src/expr/expr_stream.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/expr/expr_template.cpp b/src/expr/expr_template.cpp index 60f34867c..809064413 100644 --- a/src/expr/expr_template.cpp +++ b/src/expr/expr_template.cpp @@ -2,10 +2,10 @@ /*! \file expr_template.cpp ** \verbatim ** Original author: Morgan Deters - ** Major contributors: Dejan Jovanovic - ** Minor contributors (to current version): Tim King, Christopher L. Conway, Kshitij Bansal + ** Major contributors: Dejan Jovanovic, Kshitij Bansal + ** Minor contributors (to current version): Tim King, Christopher L. Conway ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/expr/expr_template.h b/src/expr/expr_template.h index 828b1923c..c5e8e77de 100644 --- a/src/expr/expr_template.h +++ b/src/expr/expr_template.h @@ -5,7 +5,7 @@ ** Major contributors: Dejan Jovanovic ** Minor contributors (to current version): Liana Hadarean, Kshitij Bansal, Tim King, Christopher L. Conway ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/expr/kind_map.h b/src/expr/kind_map.h index e66f8c3b3..d3ed43e1c 100644 --- a/src/expr/kind_map.h +++ b/src/expr/kind_map.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/expr/kind_template.h b/src/expr/kind_template.h index b98a9a373..f93df4132 100644 --- a/src/expr/kind_template.h +++ b/src/expr/kind_template.h @@ -5,7 +5,7 @@ ** Major contributors: Dejan Jovanovic ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/expr/metakind_template.h b/src/expr/metakind_template.h index ea9a598c0..73f48ba04 100644 --- a/src/expr/metakind_template.h +++ b/src/expr/metakind_template.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/expr/node.cpp b/src/expr/node.cpp index 34a72e106..deceda840 100644 --- a/src/expr/node.cpp +++ b/src/expr/node.cpp @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/expr/node.h b/src/expr/node.h index 358b7cfcd..35f94b9e3 100644 --- a/src/expr/node.h +++ b/src/expr/node.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): Kshitij Bansal, Francois Bobot, Clark Barrett, Tim King, Christopher L. Conway ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/expr/node_builder.h b/src/expr/node_builder.h index 0be97b24a..bea51b576 100644 --- a/src/expr/node_builder.h +++ b/src/expr/node_builder.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): Tim King, Christopher L. Conway ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/expr/node_manager.cpp b/src/expr/node_manager.cpp index 4c61550b9..be3749021 100644 --- a/src/expr/node_manager.cpp +++ b/src/expr/node_manager.cpp @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Dejan Jovanovic ** Major contributors: Morgan Deters - ** Minor contributors (to current version): ACSYS, Tim King, Christopher L. Conway + ** Minor contributors (to current version): ACSYS, Kshitij Bansal, Tim King, Christopher L. Conway ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/expr/node_manager.h b/src/expr/node_manager.h index f75ed9559..0aa222294 100644 --- a/src/expr/node_manager.h +++ b/src/expr/node_manager.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Dejan Jovanovic ** Major contributors: Christopher L. Conway, Morgan Deters - ** Minor contributors (to current version): ACSYS, Tianyi Liang, Tim King + ** Minor contributors (to current version): ACSYS, Tianyi Liang, Kshitij Bansal, Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/expr/node_manager_attributes.h b/src/expr/node_manager_attributes.h index ab55baa6e..41086ac21 100644 --- a/src/expr/node_manager_attributes.h +++ b/src/expr/node_manager_attributes.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/expr/node_self_iterator.h b/src/expr/node_self_iterator.h index e1cca1aef..401cc6152 100644 --- a/src/expr/node_self_iterator.h +++ b/src/expr/node_self_iterator.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/expr/node_value.cpp b/src/expr/node_value.cpp index d5b08bc18..8af056f62 100644 --- a/src/expr/node_value.cpp +++ b/src/expr/node_value.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Dejan Jovanovic ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/expr/node_value.h b/src/expr/node_value.h index 85abca524..a6e7a6053 100644 --- a/src/expr/node_value.h +++ b/src/expr/node_value.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Christopher L. Conway, Tim King, Dejan Jovanovic ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/expr/options_handlers.h b/src/expr/options_handlers.h index 1959c10c4..e2a92ade7 100644 --- a/src/expr/options_handlers.h +++ b/src/expr/options_handlers.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/expr/pickle_data.cpp b/src/expr/pickle_data.cpp index e80e20fc8..6f47f9207 100644 --- a/src/expr/pickle_data.cpp +++ b/src/expr/pickle_data.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/expr/pickle_data.h b/src/expr/pickle_data.h index 2224c4f99..acf0dccdd 100644 --- a/src/expr/pickle_data.h +++ b/src/expr/pickle_data.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/expr/pickler.cpp b/src/expr/pickler.cpp index 065805a65..20e8859e3 100644 --- a/src/expr/pickler.cpp +++ b/src/expr/pickler.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Tim King, Kshitij Bansal ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/expr/pickler.h b/src/expr/pickler.h index afaf72600..f1cdd1c65 100644 --- a/src/expr/pickler.h +++ b/src/expr/pickler.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Kshitij Bansal ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/expr/symbol_table.cpp b/src/expr/symbol_table.cpp index e36219a81..ce7d571db 100644 --- a/src/expr/symbol_table.cpp +++ b/src/expr/symbol_table.cpp @@ -5,7 +5,7 @@ ** Major contributors: Christopher L. Conway ** Minor contributors (to current version): Andrew Reynolds, Dejan Jovanovic, Francois Bobot ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/expr/symbol_table.h b/src/expr/symbol_table.h index 63a7e299b..a9ab43cfe 100644 --- a/src/expr/symbol_table.h +++ b/src/expr/symbol_table.h @@ -5,7 +5,7 @@ ** Major contributors: Christopher L. Conway ** Minor contributors (to current version): Andrew Reynolds, Dejan Jovanovic, Francois Bobot ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/expr/type.cpp b/src/expr/type.cpp index d0fe77aae..5810e1f4f 100644 --- a/src/expr/type.cpp +++ b/src/expr/type.cpp @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Christopher L. Conway ** Major contributors: Dejan Jovanovic, Morgan Deters - ** Minor contributors (to current version): Andrew Reynolds + ** Minor contributors (to current version): Kshitij Bansal, Andrew Reynolds ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/expr/type.h b/src/expr/type.h index b4761e1d6..7674ff9d0 100644 --- a/src/expr/type.h +++ b/src/expr/type.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Christopher L. Conway ** Major contributors: Dejan Jovanovic, Morgan Deters - ** Minor contributors (to current version): Andrew Reynolds + ** Minor contributors (to current version): Andrew Reynolds, Kshitij Bansal ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/expr/type_checker.h b/src/expr/type_checker.h index 491b44347..4b04adfc9 100644 --- a/src/expr/type_checker.h +++ b/src/expr/type_checker.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/expr/type_checker_template.cpp b/src/expr/type_checker_template.cpp index 87361e991..061e1b4e0 100644 --- a/src/expr/type_checker_template.cpp +++ b/src/expr/type_checker_template.cpp @@ -5,7 +5,7 @@ ** Major contributors: Tim King ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/expr/type_node.cpp b/src/expr/type_node.cpp index eb5c8a6f8..9dbcb628f 100644 --- a/src/expr/type_node.cpp +++ b/src/expr/type_node.cpp @@ -2,10 +2,10 @@ /*! \file type_node.cpp ** \verbatim ** Original author: Dejan Jovanovic - ** Major contributors: Tim King, Morgan Deters - ** Minor contributors (to current version): Andrew Reynolds, Clark Barrett + ** Major contributors: Kshitij Bansal, Morgan Deters + ** Minor contributors (to current version): Andrew Reynolds, Clark Barrett, Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/expr/type_node.h b/src/expr/type_node.h index a49ae31bf..289395a34 100644 --- a/src/expr/type_node.h +++ b/src/expr/type_node.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Dejan Jovanovic ** Major contributors: Morgan Deters - ** Minor contributors (to current version): Clark Barrett, Andrew Reynolds, Tianyi Liang, Tim King + ** Minor contributors (to current version): Clark Barrett, Andrew Reynolds, Tianyi Liang, Kshitij Bansal, Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/expr/type_properties_template.h b/src/expr/type_properties_template.h index fc68fcf8c..b54fd8809 100644 --- a/src/expr/type_properties_template.h +++ b/src/expr/type_properties_template.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/expr/variable_type_map.h b/src/expr/variable_type_map.h index 416850622..59ce5c606 100644 --- a/src/expr/variable_type_map.h +++ b/src/expr/variable_type_map.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/include/cvc4.h b/src/include/cvc4.h index 22217c685..77fcbad41 100644 --- a/src/include/cvc4.h +++ b/src/include/cvc4.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/include/cvc4_private.h b/src/include/cvc4_private.h index 31a5852d0..3cdb993f1 100644 --- a/src/include/cvc4_private.h +++ b/src/include/cvc4_private.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/include/cvc4_private_library.h b/src/include/cvc4_private_library.h index f7fd1b607..05bd3d820 100644 --- a/src/include/cvc4_private_library.h +++ b/src/include/cvc4_private_library.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/include/cvc4_public.h b/src/include/cvc4_public.h index b7431ce1c..f299c7237 100644 --- a/src/include/cvc4_public.h +++ b/src/include/cvc4_public.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/include/cvc4parser_private.h b/src/include/cvc4parser_private.h index bb5ffdbba..dd56c4e1d 100644 --- a/src/include/cvc4parser_private.h +++ b/src/include/cvc4parser_private.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/include/cvc4parser_public.h b/src/include/cvc4parser_public.h index e09181bd0..edb189c19 100644 --- a/src/include/cvc4parser_public.h +++ b/src/include/cvc4parser_public.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/lib/clock_gettime.c b/src/lib/clock_gettime.c index b2322884c..0187cbb7d 100644 --- a/src/lib/clock_gettime.c +++ b/src/lib/clock_gettime.c @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/lib/clock_gettime.h b/src/lib/clock_gettime.h index 8860e717b..e065466f2 100644 --- a/src/lib/clock_gettime.h +++ b/src/lib/clock_gettime.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/lib/ffs.c b/src/lib/ffs.c index abbbf1e1d..d4481d2ca 100644 --- a/src/lib/ffs.c +++ b/src/lib/ffs.c @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/lib/ffs.h b/src/lib/ffs.h index 212e3c9dd..2dc51d0e9 100644 --- a/src/lib/ffs.h +++ b/src/lib/ffs.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/lib/replacements.h b/src/lib/replacements.h index 7db0171ec..b6acc1c7d 100644 --- a/src/lib/replacements.h +++ b/src/lib/replacements.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/lib/strtok_r.c b/src/lib/strtok_r.c index 203d126c1..320da746e 100644 --- a/src/lib/strtok_r.c +++ b/src/lib/strtok_r.c @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/lib/strtok_r.h b/src/lib/strtok_r.h index b76a4a1b5..644ff7a31 100644 --- a/src/lib/strtok_r.h +++ b/src/lib/strtok_r.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/main/command_executor.cpp b/src/main/command_executor.cpp index 028a23f01..5b90ca14f 100644 --- a/src/main/command_executor.cpp +++ b/src/main/command_executor.cpp @@ -2,10 +2,10 @@ /*! \file command_executor.cpp ** \verbatim ** Original author: Morgan Deters - ** Major contributors: Kshitij Bansal - ** Minor contributors (to current version): Andrew Reynolds + ** Major contributors: Andrew Reynolds, Kshitij Bansal + ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/main/command_executor.h b/src/main/command_executor.h index e6e3d3411..9fe6347be 100644 --- a/src/main/command_executor.h +++ b/src/main/command_executor.h @@ -5,7 +5,7 @@ ** Major contributors: Kshitij Bansal ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/main/command_executor_portfolio.cpp b/src/main/command_executor_portfolio.cpp index f5d030e26..36f2abdd2 100644 --- a/src/main/command_executor_portfolio.cpp +++ b/src/main/command_executor_portfolio.cpp @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Morgan Deters ** Major contributors: Kshitij Bansal - ** Minor contributors (to current version): none + ** Minor contributors (to current version): Andrew Reynolds ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/main/command_executor_portfolio.h b/src/main/command_executor_portfolio.h index 91f9a5169..b3532cea4 100644 --- a/src/main/command_executor_portfolio.h +++ b/src/main/command_executor_portfolio.h @@ -5,7 +5,7 @@ ** Major contributors: Kshitij Bansal ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/main/driver_unified.cpp b/src/main/driver_unified.cpp index 6beb9636a..1202c7882 100644 --- a/src/main/driver_unified.cpp +++ b/src/main/driver_unified.cpp @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): Francois Bobot ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/main/interactive_shell.cpp b/src/main/interactive_shell.cpp index 7d3742cf4..bdc956535 100644 --- a/src/main/interactive_shell.cpp +++ b/src/main/interactive_shell.cpp @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Christopher L. Conway ** Major contributors: Morgan Deters - ** Minor contributors (to current version): Francois Bobot + ** Minor contributors (to current version): Kshitij Bansal, Francois Bobot ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/main/interactive_shell.h b/src/main/interactive_shell.h index 62d0ceeda..43054f980 100644 --- a/src/main/interactive_shell.h +++ b/src/main/interactive_shell.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/main/main.cpp b/src/main/main.cpp index a4c4b9c0a..e99095855 100644 --- a/src/main/main.cpp +++ b/src/main/main.cpp @@ -5,7 +5,7 @@ ** Major contributors: Christopher L. Conway ** Minor contributors (to current version): Clark Barrett, Dejan Jovanovic ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/main/main.h b/src/main/main.h index 154919aa9..01f337ef4 100644 --- a/src/main/main.h +++ b/src/main/main.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/main/options_handlers.h b/src/main/options_handlers.h index 02ebf2252..00f192d2f 100644 --- a/src/main/options_handlers.h +++ b/src/main/options_handlers.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Morgan Deters ** Major contributors: none - ** Minor contributors (to current version): Tim King + ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/main/portfolio.cpp b/src/main/portfolio.cpp index fe540d72f..757b6cd3c 100644 --- a/src/main/portfolio.cpp +++ b/src/main/portfolio.cpp @@ -5,7 +5,7 @@ ** Major contributors: Kshitij Bansal ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/main/portfolio.h b/src/main/portfolio.h index 6b75780da..f89c8f548 100644 --- a/src/main/portfolio.h +++ b/src/main/portfolio.h @@ -2,10 +2,10 @@ /*! \file portfolio.h ** \verbatim ** Original author: Morgan Deters - ** Major contributors: none - ** Minor contributors (to current version): Kshitij Bansal + ** Major contributors: Kshitij Bansal + ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/main/portfolio_util.cpp b/src/main/portfolio_util.cpp index cfaa76aa8..d4ef11a3a 100644 --- a/src/main/portfolio_util.cpp +++ b/src/main/portfolio_util.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/main/portfolio_util.h b/src/main/portfolio_util.h index d22ca07d9..8ae730506 100644 --- a/src/main/portfolio_util.h +++ b/src/main/portfolio_util.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/main/util.cpp b/src/main/util.cpp index bcb3d448f..5819028da 100644 --- a/src/main/util.cpp +++ b/src/main/util.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Christopher L. Conway, Tim King, ACSYS ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/options/base_options_handlers.h b/src/options/base_options_handlers.h index dcf059234..ac3194f29 100644 --- a/src/options/base_options_handlers.h +++ b/src/options/base_options_handlers.h @@ -2,8 +2,8 @@ /*! \file base_options_handlers.h ** \verbatim ** Original author: Morgan Deters - ** Major contributors: none - ** Minor contributors (to current version): Kshitij Bansal + ** Major contributors: Kshitij Bansal + ** Minor contributors (to current version): none ** This file is part of the CVC4 project. ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing diff --git a/src/options/base_options_template.cpp b/src/options/base_options_template.cpp index b6a320cce..2c3d717fa 100644 --- a/src/options/base_options_template.cpp +++ b/src/options/base_options_template.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/options/base_options_template.h b/src/options/base_options_template.h index daf62659c..e43d2848e 100644 --- a/src/options/base_options_template.h +++ b/src/options/base_options_template.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/options/option_exception.h b/src/options/option_exception.h index b085835b6..a90b96367 100644 --- a/src/options/option_exception.h +++ b/src/options/option_exception.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/options/options_holder_template.h b/src/options/options_holder_template.h index 8738d7b51..f033fd5ad 100644 --- a/src/options/options_holder_template.h +++ b/src/options/options_holder_template.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/options/options_template.cpp b/src/options/options_template.cpp index 5c5487e70..bd723e380 100644 --- a/src/options/options_template.cpp +++ b/src/options/options_template.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Kshitij Bansal ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/parser/antlr_input.cpp b/src/parser/antlr_input.cpp index 27a020ac5..ca8f805b4 100644 --- a/src/parser/antlr_input.cpp +++ b/src/parser/antlr_input.cpp @@ -2,8 +2,8 @@ /*! \file antlr_input.cpp ** \verbatim ** Original author: Christopher L. Conway - ** Major contributors: Morgan Deters - ** Minor contributors (to current version): Francois Bobot, Kshitij Bansal + ** Major contributors: Morgan Deters, Kshitij Bansal + ** Minor contributors (to current version): Francois Bobot ** This file is part of the CVC4 project. ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing diff --git a/src/parser/antlr_input.h b/src/parser/antlr_input.h index 8763e8451..a869fa1e8 100644 --- a/src/parser/antlr_input.h +++ b/src/parser/antlr_input.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): Tim King, Francois Bobot, Dejan Jovanovic ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/parser/antlr_line_buffered_input.cpp b/src/parser/antlr_line_buffered_input.cpp index a59fb3531..33589110f 100644 --- a/src/parser/antlr_line_buffered_input.cpp +++ b/src/parser/antlr_line_buffered_input.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/parser/antlr_line_buffered_input.h b/src/parser/antlr_line_buffered_input.h index a8522e49f..13a6486cd 100644 --- a/src/parser/antlr_line_buffered_input.h +++ b/src/parser/antlr_line_buffered_input.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/parser/antlr_tracing.h b/src/parser/antlr_tracing.h index 8fabb2db1..a94cd4f2f 100644 --- a/src/parser/antlr_tracing.h +++ b/src/parser/antlr_tracing.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/parser/bounded_token_buffer.cpp b/src/parser/bounded_token_buffer.cpp index 112d9b0ed..716639665 100644 --- a/src/parser/bounded_token_buffer.cpp +++ b/src/parser/bounded_token_buffer.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/parser/bounded_token_buffer.h b/src/parser/bounded_token_buffer.h index a0b7f5ea3..d11986754 100644 --- a/src/parser/bounded_token_buffer.h +++ b/src/parser/bounded_token_buffer.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/parser/bounded_token_factory.cpp b/src/parser/bounded_token_factory.cpp index 59fe5a2d4..7d130146f 100644 --- a/src/parser/bounded_token_factory.cpp +++ b/src/parser/bounded_token_factory.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/parser/bounded_token_factory.h b/src/parser/bounded_token_factory.h index c447700da..5e5e48fab 100644 --- a/src/parser/bounded_token_factory.h +++ b/src/parser/bounded_token_factory.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/parser/cvc/Cvc.g b/src/parser/cvc/Cvc.g index aa24ce9c4..18f9dd871 100644 --- a/src/parser/cvc/Cvc.g +++ b/src/parser/cvc/Cvc.g @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Christopher L. Conway ** Major contributors: Morgan Deters - ** Minor contributors (to current version): Tim King, Andrew Reynolds, Dejan Jovanovic + ** Minor contributors (to current version): Tim King, Dejan Jovanovic, Tianyi Liang, Andrew Reynolds ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/parser/cvc/cvc_input.cpp b/src/parser/cvc/cvc_input.cpp index 64c22b25a..38c33d007 100644 --- a/src/parser/cvc/cvc_input.cpp +++ b/src/parser/cvc/cvc_input.cpp @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/parser/cvc/cvc_input.h b/src/parser/cvc/cvc_input.h index 832eefe5d..46851bfd3 100644 --- a/src/parser/cvc/cvc_input.h +++ b/src/parser/cvc/cvc_input.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): Dejan Jovanovic ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/parser/input.cpp b/src/parser/input.cpp index 156a94e2e..53bf05064 100644 --- a/src/parser/input.cpp +++ b/src/parser/input.cpp @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): Dejan Jovanovic ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/parser/input.h b/src/parser/input.h index a05e93e23..312bc92f1 100644 --- a/src/parser/input.h +++ b/src/parser/input.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): Francois Bobot ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/parser/memory_mapped_input_buffer.cpp b/src/parser/memory_mapped_input_buffer.cpp index 27e37864d..9dcab2085 100644 --- a/src/parser/memory_mapped_input_buffer.cpp +++ b/src/parser/memory_mapped_input_buffer.cpp @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/parser/memory_mapped_input_buffer.h b/src/parser/memory_mapped_input_buffer.h index 2dd1f6ffd..bacd9cb0f 100644 --- a/src/parser/memory_mapped_input_buffer.h +++ b/src/parser/memory_mapped_input_buffer.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/parser/parser.cpp b/src/parser/parser.cpp index c40c352d9..064379cf3 100644 --- a/src/parser/parser.cpp +++ b/src/parser/parser.cpp @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Morgan Deters ** Major contributors: Christopher L. Conway - ** Minor contributors (to current version): Tim King, Dejan Jovanovic, Andrew Reynolds + ** Minor contributors (to current version): Tim King, Dejan Jovanovic, Kshitij Bansal, Andrew Reynolds ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/parser/parser.h b/src/parser/parser.h index 94636dd79..87a331711 100644 --- a/src/parser/parser.h +++ b/src/parser/parser.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Morgan Deters ** Major contributors: Christopher L. Conway - ** Minor contributors (to current version): Dejan Jovanovic, Francois Bobot, Andrew Reynolds + ** Minor contributors (to current version): Dejan Jovanovic, Kshitij Bansal, Francois Bobot, Andrew Reynolds ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/parser/parser_builder.cpp b/src/parser/parser_builder.cpp index c8171d180..b467acfeb 100644 --- a/src/parser/parser_builder.cpp +++ b/src/parser/parser_builder.cpp @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): Dejan Jovanovic, Francois Bobot ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/parser/parser_builder.h b/src/parser/parser_builder.h index 96590eb3e..71810bf7c 100644 --- a/src/parser/parser_builder.h +++ b/src/parser/parser_builder.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/parser/parser_exception.h b/src/parser/parser_exception.h index cf1bff1c0..3b211371c 100644 --- a/src/parser/parser_exception.h +++ b/src/parser/parser_exception.h @@ -5,7 +5,7 @@ ** Major contributors: Christopher L. Conway ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/parser/smt1/Smt1.g b/src/parser/smt1/Smt1.g index 156aa1591..ae06ddc01 100644 --- a/src/parser/smt1/Smt1.g +++ b/src/parser/smt1/Smt1.g @@ -5,7 +5,7 @@ ** Major contributors: Dejan Jovanovic, Christopher L. Conway ** Minor contributors (to current version): Andrew Reynolds, Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/parser/smt1/smt1.cpp b/src/parser/smt1/smt1.cpp index 73838e3cc..8d827b17e 100644 --- a/src/parser/smt1/smt1.cpp +++ b/src/parser/smt1/smt1.cpp @@ -5,7 +5,7 @@ ** Major contributors: Christopher L. Conway ** Minor contributors (to current version): Tim King, Tianyi Liang, Dejan Jovanovic, Clark Barrett ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/parser/smt1/smt1.h b/src/parser/smt1/smt1.h index c19b0f872..20ba0401c 100644 --- a/src/parser/smt1/smt1.h +++ b/src/parser/smt1/smt1.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Morgan Deters ** Major contributors: Christopher L. Conway - ** Minor contributors (to current version): Clark Barrett, Tianyi Liang + ** Minor contributors (to current version): Andrew Reynolds, Clark Barrett, Tianyi Liang ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/parser/smt1/smt1_input.cpp b/src/parser/smt1/smt1_input.cpp index be2420cad..6ac897078 100644 --- a/src/parser/smt1/smt1_input.cpp +++ b/src/parser/smt1/smt1_input.cpp @@ -5,7 +5,7 @@ ** Major contributors: Christopher L. Conway ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/parser/smt1/smt1_input.h b/src/parser/smt1/smt1_input.h index c303aea7b..0e95c192a 100644 --- a/src/parser/smt1/smt1_input.h +++ b/src/parser/smt1/smt1_input.h @@ -5,7 +5,7 @@ ** Major contributors: Christopher L. Conway ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/parser/smt2/Smt2.g b/src/parser/smt2/Smt2.g index 457c9c82f..085cc11c8 100644 --- a/src/parser/smt2/Smt2.g +++ b/src/parser/smt2/Smt2.g @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Christopher L. Conway ** Major contributors: Morgan Deters - ** Minor contributors (to current version): Dejan Jovanovic, Tianyi Liang, Andrew Reynolds, Francois Bobot + ** Minor contributors (to current version): Dejan Jovanovic, Kshitij Bansal, Tianyi Liang, Francois Bobot, Andrew Reynolds ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/parser/smt2/smt2.cpp b/src/parser/smt2/smt2.cpp index 0c4b1258f..fecccfa44 100644 --- a/src/parser/smt2/smt2.cpp +++ b/src/parser/smt2/smt2.cpp @@ -2,10 +2,10 @@ /*! \file smt2.cpp ** \verbatim ** Original author: Christopher L. Conway - ** Major contributors: Morgan Deters - ** Minor contributors (to current version): Clark Barrett, Tianyi Liang + ** Major contributors: Kshitij Bansal, Morgan Deters + ** Minor contributors (to current version): Andrew Reynolds, Clark Barrett, Tianyi Liang ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/parser/smt2/smt2.h b/src/parser/smt2/smt2.h index da68f334c..71161be94 100644 --- a/src/parser/smt2/smt2.h +++ b/src/parser/smt2/smt2.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Christopher L. Conway ** Major contributors: Morgan Deters - ** Minor contributors (to current version): Tianyi Liang + ** Minor contributors (to current version): Tianyi Liang, Kshitij Bansal ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/parser/smt2/smt2_input.cpp b/src/parser/smt2/smt2_input.cpp index 5b376a9b8..c1e177dc4 100644 --- a/src/parser/smt2/smt2_input.cpp +++ b/src/parser/smt2/smt2_input.cpp @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/parser/smt2/smt2_input.h b/src/parser/smt2/smt2_input.h index c7ff31ed4..b2244db4d 100644 --- a/src/parser/smt2/smt2_input.h +++ b/src/parser/smt2/smt2_input.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/parser/tptp/Tptp.g b/src/parser/tptp/Tptp.g index 8528fc0ab..62dcc70f5 100644 --- a/src/parser/tptp/Tptp.g +++ b/src/parser/tptp/Tptp.g @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/parser/tptp/tptp.cpp b/src/parser/tptp/tptp.cpp index 6546fd8f3..b674b12dc 100644 --- a/src/parser/tptp/tptp.cpp +++ b/src/parser/tptp/tptp.cpp @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/parser/tptp/tptp.h b/src/parser/tptp/tptp.h index 0981af42f..2cd8f4339 100644 --- a/src/parser/tptp/tptp.h +++ b/src/parser/tptp/tptp.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): Andrew Reynolds ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/parser/tptp/tptp_input.cpp b/src/parser/tptp/tptp_input.cpp index b41fcdd88..9274d1904 100644 --- a/src/parser/tptp/tptp_input.cpp +++ b/src/parser/tptp/tptp_input.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/parser/tptp/tptp_input.h b/src/parser/tptp/tptp_input.h index cb2bcd3a3..280a60536 100644 --- a/src/parser/tptp/tptp_input.h +++ b/src/parser/tptp/tptp_input.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/printer/ast/ast_printer.cpp b/src/printer/ast/ast_printer.cpp index 72bfa5603..9b60c8942 100644 --- a/src/printer/ast/ast_printer.cpp +++ b/src/printer/ast/ast_printer.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Dejan Jovanovic, Andrew Reynolds ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/printer/ast/ast_printer.h b/src/printer/ast/ast_printer.h index f09de9d00..ea425a16f 100644 --- a/src/printer/ast/ast_printer.h +++ b/src/printer/ast/ast_printer.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/printer/cvc/cvc_printer.cpp b/src/printer/cvc/cvc_printer.cpp index 8412ecc2c..2548c22ab 100644 --- a/src/printer/cvc/cvc_printer.cpp +++ b/src/printer/cvc/cvc_printer.cpp @@ -5,7 +5,7 @@ ** Major contributors: Dejan Jovanovic ** Minor contributors (to current version): Francois Bobot, Liana Hadarean, Clark Barrett, Tim King, Andrew Reynolds ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/printer/cvc/cvc_printer.h b/src/printer/cvc/cvc_printer.h index ec08b36b1..0809696c4 100644 --- a/src/printer/cvc/cvc_printer.h +++ b/src/printer/cvc/cvc_printer.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Dejan Jovanovic ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/printer/dagification_visitor.cpp b/src/printer/dagification_visitor.cpp index 091d216d8..5bb4af436 100644 --- a/src/printer/dagification_visitor.cpp +++ b/src/printer/dagification_visitor.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Andrew Reynolds ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/printer/dagification_visitor.h b/src/printer/dagification_visitor.h index e14da1cdb..99fa7db64 100644 --- a/src/printer/dagification_visitor.h +++ b/src/printer/dagification_visitor.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/printer/modes.cpp b/src/printer/modes.cpp index 4f7242318..01b7fc833 100644 --- a/src/printer/modes.cpp +++ b/src/printer/modes.cpp @@ -1,11 +1,11 @@ /********************* */ /*! \file modes.cpp ** \verbatim - ** Original author: Morgan Deters - ** Major contributors: Andrew Reynolds + ** Original author: Andrew Reynolds + ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/printer/modes.h b/src/printer/modes.h index 9673f791c..849e0d149 100644 --- a/src/printer/modes.h +++ b/src/printer/modes.h @@ -1,11 +1,11 @@ /********************* */ /*! \file modes.h ** \verbatim - ** Original author: Morgan Deters - ** Major contributors: Andrew Reynolds + ** Original author: Andrew Reynolds + ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/printer/options_handlers.h b/src/printer/options_handlers.h index 2a89a8d38..64b585a94 100644 --- a/src/printer/options_handlers.h +++ b/src/printer/options_handlers.h @@ -2,10 +2,10 @@ /*! \file options_handlers.h ** \verbatim ** Original author: Morgan Deters - ** Major contributors: none + ** Major contributors: Andrew Reynolds ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/printer/printer.cpp b/src/printer/printer.cpp index 24b9f274d..8f0f50daa 100644 --- a/src/printer/printer.cpp +++ b/src/printer/printer.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Francois Bobot, Andrew Reynolds ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/printer/printer.h b/src/printer/printer.h index 9ddac096d..beb2438e2 100644 --- a/src/printer/printer.h +++ b/src/printer/printer.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Andrew Reynolds ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/printer/smt1/smt1_printer.cpp b/src/printer/smt1/smt1_printer.cpp index c5c491cc0..474fe58dc 100644 --- a/src/printer/smt1/smt1_printer.cpp +++ b/src/printer/smt1/smt1_printer.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Andrew Reynolds ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/printer/smt1/smt1_printer.h b/src/printer/smt1/smt1_printer.h index 9faf76cc0..b13b894f0 100644 --- a/src/printer/smt1/smt1_printer.h +++ b/src/printer/smt1/smt1_printer.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/printer/smt2/smt2_printer.cpp b/src/printer/smt2/smt2_printer.cpp index 270e0dba0..421518fed 100644 --- a/src/printer/smt2/smt2_printer.cpp +++ b/src/printer/smt2/smt2_printer.cpp @@ -2,10 +2,10 @@ /*! \file smt2_printer.cpp ** \verbatim ** Original author: Morgan Deters - ** Major contributors: Andrew Reynolds - ** Minor contributors (to current version): Dejan Jovanovic, Tim King, Liana Hadarean, Francois Bobot + ** Major contributors: none + ** Minor contributors (to current version): Dejan Jovanovic, Tim King, Liana Hadarean, Kshitij Bansal, Tianyi Liang, Francois Bobot, Andrew Reynolds ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/printer/smt2/smt2_printer.h b/src/printer/smt2/smt2_printer.h index c3f8deb9c..e86b3cb2b 100644 --- a/src/printer/smt2/smt2_printer.h +++ b/src/printer/smt2/smt2_printer.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/printer/tptp/tptp_printer.cpp b/src/printer/tptp/tptp_printer.cpp index ec2a8758b..cce48ae47 100644 --- a/src/printer/tptp/tptp_printer.cpp +++ b/src/printer/tptp/tptp_printer.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/printer/tptp/tptp_printer.h b/src/printer/tptp/tptp_printer.h index a0f3de62b..bc0633822 100644 --- a/src/printer/tptp/tptp_printer.h +++ b/src/printer/tptp/tptp_printer.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/proof/cnf_proof.cpp b/src/proof/cnf_proof.cpp index 39e802b62..3dfb61428 100644 --- a/src/proof/cnf_proof.cpp +++ b/src/proof/cnf_proof.cpp @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/proof/cnf_proof.h b/src/proof/cnf_proof.h index 0a932f906..b2c35c4f7 100644 --- a/src/proof/cnf_proof.h +++ b/src/proof/cnf_proof.h @@ -2,10 +2,10 @@ /*! \file cnf_proof.h ** \verbatim ** Original author: Liana Hadarean - ** Major contributors: none - ** Minor contributors (to current version): Morgan Deters + ** Major contributors: Morgan Deters + ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/proof/proof.h b/src/proof/proof.h index e3b776cce..174913755 100644 --- a/src/proof/proof.h +++ b/src/proof/proof.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/proof/proof_manager.cpp b/src/proof/proof_manager.cpp index 14a82b17b..680e57d39 100644 --- a/src/proof/proof_manager.cpp +++ b/src/proof/proof_manager.cpp @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/proof/proof_manager.h b/src/proof/proof_manager.h index 02bc07847..f428de36d 100644 --- a/src/proof/proof_manager.h +++ b/src/proof/proof_manager.h @@ -2,10 +2,10 @@ /*! \file proof_manager.h ** \verbatim ** Original author: Liana Hadarean - ** Major contributors: none - ** Minor contributors (to current version): Morgan Deters + ** Major contributors: Morgan Deters + ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/proof/sat_proof.cpp b/src/proof/sat_proof.cpp index 3b5509ffb..0ace84b4d 100644 --- a/src/proof/sat_proof.cpp +++ b/src/proof/sat_proof.cpp @@ -2,10 +2,10 @@ /*! \file sat_proof.cpp ** \verbatim ** Original author: Liana Hadarean - ** Major contributors: none - ** Minor contributors (to current version): Morgan Deters + ** Major contributors: Morgan Deters + ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/proof/sat_proof.h b/src/proof/sat_proof.h index d555ca529..7795dfa9c 100644 --- a/src/proof/sat_proof.h +++ b/src/proof/sat_proof.h @@ -2,10 +2,10 @@ /*! \file sat_proof.h ** \verbatim ** Original author: Liana Hadarean - ** Major contributors: none - ** Minor contributors (to current version): Morgan Deters + ** Major contributors: Morgan Deters + ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/proof/theory_proof.cpp b/src/proof/theory_proof.cpp index 4ed00aaaa..52989d722 100644 --- a/src/proof/theory_proof.cpp +++ b/src/proof/theory_proof.cpp @@ -2,10 +2,10 @@ /*! \file theory_proof.cpp ** \verbatim ** Original author: Liana Hadarean - ** Major contributors: none + ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/proof/theory_proof.h b/src/proof/theory_proof.h index 0a7772a4b..d69ec5db9 100644 --- a/src/proof/theory_proof.h +++ b/src/proof/theory_proof.h @@ -2,10 +2,10 @@ /*! \file theory_proof.h ** \verbatim ** Original author: Liana Hadarean - ** Major contributors: none - ** Minor contributors (to current version): Morgan Deters + ** Major contributors: Morgan Deters + ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/prop/cnf_stream.cpp b/src/prop/cnf_stream.cpp index 3d2c29798..e0697735f 100644 --- a/src/prop/cnf_stream.cpp +++ b/src/prop/cnf_stream.cpp @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters, Dejan Jovanovic ** Minor contributors (to current version): Kshitij Bansal, Liana Hadarean, Christopher L. Conway ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/prop/cnf_stream.h b/src/prop/cnf_stream.h index 1c66be911..266362ef5 100644 --- a/src/prop/cnf_stream.h +++ b/src/prop/cnf_stream.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters, Dejan Jovanovic ** Minor contributors (to current version): Clark Barrett, Liana Hadarean, Christopher L. Conway ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/prop/options_handlers.h b/src/prop/options_handlers.h index 31d567ac4..8ed53a3f5 100644 --- a/src/prop/options_handlers.h +++ b/src/prop/options_handlers.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/prop/prop_engine.cpp b/src/prop/prop_engine.cpp index cb4a32ee7..82c0bae1a 100644 --- a/src/prop/prop_engine.cpp +++ b/src/prop/prop_engine.cpp @@ -5,7 +5,7 @@ ** Major contributors: Dejan Jovanovic ** Minor contributors (to current version): Clark Barrett, Liana Hadarean, Kshitij Bansal, Christopher L. Conway, Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/prop/prop_engine.h b/src/prop/prop_engine.h index 753890087..a5132e3da 100644 --- a/src/prop/prop_engine.h +++ b/src/prop/prop_engine.h @@ -5,7 +5,7 @@ ** Major contributors: Dejan Jovanovic ** Minor contributors (to current version): Clark Barrett, Liana Hadarean, Christopher L. Conway, Kshitij Bansal, Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/prop/sat_solver.h b/src/prop/sat_solver.h index 18a1dcf68..929b867c9 100644 --- a/src/prop/sat_solver.h +++ b/src/prop/sat_solver.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters, Liana Hadarean ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/prop/sat_solver_factory.cpp b/src/prop/sat_solver_factory.cpp index e937c718c..650c05dd4 100644 --- a/src/prop/sat_solver_factory.cpp +++ b/src/prop/sat_solver_factory.cpp @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Dejan Jovanovic ** Major contributors: Tim King - ** Minor contributors (to current version): Liana Hadarean + ** Minor contributors (to current version): Morgan Deters, Liana Hadarean ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/prop/sat_solver_factory.h b/src/prop/sat_solver_factory.h index 291609de7..0b419d545 100644 --- a/src/prop/sat_solver_factory.h +++ b/src/prop/sat_solver_factory.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Liana Hadarean, Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/prop/sat_solver_registry.cpp b/src/prop/sat_solver_registry.cpp index 111cd1836..7867c6cc3 100644 --- a/src/prop/sat_solver_registry.cpp +++ b/src/prop/sat_solver_registry.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/prop/sat_solver_registry.h b/src/prop/sat_solver_registry.h index 3a19bdb99..b8173866f 100644 --- a/src/prop/sat_solver_registry.h +++ b/src/prop/sat_solver_registry.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/prop/sat_solver_types.h b/src/prop/sat_solver_types.h index 2674c82b1..c47c2b67b 100644 --- a/src/prop/sat_solver_types.h +++ b/src/prop/sat_solver_types.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters, Liana Hadarean, Kshitij Bansal ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/prop/theory_proxy.cpp b/src/prop/theory_proxy.cpp index c9f19b42e..67325cb18 100644 --- a/src/prop/theory_proxy.cpp +++ b/src/prop/theory_proxy.cpp @@ -5,7 +5,7 @@ ** Major contributors: Kshitij Bansal, Morgan Deters ** Minor contributors (to current version): Clark Barrett, Christopher L. Conway, Tim King, Liana Hadarean ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/prop/theory_proxy.h b/src/prop/theory_proxy.h index f07f5487e..a962f653a 100644 --- a/src/prop/theory_proxy.h +++ b/src/prop/theory_proxy.h @@ -5,7 +5,7 @@ ** Major contributors: Liana Hadarean, Kshitij Bansal, Morgan Deters ** Minor contributors (to current version): Christopher L. Conway, Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/smt/boolean_terms.cpp b/src/smt/boolean_terms.cpp index c779af4ff..df5499c86 100644 --- a/src/smt/boolean_terms.cpp +++ b/src/smt/boolean_terms.cpp @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Morgan Deters ** Major contributors: none - ** Minor contributors (to current version): none + ** Minor contributors (to current version): Andrew Reynolds ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/smt/boolean_terms.h b/src/smt/boolean_terms.h index bdd9ff839..ed676c667 100644 --- a/src/smt/boolean_terms.h +++ b/src/smt/boolean_terms.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/smt/command_list.cpp b/src/smt/command_list.cpp index fca714490..18a09e7ed 100644 --- a/src/smt/command_list.cpp +++ b/src/smt/command_list.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/smt/command_list.h b/src/smt/command_list.h index ac0c382be..47185b365 100644 --- a/src/smt/command_list.h +++ b/src/smt/command_list.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/smt/logic_exception.h b/src/smt/logic_exception.h index 02c293ab4..8fda9b9e2 100644 --- a/src/smt/logic_exception.h +++ b/src/smt/logic_exception.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/smt/logic_request.cpp b/src/smt/logic_request.cpp index a0b6d2bb9..09559eb8d 100644 --- a/src/smt/logic_request.cpp +++ b/src/smt/logic_request.cpp @@ -1,3 +1,20 @@ +/********************* */ +/*! \file logic_request.cpp + ** \verbatim + ** Original author: Tim King + ** Major contributors: none + ** Minor contributors (to current version): none + ** This file is part of the CVC4 project. + ** Copyright (c) 2009-2014 New York University and The University of Iowa + ** See the file COPYING in the top-level source directory for licensing + ** information.\endverbatim + ** + ** \brief [[ Add one-line brief description here ]] + ** + ** [[ Add lengthier description here ]] + ** \todo document this file + **/ + #include "smt/logic_request.h" diff --git a/src/smt/logic_request.h b/src/smt/logic_request.h index 8aad440c6..94c6c2a5e 100644 --- a/src/smt/logic_request.h +++ b/src/smt/logic_request.h @@ -1,9 +1,9 @@ /********************* */ /*! \file logic_request.h ** \verbatim - ** Original author: Morgan Deters + ** Original author: Martin Brain <> ** Major contributors: none - ** Minor contributors (to current version): none + ** Minor contributors (to current version): Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing diff --git a/src/smt/modal_exception.h b/src/smt/modal_exception.h index bf463bb05..11e78ab19 100644 --- a/src/smt/modal_exception.h +++ b/src/smt/modal_exception.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/smt/model_postprocessor.cpp b/src/smt/model_postprocessor.cpp index 5a14924ff..eea8d2282 100644 --- a/src/smt/model_postprocessor.cpp +++ b/src/smt/model_postprocessor.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Andrew Reynolds ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/smt/model_postprocessor.h b/src/smt/model_postprocessor.h index 952bb1bf0..024f4f3a3 100644 --- a/src/smt/model_postprocessor.h +++ b/src/smt/model_postprocessor.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/smt/options_handlers.h b/src/smt/options_handlers.h index af8e8663c..61e17801d 100644 --- a/src/smt/options_handlers.h +++ b/src/smt/options_handlers.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Morgan Deters ** Major contributors: none - ** Minor contributors (to current version): Clark Barrett + ** Minor contributors (to current version): Clark Barrett, Liana Hadarean ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/smt/simplification_mode.cpp b/src/smt/simplification_mode.cpp index d3155313f..f728fa862 100644 --- a/src/smt/simplification_mode.cpp +++ b/src/smt/simplification_mode.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/smt/simplification_mode.h b/src/smt/simplification_mode.h index 6023bf518..2242e8bdf 100644 --- a/src/smt/simplification_mode.h +++ b/src/smt/simplification_mode.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/smt/smt_engine.cpp b/src/smt/smt_engine.cpp index 61fdfb8c0..7c5f98253 100644 --- a/src/smt/smt_engine.cpp +++ b/src/smt/smt_engine.cpp @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Morgan Deters ** Major contributors: Clark Barrett - ** Minor contributors (to current version): Tianyi Liang, Christopher L. Conway, Kshitij Bansal, Liana Hadarean, Dejan Jovanovic, Tim King, Andrew Reynolds + ** Minor contributors (to current version): Christopher L. Conway, Tianyi Liang, Martin Brain <>, Kshitij Bansal, Liana Hadarean, Dejan Jovanovic, Tim King, Andrew Reynolds ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/smt/smt_engine.h b/src/smt/smt_engine.h index acf7954bc..71b42534a 100644 --- a/src/smt/smt_engine.h +++ b/src/smt/smt_engine.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Morgan Deters ** Major contributors: none - ** Minor contributors (to current version): Andrew Reynolds, Tim King, Clark Barrett, Christopher L. Conway, Kshitij Bansal, Dejan Jovanovic + ** Minor contributors (to current version): Martin Brain <>, Tim King, Clark Barrett, Christopher L. Conway, Andrew Reynolds, Kshitij Bansal, Dejan Jovanovic ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/smt/smt_engine_check_proof.cpp b/src/smt/smt_engine_check_proof.cpp index 4c218b48c..2080c772a 100644 --- a/src/smt/smt_engine_check_proof.cpp +++ b/src/smt/smt_engine_check_proof.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/smt/smt_engine_scope.cpp b/src/smt/smt_engine_scope.cpp index 5a075280d..25004c85e 100644 --- a/src/smt/smt_engine_scope.cpp +++ b/src/smt/smt_engine_scope.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/smt/smt_engine_scope.h b/src/smt/smt_engine_scope.h index 2389181b5..54b9fa1d0 100644 --- a/src/smt/smt_engine_scope.h +++ b/src/smt/smt_engine_scope.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/smt/smt_options_template.cpp b/src/smt/smt_options_template.cpp index 987d2e3c7..376584636 100644 --- a/src/smt/smt_options_template.cpp +++ b/src/smt/smt_options_template.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/approx_simplex.cpp b/src/theory/arith/approx_simplex.cpp index 676c5cb25..860868df0 100644 --- a/src/theory/arith/approx_simplex.cpp +++ b/src/theory/arith/approx_simplex.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/approx_simplex.h b/src/theory/arith/approx_simplex.h index 15996fef8..808b64703 100644 --- a/src/theory/arith/approx_simplex.h +++ b/src/theory/arith/approx_simplex.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/arith_heuristic_pivot_rule.cpp b/src/theory/arith/arith_heuristic_pivot_rule.cpp index 8a1d2b557..8ef2385c7 100644 --- a/src/theory/arith/arith_heuristic_pivot_rule.cpp +++ b/src/theory/arith/arith_heuristic_pivot_rule.cpp @@ -5,7 +5,7 @@ ** Major contributors: Tim King ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/arith_heuristic_pivot_rule.h b/src/theory/arith/arith_heuristic_pivot_rule.h index 78313b81b..a64a7c846 100644 --- a/src/theory/arith/arith_heuristic_pivot_rule.h +++ b/src/theory/arith/arith_heuristic_pivot_rule.h @@ -5,7 +5,7 @@ ** Major contributors: Tim King ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/arith_ite_utils.cpp b/src/theory/arith/arith_ite_utils.cpp index fa631a527..757dab8fb 100644 --- a/src/theory/arith/arith_ite_utils.cpp +++ b/src/theory/arith/arith_ite_utils.cpp @@ -1,3 +1,20 @@ +/********************* */ +/*! \file arith_ite_utils.cpp + ** \verbatim + ** Original author: Tim King + ** Major contributors: none + ** Minor contributors (to current version): Kshitij Bansal + ** This file is part of the CVC4 project. + ** Copyright (c) 2009-2014 New York University and The University of Iowa + ** See the file COPYING in the top-level source directory for licensing + ** information.\endverbatim + ** + ** \brief [[ Add one-line brief description here ]] + ** + ** [[ Add lengthier description here ]] + ** \todo document this file + **/ + #include "theory/arith/arith_ite_utils.h" #include "theory/arith/normal_form.h" #include "theory/arith/arith_utilities.h" diff --git a/src/theory/arith/arith_ite_utils.h b/src/theory/arith/arith_ite_utils.h index 5bdcd52da..84948cd4b 100644 --- a/src/theory/arith/arith_ite_utils.h +++ b/src/theory/arith/arith_ite_utils.h @@ -1,3 +1,20 @@ +/********************* */ +/*! \file arith_ite_utils.h + ** \verbatim + ** Original author: Tim King + ** Major contributors: none + ** Minor contributors (to current version): none + ** This file is part of the CVC4 project. + ** Copyright (c) 2009-2014 New York University and The University of Iowa + ** See the file COPYING in the top-level source directory for licensing + ** information.\endverbatim + ** + ** \brief [[ Add one-line brief description here ]] + ** + ** [[ Add lengthier description here ]] + ** \todo document this file + **/ + diff --git a/src/theory/arith/arith_propagation_mode.cpp b/src/theory/arith/arith_propagation_mode.cpp index 23ca96056..119761906 100644 --- a/src/theory/arith/arith_propagation_mode.cpp +++ b/src/theory/arith/arith_propagation_mode.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/arith_propagation_mode.h b/src/theory/arith/arith_propagation_mode.h index 97867043f..fe8f8c9cc 100644 --- a/src/theory/arith/arith_propagation_mode.h +++ b/src/theory/arith/arith_propagation_mode.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/arith_rewriter.cpp b/src/theory/arith/arith_rewriter.cpp index 1d9abc38b..a85fd024f 100644 --- a/src/theory/arith/arith_rewriter.cpp +++ b/src/theory/arith/arith_rewriter.cpp @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): Dejan Jovanovic ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/arith_rewriter.h b/src/theory/arith/arith_rewriter.h index 91b4099ab..abc25b4af 100644 --- a/src/theory/arith/arith_rewriter.h +++ b/src/theory/arith/arith_rewriter.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters, Dejan Jovanovic ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/arith_static_learner.cpp b/src/theory/arith/arith_static_learner.cpp index b9260c906..a7767e38b 100644 --- a/src/theory/arith/arith_static_learner.cpp +++ b/src/theory/arith/arith_static_learner.cpp @@ -2,10 +2,10 @@ /*! \file arith_static_learner.cpp ** \verbatim ** Original author: Tim King - ** Major contributors: Morgan Deters, Dejan Jovanovic - ** Minor contributors (to current version): none + ** Major contributors: Dejan Jovanovic + ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/arith_static_learner.h b/src/theory/arith/arith_static_learner.h index 2615cdcd6..7a1a1a6db 100644 --- a/src/theory/arith/arith_static_learner.h +++ b/src/theory/arith/arith_static_learner.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): Dejan Jovanovic ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/arith_unate_lemma_mode.cpp b/src/theory/arith/arith_unate_lemma_mode.cpp index ec7e81cf3..bb6066bb4 100644 --- a/src/theory/arith/arith_unate_lemma_mode.cpp +++ b/src/theory/arith/arith_unate_lemma_mode.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/arith_unate_lemma_mode.h b/src/theory/arith/arith_unate_lemma_mode.h index 212ea85b1..5e1362bcb 100644 --- a/src/theory/arith/arith_unate_lemma_mode.h +++ b/src/theory/arith/arith_unate_lemma_mode.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/arith_utilities.h b/src/theory/arith/arith_utilities.h index f78893324..9d32916cc 100644 --- a/src/theory/arith/arith_utilities.h +++ b/src/theory/arith/arith_utilities.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Dejan Jovanovic, Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/arithvar.cpp b/src/theory/arith/arithvar.cpp index d035dde2b..9a7878750 100644 --- a/src/theory/arith/arithvar.cpp +++ b/src/theory/arith/arithvar.cpp @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/arithvar.h b/src/theory/arith/arithvar.h index 66b68339d..00545fb48 100644 --- a/src/theory/arith/arithvar.h +++ b/src/theory/arith/arithvar.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/arithvar_node_map.h b/src/theory/arith/arithvar_node_map.h index 552beb82c..ede29017b 100644 --- a/src/theory/arith/arithvar_node_map.h +++ b/src/theory/arith/arithvar_node_map.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): Dejan Jovanovic ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/attempt_solution_simplex.cpp b/src/theory/arith/attempt_solution_simplex.cpp index 01137a33c..5b92a8809 100644 --- a/src/theory/arith/attempt_solution_simplex.cpp +++ b/src/theory/arith/attempt_solution_simplex.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/attempt_solution_simplex.h b/src/theory/arith/attempt_solution_simplex.h index 6e2d86f8a..4d94169c9 100644 --- a/src/theory/arith/attempt_solution_simplex.h +++ b/src/theory/arith/attempt_solution_simplex.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Tim King ** Major contributors: none - ** Minor contributors (to current version): none + ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/bound_counts.h b/src/theory/arith/bound_counts.h index d3793432d..472eff883 100644 --- a/src/theory/arith/bound_counts.h +++ b/src/theory/arith/bound_counts.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/callbacks.cpp b/src/theory/arith/callbacks.cpp index c4b64682f..68bf3bbae 100644 --- a/src/theory/arith/callbacks.cpp +++ b/src/theory/arith/callbacks.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/callbacks.h b/src/theory/arith/callbacks.h index c4c79ad75..f0e314bfb 100644 --- a/src/theory/arith/callbacks.h +++ b/src/theory/arith/callbacks.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/congruence_manager.cpp b/src/theory/arith/congruence_manager.cpp index d1d11c86e..f2874f075 100644 --- a/src/theory/arith/congruence_manager.cpp +++ b/src/theory/arith/congruence_manager.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters, Dejan Jovanovic ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/congruence_manager.h b/src/theory/arith/congruence_manager.h index 8e369ff9a..b0fa8f6f4 100644 --- a/src/theory/arith/congruence_manager.h +++ b/src/theory/arith/congruence_manager.h @@ -2,10 +2,10 @@ /*! \file congruence_manager.h ** \verbatim ** Original author: Tim King - ** Major contributors: Dejan Jovanovic - ** Minor contributors (to current version): Morgan Deters + ** Major contributors: none + ** Minor contributors (to current version): Dejan Jovanovic, Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/constraint.cpp b/src/theory/arith/constraint.cpp index acbd4a04b..5e3808fc7 100644 --- a/src/theory/arith/constraint.cpp +++ b/src/theory/arith/constraint.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Dejan Jovanovic, Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/constraint.h b/src/theory/arith/constraint.h index 18e53660f..badb97bdd 100644 --- a/src/theory/arith/constraint.h +++ b/src/theory/arith/constraint.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/constraint_forward.h b/src/theory/arith/constraint_forward.h index 19326c0b3..c9a630984 100644 --- a/src/theory/arith/constraint_forward.h +++ b/src/theory/arith/constraint_forward.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/cut_log.cpp b/src/theory/arith/cut_log.cpp index f933516ba..d855caee8 100644 --- a/src/theory/arith/cut_log.cpp +++ b/src/theory/arith/cut_log.cpp @@ -1,3 +1,20 @@ +/********************* */ +/*! \file cut_log.cpp + ** \verbatim + ** Original author: Tim King + ** Major contributors: none + ** Minor contributors (to current version): none + ** This file is part of the CVC4 project. + ** Copyright (c) 2009-2014 New York University and The University of Iowa + ** See the file COPYING in the top-level source directory for licensing + ** information.\endverbatim + ** + ** \brief [[ Add one-line brief description here ]] + ** + ** [[ Add lengthier description here ]] + ** \todo document this file + **/ + #include "cvc4autoconfig.h" diff --git a/src/theory/arith/cut_log.h b/src/theory/arith/cut_log.h index 237a4ce2b..9ce017488 100644 --- a/src/theory/arith/cut_log.h +++ b/src/theory/arith/cut_log.h @@ -1,3 +1,20 @@ +/********************* */ +/*! \file cut_log.h + ** \verbatim + ** Original author: Tim King + ** Major contributors: none + ** Minor contributors (to current version): Kshitij Bansal, Morgan Deters + ** This file is part of the CVC4 project. + ** Copyright (c) 2009-2014 New York University and The University of Iowa + ** See the file COPYING in the top-level source directory for licensing + ** information.\endverbatim + ** + ** \brief [[ Add one-line brief description here ]] + ** + ** [[ Add lengthier description here ]] + ** \todo document this file + **/ + #include "cvc4_private.h" diff --git a/src/theory/arith/delta_rational.cpp b/src/theory/arith/delta_rational.cpp index 811658df8..550e4b503 100644 --- a/src/theory/arith/delta_rational.cpp +++ b/src/theory/arith/delta_rational.cpp @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/delta_rational.h b/src/theory/arith/delta_rational.h index c2924f239..a9d919c21 100644 --- a/src/theory/arith/delta_rational.h +++ b/src/theory/arith/delta_rational.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Dejan Jovanovic, Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/dio_solver.cpp b/src/theory/arith/dio_solver.cpp index c9f9df727..36208ff8d 100644 --- a/src/theory/arith/dio_solver.cpp +++ b/src/theory/arith/dio_solver.cpp @@ -5,7 +5,7 @@ ** Major contributors: Tim King ** Minor contributors (to current version): Dejan Jovanovic ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/dio_solver.h b/src/theory/arith/dio_solver.h index 32b8382fa..9b96acf48 100644 --- a/src/theory/arith/dio_solver.h +++ b/src/theory/arith/dio_solver.h @@ -5,7 +5,7 @@ ** Major contributors: Tim King ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/dual_simplex.cpp b/src/theory/arith/dual_simplex.cpp index b5acb9149..234b33e97 100644 --- a/src/theory/arith/dual_simplex.cpp +++ b/src/theory/arith/dual_simplex.cpp @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Tim King ** Major contributors: none - ** Minor contributors (to current version): none + ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/dual_simplex.h b/src/theory/arith/dual_simplex.h index 9d2152800..53f627081 100644 --- a/src/theory/arith/dual_simplex.h +++ b/src/theory/arith/dual_simplex.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Tim King ** Major contributors: none - ** Minor contributors (to current version): none + ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/error_set.cpp b/src/theory/arith/error_set.cpp index 4a63b1a6a..14da973d8 100644 --- a/src/theory/arith/error_set.cpp +++ b/src/theory/arith/error_set.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/error_set.h b/src/theory/arith/error_set.h index cff6807c4..5843e0f7b 100644 --- a/src/theory/arith/error_set.h +++ b/src/theory/arith/error_set.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/fc_simplex.cpp b/src/theory/arith/fc_simplex.cpp index 70a322959..d21bb8f8b 100644 --- a/src/theory/arith/fc_simplex.cpp +++ b/src/theory/arith/fc_simplex.cpp @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Tim King ** Major contributors: none - ** Minor contributors (to current version): none + ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/fc_simplex.h b/src/theory/arith/fc_simplex.h index 2397ccdba..b6c0c4f62 100644 --- a/src/theory/arith/fc_simplex.h +++ b/src/theory/arith/fc_simplex.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/linear_equality.cpp b/src/theory/arith/linear_equality.cpp index f4c1ae10c..2aeee696e 100644 --- a/src/theory/arith/linear_equality.cpp +++ b/src/theory/arith/linear_equality.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/linear_equality.h b/src/theory/arith/linear_equality.h index 804ad29ac..5e325d799 100644 --- a/src/theory/arith/linear_equality.h +++ b/src/theory/arith/linear_equality.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/matrix.cpp b/src/theory/arith/matrix.cpp index b8bd68488..9ace1d3d1 100644 --- a/src/theory/arith/matrix.cpp +++ b/src/theory/arith/matrix.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/matrix.h b/src/theory/arith/matrix.h index 084281c04..73235d490 100644 --- a/src/theory/arith/matrix.h +++ b/src/theory/arith/matrix.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/normal_form.cpp b/src/theory/arith/normal_form.cpp index 5334abbbf..c5ad46dfc 100644 --- a/src/theory/arith/normal_form.cpp +++ b/src/theory/arith/normal_form.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Dejan Jovanovic, Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/normal_form.h b/src/theory/arith/normal_form.h index 1a3327e8f..ac5ce10e5 100644 --- a/src/theory/arith/normal_form.h +++ b/src/theory/arith/normal_form.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Dejan Jovanovic, Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/options_handlers.h b/src/theory/arith/options_handlers.h index 038baf79d..57b9661ba 100644 --- a/src/theory/arith/options_handlers.h +++ b/src/theory/arith/options_handlers.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Morgan Deters ** Major contributors: none - ** Minor contributors (to current version): Tim King + ** Minor contributors (to current version): Kshitij Bansal, Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/partial_model.cpp b/src/theory/arith/partial_model.cpp index 8f08de36c..cb853953f 100644 --- a/src/theory/arith/partial_model.cpp +++ b/src/theory/arith/partial_model.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/partial_model.h b/src/theory/arith/partial_model.h index 33af3d4ef..1e6f2f5ab 100644 --- a/src/theory/arith/partial_model.h +++ b/src/theory/arith/partial_model.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/simplex.cpp b/src/theory/arith/simplex.cpp index e67f4b9fc..b37f24d14 100644 --- a/src/theory/arith/simplex.cpp +++ b/src/theory/arith/simplex.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/simplex.h b/src/theory/arith/simplex.h index f545da51e..91e6e4244 100644 --- a/src/theory/arith/simplex.h +++ b/src/theory/arith/simplex.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/simplex_update.cpp b/src/theory/arith/simplex_update.cpp index 416fbe745..14bdc9a69 100644 --- a/src/theory/arith/simplex_update.cpp +++ b/src/theory/arith/simplex_update.cpp @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Tim King ** Major contributors: none - ** Minor contributors (to current version): none + ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/simplex_update.h b/src/theory/arith/simplex_update.h index e223bba7f..1a5c42188 100644 --- a/src/theory/arith/simplex_update.h +++ b/src/theory/arith/simplex_update.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/soi_simplex.cpp b/src/theory/arith/soi_simplex.cpp index ded322f18..34f911b81 100644 --- a/src/theory/arith/soi_simplex.cpp +++ b/src/theory/arith/soi_simplex.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/soi_simplex.h b/src/theory/arith/soi_simplex.h index 89df69390..d9f6e9707 100644 --- a/src/theory/arith/soi_simplex.h +++ b/src/theory/arith/soi_simplex.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/tableau.cpp b/src/theory/arith/tableau.cpp index 22fbf8713..ea0bec095 100644 --- a/src/theory/arith/tableau.cpp +++ b/src/theory/arith/tableau.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/tableau.h b/src/theory/arith/tableau.h index 8cf92d075..c6750f61b 100644 --- a/src/theory/arith/tableau.h +++ b/src/theory/arith/tableau.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/tableau_sizes.cpp b/src/theory/arith/tableau_sizes.cpp index bc0aa4dcd..fdd9ff16a 100644 --- a/src/theory/arith/tableau_sizes.cpp +++ b/src/theory/arith/tableau_sizes.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/tableau_sizes.h b/src/theory/arith/tableau_sizes.h index 66b091fab..fd62e71a2 100644 --- a/src/theory/arith/tableau_sizes.h +++ b/src/theory/arith/tableau_sizes.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/theory_arith.cpp b/src/theory/arith/theory_arith.cpp index 74453d985..7b5b40c8b 100644 --- a/src/theory/arith/theory_arith.cpp +++ b/src/theory/arith/theory_arith.cpp @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Tim King ** Major contributors: Morgan Deters - ** Minor contributors (to current version): Andrew Reynolds, Tianyi Liang, Dejan Jovanovic + ** Minor contributors (to current version): Andrew Reynolds, Martin Brain <>, Tianyi Liang, Dejan Jovanovic ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/theory_arith.h b/src/theory/arith/theory_arith.h index 56a8d9b60..a0a8e2c89 100644 --- a/src/theory/arith/theory_arith.h +++ b/src/theory/arith/theory_arith.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Morgan Deters ** Major contributors: Dejan Jovanovic, Tim King - ** Minor contributors (to current version): Tianyi Liang, Andrew Reynolds + ** Minor contributors (to current version): Martin Brain <>, Tianyi Liang, Andrew Reynolds ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/theory_arith_private.cpp b/src/theory/arith/theory_arith_private.cpp index d3178c34f..220737d2e 100644 --- a/src/theory/arith/theory_arith_private.cpp +++ b/src/theory/arith/theory_arith_private.cpp @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Tim King ** Major contributors: none - ** Minor contributors (to current version): Andrew Reynolds, Tianyi Liang, Morgan Deters + ** Minor contributors (to current version): Andrew Reynolds, Tianyi Liang, Kshitij Bansal, Martin Brain <>, Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/theory_arith_private.h b/src/theory/arith/theory_arith_private.h index 035d41989..ff89945b8 100644 --- a/src/theory/arith/theory_arith_private.h +++ b/src/theory/arith/theory_arith_private.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Tim King ** Major contributors: none - ** Minor contributors (to current version): Andrew Reynolds, Tianyi Liang, Morgan Deters + ** Minor contributors (to current version): Andrew Reynolds, Tianyi Liang, Morgan Deters, Martin Brain <> ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/theory_arith_private_forward.h b/src/theory/arith/theory_arith_private_forward.h index 62980d83d..10b954c7d 100644 --- a/src/theory/arith/theory_arith_private_forward.h +++ b/src/theory/arith/theory_arith_private_forward.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/theory_arith_type_rules.h b/src/theory/arith/theory_arith_type_rules.h index 70f55c476..d1cd435a2 100644 --- a/src/theory/arith/theory_arith_type_rules.h +++ b/src/theory/arith/theory_arith_type_rules.h @@ -5,7 +5,7 @@ ** Major contributors: Christopher L. Conway, Morgan Deters ** Minor contributors (to current version): Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arith/type_enumerator.h b/src/theory/arith/type_enumerator.h index 30cfe20cd..f661e18d3 100644 --- a/src/theory/arith/type_enumerator.h +++ b/src/theory/arith/type_enumerator.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arrays/array_info.cpp b/src/theory/arrays/array_info.cpp index 293713aab..dc907ba0b 100644 --- a/src/theory/arrays/array_info.cpp +++ b/src/theory/arrays/array_info.cpp @@ -5,7 +5,7 @@ ** Major contributors: Clark Barrett ** Minor contributors (to current version): Dejan Jovanovic ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arrays/array_info.h b/src/theory/arrays/array_info.h index 0a2a96603..09230bba7 100644 --- a/src/theory/arrays/array_info.h +++ b/src/theory/arrays/array_info.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Dejan Jovanovic, Clark Barrett ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arrays/static_fact_manager.cpp b/src/theory/arrays/static_fact_manager.cpp index cc9bd9991..1743e3b30 100644 --- a/src/theory/arrays/static_fact_manager.cpp +++ b/src/theory/arrays/static_fact_manager.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arrays/static_fact_manager.h b/src/theory/arrays/static_fact_manager.h index 74011ad92..220bd0437 100644 --- a/src/theory/arrays/static_fact_manager.h +++ b/src/theory/arrays/static_fact_manager.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arrays/theory_arrays.cpp b/src/theory/arrays/theory_arrays.cpp index caeae891f..e73c059d4 100644 --- a/src/theory/arrays/theory_arrays.cpp +++ b/src/theory/arrays/theory_arrays.cpp @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Clark Barrett ** Major contributors: Morgan Deters - ** Minor contributors (to current version): Tim King, Andrew Reynolds, Dejan Jovanovic + ** Minor contributors (to current version): Tim King, Kshitij Bansal, Andrew Reynolds, Dejan Jovanovic ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arrays/theory_arrays.h b/src/theory/arrays/theory_arrays.h index a4029dc2e..9e9d3c890 100644 --- a/src/theory/arrays/theory_arrays.h +++ b/src/theory/arrays/theory_arrays.h @@ -5,7 +5,7 @@ ** Major contributors: Dejan Jovanovic, Clark Barrett ** Minor contributors (to current version): Tim King, Andrew Reynolds ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arrays/theory_arrays_rewriter.cpp b/src/theory/arrays/theory_arrays_rewriter.cpp index d926cd7a2..01a7a9584 100644 --- a/src/theory/arrays/theory_arrays_rewriter.cpp +++ b/src/theory/arrays/theory_arrays_rewriter.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arrays/theory_arrays_rewriter.h b/src/theory/arrays/theory_arrays_rewriter.h index 388769412..7753e11b9 100644 --- a/src/theory/arrays/theory_arrays_rewriter.h +++ b/src/theory/arrays/theory_arrays_rewriter.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters, Clark Barrett ** Minor contributors (to current version): Andrew Reynolds ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arrays/theory_arrays_type_rules.h b/src/theory/arrays/theory_arrays_type_rules.h index 9f7bdfd4a..6cb31e51a 100644 --- a/src/theory/arrays/theory_arrays_type_rules.h +++ b/src/theory/arrays/theory_arrays_type_rules.h @@ -5,7 +5,7 @@ ** Major contributors: Clark Barrett ** Minor contributors (to current version): Christopher L. Conway ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arrays/type_enumerator.h b/src/theory/arrays/type_enumerator.h index bde7eef85..2c6fc56ab 100644 --- a/src/theory/arrays/type_enumerator.h +++ b/src/theory/arrays/type_enumerator.h @@ -5,7 +5,7 @@ ** Major contributors: Clark Barrett ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arrays/union_find.cpp b/src/theory/arrays/union_find.cpp index 78305f00a..9e6978c92 100644 --- a/src/theory/arrays/union_find.cpp +++ b/src/theory/arrays/union_find.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/arrays/union_find.h b/src/theory/arrays/union_find.h index 29e7c82c0..aef2b8007 100644 --- a/src/theory/arrays/union_find.h +++ b/src/theory/arrays/union_find.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/atom_requests.cpp b/src/theory/atom_requests.cpp index b84b59d14..22ae054a3 100644 --- a/src/theory/atom_requests.cpp +++ b/src/theory/atom_requests.cpp @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/atom_requests.h b/src/theory/atom_requests.h index 689d2745b..313a50730 100644 --- a/src/theory/atom_requests.h +++ b/src/theory/atom_requests.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/booleans/boolean_term_conversion_mode.cpp b/src/theory/booleans/boolean_term_conversion_mode.cpp index 958fd3f23..b8647eb3c 100644 --- a/src/theory/booleans/boolean_term_conversion_mode.cpp +++ b/src/theory/booleans/boolean_term_conversion_mode.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/booleans/boolean_term_conversion_mode.h b/src/theory/booleans/boolean_term_conversion_mode.h index c40684bbc..5671dea13 100644 --- a/src/theory/booleans/boolean_term_conversion_mode.h +++ b/src/theory/booleans/boolean_term_conversion_mode.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/booleans/circuit_propagator.cpp b/src/theory/booleans/circuit_propagator.cpp index 834b094f3..cd6b8dc53 100644 --- a/src/theory/booleans/circuit_propagator.cpp +++ b/src/theory/booleans/circuit_propagator.cpp @@ -5,7 +5,7 @@ ** Major contributors: Dejan Jovanovic ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/booleans/circuit_propagator.h b/src/theory/booleans/circuit_propagator.h index 360efea80..7dbef4041 100644 --- a/src/theory/booleans/circuit_propagator.h +++ b/src/theory/booleans/circuit_propagator.h @@ -5,7 +5,7 @@ ** Major contributors: Dejan Jovanovic ** Minor contributors (to current version): Tim King, Clark Barrett ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/booleans/options_handlers.h b/src/theory/booleans/options_handlers.h index 614003047..8cad689eb 100644 --- a/src/theory/booleans/options_handlers.h +++ b/src/theory/booleans/options_handlers.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/booleans/theory_bool.cpp b/src/theory/booleans/theory_bool.cpp index a0179c117..8e1661e28 100644 --- a/src/theory/booleans/theory_bool.cpp +++ b/src/theory/booleans/theory_bool.cpp @@ -5,7 +5,7 @@ ** Major contributors: Dejan Jovanovic ** Minor contributors (to current version): Clark Barrett ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/booleans/theory_bool.h b/src/theory/booleans/theory_bool.h index a8c904fe3..a4a3757cd 100644 --- a/src/theory/booleans/theory_bool.h +++ b/src/theory/booleans/theory_bool.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Dejan Jovanovic ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/booleans/theory_bool_rewriter.cpp b/src/theory/booleans/theory_bool_rewriter.cpp index b243627b2..05bb99680 100644 --- a/src/theory/booleans/theory_bool_rewriter.cpp +++ b/src/theory/booleans/theory_bool_rewriter.cpp @@ -5,7 +5,7 @@ ** Major contributors: Kshitij Bansal, Tim King ** Minor contributors (to current version): Morgan Deters, Clark Barrett ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/booleans/theory_bool_rewriter.h b/src/theory/booleans/theory_bool_rewriter.h index ccf7deecf..f0f0afe87 100644 --- a/src/theory/booleans/theory_bool_rewriter.h +++ b/src/theory/booleans/theory_bool_rewriter.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/booleans/theory_bool_type_rules.h b/src/theory/booleans/theory_bool_type_rules.h index 38c394622..d2836c85e 100644 --- a/src/theory/booleans/theory_bool_type_rules.h +++ b/src/theory/booleans/theory_bool_type_rules.h @@ -5,7 +5,7 @@ ** Major contributors: Christopher L. Conway, Morgan Deters ** Minor contributors (to current version): Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/booleans/type_enumerator.h b/src/theory/booleans/type_enumerator.h index ff0d50ee0..34b1401e8 100644 --- a/src/theory/booleans/type_enumerator.h +++ b/src/theory/booleans/type_enumerator.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/builtin/theory_builtin.cpp b/src/theory/builtin/theory_builtin.cpp index d02c9ace1..07761b72e 100644 --- a/src/theory/builtin/theory_builtin.cpp +++ b/src/theory/builtin/theory_builtin.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/builtin/theory_builtin.h b/src/theory/builtin/theory_builtin.h index 3bc0a2ce1..fa6e8ab5c 100644 --- a/src/theory/builtin/theory_builtin.h +++ b/src/theory/builtin/theory_builtin.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/builtin/theory_builtin_rewriter.cpp b/src/theory/builtin/theory_builtin_rewriter.cpp index 392e146ba..516d6a06b 100644 --- a/src/theory/builtin/theory_builtin_rewriter.cpp +++ b/src/theory/builtin/theory_builtin_rewriter.cpp @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/builtin/theory_builtin_rewriter.h b/src/theory/builtin/theory_builtin_rewriter.h index a76bafe81..83df76d66 100644 --- a/src/theory/builtin/theory_builtin_rewriter.h +++ b/src/theory/builtin/theory_builtin_rewriter.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/builtin/theory_builtin_type_rules.h b/src/theory/builtin/theory_builtin_type_rules.h index aba194d95..045f440e6 100644 --- a/src/theory/builtin/theory_builtin_type_rules.h +++ b/src/theory/builtin/theory_builtin_type_rules.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Morgan Deters ** Major contributors: none - ** Minor contributors (to current version): Tim King, Andrew Reynolds, Christopher L. Conway, Dejan Jovanovic + ** Minor contributors (to current version): Kshitij Bansal, Tim King, Christopher L. Conway, Andrew Reynolds, Dejan Jovanovic ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/builtin/type_enumerator.h b/src/theory/builtin/type_enumerator.h index 21eca0b21..c9585c46f 100644 --- a/src/theory/builtin/type_enumerator.h +++ b/src/theory/builtin/type_enumerator.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/bv/abstraction.cpp b/src/theory/bv/abstraction.cpp index 3bff9fc95..c414ac749 100644 --- a/src/theory/bv/abstraction.cpp +++ b/src/theory/bv/abstraction.cpp @@ -1,19 +1,17 @@ /********************* */ /*! \file abstraction.cpp -** \verbatim -** Original author: Liana Hadarean -** Major contributors: none. -** Minor contributors (to current version): none. -** This file is part of the CVC4 project. -** Copyright (c) 2009-2013 New York University and The University of Iowa -** See the file COPYING in the top-level source directory for licensing -** information.\endverbatim -** -** \brief [[ Add one-line brief description here ]] -** -** [[ Add lengthier description here ]] -** \todo document this file -**/ + ** \verbatim + ** Original author: Liana Hadarean + ** Major contributors: none + ** Minor contributors (to current version): none + ** This file is part of the CVC4 project. + ** Copyright (c) 2009-2014 New York University and The University of Iowa + ** See the file COPYING in the top-level source directory for licensing + ** information.\endverbatim + ** + ** [[ Add lengthier description here ]] + ** \todo document this file + **/ #include "theory/bv/abstraction.h" #include "theory/bv/theory_bv_utils.h" diff --git a/src/theory/bv/abstraction.h b/src/theory/bv/abstraction.h index cd4c443a7..2e86c834d 100644 --- a/src/theory/bv/abstraction.h +++ b/src/theory/bv/abstraction.h @@ -1,11 +1,11 @@ - /********************* */ +/********************* */ /*! \file abstraction.h ** \verbatim ** Original author: Liana Hadarean - ** Major contributors: none. - ** Minor contributors (to current version): none. + ** Major contributors: none + ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/bv/aig_bitblaster.cpp b/src/theory/bv/aig_bitblaster.cpp index 70d69a138..ce775874f 100644 --- a/src/theory/bv/aig_bitblaster.cpp +++ b/src/theory/bv/aig_bitblaster.cpp @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Liana Hadarean ** Major contributors: none - ** Minor contributors (to current version): lianah + ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/bv/bitblast_mode.cpp b/src/theory/bv/bitblast_mode.cpp index 91a140539..51c0290af 100644 --- a/src/theory/bv/bitblast_mode.cpp +++ b/src/theory/bv/bitblast_mode.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/bv/bitblast_mode.h b/src/theory/bv/bitblast_mode.h index 318e17467..89ecdc381 100644 --- a/src/theory/bv/bitblast_mode.h +++ b/src/theory/bv/bitblast_mode.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/bv/bitblast_strategies_template.h b/src/theory/bv/bitblast_strategies_template.h index fba744d69..62c92c0a8 100644 --- a/src/theory/bv/bitblast_strategies_template.h +++ b/src/theory/bv/bitblast_strategies_template.h @@ -1,11 +1,11 @@ /********************* */ -/*! \file bitblast_strategies.h +/*! \file bitblast_strategies_template.h ** \verbatim ** Original author: Liana Hadarean - ** Major contributors: Liana Hadarean - ** Minor contributors (to current version): Clark Barrett, Dejan Jovanovic, Morgan Deters, Tim King + ** Major contributors: none + ** Minor contributors (to current version): Morgan Deters, Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/bv/bitblast_utils.h b/src/theory/bv/bitblast_utils.h index 91cc2d640..a236c69e8 100644 --- a/src/theory/bv/bitblast_utils.h +++ b/src/theory/bv/bitblast_utils.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Liana Hadarean ** Major contributors: none - ** Minor contributors (to current version): none. + ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/bv/bitblaster_template.h b/src/theory/bv/bitblaster_template.h index 2b6037a12..ecd7013c7 100644 --- a/src/theory/bv/bitblaster_template.h +++ b/src/theory/bv/bitblaster_template.h @@ -1,11 +1,11 @@ /********************* */ -/*! \file bitblaster.h +/*! \file bitblaster_template.h ** \verbatim ** Original author: Liana Hadarean ** Major contributors: none - ** Minor contributors (to current version): lianah, Morgan Deters, Dejan Jovanovic + ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/bv/bv_eager_solver.cpp b/src/theory/bv/bv_eager_solver.cpp index 4e822d3c0..f9f8ff581 100644 --- a/src/theory/bv/bv_eager_solver.cpp +++ b/src/theory/bv/bv_eager_solver.cpp @@ -1,11 +1,11 @@ /********************* */ -/*! \file bv_eager_solver.h +/*! \file bv_eager_solver.cpp ** \verbatim - ** Original author: Liana Hadarean + ** Original author: Liana Hadarean ** Major contributors: none - ** Minor contributors (to current version): + ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/bv/bv_eager_solver.h b/src/theory/bv/bv_eager_solver.h index 65fddd819..37e1bd9ba 100644 --- a/src/theory/bv/bv_eager_solver.h +++ b/src/theory/bv/bv_eager_solver.h @@ -1,11 +1,11 @@ /********************* */ /*! \file bv_eager_solver.h ** \verbatim - ** Original author: Liana Hadarean + ** Original author: Liana Hadarean ** Major contributors: none - ** Minor contributors (to current version): + ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/bv/bv_inequality_graph.cpp b/src/theory/bv/bv_inequality_graph.cpp index ff344d307..aa605de04 100644 --- a/src/theory/bv/bv_inequality_graph.cpp +++ b/src/theory/bv/bv_inequality_graph.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/bv/bv_inequality_graph.h b/src/theory/bv/bv_inequality_graph.h index 4a6757871..3c67f506f 100644 --- a/src/theory/bv/bv_inequality_graph.h +++ b/src/theory/bv/bv_inequality_graph.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/bv/bv_quick_check.cpp b/src/theory/bv/bv_quick_check.cpp index 1adbb83d9..5f35f95e3 100644 --- a/src/theory/bv/bv_quick_check.cpp +++ b/src/theory/bv/bv_quick_check.cpp @@ -1,11 +1,11 @@ /********************* */ /*! \file bv_quick_check.cpp ** \verbatim - ** Original author: Liana Hadaren + ** Original author: Liana Hadarean ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/bv/bv_quick_check.h b/src/theory/bv/bv_quick_check.h index 4ec9c9231..6c32fbb4d 100644 --- a/src/theory/bv/bv_quick_check.h +++ b/src/theory/bv/bv_quick_check.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Liana Hadarean ** Major contributors: none - ** Minor contributors (to current version): none + ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/bv/bv_subtheory.h b/src/theory/bv/bv_subtheory.h index 8d21734db..9a314fd6a 100644 --- a/src/theory/bv/bv_subtheory.h +++ b/src/theory/bv/bv_subtheory.h @@ -5,7 +5,7 @@ ** Major contributors: Andrew Reynolds, Dejan Jovanovic ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/bv/bv_subtheory_algebraic.cpp b/src/theory/bv/bv_subtheory_algebraic.cpp index 750e67a2d..79aa04fc6 100644 --- a/src/theory/bv/bv_subtheory_algebraic.cpp +++ b/src/theory/bv/bv_subtheory_algebraic.cpp @@ -1,18 +1,19 @@ /********************* */ -/*! \file bv_subtheory_bitblast.cpp -** \verbatim -** Original author: Liana Hadarean -** Major contributors: none -** Minor contributors (to current version): none -** This file is part of the CVC4 project. -** Copyright (c) 2009-2013 New York University and The University of Iowa -** See the file COPYING in the top-level source directory for licensing -** information.\endverbatim -** -** \brief Algebraic solver. -** -** Algebraic solver. -**/ +/*! \file bv_subtheory_algebraic.cpp + ** \verbatim + ** Original author: Liana Hadarean + ** Major contributors: none + ** Minor contributors (to current version): none + ** This file is part of the CVC4 project. + ** Copyright (c) 2009-2014 New York University and The University of Iowa + ** See the file COPYING in the top-level source directory for licensing + ** information.\endverbatim + ** + ** \brief Algebraic solver. + ** + ** Algebraic solver. + **/ + #include "util/boolean_simplification.h" #include "theory/theory_model.h" diff --git a/src/theory/bv/bv_subtheory_algebraic.h b/src/theory/bv/bv_subtheory_algebraic.h index a39631696..4ce02cae1 100644 --- a/src/theory/bv/bv_subtheory_algebraic.h +++ b/src/theory/bv/bv_subtheory_algebraic.h @@ -1,18 +1,18 @@ /********************* */ /*! \file bv_subtheory_algebraic.h -** \verbatim -** Original author: Liana Hadarean -** Major contributors: none -** Minor contributors (to current version): none -** This file is part of the CVC4 project. -** Copyright (c) 2009-2013 New York University and The University of Iowa -** See the file COPYING in the top-level source directory for licensing -** information.\endverbatim -** -** \brief Algebraic solver. -** -** Algebraic solver. -**/ + ** \verbatim + ** Original author: Liana Hadarean + ** Major contributors: none + ** Minor contributors (to current version): none + ** This file is part of the CVC4 project. + ** Copyright (c) 2009-2014 New York University and The University of Iowa + ** See the file COPYING in the top-level source directory for licensing + ** information.\endverbatim + ** + ** \brief Algebraic solver. + ** + ** Algebraic solver. + **/ #pragma once diff --git a/src/theory/bv/bv_subtheory_bitblast.cpp b/src/theory/bv/bv_subtheory_bitblast.cpp index ad5ff15b6..a2a6e19ac 100644 --- a/src/theory/bv/bv_subtheory_bitblast.cpp +++ b/src/theory/bv/bv_subtheory_bitblast.cpp @@ -2,10 +2,10 @@ /*! \file bv_subtheory_bitblast.cpp ** \verbatim ** Original author: Dejan Jovanovic - ** Major contributors: Liana Hadarean, Clark Barrett - ** Minor contributors (to current version): Morgan Deters, Andrew Reynolds, Kshitij Bansal + ** Major contributors: Clark Barrett, Liana Hadarean + ** Minor contributors (to current version): Morgan Deters, Kshitij Bansal, Andrew Reynolds ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/bv/bv_subtheory_bitblast.h b/src/theory/bv/bv_subtheory_bitblast.h index 511318521..414abdcce 100644 --- a/src/theory/bv/bv_subtheory_bitblast.h +++ b/src/theory/bv/bv_subtheory_bitblast.h @@ -2,10 +2,10 @@ /*! \file bv_subtheory_bitblast.h ** \verbatim ** Original author: Dejan Jovanovic - ** Major contributors: none - ** Minor contributors (to current version): Morgan Deters, Andrew Reynolds, Liana Hadarean, Clark Barrett + ** Major contributors: Liana Hadarean + ** Minor contributors (to current version): Morgan Deters, Andrew Reynolds, Clark Barrett ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/bv/bv_subtheory_core.cpp b/src/theory/bv/bv_subtheory_core.cpp index 179f3a44d..d2c79fec2 100644 --- a/src/theory/bv/bv_subtheory_core.cpp +++ b/src/theory/bv/bv_subtheory_core.cpp @@ -5,7 +5,7 @@ ** Major contributors: Andrew Reynolds ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/bv/bv_subtheory_core.h b/src/theory/bv/bv_subtheory_core.h index 9ab6cfce4..5b9c54095 100644 --- a/src/theory/bv/bv_subtheory_core.h +++ b/src/theory/bv/bv_subtheory_core.h @@ -5,7 +5,7 @@ ** Major contributors: Andrew Reynolds ** Minor contributors (to current version): Dejan Jovanovic, Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/bv/bv_subtheory_inequality.cpp b/src/theory/bv/bv_subtheory_inequality.cpp index 4b894fe2a..4f9eb0823 100644 --- a/src/theory/bv/bv_subtheory_inequality.cpp +++ b/src/theory/bv/bv_subtheory_inequality.cpp @@ -5,7 +5,7 @@ ** Major contributors: Andrew Reynolds ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/bv/bv_subtheory_inequality.h b/src/theory/bv/bv_subtheory_inequality.h index ef03166e6..b9195c7d1 100644 --- a/src/theory/bv/bv_subtheory_inequality.h +++ b/src/theory/bv/bv_subtheory_inequality.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Liana Hadarean ** Major contributors: Andrew Reynolds - ** Minor contributors (to current version): Morgan Deters + ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/bv/bv_to_bool.cpp b/src/theory/bv/bv_to_bool.cpp index aef1437a0..06a1d4a44 100644 --- a/src/theory/bv/bv_to_bool.cpp +++ b/src/theory/bv/bv_to_bool.cpp @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Liana Hadarean ** Major contributors: none - ** Minor contributors (to current version): none + ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/bv/bv_to_bool.h b/src/theory/bv/bv_to_bool.h index 28501ba96..b266b591b 100644 --- a/src/theory/bv/bv_to_bool.h +++ b/src/theory/bv/bv_to_bool.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/bv/bvintropow2.cpp b/src/theory/bv/bvintropow2.cpp index d7f5d6fde..5df170e21 100644 --- a/src/theory/bv/bvintropow2.cpp +++ b/src/theory/bv/bvintropow2.cpp @@ -1,3 +1,20 @@ +/********************* */ +/*! \file bvintropow2.cpp + ** \verbatim + ** Original author: Liana Hadarean + ** Major contributors: none + ** Minor contributors (to current version): none + ** This file is part of the CVC4 project. + ** Copyright (c) 2009-2014 New York University and The University of Iowa + ** See the file COPYING in the top-level source directory for licensing + ** information.\endverbatim + ** + ** \brief [[ Add one-line brief description here ]] + ** + ** [[ Add lengthier description here ]] + ** \todo document this file + **/ + #include "theory/bv/bvintropow2.h" #include "theory/rewriter.h" #include "theory/bv/theory_bv_rewrite_rules_simplification.h" diff --git a/src/theory/bv/bvintropow2.h b/src/theory/bv/bvintropow2.h index 3844d03e1..774645560 100644 --- a/src/theory/bv/bvintropow2.h +++ b/src/theory/bv/bvintropow2.h @@ -1,3 +1,20 @@ +/********************* */ +/*! \file bvintropow2.h + ** \verbatim + ** Original author: Liana Hadarean + ** Major contributors: none + ** Minor contributors (to current version): none + ** This file is part of the CVC4 project. + ** Copyright (c) 2009-2014 New York University and The University of Iowa + ** See the file COPYING in the top-level source directory for licensing + ** information.\endverbatim + ** + ** \brief [[ Add one-line brief description here ]] + ** + ** [[ Add lengthier description here ]] + ** \todo document this file + **/ + #include "cvc4_private.h" diff --git a/src/theory/bv/cd_set_collection.h b/src/theory/bv/cd_set_collection.h index 01aeeab91..5ffe7032a 100644 --- a/src/theory/bv/cd_set_collection.h +++ b/src/theory/bv/cd_set_collection.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Tim King, Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/bv/eager_bitblaster.cpp b/src/theory/bv/eager_bitblaster.cpp index 5b52fc241..e8fee00f5 100644 --- a/src/theory/bv/eager_bitblaster.cpp +++ b/src/theory/bv/eager_bitblaster.cpp @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Liana Hadarean ** Major contributors: none - ** Minor contributors (to current version): lianah + ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/bv/lazy_bitblaster.cpp b/src/theory/bv/lazy_bitblaster.cpp index d3ab68a5a..f721a22f0 100644 --- a/src/theory/bv/lazy_bitblaster.cpp +++ b/src/theory/bv/lazy_bitblaster.cpp @@ -1,18 +1,18 @@ /********************* */ /*! \file lazy_bitblaster.cpp -** \verbatim -** Original author: Liana Hadarean -** Major contributors: none -** Minor contributors (to current version): lianah -** This file is part of the CVC4 project. -** Copyright (c) 2009-2013 New York University and The University of Iowa -** See the file COPYING in the top-level source directory for licensing -** information.\endverbatim -** -** \brief -** -** Bitblaster for the lazy bv solver. -**/ + ** \verbatim + ** Original author: Liana Hadarean + ** Major contributors: none + ** Minor contributors (to current version): Morgan Deters + ** This file is part of the CVC4 project. + ** Copyright (c) 2009-2014 New York University and The University of Iowa + ** See the file COPYING in the top-level source directory for licensing + ** information.\endverbatim + ** + ** \brief Bitblaster for the lazy bv solver. + ** + ** Bitblaster for the lazy bv solver. + **/ #include "cvc4_private.h" #include "bitblaster_template.h" diff --git a/src/theory/bv/options_handlers.h b/src/theory/bv/options_handlers.h index 7cdd4aac5..c917aa9dd 100644 --- a/src/theory/bv/options_handlers.h +++ b/src/theory/bv/options_handlers.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/bv/slicer.cpp b/src/theory/bv/slicer.cpp index c37c8089d..a7587bedf 100644 --- a/src/theory/bv/slicer.cpp +++ b/src/theory/bv/slicer.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/bv/slicer.h b/src/theory/bv/slicer.h index 15c0b9c0b..7b55054bc 100644 --- a/src/theory/bv/slicer.h +++ b/src/theory/bv/slicer.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/bv/theory_bv.cpp b/src/theory/bv/theory_bv.cpp index 4b5333e46..4abf25bb1 100644 --- a/src/theory/bv/theory_bv.cpp +++ b/src/theory/bv/theory_bv.cpp @@ -1,18 +1,16 @@ /********************* */ /*! \file theory_bv.cpp -** \verbatim -** Original author: Dejan Jovanovic -** Major contributors: Morgan Deters, Liana Hadarean -** Minor contributors (to current version): Tim King, Kshitij Bansal, Clark Barrett, Andrew Reynolds -** This file is part of the CVC4 project. -** Copyright (c) 2009-2013 New York University and The University of Iowa -** See the file COPYING in the top-level source directory for licensing -** information.\endverbatim -** -** \brief [[ Add one-line brief description here ]] -** -** [[ Add lengthier description here ]] -** \todo document this file + ** \verbatim + ** Original author: Dejan Jovanovic + ** Major contributors: Liana Hadarean + ** Minor contributors (to current version): Tim King, Kshitij Bansal, Clark Barrett, Andrew Reynolds, Morgan Deters, Martin Brain <> + ** This file is part of the CVC4 project. + ** Copyright (c) 2009-2014 New York University and The University of Iowa + ** See the file COPYING in the top-level source directory for licensing + ** information.\endverbatim + ** + ** [[ Add lengthier description here ]] + ** \todo document this file **/ #include "smt/options.h" diff --git a/src/theory/bv/theory_bv.h b/src/theory/bv/theory_bv.h index e96df8df2..22d9f6775 100644 --- a/src/theory/bv/theory_bv.h +++ b/src/theory/bv/theory_bv.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Morgan Deters ** Major contributors: Dejan Jovanovic, Liana Hadarean - ** Minor contributors (to current version): Clark Barrett, Kshitij Bansal, Tim King, Andrew Reynolds + ** Minor contributors (to current version): Clark Barrett, Kshitij Bansal, Tim King, Andrew Reynolds, Martin Brain <> ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/bv/theory_bv_rewrite_rules.h b/src/theory/bv/theory_bv_rewrite_rules.h index 5e85cb145..bc9095f03 100644 --- a/src/theory/bv/theory_bv_rewrite_rules.h +++ b/src/theory/bv/theory_bv_rewrite_rules.h @@ -5,7 +5,7 @@ ** Major contributors: Liana Hadarean ** Minor contributors (to current version): Tim King, Clark Barrett, Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/bv/theory_bv_rewrite_rules_constant_evaluation.h b/src/theory/bv/theory_bv_rewrite_rules_constant_evaluation.h index db774ebe3..1f8799682 100644 --- a/src/theory/bv/theory_bv_rewrite_rules_constant_evaluation.h +++ b/src/theory/bv/theory_bv_rewrite_rules_constant_evaluation.h @@ -5,7 +5,7 @@ ** Major contributors: Clark Barrett ** Minor contributors (to current version): Morgan Deters, Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/bv/theory_bv_rewrite_rules_core.h b/src/theory/bv/theory_bv_rewrite_rules_core.h index 43acfef75..676df5dde 100644 --- a/src/theory/bv/theory_bv_rewrite_rules_core.h +++ b/src/theory/bv/theory_bv_rewrite_rules_core.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Tim King, Clark Barrett, Liana Hadarean, Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/bv/theory_bv_rewrite_rules_normalization.h b/src/theory/bv/theory_bv_rewrite_rules_normalization.h index 3e6e02952..21b59fa8c 100644 --- a/src/theory/bv/theory_bv_rewrite_rules_normalization.h +++ b/src/theory/bv/theory_bv_rewrite_rules_normalization.h @@ -5,7 +5,7 @@ ** Major contributors: Clark Barrett ** Minor contributors (to current version): Dejan Jovanovic, Morgan Deters, Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/bv/theory_bv_rewrite_rules_operator_elimination.h b/src/theory/bv/theory_bv_rewrite_rules_operator_elimination.h index 6c0ba90d4..0442c47d9 100644 --- a/src/theory/bv/theory_bv_rewrite_rules_operator_elimination.h +++ b/src/theory/bv/theory_bv_rewrite_rules_operator_elimination.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters, Clark Barrett ** Minor contributors (to current version): Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/bv/theory_bv_rewrite_rules_simplification.h b/src/theory/bv/theory_bv_rewrite_rules_simplification.h index c8705e121..3bf390ded 100644 --- a/src/theory/bv/theory_bv_rewrite_rules_simplification.h +++ b/src/theory/bv/theory_bv_rewrite_rules_simplification.h @@ -2,10 +2,10 @@ /*! \file theory_bv_rewrite_rules_simplification.h ** \verbatim ** Original author: Liana Hadarean - ** Major contributors: Clark Barrett - ** Minor contributors (to current version): Morgan Deters, Dejan Jovanovic, Tim King + ** Major contributors: none + ** Minor contributors (to current version): Morgan Deters, Dejan Jovanovic, Tim King, Clark Barrett ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/bv/theory_bv_rewriter.cpp b/src/theory/bv/theory_bv_rewriter.cpp index 4a0da44cc..306a3bd97 100644 --- a/src/theory/bv/theory_bv_rewriter.cpp +++ b/src/theory/bv/theory_bv_rewriter.cpp @@ -5,7 +5,7 @@ ** Major contributors: Liana Hadarean ** Minor contributors (to current version): Tim King, Clark Barrett, Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/bv/theory_bv_rewriter.h b/src/theory/bv/theory_bv_rewriter.h index def8e24fe..42bccb534 100644 --- a/src/theory/bv/theory_bv_rewriter.h +++ b/src/theory/bv/theory_bv_rewriter.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters, Liana Hadarean ** Minor contributors (to current version): Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/bv/theory_bv_type_rules.h b/src/theory/bv/theory_bv_type_rules.h index d7e22c32c..81a2d9a27 100644 --- a/src/theory/bv/theory_bv_type_rules.h +++ b/src/theory/bv/theory_bv_type_rules.h @@ -2,7 +2,7 @@ /*! \file theory_bv_type_rules.h ** \verbatim ** Original author: Dejan Jovanovic - ** Major contributors: Liana Hadarean, Christopher L. Conway, Morgan Deters + ** Major contributors: Christopher L. Conway, Liana Hadarean, Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. ** Copyright (c) 2009-2014 New York University and The University of Iowa diff --git a/src/theory/bv/theory_bv_utils.cpp b/src/theory/bv/theory_bv_utils.cpp index 705a784f2..824dc5b92 100644 --- a/src/theory/bv/theory_bv_utils.cpp +++ b/src/theory/bv/theory_bv_utils.cpp @@ -1,11 +1,11 @@ /********************* */ -/*! \file theory_bv_utils.h +/*! \file theory_bv_utils.cpp ** \verbatim - ** Original author: Dejan Jovanovic - ** Major contributors: Liana Hadarean - ** Minor contributors (to current version): Clark Barrett, Morgan Deters, Kshitij Bansal + ** Original author: Liana Hadarean + ** Major contributors: none + ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/bv/theory_bv_utils.h b/src/theory/bv/theory_bv_utils.h index 4dfea9d1d..6ebc9db92 100644 --- a/src/theory/bv/theory_bv_utils.h +++ b/src/theory/bv/theory_bv_utils.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Dejan Jovanovic ** Major contributors: Liana Hadarean - ** Minor contributors (to current version): Clark Barrett, Morgan Deters, Kshitij Bansal + ** Minor contributors (to current version): Kshitij Bansal, Clark Barrett, Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/bv/type_enumerator.h b/src/theory/bv/type_enumerator.h index 01741737f..1d835dd23 100644 --- a/src/theory/bv/type_enumerator.h +++ b/src/theory/bv/type_enumerator.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/datatypes/datatypes_rewriter.h b/src/theory/datatypes/datatypes_rewriter.h index e6a5306b4..37e64ca88 100644 --- a/src/theory/datatypes/datatypes_rewriter.h +++ b/src/theory/datatypes/datatypes_rewriter.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Morgan Deters ** Major contributors: Andrew Reynolds - ** Minor contributors (to current version): none + ** Minor contributors (to current version): Kshitij Bansal ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/datatypes/theory_datatypes.cpp b/src/theory/datatypes/theory_datatypes.cpp index d9cf13818..544589306 100644 --- a/src/theory/datatypes/theory_datatypes.cpp +++ b/src/theory/datatypes/theory_datatypes.cpp @@ -5,7 +5,7 @@ ** Major contributors: Andrew Reynolds ** Minor contributors (to current version): Dejan Jovanovic ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/datatypes/theory_datatypes.h b/src/theory/datatypes/theory_datatypes.h index a9b64d493..132077e29 100644 --- a/src/theory/datatypes/theory_datatypes.h +++ b/src/theory/datatypes/theory_datatypes.h @@ -5,7 +5,7 @@ ** Major contributors: Andrew Reynolds ** Minor contributors (to current version): Francois Bobot, Dejan Jovanovic ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/datatypes/theory_datatypes_type_rules.h b/src/theory/datatypes/theory_datatypes_type_rules.h index 4d0acccc8..ddad913fe 100644 --- a/src/theory/datatypes/theory_datatypes_type_rules.h +++ b/src/theory/datatypes/theory_datatypes_type_rules.h @@ -5,7 +5,7 @@ ** Major contributors: Andrew Reynolds ** Minor contributors (to current version): Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/datatypes/type_enumerator.h b/src/theory/datatypes/type_enumerator.h index ffd34d777..256dcaef2 100644 --- a/src/theory/datatypes/type_enumerator.h +++ b/src/theory/datatypes/type_enumerator.h @@ -5,7 +5,7 @@ ** Major contributors: Andrew Reynolds ** Minor contributors (to current version): Dejan Jovanovic ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/decision_attributes.h b/src/theory/decision_attributes.h index fa934ecc7..1ea1bb21d 100644 --- a/src/theory/decision_attributes.h +++ b/src/theory/decision_attributes.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/example/ecdata.cpp b/src/theory/example/ecdata.cpp index 4ed0bdb45..f9e3b53e7 100644 --- a/src/theory/example/ecdata.cpp +++ b/src/theory/example/ecdata.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/example/ecdata.h b/src/theory/example/ecdata.h index fd557a1fa..3f4b1b97d 100644 --- a/src/theory/example/ecdata.h +++ b/src/theory/example/ecdata.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/example/theory_uf_tim.cpp b/src/theory/example/theory_uf_tim.cpp index 20f190486..6963251b8 100644 --- a/src/theory/example/theory_uf_tim.cpp +++ b/src/theory/example/theory_uf_tim.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/example/theory_uf_tim.h b/src/theory/example/theory_uf_tim.h index d24c0787d..ef74a04f8 100644 --- a/src/theory/example/theory_uf_tim.h +++ b/src/theory/example/theory_uf_tim.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/idl/idl_assertion.cpp b/src/theory/idl/idl_assertion.cpp index 717122195..c6a1a5c0e 100644 --- a/src/theory/idl/idl_assertion.cpp +++ b/src/theory/idl/idl_assertion.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/idl/idl_assertion.h b/src/theory/idl/idl_assertion.h index d0328e600..9a31f283d 100644 --- a/src/theory/idl/idl_assertion.h +++ b/src/theory/idl/idl_assertion.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/idl/idl_assertion_db.cpp b/src/theory/idl/idl_assertion_db.cpp index 692084071..f2c29cb20 100644 --- a/src/theory/idl/idl_assertion_db.cpp +++ b/src/theory/idl/idl_assertion_db.cpp @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/idl/idl_assertion_db.h b/src/theory/idl/idl_assertion_db.h index 358a5386e..23f5e84d5 100644 --- a/src/theory/idl/idl_assertion_db.h +++ b/src/theory/idl/idl_assertion_db.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/idl/idl_model.cpp b/src/theory/idl/idl_model.cpp index 71cd44314..848399fbc 100644 --- a/src/theory/idl/idl_model.cpp +++ b/src/theory/idl/idl_model.cpp @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/idl/idl_model.h b/src/theory/idl/idl_model.h index c69a0c38f..5a284457a 100644 --- a/src/theory/idl/idl_model.h +++ b/src/theory/idl/idl_model.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/idl/theory_idl.cpp b/src/theory/idl/theory_idl.cpp index 11aa2d8a5..8597c117d 100644 --- a/src/theory/idl/theory_idl.cpp +++ b/src/theory/idl/theory_idl.cpp @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/idl/theory_idl.h b/src/theory/idl/theory_idl.h index 1eea28069..7c879e722 100644 --- a/src/theory/idl/theory_idl.h +++ b/src/theory/idl/theory_idl.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/interrupted.h b/src/theory/interrupted.h index 86fbe3036..ee7e5db12 100644 --- a/src/theory/interrupted.h +++ b/src/theory/interrupted.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/ite_utilities.cpp b/src/theory/ite_utilities.cpp index 35330f81a..dcb75a44a 100644 --- a/src/theory/ite_utilities.cpp +++ b/src/theory/ite_utilities.cpp @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Tim King ** Major contributors: none - ** Minor contributors (to current version): none + ** Minor contributors (to current version): Kshitij Bansal, Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/ite_utilities.h b/src/theory/ite_utilities.h index 7f0986ecb..d4abdbf35 100644 --- a/src/theory/ite_utilities.h +++ b/src/theory/ite_utilities.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Tim King ** Major contributors: none - ** Minor contributors (to current version): none + ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/logic_info.cpp b/src/theory/logic_info.cpp index bc2f1286b..4ea30d5c9 100644 --- a/src/theory/logic_info.cpp +++ b/src/theory/logic_info.cpp @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Morgan Deters ** Major contributors: none - ** Minor contributors (to current version): Dejan Jovanovic, Tianyi Liang + ** Minor contributors (to current version): Dejan Jovanovic, Tianyi Liang, Kshitij Bansal, Andrew Reynolds ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/logic_info.h b/src/theory/logic_info.h index 1c4b69b15..f4527648a 100644 --- a/src/theory/logic_info.h +++ b/src/theory/logic_info.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Morgan Deters ** Major contributors: none - ** Minor contributors (to current version): Dejan Jovanovic + ** Minor contributors (to current version): Dejan Jovanovic, Andrew Reynolds ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/options_handlers.h b/src/theory/options_handlers.h index def304d8b..4b0cd94a5 100644 --- a/src/theory/options_handlers.h +++ b/src/theory/options_handlers.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/output_channel.h b/src/theory/output_channel.h index 51187b7dd..40eba6ff5 100644 --- a/src/theory/output_channel.h +++ b/src/theory/output_channel.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Andrew Reynolds, Dejan Jovanovic, Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/ambqi_builder.cpp b/src/theory/quantifiers/ambqi_builder.cpp old mode 100755 new mode 100644 index 374d161e9..d6dac6f14 --- a/src/theory/quantifiers/ambqi_builder.cpp +++ b/src/theory/quantifiers/ambqi_builder.cpp @@ -2,10 +2,10 @@ /*! \file ambqi_builder.cpp ** \verbatim ** Original author: Andrew Reynolds - ** Major contributors: none + ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/ambqi_builder.h b/src/theory/quantifiers/ambqi_builder.h old mode 100755 new mode 100644 index d586d9c8f..44d327c5c --- a/src/theory/quantifiers/ambqi_builder.h +++ b/src/theory/quantifiers/ambqi_builder.h @@ -2,10 +2,10 @@ /*! \file ambqi_builder.h ** \verbatim ** Original author: Andrew Reynolds - ** Major contributors: none + ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/bounded_integers.cpp b/src/theory/quantifiers/bounded_integers.cpp index 17446358c..d6f9704b3 100644 --- a/src/theory/quantifiers/bounded_integers.cpp +++ b/src/theory/quantifiers/bounded_integers.cpp @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Andrew Reynolds ** Major contributors: Morgan Deters - ** Minor contributors (to current version): none + ** Minor contributors (to current version): Kshitij Bansal ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/bounded_integers.h b/src/theory/quantifiers/bounded_integers.h index a6e85b392..ac188ca65 100644 --- a/src/theory/quantifiers/bounded_integers.h +++ b/src/theory/quantifiers/bounded_integers.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/candidate_generator.cpp b/src/theory/quantifiers/candidate_generator.cpp index 799513171..9ce79c301 100644 --- a/src/theory/quantifiers/candidate_generator.cpp +++ b/src/theory/quantifiers/candidate_generator.cpp @@ -5,7 +5,7 @@ ** Major contributors: Andrew Reynolds ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/candidate_generator.h b/src/theory/quantifiers/candidate_generator.h index 74029b633..4569c2335 100644 --- a/src/theory/quantifiers/candidate_generator.h +++ b/src/theory/quantifiers/candidate_generator.h @@ -5,7 +5,7 @@ ** Major contributors: Andrew Reynolds ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/first_order_model.cpp b/src/theory/quantifiers/first_order_model.cpp index e3514d949..1421c639f 100644 --- a/src/theory/quantifiers/first_order_model.cpp +++ b/src/theory/quantifiers/first_order_model.cpp @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Andrew Reynolds ** Major contributors: none - ** Minor contributors (to current version): Morgan Deters + ** Minor contributors (to current version): Kshitij Bansal, Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/first_order_model.h b/src/theory/quantifiers/first_order_model.h index 6ab17543f..76c3946ce 100644 --- a/src/theory/quantifiers/first_order_model.h +++ b/src/theory/quantifiers/first_order_model.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/first_order_reasoning.cpp b/src/theory/quantifiers/first_order_reasoning.cpp index 1c87dad7b..df60bbc33 100644 --- a/src/theory/quantifiers/first_order_reasoning.cpp +++ b/src/theory/quantifiers/first_order_reasoning.cpp @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/first_order_reasoning.h b/src/theory/quantifiers/first_order_reasoning.h index 92898eff5..100cf34b6 100644 --- a/src/theory/quantifiers/first_order_reasoning.h +++ b/src/theory/quantifiers/first_order_reasoning.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/full_model_check.cpp b/src/theory/quantifiers/full_model_check.cpp index 5cf5a4c72..d5ed5589b 100644 --- a/src/theory/quantifiers/full_model_check.cpp +++ b/src/theory/quantifiers/full_model_check.cpp @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Andrew Reynolds ** Major contributors: Morgan Deters - ** Minor contributors (to current version): none + ** Minor contributors (to current version): Kshitij Bansal ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/inst_gen.cpp b/src/theory/quantifiers/inst_gen.cpp index aaa65e630..971b3a5ee 100644 --- a/src/theory/quantifiers/inst_gen.cpp +++ b/src/theory/quantifiers/inst_gen.cpp @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/inst_gen.h b/src/theory/quantifiers/inst_gen.h index 115dd085b..6567994f2 100644 --- a/src/theory/quantifiers/inst_gen.h +++ b/src/theory/quantifiers/inst_gen.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/inst_match.cpp b/src/theory/quantifiers/inst_match.cpp index 292190168..078614509 100644 --- a/src/theory/quantifiers/inst_match.cpp +++ b/src/theory/quantifiers/inst_match.cpp @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Morgan Deters ** Major contributors: Andrew Reynolds - ** Minor contributors (to current version): Clark Barrett, Francois Bobot + ** Minor contributors (to current version): Kshitij Bansal, Francois Bobot, Clark Barrett ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/inst_match.h b/src/theory/quantifiers/inst_match.h index d728d18a2..8753c0bb1 100644 --- a/src/theory/quantifiers/inst_match.h +++ b/src/theory/quantifiers/inst_match.h @@ -2,10 +2,10 @@ /*! \file inst_match.h ** \verbatim ** Original author: Morgan Deters - ** Major contributors: Francois Bobot, Andrew Reynolds - ** Minor contributors (to current version): none + ** Major contributors: Andrew Reynolds + ** Minor contributors (to current version): Francois Bobot ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/inst_match_generator.cpp b/src/theory/quantifiers/inst_match_generator.cpp index 5ee73d006..c024d0bab 100644 --- a/src/theory/quantifiers/inst_match_generator.cpp +++ b/src/theory/quantifiers/inst_match_generator.cpp @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/inst_match_generator.h b/src/theory/quantifiers/inst_match_generator.h index e7e07470d..56eaf2c17 100644 --- a/src/theory/quantifiers/inst_match_generator.h +++ b/src/theory/quantifiers/inst_match_generator.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/inst_strategy_cbqi.cpp b/src/theory/quantifiers/inst_strategy_cbqi.cpp index fef6b38d1..25f15cd78 100644 --- a/src/theory/quantifiers/inst_strategy_cbqi.cpp +++ b/src/theory/quantifiers/inst_strategy_cbqi.cpp @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/inst_strategy_cbqi.h b/src/theory/quantifiers/inst_strategy_cbqi.h index a446c8b35..9196b9703 100644 --- a/src/theory/quantifiers/inst_strategy_cbqi.h +++ b/src/theory/quantifiers/inst_strategy_cbqi.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/inst_strategy_e_matching.cpp b/src/theory/quantifiers/inst_strategy_e_matching.cpp index 0353b0b5f..5b0fade71 100644 --- a/src/theory/quantifiers/inst_strategy_e_matching.cpp +++ b/src/theory/quantifiers/inst_strategy_e_matching.cpp @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/inst_strategy_e_matching.h b/src/theory/quantifiers/inst_strategy_e_matching.h index 24470c58b..968194e49 100644 --- a/src/theory/quantifiers/inst_strategy_e_matching.h +++ b/src/theory/quantifiers/inst_strategy_e_matching.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/instantiation_engine.cpp b/src/theory/quantifiers/instantiation_engine.cpp index d0f50fa6a..3dd4423de 100644 --- a/src/theory/quantifiers/instantiation_engine.cpp +++ b/src/theory/quantifiers/instantiation_engine.cpp @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Morgan Deters ** Major contributors: Andrew Reynolds - ** Minor contributors (to current version): none + ** Minor contributors (to current version): Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/instantiation_engine.h b/src/theory/quantifiers/instantiation_engine.h index a460f1164..7a3528217 100644 --- a/src/theory/quantifiers/instantiation_engine.h +++ b/src/theory/quantifiers/instantiation_engine.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Morgan Deters ** Major contributors: Andrew Reynolds - ** Minor contributors (to current version): none + ** Minor contributors (to current version): Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/macros.cpp b/src/theory/quantifiers/macros.cpp index 5ddecf037..11734c43f 100644 --- a/src/theory/quantifiers/macros.cpp +++ b/src/theory/quantifiers/macros.cpp @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Andrew Reynolds ** Major contributors: Morgan Deters - ** Minor contributors (to current version): none + ** Minor contributors (to current version): Kshitij Bansal ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/macros.h b/src/theory/quantifiers/macros.h index 4fd9df5ff..57f4abe4e 100644 --- a/src/theory/quantifiers/macros.h +++ b/src/theory/quantifiers/macros.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/model_builder.cpp b/src/theory/quantifiers/model_builder.cpp index a12fc7ca2..4179dcbf5 100644 --- a/src/theory/quantifiers/model_builder.cpp +++ b/src/theory/quantifiers/model_builder.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Kshitij Bansal, Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/model_builder.h b/src/theory/quantifiers/model_builder.h index 93cc1205e..4b0046089 100644 --- a/src/theory/quantifiers/model_builder.h +++ b/src/theory/quantifiers/model_builder.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/model_engine.cpp b/src/theory/quantifiers/model_engine.cpp index dfbc01414..d68c66535 100644 --- a/src/theory/quantifiers/model_engine.cpp +++ b/src/theory/quantifiers/model_engine.cpp @@ -5,7 +5,7 @@ ** Major contributors: Andrew Reynolds ** Minor contributors (to current version): Francois Bobot ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/model_engine.h b/src/theory/quantifiers/model_engine.h index 79bdcd19b..caf27f691 100644 --- a/src/theory/quantifiers/model_engine.h +++ b/src/theory/quantifiers/model_engine.h @@ -5,7 +5,7 @@ ** Major contributors: Andrew Reynolds ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/modes.cpp b/src/theory/quantifiers/modes.cpp index b24721170..9e4cab9fa 100644 --- a/src/theory/quantifiers/modes.cpp +++ b/src/theory/quantifiers/modes.cpp @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/modes.h b/src/theory/quantifiers/modes.h index 230495f1f..112e052c2 100644 --- a/src/theory/quantifiers/modes.h +++ b/src/theory/quantifiers/modes.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/options_handlers.h b/src/theory/quantifiers/options_handlers.h index c0b76bcec..38567d166 100644 --- a/src/theory/quantifiers/options_handlers.h +++ b/src/theory/quantifiers/options_handlers.h @@ -5,7 +5,7 @@ ** Major contributors: Andrew Reynolds ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/qinterval_builder.cpp b/src/theory/quantifiers/qinterval_builder.cpp old mode 100755 new mode 100644 index bd8f23db6..fd3a76a52 --- a/src/theory/quantifiers/qinterval_builder.cpp +++ b/src/theory/quantifiers/qinterval_builder.cpp @@ -2,10 +2,10 @@ /*! \file qinterval_builder.cpp ** \verbatim ** Original author: Andrew Reynolds - ** Major contributors: none + ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/qinterval_builder.h b/src/theory/quantifiers/qinterval_builder.h old mode 100755 new mode 100644 index 6ec17756c..7515f13c6 --- a/src/theory/quantifiers/qinterval_builder.h +++ b/src/theory/quantifiers/qinterval_builder.h @@ -2,10 +2,10 @@ /*! \file qinterval_builder.h ** \verbatim ** Original author: Andrew Reynolds - ** Major contributors: none + ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/quant_conflict_find.cpp b/src/theory/quantifiers/quant_conflict_find.cpp old mode 100755 new mode 100644 index 8321f17ba..c6e881986 --- a/src/theory/quantifiers/quant_conflict_find.cpp +++ b/src/theory/quantifiers/quant_conflict_find.cpp @@ -2,10 +2,10 @@ /*! \file quant_conflict_find.cpp ** \verbatim ** Original author: Andrew Reynolds - ** Major contributors: none + ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/quant_conflict_find.h b/src/theory/quantifiers/quant_conflict_find.h old mode 100755 new mode 100644 index 6ea7849c4..0464c04e5 --- a/src/theory/quantifiers/quant_conflict_find.h +++ b/src/theory/quantifiers/quant_conflict_find.h @@ -2,10 +2,10 @@ /*! \file quant_conflict_find.h ** \verbatim ** Original author: Andrew Reynolds - ** Major contributors: none + ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/quant_util.cpp b/src/theory/quantifiers/quant_util.cpp index 31a95fb8a..b39d7fff6 100644 --- a/src/theory/quantifiers/quant_util.cpp +++ b/src/theory/quantifiers/quant_util.cpp @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/quant_util.h b/src/theory/quantifiers/quant_util.h index 711144e7e..575a7237d 100644 --- a/src/theory/quantifiers/quant_util.h +++ b/src/theory/quantifiers/quant_util.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/quantifiers_attributes.cpp b/src/theory/quantifiers/quantifiers_attributes.cpp index 909c9c388..a5de6ffa9 100644 --- a/src/theory/quantifiers/quantifiers_attributes.cpp +++ b/src/theory/quantifiers/quantifiers_attributes.cpp @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/quantifiers_attributes.h b/src/theory/quantifiers/quantifiers_attributes.h index 1aebbfcc5..cf9620a07 100644 --- a/src/theory/quantifiers/quantifiers_attributes.h +++ b/src/theory/quantifiers/quantifiers_attributes.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/quantifiers_rewriter.cpp b/src/theory/quantifiers/quantifiers_rewriter.cpp index c42c16043..eb14b0abe 100644 --- a/src/theory/quantifiers/quantifiers_rewriter.cpp +++ b/src/theory/quantifiers/quantifiers_rewriter.cpp @@ -5,7 +5,7 @@ ** Major contributors: Andrew Reynolds ** Minor contributors (to current version): Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/quantifiers_rewriter.h b/src/theory/quantifiers/quantifiers_rewriter.h index a6a8a6780..e2137b9f4 100644 --- a/src/theory/quantifiers/quantifiers_rewriter.h +++ b/src/theory/quantifiers/quantifiers_rewriter.h @@ -5,7 +5,7 @@ ** Major contributors: Andrew Reynolds ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/relevant_domain.cpp b/src/theory/quantifiers/relevant_domain.cpp index 914141995..8e3304b6a 100644 --- a/src/theory/quantifiers/relevant_domain.cpp +++ b/src/theory/quantifiers/relevant_domain.cpp @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/relevant_domain.h b/src/theory/quantifiers/relevant_domain.h index 200e49a72..7d1c60f80 100644 --- a/src/theory/quantifiers/relevant_domain.h +++ b/src/theory/quantifiers/relevant_domain.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/rewrite_engine.cpp b/src/theory/quantifiers/rewrite_engine.cpp index f0c2de6da..1b13d772e 100644 --- a/src/theory/quantifiers/rewrite_engine.cpp +++ b/src/theory/quantifiers/rewrite_engine.cpp @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/rewrite_engine.h b/src/theory/quantifiers/rewrite_engine.h index a16a6d598..d2108bf3e 100644 --- a/src/theory/quantifiers/rewrite_engine.h +++ b/src/theory/quantifiers/rewrite_engine.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/symmetry_breaking.cpp b/src/theory/quantifiers/symmetry_breaking.cpp index 900db62d0..12b16ef06 100644 --- a/src/theory/quantifiers/symmetry_breaking.cpp +++ b/src/theory/quantifiers/symmetry_breaking.cpp @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Andrew Reynolds ** Major contributors: none - ** Minor contributors (to current version): none + ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/symmetry_breaking.h b/src/theory/quantifiers/symmetry_breaking.h index d7d9e0f6f..c3ba92214 100644 --- a/src/theory/quantifiers/symmetry_breaking.h +++ b/src/theory/quantifiers/symmetry_breaking.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/term_database.cpp b/src/theory/quantifiers/term_database.cpp index 2c309899d..9ea9ee962 100644 --- a/src/theory/quantifiers/term_database.cpp +++ b/src/theory/quantifiers/term_database.cpp @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Andrew Reynolds ** Major contributors: Francois Bobot - ** Minor contributors (to current version): Morgan Deters + ** Minor contributors (to current version): Kshitij Bansal, Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/term_database.h b/src/theory/quantifiers/term_database.h index 383278f82..c839d08d7 100644 --- a/src/theory/quantifiers/term_database.h +++ b/src/theory/quantifiers/term_database.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Andrew Reynolds ** Major contributors: Morgan Deters - ** Minor contributors (to current version): none + ** Minor contributors (to current version): Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/theory_quantifiers.cpp b/src/theory/quantifiers/theory_quantifiers.cpp index 5d016fd06..4ba3c499d 100644 --- a/src/theory/quantifiers/theory_quantifiers.cpp +++ b/src/theory/quantifiers/theory_quantifiers.cpp @@ -5,7 +5,7 @@ ** Major contributors: Andrew Reynolds ** Minor contributors (to current version): Dejan Jovanovic ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/theory_quantifiers.h b/src/theory/quantifiers/theory_quantifiers.h index 5ce2e1a11..ffd3c4c59 100644 --- a/src/theory/quantifiers/theory_quantifiers.h +++ b/src/theory/quantifiers/theory_quantifiers.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Francois Bobot, Dejan Jovanovic, Andrew Reynolds ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/theory_quantifiers_type_rules.h b/src/theory/quantifiers/theory_quantifiers_type_rules.h index 93bd2c012..e4b1732dd 100644 --- a/src/theory/quantifiers/theory_quantifiers_type_rules.h +++ b/src/theory/quantifiers/theory_quantifiers_type_rules.h @@ -2,10 +2,10 @@ /*! \file theory_quantifiers_type_rules.h ** \verbatim ** Original author: Morgan Deters - ** Major contributors: none + ** Major contributors: Andrew Reynolds ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/trigger.cpp b/src/theory/quantifiers/trigger.cpp index 0d8f2c06d..c6ee48057 100644 --- a/src/theory/quantifiers/trigger.cpp +++ b/src/theory/quantifiers/trigger.cpp @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Morgan Deters ** Major contributors: Andrew Reynolds - ** Minor contributors (to current version): Francois Bobot + ** Minor contributors (to current version): Francois Bobot, Kshitij Bansal ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers/trigger.h b/src/theory/quantifiers/trigger.h index 9254105dd..17da6f0d5 100644 --- a/src/theory/quantifiers/trigger.h +++ b/src/theory/quantifiers/trigger.h @@ -5,7 +5,7 @@ ** Major contributors: Andrew Reynolds ** Minor contributors (to current version): Francois Bobot ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers_engine.cpp b/src/theory/quantifiers_engine.cpp index 083137148..c55ffa2a6 100644 --- a/src/theory/quantifiers_engine.cpp +++ b/src/theory/quantifiers_engine.cpp @@ -5,7 +5,7 @@ ** Major contributors: Andrew Reynolds ** Minor contributors (to current version): Francois Bobot ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/quantifiers_engine.h b/src/theory/quantifiers_engine.h index 19f8c55fb..7786e0b70 100644 --- a/src/theory/quantifiers_engine.h +++ b/src/theory/quantifiers_engine.h @@ -5,7 +5,7 @@ ** Major contributors: Andrew Reynolds ** Minor contributors (to current version): Francois Bobot ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/rep_set.cpp b/src/theory/rep_set.cpp index e7370311d..954272549 100644 --- a/src/theory/rep_set.cpp +++ b/src/theory/rep_set.cpp @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Andrew Reynolds ** Major contributors: Morgan Deters - ** Minor contributors (to current version): none + ** Minor contributors (to current version): Kshitij Bansal ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/rep_set.h b/src/theory/rep_set.h index c72e46e76..23db36ead 100644 --- a/src/theory/rep_set.h +++ b/src/theory/rep_set.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/rewriter.cpp b/src/theory/rewriter.cpp index f12184869..960602846 100644 --- a/src/theory/rewriter.cpp +++ b/src/theory/rewriter.cpp @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): Liana Hadarean, Clark Barrett ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/rewriter.h b/src/theory/rewriter.h index f88de72f9..b150b186a 100644 --- a/src/theory/rewriter.h +++ b/src/theory/rewriter.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/rewriter_attributes.h b/src/theory/rewriter_attributes.h index 4c4e33fc6..d2bbd44ae 100644 --- a/src/theory/rewriter_attributes.h +++ b/src/theory/rewriter_attributes.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/rewriter_tables_template.h b/src/theory/rewriter_tables_template.h index aa2964e13..9b51d2b32 100644 --- a/src/theory/rewriter_tables_template.h +++ b/src/theory/rewriter_tables_template.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters, Tim King ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/sets/expr_patterns.h b/src/theory/sets/expr_patterns.h index 93307d227..86f12082a 100644 --- a/src/theory/sets/expr_patterns.h +++ b/src/theory/sets/expr_patterns.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2013-2014 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/sets/options_handlers.h b/src/theory/sets/options_handlers.h index ff535945e..f0af6e7a3 100644 --- a/src/theory/sets/options_handlers.h +++ b/src/theory/sets/options_handlers.h @@ -1,3 +1,20 @@ +/********************* */ +/*! \file options_handlers.h + ** \verbatim + ** Original author: Kshitij Bansal + ** Major contributors: none + ** Minor contributors (to current version): none + ** This file is part of the CVC4 project. + ** Copyright (c) 2009-2014 New York University and The University of Iowa + ** See the file COPYING in the top-level source directory for licensing + ** information.\endverbatim + ** + ** \brief [[ Add one-line brief description here ]] + ** + ** [[ Add lengthier description here ]] + ** \todo document this file + **/ + #include "cvc4_private.h" #ifndef __CVC4__THEORY__SETS__OPTIONS_HANDLERS_H diff --git a/src/theory/sets/scrutinize.h b/src/theory/sets/scrutinize.h index 7343662c6..a4f3f6a6d 100644 --- a/src/theory/sets/scrutinize.h +++ b/src/theory/sets/scrutinize.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2013-2014 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/sets/term_info.h b/src/theory/sets/term_info.h index 2783faa79..3168817e2 100644 --- a/src/theory/sets/term_info.h +++ b/src/theory/sets/term_info.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2013-2014 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/sets/theory_sets.cpp b/src/theory/sets/theory_sets.cpp index 5d5e1f9ee..b59beac8d 100644 --- a/src/theory/sets/theory_sets.cpp +++ b/src/theory/sets/theory_sets.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2013-2014 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/sets/theory_sets.h b/src/theory/sets/theory_sets.h index 84d91de72..a16832389 100644 --- a/src/theory/sets/theory_sets.h +++ b/src/theory/sets/theory_sets.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2013-2014 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/sets/theory_sets_private.cpp b/src/theory/sets/theory_sets_private.cpp index be2b48f81..5d3ec5fc5 100644 --- a/src/theory/sets/theory_sets_private.cpp +++ b/src/theory/sets/theory_sets_private.cpp @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Kshitij Bansal ** Major contributors: none - ** Minor contributors (to current version): none + ** Minor contributors (to current version): Andrew Reynolds ** This file is part of the CVC4 project. - ** Copyright (c) 2013-2014 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/sets/theory_sets_private.h b/src/theory/sets/theory_sets_private.h index e5d7beb2c..78a415529 100644 --- a/src/theory/sets/theory_sets_private.h +++ b/src/theory/sets/theory_sets_private.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Kshitij Bansal ** Major contributors: none - ** Minor contributors (to current version): none + ** Minor contributors (to current version): Andrew Reynolds ** This file is part of the CVC4 project. - ** Copyright (c) 2013-2014 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/sets/theory_sets_rewriter.cpp b/src/theory/sets/theory_sets_rewriter.cpp index 8716d1065..01ad51733 100644 --- a/src/theory/sets/theory_sets_rewriter.cpp +++ b/src/theory/sets/theory_sets_rewriter.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2013-2014 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/sets/theory_sets_rewriter.h b/src/theory/sets/theory_sets_rewriter.h index 6ce418e85..58ee8bfb0 100644 --- a/src/theory/sets/theory_sets_rewriter.h +++ b/src/theory/sets/theory_sets_rewriter.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2013-2014 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/sets/theory_sets_type_enumerator.h b/src/theory/sets/theory_sets_type_enumerator.h index 97fbfe94f..5d14006bb 100644 --- a/src/theory/sets/theory_sets_type_enumerator.h +++ b/src/theory/sets/theory_sets_type_enumerator.h @@ -1,3 +1,20 @@ +/********************* */ +/*! \file theory_sets_type_enumerator.h + ** \verbatim + ** Original author: Kshitij Bansal + ** Major contributors: none + ** Minor contributors (to current version): none + ** This file is part of the CVC4 project. + ** Copyright (c) 2009-2014 New York University and The University of Iowa + ** See the file COPYING in the top-level source directory for licensing + ** information.\endverbatim + ** + ** \brief [[ Add one-line brief description here ]] + ** + ** [[ Add lengthier description here ]] + ** \todo document this file + **/ + #include "cvc4_private.h" diff --git a/src/theory/sets/theory_sets_type_rules.h b/src/theory/sets/theory_sets_type_rules.h index fa1183e07..eb270202a 100644 --- a/src/theory/sets/theory_sets_type_rules.h +++ b/src/theory/sets/theory_sets_type_rules.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Kshitij Bansal ** Major contributors: none - ** Minor contributors (to current version): none + ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2013-2014 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/shared_terms_database.cpp b/src/theory/shared_terms_database.cpp index 7669a9914..6e50cb82d 100644 --- a/src/theory/shared_terms_database.cpp +++ b/src/theory/shared_terms_database.cpp @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): Andrew Reynolds, Clark Barrett ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/shared_terms_database.h b/src/theory/shared_terms_database.h index dba904cdf..e01a407e1 100644 --- a/src/theory/shared_terms_database.h +++ b/src/theory/shared_terms_database.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): Tim King, Andrew Reynolds ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/strings/regexp_operation.cpp b/src/theory/strings/regexp_operation.cpp index 092c7e166..369278994 100644 --- a/src/theory/strings/regexp_operation.cpp +++ b/src/theory/strings/regexp_operation.cpp @@ -1,12 +1,11 @@ /********************* */ - /*! \file regexp_operation.cpp ** \verbatim ** Original author: Tianyi Liang - ** Major contributors: none + ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/strings/regexp_operation.h b/src/theory/strings/regexp_operation.h index 3d5ff2d6d..e4ae1208d 100644 --- a/src/theory/strings/regexp_operation.h +++ b/src/theory/strings/regexp_operation.h @@ -2,10 +2,10 @@ /*! \file regexp_operation.h ** \verbatim ** Original author: Tianyi Liang - ** Major contributors: none + ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/strings/theory_strings.cpp b/src/theory/strings/theory_strings.cpp index f3134789f..2856ce1e0 100644 --- a/src/theory/strings/theory_strings.cpp +++ b/src/theory/strings/theory_strings.cpp @@ -2,10 +2,10 @@ /*! \file theory_strings.cpp ** \verbatim ** Original author: Tianyi Liang - ** Major contributors: Andrew Reynolds - ** Minor contributors (to current version): Morgan Deters + ** Major contributors: none + ** Minor contributors (to current version): Andrew Reynolds, Martin Brain <>, Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/strings/theory_strings.h b/src/theory/strings/theory_strings.h index de5f62b1a..797c1bd29 100644 --- a/src/theory/strings/theory_strings.h +++ b/src/theory/strings/theory_strings.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Tianyi Liang ** Major contributors: none - ** Minor contributors (to current version): none + ** Minor contributors (to current version): Martin Brain <>, Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/strings/theory_strings_preprocess.cpp b/src/theory/strings/theory_strings_preprocess.cpp index a26d00925..6e7ca6d95 100644 --- a/src/theory/strings/theory_strings_preprocess.cpp +++ b/src/theory/strings/theory_strings_preprocess.cpp @@ -2,10 +2,10 @@ /*! \file theory_strings_preprocess.cpp ** \verbatim ** Original author: Tianyi Liang - ** Major contributors: Morgan Deters - ** Minor contributors (to current version): none + ** Major contributors: none + ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/strings/theory_strings_preprocess.h b/src/theory/strings/theory_strings_preprocess.h index e6910373f..334ac1d61 100644 --- a/src/theory/strings/theory_strings_preprocess.h +++ b/src/theory/strings/theory_strings_preprocess.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/strings/theory_strings_rewriter.cpp b/src/theory/strings/theory_strings_rewriter.cpp index 88b43f2bf..12ff92b5e 100644 --- a/src/theory/strings/theory_strings_rewriter.cpp +++ b/src/theory/strings/theory_strings_rewriter.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/strings/theory_strings_rewriter.h b/src/theory/strings/theory_strings_rewriter.h index 318176297..d33254e1b 100644 --- a/src/theory/strings/theory_strings_rewriter.h +++ b/src/theory/strings/theory_strings_rewriter.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/strings/theory_strings_type_rules.h b/src/theory/strings/theory_strings_type_rules.h index 6d3a12cc4..6d1bb1c98 100644 --- a/src/theory/strings/theory_strings_type_rules.h +++ b/src/theory/strings/theory_strings_type_rules.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Tianyi Liang ** Major contributors: none - ** Minor contributors (to current version): none + ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/strings/type_enumerator.h b/src/theory/strings/type_enumerator.h index f011e4c7d..cfc3fe02b 100644 --- a/src/theory/strings/type_enumerator.h +++ b/src/theory/strings/type_enumerator.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/substitutions.cpp b/src/theory/substitutions.cpp index 9b9fc56d7..af517dcf3 100644 --- a/src/theory/substitutions.cpp +++ b/src/theory/substitutions.cpp @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters, Clark Barrett ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/substitutions.h b/src/theory/substitutions.h index 48b8fa7e8..a4fd490c2 100644 --- a/src/theory/substitutions.h +++ b/src/theory/substitutions.h @@ -5,7 +5,7 @@ ** Major contributors: Clark Barrett, Dejan Jovanovic ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/term_registration_visitor.cpp b/src/theory/term_registration_visitor.cpp index 558975a72..0e573ce62 100644 --- a/src/theory/term_registration_visitor.cpp +++ b/src/theory/term_registration_visitor.cpp @@ -5,7 +5,7 @@ ** Major contributors: Andrew Reynolds ** Minor contributors (to current version): Tim King, Clark Barrett, Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/term_registration_visitor.h b/src/theory/term_registration_visitor.h index 478e82d19..a14b7a1ba 100644 --- a/src/theory/term_registration_visitor.h +++ b/src/theory/term_registration_visitor.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/theory.cpp b/src/theory/theory.cpp index d9281e8ba..509d7be02 100644 --- a/src/theory/theory.cpp +++ b/src/theory/theory.cpp @@ -2,10 +2,10 @@ /*! \file theory.cpp ** \verbatim ** Original author: Morgan Deters - ** Major contributors: Clark Barrett, Dejan Jovanovic - ** Minor contributors (to current version): Andrew Reynolds, Tim King + ** Major contributors: Clark Barrett, Dejan Jovanovic, Tim King + ** Minor contributors (to current version): Kshitij Bansal, Andrew Reynolds ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/theory.h b/src/theory/theory.h index 972abe3d8..7bfc7051f 100644 --- a/src/theory/theory.h +++ b/src/theory/theory.h @@ -2,10 +2,10 @@ /*! \file theory.h ** \verbatim ** Original author: Morgan Deters - ** Major contributors: Dejan Jovanovic - ** Minor contributors (to current version): Francois Bobot, Tim King, Andrew Reynolds, Clark Barrett + ** Major contributors: Tim King, Dejan Jovanovic + ** Minor contributors (to current version): Francois Bobot, Kshitij Bansal, Martin Brain <>, Clark Barrett, Andrew Reynolds ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/theory_engine.cpp b/src/theory/theory_engine.cpp index 2e80e1cda..eb1da84b2 100644 --- a/src/theory/theory_engine.cpp +++ b/src/theory/theory_engine.cpp @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Morgan Deters ** Major contributors: Dejan Jovanovic - ** Minor contributors (to current version): Christopher L. Conway, Kshitij Bansal, Liana Hadarean, Clark Barrett, Tim King, Andrew Reynolds + ** Minor contributors (to current version): Christopher L. Conway, Tianyi Liang, Kshitij Bansal, Clark Barrett, Liana Hadarean, Andrew Reynolds, Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/theory_engine.h b/src/theory/theory_engine.h index 946091167..e6684d56e 100644 --- a/src/theory/theory_engine.h +++ b/src/theory/theory_engine.h @@ -2,10 +2,10 @@ /*! \file theory_engine.h ** \verbatim ** Original author: Morgan Deters - ** Major contributors: Dejan Jovanovic - ** Minor contributors (to current version): Christopher L. Conway, Francois Bobot, Kshitij Bansal, Clark Barrett, Liana Hadarean, Tim King, Andrew Reynolds + ** Major contributors: Andrew Reynolds, Dejan Jovanovic + ** Minor contributors (to current version): Christopher L. Conway, Francois Bobot, Kshitij Bansal, Clark Barrett, Liana Hadarean, Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/theory_model.cpp b/src/theory/theory_model.cpp index 46eb5606b..70ae2c03b 100644 --- a/src/theory/theory_model.cpp +++ b/src/theory/theory_model.cpp @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Morgan Deters ** Major contributors: Andrew Reynolds, Clark Barrett - ** Minor contributors (to current version): Tim King + ** Minor contributors (to current version): Kshitij Bansal, Liana Hadarean, Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/theory_model.h b/src/theory/theory_model.h index 65b09befc..2eb33b0fb 100644 --- a/src/theory/theory_model.h +++ b/src/theory/theory_model.h @@ -5,7 +5,7 @@ ** Major contributors: Andrew Reynolds, Clark Barrett ** Minor contributors (to current version): Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/theory_registrar.h b/src/theory/theory_registrar.h index d8389bece..d04251585 100644 --- a/src/theory/theory_registrar.h +++ b/src/theory/theory_registrar.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters, Tim King ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/theory_test_utils.h b/src/theory/theory_test_utils.h index 28a749a41..6d1275c20 100644 --- a/src/theory/theory_test_utils.h +++ b/src/theory/theory_test_utils.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): Andrew Reynolds, Dejan Jovanovic ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/theory_traits_template.h b/src/theory/theory_traits_template.h index b9f3eec63..b052fb58f 100644 --- a/src/theory/theory_traits_template.h +++ b/src/theory/theory_traits_template.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/theoryof_mode.h b/src/theory/theoryof_mode.h index c50960257..c39120216 100644 --- a/src/theory/theoryof_mode.h +++ b/src/theory/theoryof_mode.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/type_enumerator.h b/src/theory/type_enumerator.h index 467bf1927..f0a76ee8a 100644 --- a/src/theory/type_enumerator.h +++ b/src/theory/type_enumerator.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/type_enumerator_template.cpp b/src/theory/type_enumerator_template.cpp index 76591487a..ca2413f90 100644 --- a/src/theory/type_enumerator_template.cpp +++ b/src/theory/type_enumerator_template.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/uf/equality_engine.cpp b/src/theory/uf/equality_engine.cpp index 65a9b246d..441d843fe 100644 --- a/src/theory/uf/equality_engine.cpp +++ b/src/theory/uf/equality_engine.cpp @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Dejan Jovanovic ** Major contributors: none - ** Minor contributors (to current version): Dejan Jovanovic, Tim King, Francois Bobot, Morgan Deters, Andrew Reynolds + ** Minor contributors (to current version): Dejan Jovanovic, Tianyi Liang, Tim King, Francois Bobot, Morgan Deters, Andrew Reynolds ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/uf/equality_engine.h b/src/theory/uf/equality_engine.h index 2961b510a..bf7c765b8 100644 --- a/src/theory/uf/equality_engine.h +++ b/src/theory/uf/equality_engine.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Dejan Jovanovic ** Major contributors: Morgan Deters - ** Minor contributors (to current version): Tim King, Dejan Jovanovic, Liana Hadarean, Andrew Reynolds + ** Minor contributors (to current version): Tim King, Kshitij Bansal, Dejan Jovanovic, Liana Hadarean, Andrew Reynolds ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/uf/equality_engine_types.h b/src/theory/uf/equality_engine_types.h index 0ee50c74d..d91d5e4f2 100644 --- a/src/theory/uf/equality_engine_types.h +++ b/src/theory/uf/equality_engine_types.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Dejan Jovanovic ** Major contributors: none - ** Minor contributors (to current version): Morgan Deters + ** Minor contributors (to current version): Morgan Deters, Andrew Reynolds ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/uf/options_handlers.h b/src/theory/uf/options_handlers.h index 029db809d..a885a10d2 100644 --- a/src/theory/uf/options_handlers.h +++ b/src/theory/uf/options_handlers.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/uf/symmetry_breaker.cpp b/src/theory/uf/symmetry_breaker.cpp index f5d7f9235..f60f15c92 100644 --- a/src/theory/uf/symmetry_breaker.cpp +++ b/src/theory/uf/symmetry_breaker.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/uf/symmetry_breaker.h b/src/theory/uf/symmetry_breaker.h index d04da048a..8cc2ef6a7 100644 --- a/src/theory/uf/symmetry_breaker.h +++ b/src/theory/uf/symmetry_breaker.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/uf/theory_uf.cpp b/src/theory/uf/theory_uf.cpp index 60f67a425..0da8e8c32 100644 --- a/src/theory/uf/theory_uf.cpp +++ b/src/theory/uf/theory_uf.cpp @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters, Dejan Jovanovic ** Minor contributors (to current version): Clark Barrett, Andrew Reynolds ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/uf/theory_uf.h b/src/theory/uf/theory_uf.h index f06a5ae87..11830f0e2 100644 --- a/src/theory/uf/theory_uf.h +++ b/src/theory/uf/theory_uf.h @@ -5,7 +5,7 @@ ** Major contributors: Dejan Jovanovic, Morgan Deters ** Minor contributors (to current version): Andrew Reynolds ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/uf/theory_uf_model.cpp b/src/theory/uf/theory_uf_model.cpp index 3b59c1c58..64f06ceb7 100644 --- a/src/theory/uf/theory_uf_model.cpp +++ b/src/theory/uf/theory_uf_model.cpp @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/uf/theory_uf_model.h b/src/theory/uf/theory_uf_model.h index e3ab24efa..970a7d6b3 100644 --- a/src/theory/uf/theory_uf_model.h +++ b/src/theory/uf/theory_uf_model.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/uf/theory_uf_rewriter.h b/src/theory/uf/theory_uf_rewriter.h index 3bd316c93..82dacb6c2 100644 --- a/src/theory/uf/theory_uf_rewriter.h +++ b/src/theory/uf/theory_uf_rewriter.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): Clark Barrett ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/uf/theory_uf_strong_solver.cpp b/src/theory/uf/theory_uf_strong_solver.cpp index 6ea3bbd21..001b21d0a 100644 --- a/src/theory/uf/theory_uf_strong_solver.cpp +++ b/src/theory/uf/theory_uf_strong_solver.cpp @@ -5,7 +5,7 @@ ** Major contributors: Andrew Reynolds ** Minor contributors (to current version): Clark Barrett ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/uf/theory_uf_strong_solver.h b/src/theory/uf/theory_uf_strong_solver.h index f59d46d36..1e5a361a7 100644 --- a/src/theory/uf/theory_uf_strong_solver.h +++ b/src/theory/uf/theory_uf_strong_solver.h @@ -5,7 +5,7 @@ ** Major contributors: Andrew Reynolds ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/uf/theory_uf_type_rules.h b/src/theory/uf/theory_uf_type_rules.h index 4f64da37e..c30742ac5 100644 --- a/src/theory/uf/theory_uf_type_rules.h +++ b/src/theory/uf/theory_uf_type_rules.h @@ -5,7 +5,7 @@ ** Major contributors: Christopher L. Conway, Andrew Reynolds, Morgan Deters ** Minor contributors (to current version): Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/unconstrained_simplifier.cpp b/src/theory/unconstrained_simplifier.cpp index c2fc9929a..d37aa1b7d 100644 --- a/src/theory/unconstrained_simplifier.cpp +++ b/src/theory/unconstrained_simplifier.cpp @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Clark Barrett ** Major contributors: none - ** Minor contributors (to current version): Tim King, Morgan Deters + ** Minor contributors (to current version): Kshitij Bansal, Morgan Deters, Tim King, Liana Hadarean, Peter Collingbourne ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/unconstrained_simplifier.h b/src/theory/unconstrained_simplifier.h index d41c7db5d..e23c4853d 100644 --- a/src/theory/unconstrained_simplifier.h +++ b/src/theory/unconstrained_simplifier.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Clark Barrett ** Major contributors: none - ** Minor contributors (to current version): Morgan Deters, Tim King + ** Minor contributors (to current version): Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/theory/valuation.h b/src/theory/valuation.h index a9d276f42..448d055d4 100644 --- a/src/theory/valuation.h +++ b/src/theory/valuation.h @@ -3,7 +3,7 @@ ** \verbatim ** Original author: Morgan Deters ** Major contributors: Dejan Jovanovic - ** Minor contributors (to current version): Tim King, Andrew Reynolds, Clark Barrett + ** Minor contributors (to current version): Tim King, Clark Barrett, Andrew Reynolds ** This file is part of the CVC4 project. ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing diff --git a/src/util/abstract_value.cpp b/src/util/abstract_value.cpp index 3ed372848..d99353b74 100644 --- a/src/util/abstract_value.cpp +++ b/src/util/abstract_value.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/abstract_value.h b/src/util/abstract_value.h index 39fd9e368..78a1e9975 100644 --- a/src/util/abstract_value.h +++ b/src/util/abstract_value.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/array.h b/src/util/array.h index 892e28a86..ab554171f 100644 --- a/src/util/array.h +++ b/src/util/array.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/array_store_all.cpp b/src/util/array_store_all.cpp index 7c9086276..dfd021e75 100644 --- a/src/util/array_store_all.cpp +++ b/src/util/array_store_all.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/array_store_all.h b/src/util/array_store_all.h index 6e60cc2cb..bccefdd58 100644 --- a/src/util/array_store_all.h +++ b/src/util/array_store_all.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/ascription_type.h b/src/util/ascription_type.h index 1f7ba0aaa..42906e557 100644 --- a/src/util/ascription_type.h +++ b/src/util/ascription_type.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/backtrackable.h b/src/util/backtrackable.h index 57ed94771..5492dd8b5 100644 --- a/src/util/backtrackable.h +++ b/src/util/backtrackable.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/bin_heap.h b/src/util/bin_heap.h index e666611a4..53c2a9bb6 100644 --- a/src/util/bin_heap.h +++ b/src/util/bin_heap.h @@ -2,7 +2,7 @@ /*! \file bin_heap.h ** \verbatim ** Original author: Tim King - ** Major contributors: none + ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. ** Copyright (c) 2009-2014 New York University and The University of Iowa diff --git a/src/util/bitvector.h b/src/util/bitvector.h index 35b052531..798dd63c7 100644 --- a/src/util/bitvector.h +++ b/src/util/bitvector.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters, Liana Hadarean ** Minor contributors (to current version): Christopher L. Conway ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/bool.h b/src/util/bool.h index 373b4fdec..2d5e15777 100644 --- a/src/util/bool.h +++ b/src/util/bool.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/boolean_simplification.cpp b/src/util/boolean_simplification.cpp index 8e077fe1d..62ef46339 100644 --- a/src/util/boolean_simplification.cpp +++ b/src/util/boolean_simplification.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/boolean_simplification.h b/src/util/boolean_simplification.h index be39f69c1..d0ca3646f 100644 --- a/src/util/boolean_simplification.h +++ b/src/util/boolean_simplification.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/cache.h b/src/util/cache.h index 8c2f9abca..5183c439b 100644 --- a/src/util/cache.h +++ b/src/util/cache.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/cardinality.cpp b/src/util/cardinality.cpp index 42f8519c1..dfee0aae2 100644 --- a/src/util/cardinality.cpp +++ b/src/util/cardinality.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/cardinality.h b/src/util/cardinality.h index 34aa9c08b..524d9cda4 100644 --- a/src/util/cardinality.h +++ b/src/util/cardinality.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/chain.h b/src/util/chain.h index e9216724e..e052a2ed8 100644 --- a/src/util/chain.h +++ b/src/util/chain.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/channel.h b/src/util/channel.h index 676371cbc..3644f786a 100644 --- a/src/util/channel.h +++ b/src/util/channel.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/cvc4_assert.cpp b/src/util/cvc4_assert.cpp index 08e2867f6..3db285182 100644 --- a/src/util/cvc4_assert.cpp +++ b/src/util/cvc4_assert.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/cvc4_assert.h b/src/util/cvc4_assert.h index 7d359a56b..cc854278b 100644 --- a/src/util/cvc4_assert.h +++ b/src/util/cvc4_assert.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): ACSYS ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/datatype.cpp b/src/util/datatype.cpp index f0ddc2cf6..9e07c746a 100644 --- a/src/util/datatype.cpp +++ b/src/util/datatype.cpp @@ -5,7 +5,7 @@ ** Major contributors: Andrew Reynolds ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/datatype.h b/src/util/datatype.h index befb3428d..32fae8235 100644 --- a/src/util/datatype.h +++ b/src/util/datatype.h @@ -2,10 +2,10 @@ /*! \file datatype.h ** \verbatim ** Original author: Morgan Deters - ** Major contributors: none - ** Minor contributors (to current version): Andrew Reynolds + ** Major contributors: Andrew Reynolds + ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/debug.h b/src/util/debug.h index 97c176f02..6ef196111 100644 --- a/src/util/debug.h +++ b/src/util/debug.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/dense_map.h b/src/util/dense_map.h index 10ca9f72f..39cee5b9e 100644 --- a/src/util/dense_map.h +++ b/src/util/dense_map.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Tim King ** Major contributors: none - ** Minor contributors (to current version): Morgan Deters, Dejan Jovanovic + ** Minor contributors (to current version): Dejan Jovanovic ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/didyoumean_test.cpp b/src/util/didyoumean_test.cpp index 2fe3331d9..0c46d5ffe 100644 --- a/src/util/didyoumean_test.cpp +++ b/src/util/didyoumean_test.cpp @@ -1,3 +1,20 @@ +/********************* */ +/*! \file didyoumean_test.cpp + ** \verbatim + ** Original author: Kshitij Bansal + ** Major contributors: none + ** Minor contributors (to current version): none + ** This file is part of the CVC4 project. + ** Copyright (c) 2009-2014 New York University and The University of Iowa + ** See the file COPYING in the top-level source directory for licensing + ** information.\endverbatim + ** + ** \brief [[ Add one-line brief description here ]] + ** + ** [[ Add lengthier description here ]] + ** \todo document this file + **/ + // Compile: g++ didyoumean_test.cpp didyoumean.cpp // For debug compile with -DDIDYOUMEAN_DEBUG or -DDIDYOUMEAN_DEBUG1 or both diff --git a/src/util/divisible.cpp b/src/util/divisible.cpp index 4e20d6b5f..ee085d25b 100644 --- a/src/util/divisible.cpp +++ b/src/util/divisible.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/divisible.h b/src/util/divisible.h index 0c0c7bc5b..6917bf2a6 100644 --- a/src/util/divisible.h +++ b/src/util/divisible.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/dump.cpp b/src/util/dump.cpp index e3baf10c5..53c5eae6a 100644 --- a/src/util/dump.cpp +++ b/src/util/dump.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/dump.h b/src/util/dump.h index a85062af1..2cf5877d4 100644 --- a/src/util/dump.h +++ b/src/util/dump.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/dynamic_array.h b/src/util/dynamic_array.h index 1f6e07cc7..18b1b645b 100644 --- a/src/util/dynamic_array.h +++ b/src/util/dynamic_array.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/emptyset.cpp b/src/util/emptyset.cpp index fa1bb8f10..7905f11fb 100644 --- a/src/util/emptyset.cpp +++ b/src/util/emptyset.cpp @@ -1,3 +1,20 @@ +/********************* */ +/*! \file emptyset.cpp + ** \verbatim + ** Original author: Kshitij Bansal + ** Major contributors: none + ** Minor contributors (to current version): none + ** This file is part of the CVC4 project. + ** Copyright (c) 2009-2014 New York University and The University of Iowa + ** See the file COPYING in the top-level source directory for licensing + ** information.\endverbatim + ** + ** \brief [[ Add one-line brief description here ]] + ** + ** [[ Add lengthier description here ]] + ** \todo document this file + **/ + #include "util/emptyset.h" #include diff --git a/src/util/emptyset.h b/src/util/emptyset.h index 43a868e42..4b3bb204f 100644 --- a/src/util/emptyset.h +++ b/src/util/emptyset.h @@ -2,7 +2,7 @@ /*! \file emptyset.h ** \verbatim ** Original author: Kshitij Bansal - ** Major contributors: none + ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. ** Copyright (c) 2009-2014 New York University and The University of Iowa diff --git a/src/util/exception.cpp b/src/util/exception.cpp index 08405c501..ab510c27d 100644 --- a/src/util/exception.cpp +++ b/src/util/exception.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/exception.h b/src/util/exception.h index cd4b763ef..937729f0c 100644 --- a/src/util/exception.h +++ b/src/util/exception.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/gmp_util.h b/src/util/gmp_util.h index b5654e9cb..d3f0d09d4 100644 --- a/src/util/gmp_util.h +++ b/src/util/gmp_util.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/hash.h b/src/util/hash.h index 0cdc96fcb..218cf0aab 100644 --- a/src/util/hash.h +++ b/src/util/hash.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): Dejan Jovanovic ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/index.h b/src/util/index.h index be3e2918b..ea0802b2d 100644 --- a/src/util/index.h +++ b/src/util/index.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): Liana Hadarean ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/integer.h.in b/src/util/integer.h.in index c3c6a70cd..3db9998a7 100644 --- a/src/util/integer.h.in +++ b/src/util/integer.h.in @@ -5,7 +5,7 @@ ** Major contributors: Tim King ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/integer_cln_imp.cpp b/src/util/integer_cln_imp.cpp index bd23b48c9..02086494b 100644 --- a/src/util/integer_cln_imp.cpp +++ b/src/util/integer_cln_imp.cpp @@ -1,3 +1,20 @@ +/********************* */ +/*! \file integer_cln_imp.cpp + ** \verbatim + ** Original author: Tim King + ** Major contributors: none + ** Minor contributors (to current version): none + ** This file is part of the CVC4 project. + ** Copyright (c) 2009-2014 New York University and The University of Iowa + ** See the file COPYING in the top-level source directory for licensing + ** information.\endverbatim + ** + ** \brief [[ Add one-line brief description here ]] + ** + ** [[ Add lengthier description here ]] + ** \todo document this file + **/ + #include "cvc4autoconfig.h" #include "util/integer.h" #include diff --git a/src/util/integer_cln_imp.h b/src/util/integer_cln_imp.h index 8b56c4b19..9f7f4a06b 100644 --- a/src/util/integer_cln_imp.h +++ b/src/util/integer_cln_imp.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): Dejan Jovanovic, Liana Hadarean ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/integer_gmp_imp.cpp b/src/util/integer_gmp_imp.cpp index bb6166523..2717d03f4 100644 --- a/src/util/integer_gmp_imp.cpp +++ b/src/util/integer_gmp_imp.cpp @@ -2,10 +2,10 @@ /*! \file integer_gmp_imp.cpp ** \verbatim ** Original author: Tim King - ** Major contributors: Morgan Deters, Christopher L. Conway + ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/integer_gmp_imp.h b/src/util/integer_gmp_imp.h index 68d335aec..d1f5050d5 100644 --- a/src/util/integer_gmp_imp.h +++ b/src/util/integer_gmp_imp.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters, Liana Hadarean ** Minor contributors (to current version): Dejan Jovanovic ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/ite_removal.cpp b/src/util/ite_removal.cpp index f1dce413c..68d7d9a34 100644 --- a/src/util/ite_removal.cpp +++ b/src/util/ite_removal.cpp @@ -2,10 +2,10 @@ /*! \file ite_removal.cpp ** \verbatim ** Original author: Dejan Jovanovic - ** Major contributors: Morgan Deters, Andrew Reynolds, Tim King - ** Minor contributors (to current version): Clark Barrett + ** Major contributors: Tim King, Morgan Deters + ** Minor contributors (to current version): Kshitij Bansal, Andrew Reynolds, Clark Barrett ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/ite_removal.h b/src/util/ite_removal.h index de5f83f27..83c55dab7 100644 --- a/src/util/ite_removal.h +++ b/src/util/ite_removal.h @@ -2,10 +2,10 @@ /*! \file ite_removal.h ** \verbatim ** Original author: Dejan Jovanovic - ** Major contributors: Kshitij Bansal, Morgan Deters, Tim King - ** Minor contributors (to current version): Andrew Reynolds, Clark Barrett + ** Major contributors: Kshitij Bansal, Tim King, Morgan Deters + ** Minor contributors (to current version): Clark Barrett ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/language.cpp b/src/util/language.cpp index 1a184e648..f19f20c03 100644 --- a/src/util/language.cpp +++ b/src/util/language.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Francois Bobot ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/language.h b/src/util/language.h index 0d1c5486a..be962bf3e 100644 --- a/src/util/language.h +++ b/src/util/language.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Francois Bobot ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/lemma_input_channel.h b/src/util/lemma_input_channel.h index 319de942c..44f0b87f5 100644 --- a/src/util/lemma_input_channel.h +++ b/src/util/lemma_input_channel.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/lemma_output_channel.h b/src/util/lemma_output_channel.h index 8f4f7461d..df7abd1e9 100644 --- a/src/util/lemma_output_channel.h +++ b/src/util/lemma_output_channel.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/matcher.h b/src/util/matcher.h index 4a3233261..107891a54 100644 --- a/src/util/matcher.h +++ b/src/util/matcher.h @@ -5,7 +5,7 @@ ** Major contributors: Andrew Reynolds ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/maybe.h b/src/util/maybe.h index b1c81f76e..4d279a0c7 100644 --- a/src/util/maybe.h +++ b/src/util/maybe.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Tim King ** Major contributors: none - ** Minor contributors (to current version): none + ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/model.cpp b/src/util/model.cpp index e25065c21..c1254ab47 100644 --- a/src/util/model.cpp +++ b/src/util/model.cpp @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/model.h b/src/util/model.h index 1d80b0308..98794a53d 100644 --- a/src/util/model.h +++ b/src/util/model.h @@ -5,7 +5,7 @@ ** Major contributors: Andrew Reynolds ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/nary_builder.cpp b/src/util/nary_builder.cpp index 08aceef6f..d89121fd7 100644 --- a/src/util/nary_builder.cpp +++ b/src/util/nary_builder.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/nary_builder.h b/src/util/nary_builder.h index 7676cadbc..c98e01b1b 100644 --- a/src/util/nary_builder.h +++ b/src/util/nary_builder.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/node_visitor.h b/src/util/node_visitor.h index 1d2bf0b9d..66a58efd1 100644 --- a/src/util/node_visitor.h +++ b/src/util/node_visitor.h @@ -5,7 +5,7 @@ ** Major contributors: Liana Hadarean, Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/ntuple.h b/src/util/ntuple.h index a342a11c1..b9e1100f1 100644 --- a/src/util/ntuple.h +++ b/src/util/ntuple.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/output.cpp b/src/util/output.cpp index d60330b0c..462043805 100644 --- a/src/util/output.cpp +++ b/src/util/output.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/output.h b/src/util/output.h index 7394f24ab..0974591db 100644 --- a/src/util/output.h +++ b/src/util/output.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Tim King, Dejan Jovanovic ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/predicate.cpp b/src/util/predicate.cpp index 1b473d5ad..787d329aa 100644 --- a/src/util/predicate.cpp +++ b/src/util/predicate.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/predicate.h b/src/util/predicate.h index 5fb3f806a..5ead2f090 100644 --- a/src/util/predicate.h +++ b/src/util/predicate.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/proof.h b/src/util/proof.h index aa81d3294..be1e2a8e2 100644 --- a/src/util/proof.h +++ b/src/util/proof.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/rational.h.in b/src/util/rational.h.in index c02886906..6f9c29c19 100644 --- a/src/util/rational.h.in +++ b/src/util/rational.h.in @@ -5,7 +5,7 @@ ** Major contributors: Tim King ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/rational_cln_imp.cpp b/src/util/rational_cln_imp.cpp index f674481de..e5e3608cb 100644 --- a/src/util/rational_cln_imp.cpp +++ b/src/util/rational_cln_imp.cpp @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters, Christopher L. Conway ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/rational_cln_imp.h b/src/util/rational_cln_imp.h index b144ab419..895fc1c9b 100644 --- a/src/util/rational_cln_imp.h +++ b/src/util/rational_cln_imp.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): Dejan Jovanovic ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/rational_gmp_imp.cpp b/src/util/rational_gmp_imp.cpp index 25c7dab59..155faebf2 100644 --- a/src/util/rational_gmp_imp.cpp +++ b/src/util/rational_gmp_imp.cpp @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters, Christopher L. Conway ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/rational_gmp_imp.h b/src/util/rational_gmp_imp.h index 273b3072d..6288be050 100644 --- a/src/util/rational_gmp_imp.h +++ b/src/util/rational_gmp_imp.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): Dejan Jovanovic ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/record.cpp b/src/util/record.cpp index 136f190a1..ea9b5495a 100644 --- a/src/util/record.cpp +++ b/src/util/record.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/record.h b/src/util/record.h index 63c54930e..5689a4209 100644 --- a/src/util/record.h +++ b/src/util/record.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/recursion_breaker.h b/src/util/recursion_breaker.h index a4177f600..3369c5c23 100644 --- a/src/util/recursion_breaker.h +++ b/src/util/recursion_breaker.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/regexp.cpp b/src/util/regexp.cpp index ce6f0d29b..b1b454cfa 100644 --- a/src/util/regexp.cpp +++ b/src/util/regexp.cpp @@ -2,10 +2,10 @@ /*! \file regexp.cpp ** \verbatim ** Original author: Tianyi Liang - ** Major contributors: none - ** Minor contributors (to current version): Morgan Deters + ** Major contributors: Morgan Deters + ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/regexp.h b/src/util/regexp.h index 9f522bdaa..e75ca1fad 100644 --- a/src/util/regexp.h +++ b/src/util/regexp.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/result.cpp b/src/util/result.cpp index 909a7d8c6..91b671262 100644 --- a/src/util/result.cpp +++ b/src/util/result.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/result.h b/src/util/result.h index 21bf563bd..8c804daa7 100644 --- a/src/util/result.h +++ b/src/util/result.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/sexpr.cpp b/src/util/sexpr.cpp index 52d992d4b..64b898d45 100644 --- a/src/util/sexpr.cpp +++ b/src/util/sexpr.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/sexpr.h b/src/util/sexpr.h index 0222382b0..a121b5195 100644 --- a/src/util/sexpr.h +++ b/src/util/sexpr.h @@ -5,7 +5,7 @@ ** Major contributors: Tim King, Morgan Deters ** Minor contributors (to current version): Dejan Jovanovic ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/sort_inference.cpp b/src/util/sort_inference.cpp index 90382c365..179bb1a23 100644 --- a/src/util/sort_inference.cpp +++ b/src/util/sort_inference.cpp @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Andrew Reynolds ** Major contributors: Morgan Deters - ** Minor contributors (to current version): none + ** Minor contributors (to current version): Kshitij Bansal ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/sort_inference.h b/src/util/sort_inference.h index 4cf2ab732..4bb1a072e 100644 --- a/src/util/sort_inference.h +++ b/src/util/sort_inference.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/statistics.cpp b/src/util/statistics.cpp index d632933b4..ff31e7b4b 100644 --- a/src/util/statistics.cpp +++ b/src/util/statistics.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/statistics.h b/src/util/statistics.h index 5b9e75837..a7088f5c5 100644 --- a/src/util/statistics.h +++ b/src/util/statistics.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/statistics_registry.cpp b/src/util/statistics_registry.cpp index 61762b84d..097869bc7 100644 --- a/src/util/statistics_registry.cpp +++ b/src/util/statistics_registry.cpp @@ -2,10 +2,10 @@ /*! \file statistics_registry.cpp ** \verbatim ** Original author: Morgan Deters - ** Major contributors: Tim King - ** Minor contributors (to current version): none + ** Major contributors: none + ** Minor contributors (to current version): Kshitij Bansal, Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/statistics_registry.h b/src/util/statistics_registry.h index 186433c5a..b9e3eaf8b 100644 --- a/src/util/statistics_registry.h +++ b/src/util/statistics_registry.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Morgan Deters ** Major contributors: Tim King - ** Minor contributors (to current version): none + ** Minor contributors (to current version): Kshitij Bansal ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/subrange_bound.h b/src/util/subrange_bound.h index 82dc940ea..b90656f33 100644 --- a/src/util/subrange_bound.h +++ b/src/util/subrange_bound.h @@ -5,7 +5,7 @@ ** Major contributors: Tim King ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/tls.h.in b/src/util/tls.h.in index e13149c3a..88969e250 100644 --- a/src/util/tls.h.in +++ b/src/util/tls.h.in @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/trans_closure.cpp b/src/util/trans_closure.cpp index 970d2542e..02b51d751 100644 --- a/src/util/trans_closure.cpp +++ b/src/util/trans_closure.cpp @@ -5,7 +5,7 @@ ** Major contributors: Andrew Reynolds ** Minor contributors (to current version): Dejan Jovanovic, Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/trans_closure.h b/src/util/trans_closure.h index 14e7ab95f..27f32377e 100644 --- a/src/util/trans_closure.h +++ b/src/util/trans_closure.h @@ -5,7 +5,7 @@ ** Major contributors: Andrew Reynolds ** Minor contributors (to current version): Dejan Jovanovic, Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/tuple.h b/src/util/tuple.h index 375a1aba3..fe016db2c 100644 --- a/src/util/tuple.h +++ b/src/util/tuple.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/uninterpreted_constant.cpp b/src/util/uninterpreted_constant.cpp index 6b98a7be8..f0d9a42d2 100644 --- a/src/util/uninterpreted_constant.cpp +++ b/src/util/uninterpreted_constant.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/uninterpreted_constant.h b/src/util/uninterpreted_constant.h index 869491538..c4fb776bc 100644 --- a/src/util/uninterpreted_constant.h +++ b/src/util/uninterpreted_constant.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/src/util/utility.h b/src/util/utility.h index 9b15adecd..59522901a 100644 --- a/src/util/utility.h +++ b/src/util/utility.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/system/CVC4JavaTest.java b/test/system/CVC4JavaTest.java index a2bae6fc6..902af6c26 100644 --- a/test/system/CVC4JavaTest.java +++ b/test/system/CVC4JavaTest.java @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/system/boilerplate.cpp b/test/system/boilerplate.cpp index aa4582c6a..8d5f3b795 100644 --- a/test/system/boilerplate.cpp +++ b/test/system/boilerplate.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/system/cvc3_george.cpp b/test/system/cvc3_george.cpp index 39f257b9d..267211ded 100644 --- a/test/system/cvc3_george.cpp +++ b/test/system/cvc3_george.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/system/cvc3_george.h b/test/system/cvc3_george.h index b9dbbac14..86b53008e 100644 --- a/test/system/cvc3_george.h +++ b/test/system/cvc3_george.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/system/cvc3_main.cpp b/test/system/cvc3_main.cpp index 641eae725..ada82a80f 100644 --- a/test/system/cvc3_main.cpp +++ b/test/system/cvc3_main.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/system/ouroborous.cpp b/test/system/ouroborous.cpp index c0582919d..4fbabf5f1 100644 --- a/test/system/ouroborous.cpp +++ b/test/system/ouroborous.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/system/smt2_compliance.cpp b/test/system/smt2_compliance.cpp index f8b6f8a95..593123426 100644 --- a/test/system/smt2_compliance.cpp +++ b/test/system/smt2_compliance.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/system/statistics.cpp b/test/system/statistics.cpp index 8139167a4..f955bd150 100644 --- a/test/system/statistics.cpp +++ b/test/system/statistics.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/system/two_smt_engines.cpp b/test/system/two_smt_engines.cpp index 2a4c73b7e..eb56aeebf 100644 --- a/test/system/two_smt_engines.cpp +++ b/test/system/two_smt_engines.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/context/cdlist_black.h b/test/unit/context/cdlist_black.h index a969ebd42..5f473478c 100644 --- a/test/unit/context/cdlist_black.h +++ b/test/unit/context/cdlist_black.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/context/cdlist_context_memory_black.h b/test/unit/context/cdlist_context_memory_black.h index fed2df5cb..359c3dce5 100644 --- a/test/unit/context/cdlist_context_memory_black.h +++ b/test/unit/context/cdlist_context_memory_black.h @@ -5,7 +5,7 @@ ** Major contributors: Tim King ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/context/cdmap_black.h b/test/unit/context/cdmap_black.h index 3ec697dd9..aad5c49d0 100644 --- a/test/unit/context/cdmap_black.h +++ b/test/unit/context/cdmap_black.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Tim King, Dejan Jovanovic ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/context/cdmap_white.h b/test/unit/context/cdmap_white.h index e71d2b4ad..84b8242b4 100644 --- a/test/unit/context/cdmap_white.h +++ b/test/unit/context/cdmap_white.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Dejan Jovanovic ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/context/cdo_black.h b/test/unit/context/cdo_black.h index c665423ac..fe04421b4 100644 --- a/test/unit/context/cdo_black.h +++ b/test/unit/context/cdo_black.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/context/cdvector_black.h b/test/unit/context/cdvector_black.h index 87cb19121..c2a5259ee 100644 --- a/test/unit/context/cdvector_black.h +++ b/test/unit/context/cdvector_black.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/context/context_black.h b/test/unit/context/context_black.h index bc7f5a639..494db312c 100644 --- a/test/unit/context/context_black.h +++ b/test/unit/context/context_black.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/context/context_mm_black.h b/test/unit/context/context_mm_black.h index 8c249996d..e58b22895 100644 --- a/test/unit/context/context_mm_black.h +++ b/test/unit/context/context_mm_black.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/context/context_white.h b/test/unit/context/context_white.h index 0461e9124..7ad70f061 100644 --- a/test/unit/context/context_white.h +++ b/test/unit/context/context_white.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/context/stacking_map_black.h b/test/unit/context/stacking_map_black.h index 92a9546c2..91e12a25e 100644 --- a/test/unit/context/stacking_map_black.h +++ b/test/unit/context/stacking_map_black.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/context/stacking_vector_black.h b/test/unit/context/stacking_vector_black.h index 82966a564..c7e185735 100644 --- a/test/unit/context/stacking_vector_black.h +++ b/test/unit/context/stacking_vector_black.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/expr/attribute_black.h b/test/unit/expr/attribute_black.h index b27d556c1..8fee6571d 100644 --- a/test/unit/expr/attribute_black.h +++ b/test/unit/expr/attribute_black.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters, Tim King ** Minor contributors (to current version): Christopher L. Conway ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/expr/attribute_white.h b/test/unit/expr/attribute_white.h index 7fa9972a6..11063cd1b 100644 --- a/test/unit/expr/attribute_white.h +++ b/test/unit/expr/attribute_white.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Dejan Jovanovic, Christopher L. Conway ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/expr/expr_manager_public.h b/test/unit/expr/expr_manager_public.h index f7c7f403a..727abe984 100644 --- a/test/unit/expr/expr_manager_public.h +++ b/test/unit/expr/expr_manager_public.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Tim King, Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/expr/expr_public.h b/test/unit/expr/expr_public.h index 4a9d73cb7..b70c51276 100644 --- a/test/unit/expr/expr_public.h +++ b/test/unit/expr/expr_public.h @@ -5,7 +5,7 @@ ** Major contributors: Christopher L. Conway, Dejan Jovanovic ** Minor contributors (to current version): Tim King, Clark Barrett ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/expr/kind_black.h b/test/unit/expr/kind_black.h index d591f0c9f..9deb8ce71 100644 --- a/test/unit/expr/kind_black.h +++ b/test/unit/expr/kind_black.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/expr/kind_map_black.h b/test/unit/expr/kind_map_black.h index 605dd92b5..489aaaa21 100644 --- a/test/unit/expr/kind_map_black.h +++ b/test/unit/expr/kind_map_black.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/expr/node_black.h b/test/unit/expr/node_black.h index 6cf85fb7e..9f8ecb69e 100644 --- a/test/unit/expr/node_black.h +++ b/test/unit/expr/node_black.h @@ -5,7 +5,7 @@ ** Major contributors: Tim King ** Minor contributors (to current version): Christopher L. Conway, Dejan Jovanovic ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/expr/node_builder_black.h b/test/unit/expr/node_builder_black.h index 1467b90c5..c71ba48c5 100644 --- a/test/unit/expr/node_builder_black.h +++ b/test/unit/expr/node_builder_black.h @@ -5,7 +5,7 @@ ** Major contributors: Christopher L. Conway, Morgan Deters ** Minor contributors (to current version): Dejan Jovanovic ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/expr/node_manager_black.h b/test/unit/expr/node_manager_black.h index 4c2cc97e2..9ca086d06 100644 --- a/test/unit/expr/node_manager_black.h +++ b/test/unit/expr/node_manager_black.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters, Dejan Jovanovic ** Minor contributors (to current version): Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/expr/node_manager_white.h b/test/unit/expr/node_manager_white.h index b272cb692..7bc279f47 100644 --- a/test/unit/expr/node_manager_white.h +++ b/test/unit/expr/node_manager_white.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/expr/node_self_iterator_black.h b/test/unit/expr/node_self_iterator_black.h index 31de84643..9f90bd1b0 100644 --- a/test/unit/expr/node_self_iterator_black.h +++ b/test/unit/expr/node_self_iterator_black.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/expr/node_white.h b/test/unit/expr/node_white.h index 58ef7134f..bcb3155e1 100644 --- a/test/unit/expr/node_white.h +++ b/test/unit/expr/node_white.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Tim King, Dejan Jovanovic ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/expr/symbol_table_black.h b/test/unit/expr/symbol_table_black.h index 386bcaa91..2acd1ebae 100644 --- a/test/unit/expr/symbol_table_black.h +++ b/test/unit/expr/symbol_table_black.h @@ -5,7 +5,7 @@ ** Major contributors: Christopher L. Conway ** Minor contributors (to current version): Dejan Jovanovic ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/expr/type_cardinality_public.h b/test/unit/expr/type_cardinality_public.h index 3c2609e3e..8eb59952a 100644 --- a/test/unit/expr/type_cardinality_public.h +++ b/test/unit/expr/type_cardinality_public.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/expr/type_node_white.h b/test/unit/expr/type_node_white.h index ae6e00616..ce1ce1534 100644 --- a/test/unit/expr/type_node_white.h +++ b/test/unit/expr/type_node_white.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/main/interactive_shell_black.h b/test/unit/main/interactive_shell_black.h index fa2a3f0e2..b09246d95 100644 --- a/test/unit/main/interactive_shell_black.h +++ b/test/unit/main/interactive_shell_black.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/memory.h b/test/unit/memory.h index 44eec00d0..2809edee7 100644 --- a/test/unit/memory.h +++ b/test/unit/memory.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/parser/parser_black.h b/test/unit/parser/parser_black.h index 8ff62c25a..c157db8c4 100644 --- a/test/unit/parser/parser_black.h +++ b/test/unit/parser/parser_black.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/parser/parser_builder_black.h b/test/unit/parser/parser_builder_black.h index 58432ff86..c2c7cc18d 100644 --- a/test/unit/parser/parser_builder_black.h +++ b/test/unit/parser/parser_builder_black.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/prop/cnf_stream_white.h b/test/unit/prop/cnf_stream_white.h index ccba0164a..665126059 100644 --- a/test/unit/prop/cnf_stream_white.h +++ b/test/unit/prop/cnf_stream_white.h @@ -5,7 +5,7 @@ ** Major contributors: Dejan Jovanovic, Christopher L. Conway ** Minor contributors (to current version): Liana Hadarean ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/theory/logic_info_white.h b/test/unit/theory/logic_info_white.h index d568f8c1f..007378528 100644 --- a/test/unit/theory/logic_info_white.h +++ b/test/unit/theory/logic_info_white.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Morgan Deters ** Major contributors: none - ** Minor contributors (to current version): Tianyi Liang + ** Minor contributors (to current version): Kshitij Bansal, Tianyi Liang ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/theory/stacking_map_black.h b/test/unit/theory/stacking_map_black.h index d867ef7fa..8097220ad 100644 --- a/test/unit/theory/stacking_map_black.h +++ b/test/unit/theory/stacking_map_black.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/theory/theory_arith_white.h b/test/unit/theory/theory_arith_white.h index d117f5173..58bbe7a2b 100644 --- a/test/unit/theory/theory_arith_white.h +++ b/test/unit/theory/theory_arith_white.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Tim King ** Major contributors: Morgan Deters - ** Minor contributors (to current version): Dejan Jovanovic + ** Minor contributors (to current version): Kshitij Bansal, Dejan Jovanovic ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/theory/theory_black.h b/test/unit/theory/theory_black.h index 4644d3385..bafd572c3 100644 --- a/test/unit/theory/theory_black.h +++ b/test/unit/theory/theory_black.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Tim King ** Major contributors: Clark Barrett - ** Minor contributors (to current version): none + ** Minor contributors (to current version): Liana Hadarean ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/theory/theory_bv_white.h b/test/unit/theory/theory_bv_white.h index 64dd680ae..eed173366 100644 --- a/test/unit/theory/theory_bv_white.h +++ b/test/unit/theory/theory_bv_white.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Liana Hadarean ** Major contributors: none - ** Minor contributors (to current version): Dejan Jovanovic, Morgan Deters + ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/theory/theory_engine_white.h b/test/unit/theory/theory_engine_white.h index e32e49801..7440de350 100644 --- a/test/unit/theory/theory_engine_white.h +++ b/test/unit/theory/theory_engine_white.h @@ -5,7 +5,7 @@ ** Major contributors: Dejan Jovanovic ** Minor contributors (to current version): Andrew Reynolds, Christopher L. Conway, Tim King ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/theory/theory_white.h b/test/unit/theory/theory_white.h index 3259381ad..08447b86d 100644 --- a/test/unit/theory/theory_white.h +++ b/test/unit/theory/theory_white.h @@ -5,7 +5,7 @@ ** Major contributors: Tim King ** Minor contributors (to current version): Dejan Jovanovic, Clark Barrett ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/theory/type_enumerator_white.h b/test/unit/theory/type_enumerator_white.h index 4e80b7d20..3dcb2db85 100644 --- a/test/unit/theory/type_enumerator_white.h +++ b/test/unit/theory/type_enumerator_white.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/util/array_store_all_black.h b/test/unit/util/array_store_all_black.h index 094368703..ea7b89191 100644 --- a/test/unit/util/array_store_all_black.h +++ b/test/unit/util/array_store_all_black.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/util/assert_white.h b/test/unit/util/assert_white.h index 6ecd013c9..38dfe87e6 100644 --- a/test/unit/util/assert_white.h +++ b/test/unit/util/assert_white.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/util/bitvector_black.h b/test/unit/util/bitvector_black.h index 505aa3e7f..b93bfafc3 100644 --- a/test/unit/util/bitvector_black.h +++ b/test/unit/util/bitvector_black.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/util/boolean_simplification_black.h b/test/unit/util/boolean_simplification_black.h index e032f48cc..e2937ccb2 100644 --- a/test/unit/util/boolean_simplification_black.h +++ b/test/unit/util/boolean_simplification_black.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/util/cardinality_public.h b/test/unit/util/cardinality_public.h index 8d05f96f8..732bb0dbb 100644 --- a/test/unit/util/cardinality_public.h +++ b/test/unit/util/cardinality_public.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/util/configuration_black.h b/test/unit/util/configuration_black.h index 978b73eab..2d7378a67 100644 --- a/test/unit/util/configuration_black.h +++ b/test/unit/util/configuration_black.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/util/datatype_black.h b/test/unit/util/datatype_black.h index 0bb98c3f2..addd716e5 100644 --- a/test/unit/util/datatype_black.h +++ b/test/unit/util/datatype_black.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Andrew Reynolds ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/util/exception_black.h b/test/unit/util/exception_black.h index 1dab7c6a6..d2ae7d3e5 100644 --- a/test/unit/util/exception_black.h +++ b/test/unit/util/exception_black.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/util/integer_black.h b/test/unit/util/integer_black.h index de5669c11..36de17cba 100644 --- a/test/unit/util/integer_black.h +++ b/test/unit/util/integer_black.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): Christopher L. Conway ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/util/integer_white.h b/test/unit/util/integer_white.h index 70b692412..12eabfbb2 100644 --- a/test/unit/util/integer_white.h +++ b/test/unit/util/integer_white.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/util/output_black.h b/test/unit/util/output_black.h index c507d8552..0b151ef3f 100644 --- a/test/unit/util/output_black.h +++ b/test/unit/util/output_black.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/util/rational_black.h b/test/unit/util/rational_black.h index 7cd4c4ce4..d25c9473c 100644 --- a/test/unit/util/rational_black.h +++ b/test/unit/util/rational_black.h @@ -5,7 +5,7 @@ ** Major contributors: Morgan Deters ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/util/rational_white.h b/test/unit/util/rational_white.h index b9d0002f8..dfd0fa43b 100644 --- a/test/unit/util/rational_white.h +++ b/test/unit/util/rational_white.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/util/recursion_breaker_black.h b/test/unit/util/recursion_breaker_black.h index 9cbecae93..8bbc4c3b0 100644 --- a/test/unit/util/recursion_breaker_black.h +++ b/test/unit/util/recursion_breaker_black.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/util/stats_black.h b/test/unit/util/stats_black.h index 02daf8066..67deede75 100644 --- a/test/unit/util/stats_black.h +++ b/test/unit/util/stats_black.h @@ -3,9 +3,9 @@ ** \verbatim ** Original author: Morgan Deters ** Major contributors: none - ** Minor contributors (to current version): none + ** Minor contributors (to current version): Kshitij Bansal ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/util/subrange_bound_white.h b/test/unit/util/subrange_bound_white.h index 2261c0bbb..71947b297 100644 --- a/test/unit/util/subrange_bound_white.h +++ b/test/unit/util/subrange_bound_white.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): none ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** diff --git a/test/unit/util/trans_closure_black.h b/test/unit/util/trans_closure_black.h index f2ae8fbe1..1c88ae427 100644 --- a/test/unit/util/trans_closure_black.h +++ b/test/unit/util/trans_closure_black.h @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): Morgan Deters ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2013 New York University and The University of Iowa + ** Copyright (c) 2009-2014 New York University and The University of Iowa ** See the file COPYING in the top-level source directory for licensing ** information.\endverbatim ** -- cgit v1.2.3 From e926fd162c6cee95d31044305e3b4df90b59f9fc Mon Sep 17 00:00:00 2001 From: Kshitij Bansal Date: Thu, 3 Jul 2014 18:37:51 -0400 Subject: change lemma generation behavior don't store lemmas in a pending queue, instead generate them right away doing with pending queue is tricky, needs rethinking to do it properly --- src/theory/sets/theory_sets_private.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/theory') diff --git a/src/theory/sets/theory_sets_private.cpp b/src/theory/sets/theory_sets_private.cpp index 5d3ec5fc5..592b4bc37 100644 --- a/src/theory/sets/theory_sets_private.cpp +++ b/src/theory/sets/theory_sets_private.cpp @@ -814,15 +814,19 @@ void TheorySetsPrivate::addToPending(Node n) { Assert(n.getKind() == kind::EQUAL); d_pendingDisequal.push(n); } + d_external.d_out->lemma(getLemma()); + Assert(isComplete()); } } bool TheorySetsPrivate::isComplete() { - while(!d_pending.empty() && present(d_pending.front())) { - Debug("sets-pending") << "[sets-pending] removing as already present: " - << d_pending.front() << std::endl; - d_pending.pop(); - } + // while(!d_pending.empty() && + // (d_pendingEverInserted.find(d_pending.front()) != d_pendingEverInserted.end() + // || present(d_pending.front()) ) ) { + // Debug("sets-pending") << "[sets-pending] removing as already present: " + // << d_pending.front() << std::endl; + // d_pending.pop(); + // } return d_pending.empty() && d_pendingDisequal.empty(); } -- cgit v1.2.3