CVC3::VCL Class Reference

#include <vcl.h>

Inheritance diagram for CVC3::VCL:

Inheritance graph
[legend]
Collaboration diagram for CVC3::VCL:

Collaboration graph
[legend]
List of all members.

Public Member Functions

Private Member Functions

Private Attributes

Classes


Detailed Description

Definition at line 47 of file vcl.h.


Constructor & Destructor Documentation

CVC3::VCL::VCL ( const CLFlags flags  ) 

VCL::~VCL (  ) 

Definition at line 476 of file vcl.cpp.

References CVC3::TheoremManager::clear(), CVC3::ExprManager::clear(), d_cm, d_em, d_lastClosure, d_lastQuery, d_lastQueryTCC, d_se, d_stackLevel, d_theories, d_tm, d_translator, d_userAssertions, CVC3::Translator::finish(), CVC3::ContextManager::popto(), popto(), CVC3::TRACE, and TRACE_MSG.


Member Function Documentation

Theorem3 VCL::deriveClosure ( const Theorem3 thm  )  [private]

Construct the closure "|-_3 Gamma => phi" of thm = "Gamma |-_3 phi".

Definition at line 278 of file vcl.cpp.

References d_se, getAssumptionsRec(), CVC3::Theorem3::getAssumptionsRef(), CVC3::SearchEngine::getCommonRules(), getFlags(), and CVC3::CommonProofRules::implIntro3().

Referenced by getClosure(), and getProofClosure().

void VCL::getAssumptionsRec ( const Theorem thm,
std::set< UserAssertion > &  assumptions,
bool  addTCCs 
) [private]

Recursive assumption graph traversal to find user assumptions.

If an assumption has a TCC, traverse the proof of TCC and add its assumptions to the set recursively.

Definition at line 321 of file vcl.cpp.

References d_nextIdx, d_userAssertions, DebugAssert, CVC3::Theorem::getAssumptionsRef(), CVC3::Theorem::getExpr(), CVC3::Theorem::isAssump(), CVC3::Theorem::isFlagged(), CVC3::Theorem::isNull(), CVC3::Theorem::isRefl(), CVC3::Theorem::setFlag(), CVC3::VCL::UserAssertion::tcc(), CVC3::VCL::UserAssertion::thm(), and CVC3::Theorem::toString().

Referenced by deriveClosure(), and getAssumptions().

void VCL::getAssumptions ( const Assumptions a,
std::vector< Expr > &  assumptions 
) [private]

Get set of user assertions from the set of assumptions.

Definition at line 348 of file vcl.cpp.

References CVC3::Assumptions::begin(), CVC3::Assumptions::empty(), CVC3::Assumptions::end(), getAssumptionsRec(), and getFlags().

Referenced by getAssumptionsTCC(), and inconsistent().

Theorem VCL::checkTCC ( const Expr tcc  )  [private]

Check the tcc.

Definition at line 1521 of file vcl.cpp.

References CVC3::ABORT, CVC3::SearchEngine::checkValid(), d_lastQueryTCC, d_se, FatalAssert, CVC3::INVALID, CVC3::SearchEngine::pop(), CVC3::SearchEngine::push(), simplify(), CVC3::Expr::toString(), CVC3::UNKNOWN, and CVC3::VALID.

Referenced by assertFormula(), createOp(), query(), and varExpr().

void CVC3::VCL::dumpTrace ( int  scope  )  [private]

Print an entry to the dump file: change of scope.

Referenced by popScope(), poptoScope(), and pushScope().

CLFlags& CVC3::VCL::getFlags (  )  const [inline, virtual]

Return the set of command-line flags.

The flags are returned by reference, and if modified, will have an immediate effect on the subsequent commands. Note that not all flags will have such an effect; some flags are used only at initialization time (like "sat"), and therefore, will not take effect if modified after ValidityChecker is created.

Implements CVC3::ValidityChecker.

Definition at line 155 of file vcl.h.

Referenced by assertFormula(), createOp(), deriveClosure(), getAssumptions(), query(), and varExpr().

void VCL::reprocessFlags (  )  [virtual]

Force reprocessing of all flags.

Implements CVC3::ValidityChecker.

Definition at line 529 of file vcl.cpp.

References d_se, d_theories, d_theoryArith, d_translator, CVC3::Theory::getName(), CVC3::SearchEngine::getName(), and CVC3::Translator::setTheoryArith().

TheoryCore * VCL::core (  ) 

Definition at line 562 of file vcl.cpp.

Type VCL::boolType (  )  [virtual]

Create type BOOLEAN.

Implements CVC3::ValidityChecker.

Definition at line 566 of file vcl.cpp.

Type VCL::realType (  )  [virtual]

Create type REAL.

Implements CVC3::ValidityChecker.

Definition at line 571 of file vcl.cpp.

References d_theoryArith, and CVC3::TheoryArith::realType().

Type VCL::intType (  )  [virtual]

Create type INT.

Implements CVC3::ValidityChecker.

Definition at line 577 of file vcl.cpp.

References d_theoryArith, and CVC3::TheoryArith::intType().

Type VCL::subrangeType ( const Expr l,
const Expr r 
) [virtual]

Create a subrange type [l..r].

l and r can be Null; l=Null represents minus infinity, r=Null is plus infinity.

Implements CVC3::ValidityChecker.

Definition at line 582 of file vcl.cpp.

References d_theoryArith, and CVC3::TheoryArith::subrangeType().

Type VCL::subtypeType ( const Expr pred,
const Expr witness 
) [virtual]

Creates a subtype defined by the given predicate.

Parameters:
pred is a predicate taking one argument of type T and returning Boolean. The resulting type is a subtype of T whose elements x are those satisfying the predicate pred(x).
witness is an expression of type T for which pred holds (if a Null expression is passed as a witness, cvc will try to prove $\exists x. pred(x))$. if the witness check fails, a TypecheckException is thrown.

Implements CVC3::ValidityChecker.

Definition at line 587 of file vcl.cpp.

Type VCL::tupleType ( const Type type0,
const Type type1 
) [virtual]

2-element tuple

Implements CVC3::ValidityChecker.

Definition at line 593 of file vcl.cpp.

References d_theoryRecords, and CVC3::TheoryRecords::tupleType().

Type VCL::tupleType ( const Type type0,
const Type type1,
const Type type2 
) [virtual]

3-element tuple

Implements CVC3::ValidityChecker.

Definition at line 602 of file vcl.cpp.

References d_theoryRecords, and CVC3::TheoryRecords::tupleType().

Type VCL::tupleType ( const std::vector< Type > &  types  )  [virtual]

n-element tuple (from a vector of types)

Implements CVC3::ValidityChecker.

Definition at line 612 of file vcl.cpp.

References d_theoryRecords, and CVC3::TheoryRecords::tupleType().

Type VCL::recordType ( const std::string &  field,
const Type type 
) [virtual]

1-element record

Implements CVC3::ValidityChecker.

Definition at line 618 of file vcl.cpp.

References d_theoryRecords, and CVC3::TheoryRecords::recordType().

Type VCL::recordType ( const std::string &  field0,
const Type type0,
const std::string &  field1,
const Type type1 
) [virtual]

2-element record

Fields will be sorted automatically

Implements CVC3::ValidityChecker.

Definition at line 628 of file vcl.cpp.

References d_theoryRecords, and CVC3::TheoryRecords::recordType().

Type VCL::recordType ( const std::string &  field0,
const Type type0,
const std::string &  field1,
const Type type1,
const std::string &  field2,
const Type type2 
) [virtual]

3-element record

Fields will be sorted automatically

Implements CVC3::ValidityChecker.

Definition at line 641 of file vcl.cpp.

References d_theoryRecords, and CVC3::TheoryRecords::recordType().

Type VCL::recordType ( const std::vector< std::string > &  fields,
const std::vector< Type > &  types 
) [virtual]

n-element record (fields and types must be of the same length)

Fields will be sorted automatically

Implements CVC3::ValidityChecker.

Definition at line 658 of file vcl.cpp.

References d_theoryRecords, DebugAssert, and CVC3::TheoryRecords::recordType().

Type VCL::dataType ( const std::string &  name,
const std::string &  constructor,
const std::vector< std::string > &  selectors,
const std::vector< Expr > &  types 
) [virtual]

Single datatype, single constructor.

The types are either type exressions (obtained from a type with getExpr()) or string expressions containing the name of (one of) the dataType(s) being defined.

Implements CVC3::ValidityChecker.

Definition at line 672 of file vcl.cpp.

Type VCL::dataType ( const std::string &  name,
const std::vector< std::string > &  constructors,
const std::vector< std::vector< std::string > > &  selectors,
const std::vector< std::vector< Expr > > &  types 
) [virtual]

Single datatype, multiple constructors.

The types are either type exressions (obtained from a type with getExpr()) or string expressions containing the name of (one of) the dataType(s) being defined.

Implements CVC3::ValidityChecker.

Definition at line 689 of file vcl.cpp.

References d_theoryDatatype, and CVC3::TheoryDatatype::dataType().

void VCL::dataType ( const std::vector< std::string > &  names,
const std::vector< std::vector< std::string > > &  constructors,
const std::vector< std::vector< std::vector< std::string > > > &  selectors,
const std::vector< std::vector< std::vector< Expr > > > &  types,
std::vector< Type > &  returnTypes 
) [virtual]

Multiple datatypes.

The types are either type exressions (obtained from a type with getExpr()) or string expressions containing the name of (one of) the dataType(s) being defined.

Implements CVC3::ValidityChecker.

Definition at line 698 of file vcl.cpp.

References d_theoryDatatype, and CVC3::TheoryDatatype::dataType().

Type VCL::arrayType ( const Type typeIndex,
const Type typeData 
) [virtual]

Create an array type (ARRAY typeIndex OF typeData).

Implements CVC3::ValidityChecker.

Definition at line 708 of file vcl.cpp.

References CVC3::arrayType().

Type VCL::bitvecType ( int  n  )  [virtual]

Create a bitvector type of length n.

Implements CVC3::ValidityChecker.

Definition at line 714 of file vcl.cpp.

References d_theoryBitvector, and CVC3::TheoryBitvector::newBitvectorType().

Type VCL::funType ( const Type typeDom,
const Type typeRan 
) [virtual]

Create a function type typeDom -> typeRan.

Implements CVC3::ValidityChecker.

Definition at line 720 of file vcl.cpp.

References CVC3::Type::funType().

Type VCL::funType ( const std::vector< Type > &  typeDom,
const Type typeRan 
) [virtual]

Create a function type (t1,t2,...,tn) -> typeRan.

Implements CVC3::ValidityChecker.

Definition at line 726 of file vcl.cpp.

References DebugAssert, and CVC3::Type::funType().

Type VCL::createType ( const std::string &  typeName  )  [virtual]

Create named user-defined uninterpreted type.

Implements CVC3::ValidityChecker.

Definition at line 732 of file vcl.cpp.

References d_dump, d_translator, CVC3::Translator::dump(), idExpr(), listExpr(), and CVC3::TYPE.

Type VCL::createType ( const std::string &  typeName,
const Type def 
) [virtual]

Create named user-defined interpreted type (type abbreviation).

Implements CVC3::ValidityChecker.

Definition at line 741 of file vcl.cpp.

References d_dump, d_translator, CVC3::Translator::dump(), CVC3::Type::getExpr(), idExpr(), and CVC3::TYPE.

Type VCL::lookupType ( const std::string &  typeName  )  [virtual]

Lookup a user-defined (uninterpreted) type by name.

Implements CVC3::ValidityChecker.

Definition at line 750 of file vcl.cpp.

ExprManager* CVC3::VCL::getEM (  )  [inline, virtual]

Return the ExprManager.

Implements CVC3::ValidityChecker.

Definition at line 197 of file vcl.h.

Referenced by listExpr(), and stringExpr().

Expr VCL::varExpr ( const std::string &  name,
const Type type 
) [virtual]

Create a variable with a given name and type.

Parameters:
name is the name of the variable
type is its type. The type cannot be a function type.
Returns:
an Expr representation of a new variable

Implements CVC3::ValidityChecker.

Definition at line 757 of file vcl.cpp.

References CVC3::CONST, d_dump, d_translator, CVC3::Translator::dump(), CVC3::Type::getExpr(), and idExpr().

Expr VCL::varExpr ( const std::string &  name,
const Type type,
const Expr def 
) [virtual]

Create a variable with a given name, type, and value.

Implements CVC3::ValidityChecker.

Definition at line 767 of file vcl.cpp.

References boundVarExpr(), checkTCC(), CVC3::CONST, d_dump, d_translator, CVC3::Translator::dump(), eqExpr(), forallExpr(), getBaseType(), CVC3::Type::getExpr(), getFlags(), CVC3::Expr::getType(), getTypePred(), idExpr(), CVC3::Type::toString(), and CVC3::TRACE.

Expr VCL::boundVarExpr ( const std::string &  name,
const std::string &  uid,
const Type type 
) [virtual]

Create a bound variable with a given name, unique ID (uid) and type.

Parameters:
name is the name of the variable
uid is the unique ID (a string), which must be unique for each variable
type is its type. The type cannot be a function type.
Returns:
an Expr representation of a new variable

Implements CVC3::ValidityChecker.

Definition at line 812 of file vcl.cpp.

References d_em, and CVC3::ExprManager::newBoundVarExpr().

Referenced by varExpr().

Expr VCL::lookupVar ( const std::string &  name,
Type type 
) [virtual]

Get the variable associated with a name, and its type.

Parameters:
name is the variable name
type is where the type value is returned
Returns:
a variable by the name. If there is no such Expr, a NULL \ Expr is returned.

Implements CVC3::ValidityChecker.

Definition at line 818 of file vcl.cpp.

Type VCL::getType ( const Expr e  )  [virtual]

Get the type of the Expr.

Implements CVC3::ValidityChecker.

Definition at line 824 of file vcl.cpp.

References CVC3::Expr::getType().

Type VCL::getBaseType ( const Expr e  )  [virtual]

Get the largest supertype of the Expr.

Implements CVC3::ValidityChecker.

Definition at line 830 of file vcl.cpp.

Referenced by createOp(), and varExpr().

Type VCL::getBaseType ( const Type e  )  [virtual]

Get the largest supertype of the Type.

Implements CVC3::ValidityChecker.

Definition at line 836 of file vcl.cpp.

Expr VCL::getTypePred ( const Type t,
const Expr e 
) [virtual]

Get the subtype predicate.

Implements CVC3::ValidityChecker.

Definition at line 842 of file vcl.cpp.

Referenced by createOp(), and varExpr().

Expr VCL::stringExpr ( const std::string &  str  )  [virtual]

Create a string Expr.

Implements CVC3::ValidityChecker.

Definition at line 848 of file vcl.cpp.

References getEM(), and CVC3::ExprManager::newStringExpr().

Referenced by idExpr().

Expr VCL::idExpr ( const std::string &  name  )  [virtual]

Create an ID Expr.

Implements CVC3::ValidityChecker.

Definition at line 853 of file vcl.cpp.

References CVC3::ID, and stringExpr().

Referenced by createOp(), createType(), listExpr(), and varExpr().

Expr VCL::listExpr ( const std::vector< Expr > &  kids  )  [virtual]

Create a list Expr.

Intermediate representation for DP-specific expressions. Normally, the first element of the list is a string Expr representing an operator, and the rest of the list are the arguments. For example,

kids.push_back(vc->stringExpr("PLUS")); kids.push_back(x); // x and y are previously created Exprs kids.push_back(y); Expr lst = vc->listExpr(kids);

Or, alternatively (using its overloaded version):

Expr lst = vc->listExpr("PLUS", x, y);

or

vector<Expr> summands; summands.push_back(x); summands.push_back(y); ... Expr lst = vc->listExpr("PLUS", summands);

Implements CVC3::ValidityChecker.

Definition at line 858 of file vcl.cpp.

References getEM(), and CVC3::RAW_LIST.

Referenced by createType(), and listExpr().

Expr VCL::listExpr ( const Expr e1  )  [virtual]

Overloaded version of listExpr with one argument.

Implements CVC3::ValidityChecker.

Definition at line 863 of file vcl.cpp.

References CVC3::RAW_LIST.

Expr VCL::listExpr ( const Expr e1,
const Expr e2 
) [virtual]

Overloaded version of listExpr with two arguments.

Implements CVC3::ValidityChecker.

Definition at line 868 of file vcl.cpp.

References CVC3::RAW_LIST.

Expr VCL::listExpr ( const Expr e1,
const Expr e2,
const Expr e3 
) [virtual]

Overloaded version of listExpr with three arguments.

Implements CVC3::ValidityChecker.

Definition at line 873 of file vcl.cpp.

References CVC3::RAW_LIST.

Expr VCL::listExpr ( const std::string &  op,
const std::vector< Expr > &  kids 
) [virtual]

Overloaded version of listExpr with string operator and many arguments.

Implements CVC3::ValidityChecker.

Definition at line 878 of file vcl.cpp.

References idExpr(), and listExpr().

Expr VCL::listExpr ( const std::string &  op,
const Expr e1 
) [virtual]

Overloaded version of listExpr with string operator and one argument.

Implements CVC3::ValidityChecker.

Definition at line 886 of file vcl.cpp.

References idExpr(), and CVC3::RAW_LIST.

Expr VCL::listExpr ( const std::string &  op,
const Expr e1,
const Expr e2 
) [virtual]

Overloaded version of listExpr with string operator and two arguments.

Implements CVC3::ValidityChecker.

Definition at line 891 of file vcl.cpp.

References idExpr(), and CVC3::RAW_LIST.

Expr VCL::listExpr ( const std::string &  op,
const Expr e1,
const Expr e2,
const Expr e3 
) [virtual]

Overloaded version of listExpr with string operator and three arguments.

Implements CVC3::ValidityChecker.

Definition at line 897 of file vcl.cpp.

References idExpr(), and listExpr().

void VCL::printExpr ( const Expr e  )  [virtual]

Prints e to the standard output.

Implements CVC3::ValidityChecker.

Definition at line 908 of file vcl.cpp.

void VCL::printExpr ( const Expr e,
std::ostream &  os 
) [virtual]

Prints e to the given ostream.

Implements CVC3::ValidityChecker.

Definition at line 913 of file vcl.cpp.

References std::endl().

Expr VCL::parseExpr ( const Expr e  )  [virtual]

Parse an expression using a Theory-specific parser.

Implements CVC3::ValidityChecker.

Definition at line 918 of file vcl.cpp.

Type VCL::parseType ( const Expr e  )  [virtual]

Parse a type expression using a Theory-specific parser.

Implements CVC3::ValidityChecker.

Definition at line 923 of file vcl.cpp.

Expr VCL::importExpr ( const Expr e  )  [virtual]

Import the Expr from another instance of ValidityChecker.

When expressions need to be passed among several instances of ValidityChecker, they need to be explicitly imported into the corresponding instance using this method. The return result is an identical expression that belongs to the current instance of ValidityChecker, and can be safely used as part of more complex expressions from the same instance.

Implements CVC3::ValidityChecker.

Definition at line 928 of file vcl.cpp.

References d_em, and CVC3::ExprManager::rebuild().

Type VCL::importType ( const Type t  )  [virtual]

Import the Type from another instance of ValidityChecker.

See also:
getType()

Implements CVC3::ValidityChecker.

Definition at line 934 of file vcl.cpp.

References d_em, CVC3::Type::getExpr(), and CVC3::ExprManager::rebuild().

Expr VCL::trueExpr (  )  [virtual]

Return TRUE Expr.

Implements CVC3::ValidityChecker.

Definition at line 940 of file vcl.cpp.

References d_em, and CVC3::ExprManager::trueExpr().

Expr VCL::falseExpr (  )  [virtual]

Return FALSE Expr.

Implements CVC3::ValidityChecker.

Definition at line 946 of file vcl.cpp.

References d_em, and CVC3::ExprManager::falseExpr().

Referenced by checkContinue().

Expr VCL::notExpr ( const Expr child  )  [virtual]

Create negation.

Implements CVC3::ValidityChecker.

Definition at line 952 of file vcl.cpp.

Expr VCL::andExpr ( const Expr left,
const Expr right 
) [virtual]

Create 2-element conjunction.

Implements CVC3::ValidityChecker.

Definition at line 958 of file vcl.cpp.

References MiniSat::left(), and MiniSat::right().

Referenced by checkContinue().

Expr VCL::andExpr ( const std::vector< Expr > &  children  )  [virtual]

Create n-element conjunction.

Implements CVC3::ValidityChecker.

Definition at line 964 of file vcl.cpp.

References CVC3::AND.

Expr VCL::orExpr ( const Expr left,
const Expr right 
) [virtual]

Create 2-element disjunction.

Implements CVC3::ValidityChecker.

Definition at line 972 of file vcl.cpp.

References MiniSat::left(), and MiniSat::right().

Expr VCL::orExpr ( const std::vector< Expr > &  children  )  [virtual]

Create n-element disjunction.

Implements CVC3::ValidityChecker.

Definition at line 978 of file vcl.cpp.

References CVC3::OR.

Expr VCL::impliesExpr ( const Expr hyp,
const Expr conc 
) [virtual]

Create Boolean implication.

Implements CVC3::ValidityChecker.

Definition at line 986 of file vcl.cpp.

References CVC3::Expr::impExpr().

Expr VCL::iffExpr ( const Expr left,
const Expr right 
) [virtual]

Create left IFF right (boolean equivalence).

Implements CVC3::ValidityChecker.

Definition at line 992 of file vcl.cpp.

References MiniSat::left(), and MiniSat::right().

Expr VCL::eqExpr ( const Expr child0,
const Expr child1 
) [virtual]

Create an equality expression.

The two children must have the same type, and cannot be of type Boolean.

Implements CVC3::ValidityChecker.

Definition at line 998 of file vcl.cpp.

References CVC3::Expr::eqExpr().

Referenced by varExpr().

Expr VCL::iteExpr ( const Expr ifpart,
const Expr thenpart,
const Expr elsepart 
) [virtual]

Create IF ifpart THEN thenpart ELSE elsepart ENDIF.

Parameters:
ifpart must be of type Boolean.
thenpart and
elsepart must have the same type, which will also be the type of the ite expression.

Implements CVC3::ValidityChecker.

Definition at line 1004 of file vcl.cpp.

References CVC3::Expr::iteExpr().

Op VCL::createOp ( const std::string &  name,
const Type type 
) [virtual]

Create a named uninterpreted function with a given type.

Parameters:
name is the new function's name (as ID Expr)
type is a function type ( [range -> domain] )

Implements CVC3::ValidityChecker.

Definition at line 1010 of file vcl.cpp.

References CVC3::CONST, d_dump, d_translator, CVC3::Translator::dump(), CVC3::Type::getExpr(), getFlags(), idExpr(), and CVC3::Type::isFunction().

Op VCL::createOp ( const std::string &  name,
const Type type,
const Expr def 
) [virtual]

Create a named user-defined function with a given type.

Implements CVC3::ValidityChecker.

Definition at line 1022 of file vcl.cpp.

References CVC3::Expr::andExpr(), CVC3::Type::arity(), checkTCC(), CVC3::CONST, d_dump, d_em, d_translator, CVC3::Translator::dump(), forallExpr(), getBaseType(), CVC3::Type::getExpr(), getFlags(), CVC3::Expr::getType(), getTypePred(), idExpr(), CVC3::Type::isFunction(), CVC3::Expr::mkOp(), CVC3::ExprManager::newBoundVarExpr(), CVC3::Expr::toString(), and CVC3::Type::toString().

Expr VCL::funExpr ( const Op op,
const Expr child 
) [virtual]

Unary function application (op must be of function type).

Implements CVC3::ValidityChecker.

Definition at line 1080 of file vcl.cpp.

Expr VCL::funExpr ( const Op op,
const Expr left,
const Expr right 
) [virtual]

Binary function application (op must be of function type).

Implements CVC3::ValidityChecker.

Definition at line 1086 of file vcl.cpp.

References MiniSat::left(), and MiniSat::right().

Expr VCL::funExpr ( const Op op,
const Expr child0,
const Expr child1,
const Expr child2 
) [virtual]

Ternary function application (op must be of function type).

Implements CVC3::ValidityChecker.

Definition at line 1092 of file vcl.cpp.

Expr VCL::funExpr ( const Op op,
const std::vector< Expr > &  children 
) [virtual]

n-ary function application (op must be of function type)

Implements CVC3::ValidityChecker.

Definition at line 1098 of file vcl.cpp.

Expr VCL::ratExpr ( int  n,
int  d 
) [virtual]

Create a rational number with numerator n and denominator d.

Parameters:
n the numerator
d the denominator, cannot be 0.

Implements CVC3::ValidityChecker.

Definition at line 1104 of file vcl.cpp.

References d_em, DebugAssert, and CVC3::ExprManager::newRatExpr().

Referenced by popto(), and poptoScope().

Expr VCL::ratExpr ( const std::string &  n,
const std::string &  d,
int  base 
) [virtual]

Create a rational number with numerator n and denominator d.

Here n and d are given as strings. They are converted to arbitrary-precision integers according to the given base.

Implements CVC3::ValidityChecker.

Definition at line 1111 of file vcl.cpp.

References d_em, and CVC3::ExprManager::newRatExpr().

Expr VCL::ratExpr ( const std::string &  n,
int  base 
) [virtual]

Create a rational from a single string.

Parameters:
n can be a string containing an integer, a pair of integers "nnn/ddd", or a number in the fixed or floating point format.
base is the base in which to interpret the string.

Implements CVC3::ValidityChecker.

Definition at line 1117 of file vcl.cpp.

References d_em, CVC3::ExprManager::newRatExpr(), and CVC3::pow().

Expr VCL::uminusExpr ( const Expr child  )  [virtual]

Unary minus.

Implements CVC3::ValidityChecker.

Definition at line 1139 of file vcl.cpp.

Expr VCL::plusExpr ( const Expr left,
const Expr right 
) [virtual]

Create 2-element sum (left + right).

Implements CVC3::ValidityChecker.

Definition at line 1145 of file vcl.cpp.

References MiniSat::left(), and MiniSat::right().

Expr VCL::minusExpr ( const Expr left,
const Expr right 
) [virtual]

Make a difference (left - right).

Implements CVC3::ValidityChecker.

Definition at line 1151 of file vcl.cpp.

References MiniSat::left(), and MiniSat::right().

Expr VCL::multExpr ( const Expr left,
const Expr right 
) [virtual]

Create a product (left * right).

Implements CVC3::ValidityChecker.

Definition at line 1157 of file vcl.cpp.

References MiniSat::left(), and MiniSat::right().

Expr VCL::powExpr ( const Expr x,
const Expr n 
) [virtual]

Create a power expression (x ^ n); n must be integer.

Implements CVC3::ValidityChecker.

Definition at line 1163 of file vcl.cpp.

References CVC3::powExpr().

Expr VCL::divideExpr ( const Expr left,
const Expr right 
) [virtual]

Create expression x / y.

Implements CVC3::ValidityChecker.

Definition at line 1169 of file vcl.cpp.

References CVC3::divideExpr().

Expr VCL::ltExpr ( const Expr left,
const Expr right 
) [virtual]

Create (left < right).

Implements CVC3::ValidityChecker.

Definition at line 1175 of file vcl.cpp.

References MiniSat::left(), CVC3::ltExpr(), and MiniSat::right().

Expr VCL::leExpr ( const Expr left,
const Expr right 
) [virtual]

Create (left <= right).

Implements CVC3::ValidityChecker.

Definition at line 1181 of file vcl.cpp.

References CVC3::leExpr(), MiniSat::left(), and MiniSat::right().

Expr VCL::gtExpr ( const Expr left,
const Expr right 
) [virtual]

Create (left > right).

Implements CVC3::ValidityChecker.

Definition at line 1187 of file vcl.cpp.

References CVC3::gtExpr(), MiniSat::left(), and MiniSat::right().

Expr VCL::geExpr ( const Expr left,
const Expr right 
) [virtual]

Create (left >= right).

Implements CVC3::ValidityChecker.

Definition at line 1193 of file vcl.cpp.

References CVC3::geExpr(), MiniSat::left(), and MiniSat::right().

Expr VCL::recordExpr ( const std::string &  field,
const Expr expr 
) [virtual]

Create a 1-element record value (# field := expr #).

Fields will be sorted automatically

Implements CVC3::ValidityChecker.

Definition at line 1199 of file vcl.cpp.

References d_theoryRecords, and CVC3::TheoryRecords::recordExpr().

Expr VCL::recordExpr ( const std::string &  field0,
const Expr expr0,
const std::string &  field1,
const Expr expr1 
) [virtual]

Create a 2-element record value (# field0 := expr0, field1 := expr1 #).

Fields will be sorted automatically

Implements CVC3::ValidityChecker.

Definition at line 1209 of file vcl.cpp.

References d_theoryRecords, and CVC3::TheoryRecords::recordExpr().

Expr VCL::recordExpr ( const std::string &  field0,
const Expr expr0,
const std::string &  field1,
const Expr expr1,
const std::string &  field2,
const Expr expr2 
) [virtual]

Create a 3-element record value (# field_i := expr_i #).

Fields will be sorted automatically

Implements CVC3::ValidityChecker.

Definition at line 1223 of file vcl.cpp.

References d_theoryRecords, and CVC3::TheoryRecords::recordExpr().

Expr VCL::recordExpr ( const std::vector< std::string > &  fields,
const std::vector< Expr > &  exprs 
) [virtual]

Create an n-element record value (# field_i := expr_i #).

Parameters:
fields 
exprs must be the same length as fields
Fields will be sorted automatically

Implements CVC3::ValidityChecker.

Definition at line 1240 of file vcl.cpp.

References d_theoryRecords, DebugAssert, and CVC3::TheoryRecords::recordExpr().

Expr VCL::recSelectExpr ( const Expr record,
const std::string &  field 
) [virtual]

Create record.field (field selection).

Create an expression representing the selection of a field from a record.

Implements CVC3::ValidityChecker.

Definition at line 1253 of file vcl.cpp.

References d_theoryRecords, and CVC3::TheoryRecords::recordSelect().

Expr VCL::recUpdateExpr ( const Expr record,
const std::string &  field,
const Expr newValue 
) [virtual]

Record update; equivalent to "record WITH .field := newValue".

Notice the `.' before field in the presentation language (and the comment above); this is to distinguish it from datatype update.

Implements CVC3::ValidityChecker.

Definition at line 1259 of file vcl.cpp.

References d_theoryRecords, and CVC3::TheoryRecords::recordUpdate().

Expr VCL::readExpr ( const Expr array,
const Expr index 
) [virtual]

Create an expression array[index] (array access).

Create an expression for the value of array at the given index

Implements CVC3::ValidityChecker.

Definition at line 1266 of file vcl.cpp.

References CVC3::READ.

Expr VCL::writeExpr ( const Expr array,
const Expr index,
const Expr newValue 
) [virtual]

Array update; equivalent to "array WITH index := newValue".

Implements CVC3::ValidityChecker.

Definition at line 1272 of file vcl.cpp.

References CVC3::WRITE.

Expr VCL::newBVConstExpr ( const std::string &  s,
int  base 
) [virtual]

Implements CVC3::ValidityChecker.

Definition at line 1278 of file vcl.cpp.

References d_theoryBitvector, and CVC3::TheoryBitvector::newBVConstExpr().

Expr VCL::newBVConstExpr ( const std::vector< bool > &  bits  )  [virtual]

Implements CVC3::ValidityChecker.

Definition at line 1284 of file vcl.cpp.

References d_theoryBitvector, and CVC3::TheoryBitvector::newBVConstExpr().

Expr VCL::newBVConstExpr ( const Rational r,
int  len 
) [virtual]

Implements CVC3::ValidityChecker.

Definition at line 1290 of file vcl.cpp.

References d_theoryBitvector, and CVC3::TheoryBitvector::newBVConstExpr().

Expr VCL::newConcatExpr ( const Expr t1,
const Expr t2 
) [virtual]

Implements CVC3::ValidityChecker.

Definition at line 1296 of file vcl.cpp.

References d_theoryBitvector, and CVC3::TheoryBitvector::newConcatExpr().

Expr VCL::newConcatExpr ( const std::vector< Expr > &  kids  )  [virtual]

Implements CVC3::ValidityChecker.

Definition at line 1302 of file vcl.cpp.

References d_theoryBitvector, and CVC3::TheoryBitvector::newConcatExpr().

Expr VCL::newBVExtractExpr ( const Expr e,
int  hi,
int  low 
) [virtual]

Implements CVC3::ValidityChecker.

Definition at line 1308 of file vcl.cpp.

References d_theoryBitvector, and CVC3::TheoryBitvector::newBVExtractExpr().

Expr VCL::newBVNegExpr ( const Expr t1  )  [virtual]

Implements CVC3::ValidityChecker.

Definition at line 1314 of file vcl.cpp.

References d_theoryBitvector, and CVC3::TheoryBitvector::newBVNegExpr().

Expr VCL::newBVAndExpr ( const Expr t1,
const Expr t2 
) [virtual]

Implements CVC3::ValidityChecker.

Definition at line 1320 of file vcl.cpp.

References d_theoryBitvector, and CVC3::TheoryBitvector::newBVAndExpr().

Expr VCL::newBVAndExpr ( const std::vector< Expr > &  kids  )  [virtual]

Implements CVC3::ValidityChecker.

Definition at line 1326 of file vcl.cpp.

References d_theoryBitvector, and CVC3::TheoryBitvector::newBVAndExpr().

Expr VCL::newBVOrExpr ( const Expr t1,
const Expr t2 
) [virtual]

Implements CVC3::ValidityChecker.

Definition at line 1332 of file vcl.cpp.

References d_theoryBitvector, and CVC3::TheoryBitvector::newBVOrExpr().

Expr VCL::newBVOrExpr ( const std::vector< Expr > &  kids  )  [virtual]

Implements CVC3::ValidityChecker.

Definition at line 1338 of file vcl.cpp.

References d_theoryBitvector, and CVC3::TheoryBitvector::newBVOrExpr().

Expr VCL::newBVXorExpr ( const Expr t1,
const Expr t2 
) [virtual]

Implements CVC3::ValidityChecker.

Definition at line 1344 of file vcl.cpp.

References d_theoryBitvector, and CVC3::TheoryBitvector::newBVXorExpr().

Expr VCL::newBVXorExpr ( const std::vector< Expr > &  kids  )  [virtual]

Implements CVC3::ValidityChecker.

Definition at line 1350 of file vcl.cpp.

References d_theoryBitvector, and CVC3::TheoryBitvector::newBVXorExpr().

Expr VCL::newBVXnorExpr ( const Expr t1,
const Expr t2 
) [virtual]

Implements CVC3::ValidityChecker.

Definition at line 1356 of file vcl.cpp.

References d_theoryBitvector, and CVC3::TheoryBitvector::newBVXnorExpr().

Expr VCL::newBVXnorExpr ( const std::vector< Expr > &  kids  )  [virtual]

Implements CVC3::ValidityChecker.

Definition at line 1362 of file vcl.cpp.

References d_theoryBitvector, and CVC3::TheoryBitvector::newBVXnorExpr().

Expr VCL::newBVNandExpr ( const Expr t1,
const Expr t2 
) [virtual]

Implements CVC3::ValidityChecker.

Definition at line 1368 of file vcl.cpp.

References d_theoryBitvector, and CVC3::TheoryBitvector::newBVNandExpr().

Expr VCL::newBVNorExpr ( const Expr t1,
const Expr t2 
) [virtual]

Implements CVC3::ValidityChecker.

Definition at line 1374 of file vcl.cpp.

References d_theoryBitvector, and CVC3::TheoryBitvector::newBVNorExpr().

Expr VCL::newBVLTExpr ( const Expr t1,
const Expr t2 
) [virtual]

Implements CVC3::ValidityChecker.

Definition at line 1380 of file vcl.cpp.

References d_theoryBitvector, and CVC3::TheoryBitvector::newBVLTExpr().

Expr VCL::newBVLEExpr ( const Expr t1,
const Expr t2 
) [virtual]

Implements CVC3::ValidityChecker.

Definition at line 1386 of file vcl.cpp.

References d_theoryBitvector, and CVC3::TheoryBitvector::newBVLEExpr().

Expr VCL::newBVSLTExpr ( const Expr t1,
const Expr t2 
) [virtual]

Implements CVC3::ValidityChecker.

Definition at line 1392 of file vcl.cpp.

References d_theoryBitvector, and CVC3::TheoryBitvector::newBVSLTExpr().

Expr VCL::newBVSLEExpr ( const Expr t1,
const Expr t2 
) [virtual]

Implements CVC3::ValidityChecker.

Definition at line 1398 of file vcl.cpp.

References d_theoryBitvector, and CVC3::TheoryBitvector::newBVSLEExpr().

Expr VCL::newSXExpr ( const Expr t1,
int  len 
) [virtual]

Implements CVC3::ValidityChecker.

Definition at line 1404 of file vcl.cpp.

References d_theoryBitvector, and CVC3::TheoryBitvector::newSXExpr().

Expr VCL::newBVUminusExpr ( const Expr t1  )  [virtual]

Implements CVC3::ValidityChecker.

Definition at line 1410 of file vcl.cpp.

References d_theoryBitvector, and CVC3::TheoryBitvector::newBVUminusExpr().

Expr VCL::newBVSubExpr ( const Expr t1,
const Expr t2 
) [virtual]

Implements CVC3::ValidityChecker.

Definition at line 1416 of file vcl.cpp.

References d_theoryBitvector, and CVC3::TheoryBitvector::newBVSubExpr().

Expr VCL::newBVPlusExpr ( int  numbits,
const std::vector< Expr > &  k 
) [virtual]

'numbits' is the number of bits in the result

Implements CVC3::ValidityChecker.

Definition at line 1422 of file vcl.cpp.

References d_theoryBitvector, and CVC3::TheoryBitvector::newBVPlusExpr().

Expr VCL::newBVMultExpr ( int  numbits,
const Expr t1,
const Expr t2 
) [virtual]

Implements CVC3::ValidityChecker.

Definition at line 1428 of file vcl.cpp.

References d_theoryBitvector, and CVC3::TheoryBitvector::newBVMultExpr().

Expr VCL::newFixedLeftShiftExpr ( const Expr t1,
int  r 
) [virtual]

Implements CVC3::ValidityChecker.

Definition at line 1434 of file vcl.cpp.

References d_theoryBitvector, and CVC3::TheoryBitvector::newFixedLeftShiftExpr().

Expr VCL::newFixedConstWidthLeftShiftExpr ( const Expr t1,
int  r 
) [virtual]

Implements CVC3::ValidityChecker.

Definition at line 1440 of file vcl.cpp.

References d_theoryBitvector, and CVC3::TheoryBitvector::newFixedConstWidthLeftShiftExpr().

Expr VCL::newFixedRightShiftExpr ( const Expr t1,
int  r 
) [virtual]

Implements CVC3::ValidityChecker.

Definition at line 1446 of file vcl.cpp.

References d_theoryBitvector, and CVC3::TheoryBitvector::newFixedRightShiftExpr().

Expr VCL::tupleExpr ( const std::vector< Expr > &  exprs  )  [virtual]

Tuple expression.

Implements CVC3::ValidityChecker.

Definition at line 1452 of file vcl.cpp.

References d_theoryRecords, DebugAssert, and CVC3::TheoryRecords::tupleExpr().

Expr VCL::tupleSelectExpr ( const Expr tuple,
int  index 
) [virtual]

Tuple select; equivalent to "tuple.n", where n is an numeral (e.g. tup.5).

Implements CVC3::ValidityChecker.

Definition at line 1458 of file vcl.cpp.

References d_theoryRecords, and CVC3::TheoryRecords::tupleSelect().

Expr VCL::tupleUpdateExpr ( const Expr tuple,
int  index,
const Expr newValue 
) [virtual]

Tuple update; equivalent to "tuple WITH index := newValue".

Implements CVC3::ValidityChecker.

Definition at line 1464 of file vcl.cpp.

References d_theoryRecords, and CVC3::TheoryRecords::tupleUpdate().

Expr VCL::datatypeConsExpr ( const std::string &  constructor,
const std::vector< Expr > &  args 
) [virtual]

Datatype constructor expression.

Implements CVC3::ValidityChecker.

Definition at line 1470 of file vcl.cpp.

References d_theoryDatatype, and CVC3::TheoryDatatype::datatypeConsExpr().

Expr VCL::datatypeSelExpr ( const std::string &  selector,
const Expr arg 
) [virtual]

Datatype selector expression.

Implements CVC3::ValidityChecker.

Definition at line 1476 of file vcl.cpp.

References d_theoryDatatype, and CVC3::TheoryDatatype::datatypeSelExpr().

Expr VCL::datatypeTestExpr ( const std::string &  constructor,
const Expr arg 
) [virtual]

Datatype tester expression.

Implements CVC3::ValidityChecker.

Definition at line 1482 of file vcl.cpp.

References d_theoryDatatype, and CVC3::TheoryDatatype::datatypeTestExpr().

Expr VCL::forallExpr ( const std::vector< Expr > &  vars,
const Expr body 
) [virtual]

Universal quantifier.

Implements CVC3::ValidityChecker.

Definition at line 1488 of file vcl.cpp.

References d_em, DebugAssert, CVC3::FORALL, and CVC3::ExprManager::newClosureExpr().

Referenced by createOp(), and varExpr().

Expr VCL::existsExpr ( const std::vector< Expr > &  vars,
const Expr body 
) [virtual]

Existential quantifier.

Implements CVC3::ValidityChecker.

Definition at line 1494 of file vcl.cpp.

References d_em, CVC3::EXISTS, and CVC3::ExprManager::newClosureExpr().

Op VCL::lambdaExpr ( const std::vector< Expr > &  vars,
const Expr body 
) [virtual]

Lambda-expression.

Implements CVC3::ValidityChecker.

Definition at line 1499 of file vcl.cpp.

References d_em, CVC3::LAMBDA, CVC3::Expr::mkOp(), and CVC3::ExprManager::newClosureExpr().

Expr VCL::simulateExpr ( const Expr f,
const Expr s0,
const std::vector< Expr > &  inputs,
const Expr n 
) [virtual]

Symbolic simulation expression.

Parameters:
f is the next state function (LAMBDA-expression)
s0 is the initial state
inputs is the vector of LAMBDA-expressions representing the sequences of inputs to f
n is a constant, the number of cycles to run the simulation.

Implements CVC3::ValidityChecker.

Definition at line 1504 of file vcl.cpp.

References CVC3::SIMULATE.

void VCL::setResourceLimit ( unsigned  limit  )  [virtual]

Set the resource limit (0==unlimited, 1==exhausted).

Currently, the limit is the total number of processed facts.

Implements CVC3::ValidityChecker.

Definition at line 1515 of file vcl.cpp.

void VCL::assertFormula ( const Expr e  )  [virtual]

Assert a new formula in the current context.

This creates the assumption e |- e. The formula must have Boolean type.

Implements CVC3::ValidityChecker.

Definition at line 1559 of file vcl.cpp.

References CVC3::ASSERT, checkTCC(), d_dump, d_nextIdx, d_se, d_translator, d_userAssertions, CVC3::Translator::dumpAssertion(), getFlags(), CVC3::Expr::getType(), CVC3::Type::isBool(), CVC3::SearchEngine::newUserAssumption(), CVC3::Type::toString(), CVC3::TRACE, and TRACE_MSG.

void VCL::registerAtom ( const Expr e  )  [virtual]

Register an atomic formula of interest.

Registered atoms are tracked by the decision procedures. If one of them is deduced to be true or false, it is added to a list of implied literals. Implied literals can be retrieved with the getImpliedLiteral function

Implements CVC3::ValidityChecker.

Definition at line 1593 of file vcl.cpp.

References d_se, and CVC3::SearchEngine::registerAtom().

Expr VCL::getImpliedLiteral (  )  [virtual]

Return next literal implied by last assertion. Null Expr if none.

Returned literals are either registered atomic formulas or their negation

Implements CVC3::ValidityChecker.

Definition at line 1600 of file vcl.cpp.

References d_se, CVC3::Theorem::getExpr(), CVC3::SearchEngine::getImpliedLiteral(), and CVC3::Theorem::isNull().

Expr VCL::simplify ( const Expr e  )  [virtual]

Simplify e with respect to the current context.

Implements CVC3::ValidityChecker.

Definition at line 1609 of file vcl.cpp.

References CVC3::Theorem::getRHS(), and simplifyThm().

Referenced by checkTCC().

Theorem VCL::simplifyThm ( const Expr e  ) 

Definition at line 1615 of file vcl.cpp.

References CVC3::Theorem::getRHS(), and CVC3::Expr::getType().

Referenced by simplify().

QueryResult VCL::query ( const Expr e  )  [virtual]

Check validity of e in the current context.

If it returns VALID, the scope and context are the same as when called. If it returns INVALID, the context will be one which falsifies the query. If it returns UNKNOWN, the context will falsify the query, but the context may be inconsistent. Finally, if it returns ABORT, the context will be one which satisfies as much as possible.

Parameters:
e is the queried formula

Implements CVC3::ValidityChecker.

Definition at line 1625 of file vcl.cpp.

References CVC3::ABORT, checkTCC(), CVC3::SearchEngine::checkValid(), d_dump, d_lastClosure, d_lastQuery, d_lastQueryTCC, d_se, d_translator, CVC3::Translator::dumpQuery(), CVC3::Translator::dumpQueryResult(), CVC3::SearchEngine::getCommonRules(), getFlags(), CVC3::Expr::getType(), CVC3::INVALID, CVC3::Type::isBool(), CVC3::QUERY, CVC3::CommonProofRules::queryTCC(), CVC3::Type::toString(), CVC3::TRACE, CVC3::CommonProofRules::trueTheorem(), CVC3::UNKNOWN, and CVC3::VALID.

Referenced by checkUnsat().

QueryResult VCL::checkUnsat ( const Expr e  )  [virtual]

Check satisfiability of the expr in the current context.

Equivalent to query(!e)

Implements CVC3::ValidityChecker.

Definition at line 1669 of file vcl.cpp.

References CVC3::Expr::negate(), and query().

QueryResult VCL::checkContinue (  )  [virtual]

Get the next model.

This method should only be called after a query which returns INVALID. Its return values are as for query().

Implements CVC3::ValidityChecker.

Definition at line 1675 of file vcl.cpp.

References andExpr(), CVC3::CONTINUE, d_dump, d_em, d_se, d_translator, CVC3::Translator::dump(), falseExpr(), CVC3::SearchEngine::getCounterExample(), CVC3::ExprManager::newLeafExpr(), and CVC3::SearchEngine::restart().

QueryResult VCL::restart ( const Expr e  )  [virtual]

Restart the most recent query with e as an additional assertion.

This method should only be called after a query which returns INVALID. Its return values are as for query().

Implements CVC3::ValidityChecker.

Definition at line 1691 of file vcl.cpp.

References d_dump, d_se, d_translator, CVC3::Translator::dump(), CVC3::SearchEngine::restart(), and CVC3::RESTART.

void VCL::returnFromCheck (  )  [virtual]

Returns to context immediately before last invalid query.

This method should only be called after a query which returns false.

Implements CVC3::ValidityChecker.

Definition at line 1701 of file vcl.cpp.

References d_se, and CVC3::SearchEngine::returnFromCheck().

void VCL::getUserAssumptions ( std::vector< Expr > &  assumptions  )  [virtual]

Get assumptions made by the user in this and all previous contexts.

User assumptions are created either by calls to assertFormula or by a call to query. In the latter case, the negated query is added as an assumption.

Parameters:
assumptions should be empty on entry.

Implements CVC3::ValidityChecker.

Definition at line 1708 of file vcl.cpp.

References d_se, and CVC3::SearchEngine::getUserAssumptions().

void VCL::getInternalAssumptions ( std::vector< Expr > &  assumptions  )  [virtual]

Get assumptions made internally in this and all previous contexts.

Internal assumptions are literals assumed by the sat solver.

Parameters:
assumptions should be empty on entry.

Implements CVC3::ValidityChecker.

Definition at line 1715 of file vcl.cpp.

References d_se, and CVC3::SearchEngine::getInternalAssumptions().

void VCL::getAssumptions ( std::vector< Expr > &  assumptions  )  [virtual]

Get all assumptions made in this and all previous contexts.

Parameters:
assumptions should be empty on entry.

Implements CVC3::ValidityChecker.

Definition at line 1722 of file vcl.cpp.

References CVC3::ASSUMPTIONS, d_dump, d_em, d_se, d_translator, CVC3::Translator::dump(), CVC3::SearchEngine::getAssumptions(), and CVC3::ExprManager::newLeafExpr().

void VCL::getAssumptionsUsed ( std::vector< Expr > &  assumptions  )  [virtual]

Returns the set of assumptions used in the proof of queried formula.

It returns a subset of getAssumptions(). If the last query was false or there has not yet been a query, it does nothing.

Parameters:
assumptions should be empty on entry.

Implements CVC3::ValidityChecker.

Definition at line 1731 of file vcl.cpp.

References d_dump, d_em, d_se, d_translator, CVC3::Translator::dump(), CVC3::DUMP_ASSUMPTIONS, CVC3::Theorem::getLeafAssumptions(), CVC3::Theorem::isNull(), CVC3::SearchEngine::lastThm(), and CVC3::ExprManager::newLeafExpr().

void VCL::getCounterExample ( std::vector< Expr > &  assumptions,
bool  inOrder 
) [virtual]

Return the internal assumptions that make the queried formula false.

This method should only be called after a query which returns false. It will try to return the simplest possible subset of the internal assumptions sufficient to make the queried expression false.

Parameters:
assumptions should be empty on entry.
inOrder if true, returns the assumptions in the order they were made. This is slightly more expensive than inOrder = false.

Implements CVC3::ValidityChecker.

Definition at line 1742 of file vcl.cpp.

References CVC3::COUNTEREXAMPLE, d_dump, d_em, d_se, d_translator, CVC3::Translator::dump(), CVC3::SearchEngine::getCounterExample(), and CVC3::ExprManager::newLeafExpr().

void VCL::getConcreteModel ( ExprMap< Expr > &  m  )  [virtual]

Will assign concrete values to all user created variables.

This function should only be called after a query which return false.

Implements CVC3::ValidityChecker.

Definition at line 1752 of file vcl.cpp.

References CVC3::COUNTERMODEL, d_dump, d_em, d_se, d_translator, CVC3::Translator::dump(), CVC3::SearchEngine::getConcreteModel(), and CVC3::ExprManager::newLeafExpr().

bool VCL::inconsistent ( std::vector< Expr > &  assumptions  )  [virtual]

Returns true if the current context is inconsistent.

Also returns a minimal set of assertions used to determine the inconsistency.

Parameters:
assumptions should be empty on entry.

Implements CVC3::ValidityChecker.

Definition at line 1762 of file vcl.cpp.

References getAssumptions().

bool VCL::incomplete (  )  [virtual]

Returns true if the invalid result from last query() is imprecise.

Some decision procedures in CVC are incomplete (quantifier elimination, non-linear arithmetic, etc.). If any incomplete features were used during the last query(), and the result is "invalid" (query() returns false), then this result is inconclusive. It means that the system gave up the search for contradiction at some point.

Implements CVC3::ValidityChecker.

Definition at line 1775 of file vcl.cpp.

References d_lastQuery, and CVC3::Theorem3::isNull().

bool VCL::incomplete ( std::vector< std::string > &  reasons  )  [virtual]

Returns true if the invalid result from last query() is imprecise.

See also:
incomplete()
The argument is filled with the reasons for incompleteness (they are intended to be shown to the end user).

Implements CVC3::ValidityChecker.

Definition at line 1782 of file vcl.cpp.

References d_lastQuery, and CVC3::Theorem3::isNull().

Proof VCL::getProof (  )  [virtual]

Returns the proof term for the last proven query.

If there has not been a successful query, it should return a NULL proof

Implements CVC3::ValidityChecker.

Definition at line 1789 of file vcl.cpp.

References d_dump, d_em, d_lastQuery, d_se, d_translator, CVC3::Translator::dump(), CVC3::DUMP_PROOF, CVC3::SearchEngine::getProof(), CVC3::Theorem3::isNull(), and CVC3::ExprManager::newLeafExpr().

Expr VCL::getTCC (  )  [virtual]

Returns the TCC of the last assumption or query.

Returns Null if no assumptions or queries were performed.

Implements CVC3::ValidityChecker.

Definition at line 1803 of file vcl.cpp.

References d_dump, d_em, d_lastQueryTCC, d_translator, CVC3::Translator::dump(), CVC3::DUMP_TCC, CVC3::Theorem::getExpr(), CVC3::Theorem::isNull(), and CVC3::ExprManager::newLeafExpr().

void VCL::getAssumptionsTCC ( std::vector< Expr > &  assumptions  )  [virtual]

Return the set of assumptions used in the proof of the last TCC.

Implements CVC3::ValidityChecker.

Definition at line 1813 of file vcl.cpp.

References d_dump, d_em, d_lastQuery, d_lastQueryTCC, d_translator, CVC3::Translator::dump(), CVC3::DUMP_TCC_ASSUMPTIONS, getAssumptions(), CVC3::Theorem::getAssumptionsRef(), CVC3::Theorem3::isNull(), and CVC3::ExprManager::newLeafExpr().

Proof VCL::getProofTCC (  )  [virtual]

Returns the proof of TCC of the last assumption or query.

Returns Null if no assumptions or queries were performed.

Implements CVC3::ValidityChecker.

Definition at line 1826 of file vcl.cpp.

References d_dump, d_em, d_lastQueryTCC, d_translator, CVC3::Translator::dump(), CVC3::DUMP_TCC_PROOF, CVC3::Theorem::getProof(), CVC3::Theorem::isNull(), and CVC3::ExprManager::newLeafExpr().

Expr VCL::getClosure (  )  [virtual]

After successful query, return its closure |- Gamma => phi.

Turn a valid query Gamma |- phi into an implication |- Gamma => phi.

Returns Null if last query was invalid.

Implements CVC3::ValidityChecker.

Definition at line 1836 of file vcl.cpp.

References d_dump, d_em, d_lastClosure, d_lastQuery, d_translator, deriveClosure(), CVC3::Translator::dump(), CVC3::DUMP_CLOSURE, CVC3::Theorem3::getExpr(), CVC3::Theorem3::isNull(), and CVC3::ExprManager::newLeafExpr().

Proof VCL::getProofClosure (  )  [virtual]

Construct a proof of the query closure |- Gamma => phi.

Returns Null if last query was Invalid.

Implements CVC3::ValidityChecker.

Definition at line 1850 of file vcl.cpp.

References d_dump, d_em, d_lastClosure, d_lastQuery, d_translator, deriveClosure(), CVC3::Translator::dump(), CVC3::DUMP_CLOSURE_PROOF, CVC3::Theorem3::getProof(), CVC3::Theorem3::isNull(), and CVC3::ExprManager::newLeafExpr().

int VCL::stackLevel (  )  [virtual]

Returns the current stack level. Initial level is 0.

Implements CVC3::ValidityChecker.

Definition at line 1864 of file vcl.cpp.

References d_stackLevel, and CVC3::CDO< T >::get().

Referenced by pop(), popto(), and push().

void VCL::push (  )  [virtual]

Checkpoint the current context and increase the scope level.

Implements CVC3::ValidityChecker.

Definition at line 1870 of file vcl.cpp.

References d_dump, d_em, d_se, d_stackLevel, d_translator, CVC3::Translator::dump(), CVC3::ExprManager::newLeafExpr(), CVC3::SearchEngine::push(), CVC3::PUSH, CVC3::CDO< T >::set(), and stackLevel().

void VCL::pop (  )  [virtual]

Restore the current context to its state at the last checkpoint.

Implements CVC3::ValidityChecker.

Definition at line 1880 of file vcl.cpp.

References d_dump, d_em, d_se, d_translator, CVC3::Translator::dump(), CVC3::ExprManager::newLeafExpr(), CVC3::SearchEngine::pop(), CVC3::POP, and stackLevel().

void VCL::popto ( int  stackLevel  )  [virtual]

Restore the current context to the given stackLevel.

Parameters:
stackLevel should be greater than or equal to 0 and less than or equal to the current scope level.

Implements CVC3::ValidityChecker.

Definition at line 1895 of file vcl.cpp.

References d_dump, d_se, d_translator, CVC3::Translator::dump(), CVC3::SearchEngine::pop(), CVC3::POPTO, ratExpr(), and stackLevel().

Referenced by ~VCL().

int VCL::scopeLevel (  )  [virtual]

Returns the current scope level. Initially, the scope level is 1.

Implements CVC3::ValidityChecker.

Definition at line 1908 of file vcl.cpp.

References d_cm, and CVC3::ContextManager::scopeLevel().

Referenced by popScope(), poptoScope(), and pushScope().

void VCL::pushScope (  )  [virtual]

Checkpoint the current context and increase the internal scope level. Do not use unless you know what you're doing!

Implements CVC3::ValidityChecker.

Definition at line 1914 of file vcl.cpp.

References d_cm, d_dump, d_em, d_translator, CVC3::Translator::dump(), dumpTrace(), IF_DEBUG, CVC3::ExprManager::newLeafExpr(), CVC3::ContextManager::push(), CVC3::PUSH_SCOPE, and scopeLevel().

void VCL::popScope (  )  [virtual]

Restore the current context to its state at the last internal checkpoint. Do not use unless you know what you're doing!

Implements CVC3::ValidityChecker.

Definition at line 1926 of file vcl.cpp.

References d_cm, d_dump, d_em, d_translator, CVC3::Translator::dump(), dumpTrace(), std::endl(), IF_DEBUG, CVC3::ExprManager::newLeafExpr(), CVC3::ContextManager::pop(), CVC3::POP_SCOPE, and scopeLevel().

void VCL::poptoScope ( int  scopeLevel  )  [virtual]

Restore the current context to the given scopeLevel.

Parameters:
scopeLevel should be less than or equal to the current scope level.
If scopeLevel is less than 1, then the current context is reset and the scope level is set to 1.

Implements CVC3::ValidityChecker.

Definition at line 1941 of file vcl.cpp.

References d_cm, d_dump, d_translator, CVC3::Translator::dump(), dumpTrace(), IF_DEBUG, CVC3::ContextManager::popto(), CVC3::POPTO_SCOPE, CVC3::ContextManager::push(), ratExpr(), and scopeLevel().

Context * VCL::getCurrentContext (  )  [virtual]

Get the current context.

Implements CVC3::ValidityChecker.

Definition at line 1957 of file vcl.cpp.

References d_cm, and CVC3::ContextManager::getCurrentContext().

void VCL::loadFile ( const std::string &  fileName,
InputLanguage  lang = PRESENTATION_LANG,
bool  interactive = false 
) [virtual]

Read and execute the commands from a file given by name ("" means stdin).

Implements CVC3::ValidityChecker.

Definition at line 1963 of file vcl.cpp.

References CVC3::VCCmd::processCommands().

void VCL::loadFile ( std::istream &  is,
InputLanguage  lang = PRESENTATION_LANG,
bool  interactive = false 
) [virtual]

Read and execute the commands from a stream.

Implements CVC3::ValidityChecker.

Definition at line 1972 of file vcl.cpp.

References CVC3::VCCmd::processCommands().

Statistics& CVC3::VCL::getStatistics (  )  [inline, virtual]

Get statistics object.

Implements CVC3::ValidityChecker.

Definition at line 361 of file vcl.h.

void CVC3::VCL::printStatistics (  )  [inline, virtual]

Print collected statistics to stdout.

Implements CVC3::ValidityChecker.

Definition at line 362 of file vcl.h.

References std::endl().

unsigned long VCL::printMemory (  ) 

Definition at line 1981 of file vcl.cpp.

References d_cm, d_theories, std::endl(), and CVC3::ContextManager::getMemory().


Member Data Documentation

ExprManager* CVC3::VCL::d_em [private]

Pointers to main system components.

Definition at line 50 of file vcl.h.

Referenced by boundVarExpr(), checkContinue(), createOp(), existsExpr(), falseExpr(), forallExpr(), getAssumptions(), getAssumptionsTCC(), getAssumptionsUsed(), getClosure(), getConcreteModel(), getCounterExample(), getProof(), getProofClosure(), getProofTCC(), getTCC(), importExpr(), importType(), lambdaExpr(), pop(), popScope(), push(), pushScope(), ratExpr(), trueExpr(), and ~VCL().

ContextManager* CVC3::VCL::d_cm [private]

Definition at line 51 of file vcl.h.

Referenced by getCurrentContext(), popScope(), poptoScope(), printMemory(), pushScope(), scopeLevel(), and ~VCL().

TheoremManager* CVC3::VCL::d_tm [private]

Definition at line 52 of file vcl.h.

Referenced by ~VCL().

SearchEngine* CVC3::VCL::d_se [private]

Definition at line 53 of file vcl.h.

Referenced by assertFormula(), checkContinue(), checkTCC(), deriveClosure(), getAssumptions(), getAssumptionsUsed(), getConcreteModel(), getCounterExample(), getImpliedLiteral(), getInternalAssumptions(), getProof(), getUserAssumptions(), pop(), popto(), push(), query(), registerAtom(), reprocessFlags(), restart(), returnFromCheck(), and ~VCL().

TheoryCore* CVC3::VCL::d_theoryCore [private]

Pointers to theories.

Definition at line 56 of file vcl.h.

TheoryUF* CVC3::VCL::d_theoryUF [private]

Definition at line 57 of file vcl.h.

TheoryArith* CVC3::VCL::d_theoryArith [private]

Definition at line 58 of file vcl.h.

Referenced by intType(), realType(), reprocessFlags(), and subrangeType().

TheoryArray* CVC3::VCL::d_theoryArray [private]

Definition at line 59 of file vcl.h.

TheoryQuant* CVC3::VCL::d_theoryQuant [private]

Definition at line 60 of file vcl.h.

TheoryRecords* CVC3::VCL::d_theoryRecords [private]

Definition at line 61 of file vcl.h.

Referenced by recordExpr(), recordType(), recSelectExpr(), recUpdateExpr(), tupleExpr(), tupleSelectExpr(), tupleType(), and tupleUpdateExpr().

TheorySimulate* CVC3::VCL::d_theorySimulate [private]

Definition at line 62 of file vcl.h.

TheoryBitvector* CVC3::VCL::d_theoryBitvector [private]

Definition at line 63 of file vcl.h.

Referenced by bitvecType(), newBVAndExpr(), newBVConstExpr(), newBVExtractExpr(), newBVLEExpr(), newBVLTExpr(), newBVMultExpr(), newBVNandExpr(), newBVNegExpr(), newBVNorExpr(), newBVOrExpr(), newBVPlusExpr(), newBVSLEExpr(), newBVSLTExpr(), newBVSubExpr(), newBVUminusExpr(), newBVXnorExpr(), newBVXorExpr(), newConcatExpr(), newFixedConstWidthLeftShiftExpr(), newFixedLeftShiftExpr(), newFixedRightShiftExpr(), and newSXExpr().

TheoryDatatype* CVC3::VCL::d_theoryDatatype [private]

Definition at line 64 of file vcl.h.

Referenced by dataType(), datatypeConsExpr(), datatypeSelExpr(), and datatypeTestExpr().

Translator* CVC3::VCL::d_translator [private]

Definition at line 65 of file vcl.h.

Referenced by assertFormula(), checkContinue(), createOp(), createType(), getAssumptions(), getAssumptionsTCC(), getAssumptionsUsed(), getClosure(), getConcreteModel(), getCounterExample(), getProof(), getProofClosure(), getProofTCC(), getTCC(), pop(), popScope(), popto(), poptoScope(), push(), pushScope(), query(), reprocessFlags(), restart(), varExpr(), and ~VCL().

std::vector<Theory*> CVC3::VCL::d_theories [private]

All theories are stored in this common vector.

This includes TheoryCore and TheoryArith.

Definition at line 69 of file vcl.h.

Referenced by printMemory(), reprocessFlags(), and ~VCL().

CLFlags* CVC3::VCL::d_flags [private]

Command line flags.

Definition at line 72 of file vcl.h.

CDO<int>* CVC3::VCL::d_stackLevel [private]

User-level view of the scope stack.

Definition at line 75 of file vcl.h.

Referenced by push(), stackLevel(), and ~VCL().

Statistics CVC3::VCL::d_statistics [private]

Run-time statistics.

Definition at line 78 of file vcl.h.

size_t CVC3::VCL::d_nextIdx [private]

Next index for user assertion.

Definition at line 81 of file vcl.h.

Referenced by assertFormula(), and getAssumptionsRec().

CDMap<Expr,UserAssertion>* CVC3::VCL::d_userAssertions [private]

Backtracking map of user assertions.

Definition at line 107 of file vcl.h.

Referenced by assertFormula(), getAssumptionsRec(), and ~VCL().

Theorem3 CVC3::VCL::d_lastQuery [private]

Result of the last query().

Saved for printing assumptions and proofs. Normally it is Theorem3, but query() on a TCC returns a 2-valued Theorem.

Definition at line 112 of file vcl.h.

Referenced by getAssumptionsTCC(), getClosure(), getProof(), getProofClosure(), incomplete(), query(), and ~VCL().

Theorem CVC3::VCL::d_lastQueryTCC [private]

Result of the last query(e, true) (for a TCC).

Definition at line 115 of file vcl.h.

Referenced by checkTCC(), getAssumptionsTCC(), getProofTCC(), getTCC(), query(), and ~VCL().

Theorem3 CVC3::VCL::d_lastClosure [private]

Closure of the last query(e): |- Gamma => e.

Definition at line 118 of file vcl.h.

Referenced by getClosure(), getProofClosure(), query(), and ~VCL().

bool CVC3::VCL::d_dump [private]

Whether to dump a trace (or a translated version).

Definition at line 121 of file vcl.h.

Referenced by assertFormula(), checkContinue(), createOp(), createType(), getAssumptions(), getAssumptionsTCC(), getAssumptionsUsed(), getClosure(), getConcreteModel(), getCounterExample(), getProof(), getProofClosure(), getProofTCC(), getTCC(), pop(), popScope(), popto(), poptoScope(), push(), pushScope(), query(), restart(), and varExpr().


The documentation for this class was generated from the following files:
Generated on Tue Jul 3 14:40:15 2007 for CVC3 by  doxygen 1.5.1