-CVC4 is copyright (C) 2009, 2010, 2011, 2012 New York University and
-The University of Iowa. All rights reserved.
+CVC4 is copyright (C) 2009, 2010, 2011, 2012, 2013 New York University
+and The University of Iowa. All rights reserved.
CVC4 is open-source; distribution is under the terms of the modified BSD
license. However, certain builds of CVC4 link against GPLed libraries,
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--- Morgan Deters <mdeters@cs.nyu.edu> Fri, 04 Feb 2011 14:56:41 -0500
+-- Morgan Deters <mdeters@cs.nyu.edu> Mon, 28 Jan 2013 17:22:36 -0500
CVC4 incorporates MiniSat code, excluded from the above copyright.
See src/sat/minisat. Its copyright:
-#!/bin/sh
+#!/bin/bash -ex
#
# configure-in-place
# Morgan Deters <mdeters@cs.nyu.edu> for CVC4
-# Copyright (c) 2010, 2011 The CVC4 Project
+# Copyright (c) 2010-2013 The CVC4 Project
#
# usage: configure-in-place [ arguments... ]
#
# should be invoked).
#
-if [ -e .svn ]; then
+if [ -e .git ] && ! [ x"$1" = x-f ]; then
echo
- echo "DO NOT USE THIS IN SUBVERSION WORKING DIRECTORIES!"
+ echo "DO NOT USE THIS IN GIT WORKING DIRECTORIES!"
echo
echo "You might accidentally commit Makefiles in the source directories"
echo "improperly, since they exist in the source directory for"
exit 1
fi
+if [ x"$1" = x-f ]; then
+ shift
+fi
+
./configure "$@"
-. builds/current
-builds/$(CURRENT_BUILD)/config.status
+CURRENT_BUILD="$(grep '^CURRENT_BUILD *= *' builds/current | awk 'BEGIN {FS=" *= *"} {print$2}')"
+builds/$CURRENT_BUILD/config.status
echo "MacPorts must be installed (but this script installs prerequisite port" >&2
echo "packages for CVC4). If this script is successful, it prints a configure" >&2
echo "line that you can use to configure CVC4." >&2
+ exit 1
fi
function reporterror {
/********************* */
-/*! \file Combination.cpp
+/*! \file Combination.java
** \verbatim
** Original author: mdeters
** Major contributors: none
* If the key is a TNode and the backing (the hard node reference)
* for the key in another data structure removes the key at the same context
* the ref count could drop to 0. The key would then not be eligible to be
- * hashed. Getting the order right with a guarentee is to hard.
+ * hashed. Getting the order right with a guarantee is too hard.
*/
BOOST_STATIC_ASSERT(sizeof(Data) == 0);
return d_trailMap->find(k);
}
- /** Returns an iterator to the begining of the map. */
+ /** Returns an iterator to the beginning of the map. */
const_iterator begin() const{
return d_trailMap->begin();
}
* If the key is a TNode and the backing (the hard node reference)
* for the key in another data structure removes the key at the same context
* the ref count could drop to 0. The key would then not be eligible to be
- * hashed. Getting the order right with a guarentee is to hard.
+ * hashed. Getting the order right with a guarantee is too hard.
*/
BOOST_STATIC_ASSERT(sizeof(Data) == 0);
SatValue DecisionEngine::getPolarity(SatVariable var)
{
- Debug("decision") << "getPolariry(" << var <<")" << std::endl;
+ Debug("decision") << "getPolarity(" << var <<")" << std::endl;
if(d_relevancyStrategy != NULL) {
Assert(isRelevant(var));
return d_relevancyStrategy->getPolarity( d_cnfStream->getNode(SatLiteral(var)) );
** See the file COPYING in the top-level source directory for licensing
** information.\endverbatim
**
- ** \brief Decision stategy
+ ** \brief Decision strategy
**
** Decision strategy
**/
/**
* The command when an attribute is set by a user. In SMT-LIBv2 this is done
- * via the syntax (! expr :atrr)
+ * via the syntax (! expr :attr)
*/
class CVC4_PUBLIC SetUserAttributeCommand : public Command {
protected:
#
# mkexpr
# Morgan Deters <mdeters@cs.nyu.edu> for CVC4
-# Copyright (c) 2010-2012 The CVC4 Project
+# Copyright (c) 2010-2013 The CVC4 Project
#
# The purpose of this script is to create {expr,expr_manager}.{h,cpp}
# from template files and a list of theory kinds. Basically it just
# Output is to standard out.
#
-copyright=2010-2012
+copyright=2010-2013
filename=`basename "$1" | sed 's,_template,,'`
/********************* */
/** $filename
**
- ** Copyright $copyright The AcSys Group, New York University, and as below.
+ ** Copyright $copyright New York University and The University of Iowa,
+ ** and as below.
**
** This file automatically generated by:
**
#
# mkkind
# Morgan Deters <mdeters@cs.nyu.edu> for CVC4
-# Copyright (c) 2010-2012 The CVC4 Project
+# Copyright (c) 2010-2013 The CVC4 Project
#
# The purpose of this script is to create kind.h (and also
# type_properties.h) from a template and a list of theory kinds.
# Output is to standard out.
#
-copyright=2010-2012
+copyright=2010-2013
filename=`basename "$1" | sed 's,_template,,'`
/********************* */
/** $filename
**
- ** Copyright $copyright The AcSys Group, New York University, and as below.
+ ** Copyright $copyright New York University and The University of Iowa,
+ ** and as below.
**
** This header file automatically generated by:
**
#
# mkmetakind
# Morgan Deters <mdeters@cs.nyu.edu> for CVC4
-# Copyright (c) 2010-2012 The CVC4 Project
+# Copyright (c) 2010-2013 The CVC4 Project
#
# The purpose of this script is to create metakind.h from a template
# and a list of theory kinds.
# Output is to standard out.
#
-copyright=2010-2012
+copyright=2010-2013
cat <<EOF
/********************* */
/** metakind.h
**
- ** Copyright $copyright The AcSys Group, New York University, and as below.
+ ** Copyright $copyright New York University and The University of Iowa,
+ ** and as below.
**
** This header file automatically generated by:
**
#
# mkoptions
# Morgan Deters <mdeters@cs.nyu.edu> for CVC4
-# Copyright (c) 2011-2012 The CVC4 Project
+# Copyright (c) 2011-2013 The CVC4 Project
#
# The purpose of this script is to create options.{h,cpp}
# from template files and a list of options.
# mkoptions (template-file output-file)+ -t options.h-template options.cpp-template (options-file output-dir)+
#
-copyright=2011-2012
+copyright=2011-2013
me=$(basename "$0")
/********************* */
/** $filename
**
- ** Copyright $copyright The AcSys Group, New York University, and as below.
+ ** Copyright $copyright New York University and The University of Iowa,
+ ** and as below.
**
** This file automatically generated by:
**
/********************* */
/** $filename
**
- ** Copyright $copyright The AcSys Group, New York University, and as below.
+ ** Copyright $copyright New York University and The University of Iowa,
+ ** and as below.
**
** This file automatically generated by:
**
}
-/// Return a string that represents the name assoicated with the input source
+/// Return a string that represents the name associated with the input source
///
/// /param[in] is The ANTLR3_INT_STREAM interface that is representing this token stream.
///
@header {
/**
- ** This file is part of the CVC4 prototype.
- ** Copyright (c) 2009, 2010, 2011 The Analysis of Computer Systems Group (ACSys)
- ** Courant Institute of Mathematical Sciences
- ** New York University
+ ** This file is part of CVC4.
+ ** 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.
**/
+/* ******************* */
/*! \file Smt1.g
** \verbatim
** Original author: cconway
@header {
/**
- ** This file is part of the CVC4 prototype.
- ** Copyright (c) 2009, 2010, 2011 The Analysis of Computer Systems Group (ACSys)
- ** Courant Institute of Mathematical Sciences
- ** New York University
+ ** This file is part of CVC4.
+ ** 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.
**/
@header {
/**
- ** This file is part of the CVC4 prototype.
- ** Copyright (c) 2009-2012 The Analysis of Computer Systems Group (ACSys)
- ** Courant Institute of Mathematical Sciences
- ** New York University
+ ** This file is part of CVC4.
+ ** 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.
**/
/** The ANTLR3 SMT2 lexer for the input. */
pSmt2Lexer d_pSmt2Lexer;
- /** The ANTLR3 CVC parser for the input. */
+ /** The ANTLR3 SMT2 parser for the input. */
pSmt2Parser d_pSmt2Parser;
/**
@header {
/**
- ** This file is part of the CVC4 prototype.
- ** Copyright (c) 2009, 2010, 2011 The Analysis of Computer Systems Group (ACSys)
- ** Courant Institute of Mathematical Sciences
- ** New York University
+ ** This file is part of CVC4.
+ ** 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.
**/
if( d_tptpDir.empty() ){
parseError("Couldn't open included file: " + fileName
- + " at " + currentDirFileName + " and the TPTP directory is not specified (environnement variable TPTP)");
+ + " at " + currentDirFileName + " and the TPTP directory is not specified (environment variable TPTP)");
};
std::string tptpDirFileName = d_tptpDir + fileName;
* Does a depth first search on removed literals and adds the literals
* to be removed in the proper order to the stack.
*
- * @param lit the literal we are recusing on
- * @param removedSet the previously computed set of redundantant literals
+ * @param lit the literal we are recursing on
+ * @param removedSet the previously computed set of redundant literals
* @param removeStack the stack of literals in reverse order of resolution
*/
void removedDfs(::Minisat::Lit lit, LitSet* removedSet, LitVector& removeStack, LitSet& inClause, LitSet& seen);
--- /dev/null
+topdir = ../../..
+srcdir = src/prop/bvminisat
+
+include $(topdir)/Makefile.subdir
}
void nmNotifyNewSkolem(TNode n, const std::string& comment, bool isGlobal) {
- std::string id = n.getAttribute(expr::VarNameAttr());
+ string id = n.getAttribute(expr::VarNameAttr());
DeclareFunctionCommand c(id,
n.toExpr(),
n.getType().toType());
}/* namespace CVC4::smt */
-using namespace CVC4::smt;
-
SmtEngine::SmtEngine(ExprManager* em) throw() :
d_context(em->getContext()),
d_userLevels(),
if(options::checkModels()) {
if(! options::produceModels()) {
- Notice() << "SmtEngine: turning on produce-models to support check-model" << std::endl;
+ Notice() << "SmtEngine: turning on produce-models to support check-model" << endl;
setOption("produce-models", SExpr("true"));
}
if(! options::interactive()) {
- Notice() << "SmtEngine: turning on interactive-mode to support check-model" << std::endl;
+ Notice() << "SmtEngine: turning on interactive-mode to support check-model" << endl;
setOption("interactive-mode", SExpr("true"));
}
}
if(options::produceAssignments() && !options::produceModels()) {
- Notice() << "SmtEngine: turning on produce-models to support produce-assignments" << std::endl;
+ Notice() << "SmtEngine: turning on produce-models to support produce-assignments" << endl;
setOption("produce-models", SExpr("true"));
}
// by default, symmetry breaker is on only for QF_UF
if(! options::ufSymmetryBreaker.wasSetByUser()) {
bool qf_uf = d_logic.isPure(THEORY_UF) && !d_logic.isQuantified();
- Trace("smt") << "setting uf symmetry breaker to " << qf_uf << std::endl;
+ Trace("smt") << "setting uf symmetry breaker to " << qf_uf << endl;
options::ufSymmetryBreaker.set(qf_uf);
}
// by default, nonclausal simplification is off for QF_SAT and for quantifiers
if(! options::simplificationMode.wasSetByUser()) {
bool qf_sat = d_logic.isPure(THEORY_BOOL) && !d_logic.isQuantified();
bool quantifiers = d_logic.isQuantified();
- Trace("smt") << "setting simplification mode to <" << d_logic.getLogicString() << "> " << (!qf_sat && !quantifiers) << std::endl;
- //simplifaction=none works better for SMT LIB benchmarks with quantifiers, not others
+ Trace("smt") << "setting simplification mode to <" << d_logic.getLogicString() << "> " << (!qf_sat && !quantifiers) << endl;
+ //simplification=none works better for SMT LIB benchmarks with quantifiers, not others
//options::simplificationMode.set(qf_sat || quantifiers ? SIMPLIFICATION_MODE_NONE : SIMPLIFICATION_MODE_BATCH);
options::simplificationMode.set(qf_sat ? SIMPLIFICATION_MODE_NONE : SIMPLIFICATION_MODE_BATCH);
}
bool iteSimp = !d_logic.isQuantified() &&
((d_logic.isPure(THEORY_ARITH) && d_logic.isLinear() && !d_logic.isDifferenceLogic() && !d_logic.areRealsUsed()) ||
(d_logic.isTheoryEnabled(THEORY_ARRAY) && d_logic.isTheoryEnabled(THEORY_UF) && d_logic.isTheoryEnabled(THEORY_BV)));
- Trace("smt") << "setting ite simplification to " << iteSimp << std::endl;
+ Trace("smt") << "setting ite simplification to " << iteSimp << endl;
options::doITESimp.set(iteSimp);
}
// Turn on multiple-pass non-clausal simplification for QF_AUFBV
if(! options::repeatSimp.wasSetByUser()) {
bool repeatSimp = !d_logic.isQuantified() &&
(d_logic.isTheoryEnabled(THEORY_ARRAY) && d_logic.isTheoryEnabled(THEORY_UF) && d_logic.isTheoryEnabled(THEORY_BV));
- Trace("smt") << "setting repeat simplification to " << repeatSimp << std::endl;
+ Trace("smt") << "setting repeat simplification to " << repeatSimp << endl;
options::repeatSimp.set(repeatSimp);
}
// Turn on unconstrained simplification for QF_AUFBV
// bool uncSimp = false && !qf_sat && !options::incrementalSolving();
bool uncSimp = !options::incrementalSolving() && !d_logic.isQuantified() && !options::produceModels() && !options::checkModels() &&
(d_logic.isTheoryEnabled(THEORY_ARRAY) && d_logic.isTheoryEnabled(THEORY_BV));
- Trace("smt") << "setting unconstrained simplification to " << uncSimp << std::endl;
+ Trace("smt") << "setting unconstrained simplification to " << uncSimp << endl;
options::unconstrainedSimp.set(uncSimp);
}
// Unconstrained simp currently does *not* support model generation
if (options::unconstrainedSimp.wasSetByUser() && options::unconstrainedSimp()) {
if (options::produceModels()) {
- Notice() << "SmtEngine: turning off produce-models to support unconstrainedSimp" << std::endl;
+ Notice() << "SmtEngine: turning off produce-models to support unconstrainedSimp" << endl;
setOption("produce-models", SExpr("false"));
}
if (options::checkModels()) {
- Notice() << "SmtEngine: turning off check-models to support unconstrainedSimp" << std::endl;
+ Notice() << "SmtEngine: turning off check-models to support unconstrainedSimp" << endl;
setOption("check-models", SExpr("false"));
}
}
// Turn on arith rewrite equalities only for pure arithmetic
if(! options::arithRewriteEq.wasSetByUser()) {
bool arithRewriteEq = d_logic.isPure(THEORY_ARITH) && !d_logic.isQuantified();
- Trace("smt") << "setting arith rewrite equalities " << arithRewriteEq << std::endl;
+ Trace("smt") << "setting arith rewrite equalities " << arithRewriteEq << endl;
options::arithRewriteEq.set(arithRewriteEq);
}
if(! options::arithHeuristicPivots.wasSetByUser()) {
heuristicPivots = 0;
}
}
- Trace("smt") << "setting arithHeuristicPivots " << heuristicPivots << std::endl;
+ Trace("smt") << "setting arithHeuristicPivots " << heuristicPivots << endl;
options::arithHeuristicPivots.set(heuristicPivots);
}
if(! options::arithPivotThreshold.wasSetByUser()){
pivotThreshold = 16;
}
}
- Trace("smt") << "setting arith arithPivotThreshold " << pivotThreshold << std::endl;
+ Trace("smt") << "setting arith arithPivotThreshold " << pivotThreshold << endl;
options::arithPivotThreshold.set(pivotThreshold);
}
if(! options::arithStandardCheckVarOrderPivots.wasSetByUser()){
if(d_logic.isPure(THEORY_ARITH) && !d_logic.isQuantified()){
varOrderPivots = 200;
}
- Trace("smt") << "setting arithStandardCheckVarOrderPivots " << varOrderPivots << std::endl;
+ Trace("smt") << "setting arithStandardCheckVarOrderPivots " << varOrderPivots << endl;
options::arithStandardCheckVarOrderPivots.set(varOrderPivots);
}
// Turn off early theory preprocessing if arithRewriteEq is on
? true : false
);
- Trace("smt") << "setting decision mode to " << decMode << std::endl;
+ Trace("smt") << "setting decision mode to " << decMode << endl;
options::decisionMode.set(decMode);
options::decisionStopOnly.set(stoponly);
}
//for finite model finding
if( ! options::instWhenMode.wasSetByUser()){
if( options::fmfInstEngine() ){
- Trace("smt") << "setting inst when mode to LAST_CALL" << std::endl;
+ Trace("smt") << "setting inst when mode to LAST_CALL" << endl;
options::instWhenMode.set( INST_WHEN_LAST_CALL );
}
}
}
else if (options::minisatUseElim()) {
if (options::produceModels()) {
- Notice() << "SmtEngine: turning off produce-models to support minisatUseElim" << std::endl;
+ Notice() << "SmtEngine: turning off produce-models to support minisatUseElim" << endl;
setOption("produce-models", SExpr("false"));
}
if (options::checkModels()) {
- Notice() << "SmtEngine: turning off check-models to support minisatUseElim" << std::endl;
+ Notice() << "SmtEngine: turning off check-models to support minisatUseElim" << endl;
setOption("check-models", SExpr("false"));
}
}
if (d_logic.isTheoryEnabled(theory::THEORY_ARITH) &&
!d_logic.isLinear()) {
if (options::produceModels()) {
- Warning() << "SmtEngine: turning off produce-models because unsupported for nonlinear arith" << std::endl;
+ Warning() << "SmtEngine: turning off produce-models because unsupported for nonlinear arith" << endl;
setOption("produce-models", SExpr("false"));
}
if (options::checkModels()) {
- Warning() << "SmtEngine: turning off check-models because unsupported for nonlinear arith" << std::endl;
+ Warning() << "SmtEngine: turning off check-models because unsupported for nonlinear arith" << endl;
setOption("check-models", SExpr("false"));
}
}
Trace("smt") << "SMT setInfo(" << key << ", " << value << ")" << endl;
if(Dump.isOn("benchmark")) {
if(key == "status") {
- std::string s = value.getValue();
+ string s = value.getValue();
BenchmarkStatus status =
(s == "sat") ? SMT_SATISFIABLE :
((s == "unsat") ? SMT_UNSATISFIABLE : SMT_UNKNOWN);
// Permit (check-sat) (define-fun ...) (get-value ...) sequences.
// Otherwise, (check-sat) (get-value ((! foo :named bar))) breaks
// d_haveAdditions = true;
- Debug("smt") << "definedFunctions insert " << funcNode << " " << formNode << std::endl;
+ Debug("smt") << "definedFunctions insert " << funcNode << " " << formNode << endl;
d_definedFunctions->insert(funcNode, def);
}
if (k == kind::BITVECTOR_UDIV) {
if (d_BVDivByZero.find(width) == d_BVDivByZero.end()) {
// lazily create the function symbols
- std::ostringstream os;
+ ostringstream os;
os << "BVUDivByZero_" << width;
Node divByZero = nm->mkSkolem(os.str(),
nm->mkFunctionType(nm->mkBitVectorType(width), nm->mkBitVectorType(width)),
}
else if (k == kind::BITVECTOR_UREM) {
if (d_BVRemByZero.find(width) == d_BVRemByZero.end()) {
- std::ostringstream os;
+ ostringstream os;
os << "BVURemByZero_" << width;
Node divByZero = nm->mkSkolem(os.str(),
nm->mkFunctionType(nm->mkBitVectorType(width), nm->mkBitVectorType(width)),
if(i != d_smt.d_definedFunctions->end()) {
// replacement must be closed
if((*i).second.getFormals().size() > 0) {
- throw TypeCheckingException(n.toExpr(), std::string("Defined function requires arguments: `") + n.toString() + "'");
+ throw TypeCheckingException(n.toExpr(), string("Defined function requires arguments: `") + n.toString() + "'");
}
// don't bother putting in the cache
return (*i).second.getFormula();
break;
}
- case kind::BITVECTOR_UDIV:
- case kind::BITVECTOR_UREM: {
- node = expandBVDivByZero(node);
+ case kind::BITVECTOR_UDIV:
+ case kind::BITVECTOR_UREM: {
+ node = expandBVDivByZero(node);
break;
}
case kind::DIVISION: {
Debug("expand") << " : \"" << name << "\"" << endl;
}
if(i == d_smt.d_definedFunctions->end()) {
- throw TypeCheckingException(n.toExpr(), std::string("Undefined function: `") + func.toString() + "'");
+ throw TypeCheckingException(n.toExpr(), string("Undefined function: `") + func.toString() + "'");
}
if(Debug.isOn("expand")) {
Debug("expand") << " defn: " << def.getFunction() << endl
}
Node SmtEnginePrivate::preSkolemizeQuantifiers( Node n, bool polarity, std::vector< Node >& fvs ){
- Trace("pre-sk") << "Pre-skolem " << n << " " << polarity << " " << fvs.size() << std::endl;
+ Trace("pre-sk") << "Pre-skolem " << n << " " << polarity << " " << fvs.size() << endl;
if( n.getKind()==kind::NOT ){
Node nn = preSkolemizeQuantifiers( n[0], !polarity, fvs );
return nn.negate();
}else if( n.getKind()==kind::FORALL ){
if( polarity ){
- std::vector< Node > children;
+ vector< Node > children;
children.push_back( n[0] );
//add children to current scope
- std::vector< Node > fvss;
+ vector< Node > fvss;
fvss.insert( fvss.begin(), fvs.begin(), fvs.end() );
for( int i=0; i<(int)n[0].getNumChildren(); i++ ){
fvss.push_back( n[0][i] );
//process body
Node nn = preSkolemizeQuantifiers( n[1], polarity, fvs );
//now, substitute skolems for the variables
- std::vector< TypeNode > argTypes;
+ vector< TypeNode > argTypes;
for( int i=0; i<(int)fvs.size(); i++ ){
argTypes.push_back( fvs[i].getType() );
}
//calculate the variables and substitution
- std::vector< Node > vars;
- std::vector< Node > subs;
+ vector< Node > vars;
+ vector< Node > subs;
for( int i=0; i<(int)n[0].getNumChildren(); i++ ){
vars.push_back( n[0][i] );
}
TypeNode typ = NodeManager::currentNM()->mkFunctionType( argTypes, n[0][i].getType() );
Node op = NodeManager::currentNM()->mkSkolem( "skop_$$", typ, "op created during pre-skolemization" );
//DOTHIS: set attribute on op, marking that it should not be selected as trigger
- std::vector< Node > funcArgs;
+ vector< Node > funcArgs;
funcArgs.push_back( op );
funcArgs.insert( funcArgs.end(), fvs.begin(), fvs.end() );
subs.push_back( NodeManager::currentNM()->mkNode( kind::APPLY_UF, funcArgs ) );
return preSkolemizeQuantifiers( nn, polarity, fvs );
}else{
Assert( n.getKind() == kind::AND || n.getKind() == kind::OR );
- std::vector< Node > children;
+ vector< Node > children;
for( int i=0; i<(int)n.getNumChildren(); i++ ){
children.push_back( preSkolemizeQuantifiers( n[i], polarity, fvs ) );
}
static void dumpAssertions(const char* key,
const std::vector<Node>& assertionList) {
if( Dump.isOn("assertions") &&
- Dump.isOn(std::string("assertions:") + key) ) {
+ Dump.isOn(string("assertions:") + key) ) {
// Push the simplified assertions to the dump output stream
for(unsigned i = 0; i < assertionList.size(); ++ i) {
TNode n = assertionList[i];
d_assertionsToCheck.swap(d_assertionsToPreprocess);
}
- Trace("smt") << "POST nonClasualSimplify" << std::endl;
+ Trace("smt") << "POST nonClausalSimplify" << endl;
Debug("smt") << " d_assertionsToPreprocess: " << d_assertionsToPreprocess.size() << endl;
Debug("smt") << " d_assertionsToCheck : " << d_assertionsToCheck.size() << endl;
}
}
- Trace("smt") << "POST theoryPP" << std::endl;
+ Trace("smt") << "POST theoryPP" << endl;
Debug("smt") << " d_assertionsToPreprocess: " << d_assertionsToPreprocess.size() << endl;
Debug("smt") << " d_assertionsToCheck : " << d_assertionsToCheck.size() << endl;
simpITE();
}
- Trace("smt") << "POST iteSimp" << std::endl;
+ Trace("smt") << "POST iteSimp" << endl;
Debug("smt") << " d_assertionsToPreprocess: " << d_assertionsToPreprocess.size() << endl;
Debug("smt") << " d_assertionsToCheck : " << d_assertionsToCheck.size() << endl;
unconstrainedSimp();
}
- Trace("smt") << "POST unconstrainedSimp" << std::endl;
+ Trace("smt") << "POST unconstrainedSimp" << endl;
Debug("smt") << " d_assertionsToPreprocess: " << d_assertionsToPreprocess.size() << endl;
Debug("smt") << " d_assertionsToCheck : " << d_assertionsToCheck.size() << endl;
if(options::repeatSimp() && options::simplificationMode() != SIMPLIFICATION_MODE_NONE) {
Chat() << "...doing another round of nonclausal simplification..." << endl;
Trace("simplify") << "SmtEnginePrivate::simplify(): "
- << " doing repeated simplification" << std::endl;
+ << " doing repeated simplification" << endl;
d_assertionsToCheck.swap(d_assertionsToPreprocess);
Assert(d_assertionsToCheck.empty());
bool noConflict = nonClausalSimplify();
}
}
- Trace("smt") << "POST repeatSimp" << std::endl;
+ Trace("smt") << "POST repeatSimp" << endl;
Debug("smt") << " d_assertionsToPreprocess: " << d_assertionsToPreprocess.size() << endl;
Debug("smt") << " d_assertionsToCheck : " << d_assertionsToCheck.size() << endl;
//apply pre-skolemization to existential quantifiers
for (unsigned i = 0; i < d_assertionsToPreprocess.size(); ++ i) {
Node prev = d_assertionsToPreprocess[i];
- std::vector< Node > fvs;
+ vector< Node > fvs;
d_assertionsToPreprocess[i] = Rewriter::rewrite( preSkolemizeQuantifiers( d_assertionsToPreprocess[i], true, fvs ) );
if( prev!=d_assertionsToPreprocess[i] ){
- Trace("quantifiers-rewrite") << "*** Pre-skolemize " << prev << std::endl;
- Trace("quantifiers-rewrite") << " ...got " << d_assertionsToPreprocess[i] << std::endl;
+ Trace("quantifiers-rewrite") << "*** Pre-skolemize " << prev << endl;
+ Trace("quantifiers-rewrite") << " ...got " << d_assertionsToPreprocess[i] << endl;
}
}
}
d_database->pushAssertionOrderWatch(this, witness);
}
-// bool ConstraintValue::isPsuedoConstraint() const {
-// return d_proof == d_database->d_psuedoConstraintProof;
+// bool ConstraintValue::isPseudoConstraint() const {
+// return d_proof == d_database->d_pseudoConstraintProof;
// }
bool ConstraintValue::isSelfExplaining() const {
d_equalityEngineProof = d_proofs.size();
d_proofs.push_back(NullConstraint);
- // d_psuedoConstraintProof = d_proofs.size();
+ // d_pseudoConstraintProof = d_proofs.size();
// d_proofs.push_back(NullConstraint);
}
}
}
-// void ConstraintValue::setPsuedoConstraint(){
+// void ConstraintValue::setPseudoConstraint(){
// Assert(truthIsUnknown());
// Assert(!hasLiteral());
-// d_database->pushProofWatch(this, d_database->d_psuedoConstraintProof);
+// d_database->pushProofWatch(this, d_database->d_pseudoConstraintProof);
// }
void ConstraintValue::setEqualityEngineProof(){
void ConstraintValue::markAsTrue(Constraint imp){
Assert(truthIsUnknown());
Assert(imp->hasProof());
- //Assert(!imp->isPsuedoConstraint());
+ //Assert(!imp->isPseudoConstraint());
d_database->d_proofs.push_back(NullConstraint);
d_database->d_proofs.push_back(imp);
Assert(truthIsUnknown());
Assert(impA->hasProof());
Assert(impB->hasProof());
- //Assert(!impA->isPsuedoConstraint());
- //Assert(!impB->isPsuedoConstraint());
+ //Assert(!impA->isPseudoConstraint());
+ //Assert(!impB->isPseudoConstraint());
d_database->d_proofs.push_back(NullConstraint);
d_database->d_proofs.push_back(impA);
for(vector<Constraint>::const_iterator i = a.begin(), end = a.end(); i != end; ++i){
Constraint c_i = *i;
Assert(c_i->hasProof());
- //Assert(!c_i->isPsuedoConstraint());
+ //Assert(!c_i->isPseudoConstraint());
d_database->d_proofs.push_back(c_i);
}
bool ConstraintValue::proofIsEmpty() const{
Assert(hasProof());
bool result = d_database->d_proofs[d_proof] == NullConstraint;
- //Assert((!result) || isSelfExplaining() || hasEqualityEngineProof() || isPsuedoConstraint());
+ //Assert((!result) || isSelfExplaining() || hasEqualityEngineProof() || isPseudoConstraint());
Assert((!result) || isSelfExplaining() || hasEqualityEngineProof());
return result;
}
*/
AssertionOrder _d_assertionOrder;
/**
- * This is guarenteed to be on the fact queue.
+ * This is guaranteed to be on the fact queue.
* For example if x + y = x + 1 is on the fact queue, then use this
*/
TNode d_witness;
* The explanation is the constant true.
* explainInto() does nothing.
*/
- //void setPsuedoConstraint();
- //bool isPsuedoConstraint() const;
+ //void setPseudoConstraint();
+ //bool isPseudoConstraint() const;
/**
* Returns a explanation of the constraint that is appropriate for conflicts.
*
* This is a special proof that is always a member of the list.
*/
- //ProofId d_psuedoConstraintProof;
+ //ProofId d_pseudoConstraintProof;
typedef context::CDList<Constraint, ConstraintValue::ProofCleanup> ProofCleanupList;
typedef context::CDList<Constraint, ConstraintValue::CanBePropagatedCleanup> CBPList;
}
/**
- * Computes a sufficient upperbound to seperate two DeltaRationals.
+ * Computes a sufficient upperbound to separate two DeltaRationals.
* This value is stored in res.
* For any rational d such that
* 0 < d < res
option doCutAllBounded --enable-cut-all-bounded/--disable-cut-all-bounded bool :default false :read-write
turns on the integer solving step of periodically cutting all integer variables that have both upper and lower bounds
-/ turns off the integer solving step of periodically cutting all integer variables that have both upper and lower bounds
-
+/turns off the integer solving step of periodically cutting all integer variables that have both upper and lower bounds
endmodule
";
static const std::string heuristicPivotRulesHelp = "\
-This decides on the rule used by simplex during hueristic rounds\n\
+This decides on the rule used by simplex during heuristic rounds\n\
for deciding the next basic variable to select.\n\
Heuristic pivot rules available:\n\
+min\n\
return it->second;
}else{
return NodeManager::currentNM()->mkNode( SELECT, getArrayValue(), i );
- //return d_default_value; //TODO: guarentee I can return this here
+ //return d_default_value; //TODO: guarantee I can return this here
}
}
#
# mkrewriter
# Morgan Deters <mdeters@cs.nyu.edu> for CVC4
-# Copyright (c) 2010-2012 The CVC4 Project
+# Copyright (c) 2010-2013 The CVC4 Project
#
# The purpose of this script is to create rewriter_tables.h from a template
# and a list of theory kinds.
# Output is to standard out.
#
-copyright=2010-2012
+copyright=2010-2013
cat <<EOF
/********************* */
/** rewriter_tables.h
**
- ** Copyright $copyright The AcSys Group, New York University, and as below.
+ ** Copyright $copyright New York University and The University of Iowa,
+ ** and as below.
**
** This header file automatically generated by:
**
#
# mktheorytraits
# Morgan Deters <mdeters@cs.nyu.edu> for CVC4
-# Copyright (c) 2010-2012 The CVC4 Project
+# Copyright (c) 2010-2013 The CVC4 Project
#
# The purpose of this script is to create theory_traits.h from a template
# and a list of theory kinds.
# Output is to standard out.
#
-copyright=2010-2012
+copyright=2010-2013
filename=`basename "$1" | sed 's,_template,,'`
/********************* */
/** $filename
**
- ** Copyright $copyright The AcSys Group, New York University, and as below.
+ ** Copyright $copyright New York University and The University of Iowa,
+ ** and as below.
**
** This header file automatically generated by:
**
void addSubstitution(TNode x, TNode t, bool invalidateCache = true);
/** add term function
* addTerm( n ) will do any model-specific processing necessary for n,
- * such as contraining the interpretation of uninterpretted functions,
+ * such as constraining the interpretation of uninterpreted functions,
* and adding n to the equality engine of this model
*/
virtual void addTerm(TNode n);
int getNumMatches() { return d_matches.size(); }
bool getMatch( EqualityQuery* q, int i, InstMatch& m );
Node getMatchValue( int i ) { return d_match_values[i]; }
-};
+};/* class InstGenProcess */
-}
-}
-}
+}/* CVC4::theory::quantifiers namespace */
+}/* CVC4::theory namespace */
+}/* CVC4 namespace */
-#endif
+#endif /* __CVC4__THEORY__QUANTIFIERS__INST_GEN_H */
if( n.getKind()==APPLY_UF ){
Node op = n.getOperator();
if( d_macro_defs.find( op )!=d_macro_defs.end() && !d_macro_defs[op].isNull() ){
- //do subsitutition
+ //do substitution
Node ret = d_macro_defs[op];
ret = ret.substitute( d_macro_basis[op].begin(), d_macro_basis[op].end(), children.begin(), children.end() );
return ret;
/** get counterexample literal (for cbqi) */
Node getCounterexampleLiteral( Node f );
/** returns node n with bound vars of f replaced by instantiation constants of f
- node n : is the futur pattern
+ node n : is the future pattern
node f : is the quantifier containing which bind the variable
return a pattern where the variable are replaced by variable for
instantiation.
#include "cvc4_private.h"
-#ifndef __CVC4__REP_SET_H
-#define __CVC4__REP_SET_H
+#ifndef __CVC4__THEORY__REP_SET_H
+#define __CVC4__THEORY__REP_SET_H
#include "expr/node.h"
#include <map>
void complete( TypeNode t );
/** debug print */
void toStream(std::ostream& out);
-};
+};/* class RepSet */
//representative domain
typedef std::vector< int > RepDomain;
/** debug print */
void debugPrint( const char* c );
void debugPrintSmall( const char* c );
-};
+};/* class RepSetIterator */
-}
-}
+}/* CVC4::theory namespace */
+}/* CVC4 namespace */
-#endif
\ No newline at end of file
+#endif /* __CVC4__THEORY__REP_SET_H */
//New CandidateGenerator. They have a simpler semantic than the old one
-// Just iterate amoung the equivalence classes
+// Just iterate among the equivalence classes
// node::Null() must be given to reset
class CandidateGeneratorTheoryEeClasses : public CandidateGenerator{
private:
};
};
-// Just iterate amoung the equivalence class of the given node
+// Just iterate among the equivalence class of the given node
// node::Null() *can't* be given to reset
class CandidateGeneratorTheoryEeClass : public CandidateGenerator{
private:
/** If reset, or getNextMatch return false they remove from the
InstMatch the binding that they have previously created */
- /** virtual Matcher in order to have definned behavior */
+ /** virtual Matcher in order to have defined behavior */
virtual ~Matcher(){};
};
std::vector< triple< Matcher*, size_t, EqualityQuery* > > d_childrens;
/** the variable that have been set by this matcher (during its own reset) */
std::vector< TNode > d_binded; /* TNode because the variable are already in d_pattern */
- /** the representant of the argument of the term given by the last reset */
+ /** the representative of the argument of the term given by the last reset */
std::vector< Node > d_reps;
public:
/** The pattern we are producing matches for */
PatsMatcher* mkPatterns( std::vector< Node > pat, QuantifiersEngine* qe );
PatsMatcher* mkPatternsEfficient( std::vector< Node > pat, QuantifiersEngine* qe );
-/** return true if whatever Node is subsituted for the variables the
+/** return true if whatever Node is substituted for the variables the
given Node can't match the pattern */
bool nonunifiable( TNode t, TNode pat, const std::vector<Node> & vars);
stringstream ss;
ss << "The logic was specified as " << d_logicInfo.getLogicString()
<< ", which doesn't include " << Theory::theoryOf(current)
- << ", but got a preprocesing-time fact for that theory." << endl
+ << ", but got a preprocessing-time fact for that theory." << endl
<< "The fact:" << endl
<< current;
throw LogicException(ss.str());
void safePoint() throw(theory::Interrupted, AssertionException) {
if (d_engine->d_interrupted)
throw theory::Interrupted();
- }
+ }
void conflict(TNode conflictNode) throw(AssertionException) {
Trace("theory::conflict") << "EngineOutputChannel<" << d_theory << ">::conflict(" << conflictNode << ")" << std::endl;
std::map< std::string, std::vector< theory::Theory* > > d_attr_handle;
public:
- /** Set user attribute
- * This function is called when an attribute is set by a user. In SMT-LIBv2 this is done
- * via the syntax (! n :attr)
- */
+ /**
+ * Set user attribute.
+ * This function is called when an attribute is set by a user. In SMT-LIBv2 this is done
+ * via the syntax (! n :attr)
+ */
void setUserAttribute(const std::string& attr, Node n);
- /** Handle user attribute
- * Associates theory t with the attribute attr. Theory t will be
- * notifed whenever an attribute of name attr is set.
- */
+ /**
+ * Handle user attribute.
+ * Associates theory t with the attribute attr. Theory t will be
+ * notified whenever an attribute of name attr is set.
+ */
void handleUserAttribute(const char* attr, theory::Theory* t);
- /** Check that the theory assertions are satisfied in the model
- * This function is called from the smt engine's checkModel routine
+ /**
+ * Check that the theory assertions are satisfied in the model.
+ * This function is called from the smt engine's checkModel routine.
*/
void checkTheoryAssertionsWithModel();
)) + "\n\
compiled with " + ::CVC4::Configuration::getCompiler() + "\n\
on " + ::CVC4::Configuration::getCompiledDateTime() + "\n\n\
-Copyright (C) 2009, 2010, 2011, 2012\n\
+Copyright (C) 2009, 2010, 2011, 2012, 2013\n\
New York University and The University of Iowa\n\n" + \
( IS_CLN_BUILD ? "\
This CVC4 library uses CLN as its multi-precision arithmetic library.\n\n\
/********************* */
-/*! \file integer.h
+/*! \file integer.h.in
** \verbatim
** Original author: taking
** Major contributors: none
/********************* */
-/*! \file rational.h
+/*! \file rational.h.in
** \verbatim
** Original author: taking
** Major contributors: none
d_op_return_types[sk] = getSortId( f, v );
}
-}
\ No newline at end of file
+}/* CVC4 namespace */
/********************* */
-/*! \file tls.h
+/*! \file tls.h.in
** \verbatim
** Original author: mdeters
** Major contributors: none
--- /dev/null
+topdir = ../../../..
+srcdir = test/regress/regress1/arith
+
+include $(topdir)/Makefile.subdir
+
+# synonyms for "check"
+.PHONY: test
+test: check