30#ifndef __CVC4__CVC3_COMPAT_H
31#define __CVC4__CVC3_COMPAT_H
34#if defined(_cvc3__include__vc_h_) || \
35 defined(_cvc3__expr_h_) || \
36 defined(_cvc3__command_line_flags_h_) || \
37 defined(_cvc3__include__queryresult_h_) || \
38 defined(_cvc3__include__formula_value_h_)
40#error "A CVC3 header file was included before CVC4's cvc3_compat.h header. Please include cvc3_compat.h rather than any CVC3 headers."
46#define _cvc3__include__vc_h_
47#define _cvc3__command_line_flags_h_
48#define _cvc3__include__queryresult_h_
49#define _cvc3__include__formula_value_h_
57#include "util/rational.h"
58#include "util/integer.h"
118 std::vector<std::pair<std::string,bool> >*
sv;
124 CLFlag(
bool b,
const std::string& help,
bool display =
true);
126 CLFlag(
int i,
const std::string& help,
bool display =
true);
128 CLFlag(
const std::string& s,
const std::string& help,
bool display =
true);
130 CLFlag(
const char* s,
const std::string& help,
bool display =
true);
132 CLFlag(
const std::vector<std::pair<std::string,bool> >& sv,
133 const std::string& help,
bool display =
true);
183 const std::vector<std::pair<std::string,bool> >&
getStrVec()
const;
199 typedef std::map<std::string, CLFlag> FlagMap;
210 std::vector<std::string>& names)
const;
222 void setFlag(
const std::string& name,
bool b);
224 void setFlag(
const std::string& name,
const std::string& s);
225 void setFlag(
const std::string& name,
const char* s);
226 void setFlag(
const std::string& name,
const std::pair<std::string, bool>& p);
228 const std::vector<std::pair<std::string, bool> >& sv);
340 const std::vector<Expr>& newTerms)
const;
464#define PRESENTATION_LANG ::CVC4::language::input::LANG_CVC4
465#define SMTLIB_LANG ::CVC4::language::input::LANG_SMTLIB_V1
466#define SMTLIB_V2_LANG ::CVC4::language::input::LANG_SMTLIB_V2
467#define TPTP_LANG ::CVC4::language::input::LANG_TPTP
468#define AST_LANG ::CVC4::language::input::LANG_AST
519 std::map<CVC4::ExprManager*, CVC4::ExprManagerMapCollection> d_emmc;
520 std::set<ValidityChecker*> d_reverseEmmc;
523 std::vector<Expr> d_exprTypeMapRemove;
524 unsigned d_stackLevel;
528 typedef std::hash_map<std::string, const CVC4::Datatype*, CVC4::StringHashFunction> ConstructorMap;
529 typedef std::hash_map<std::string, std::pair<const CVC4::Datatype*, std::string>,
CVC4::StringHashFunction> SelectorMap;
531 ConstructorMap d_constructors;
532 SelectorMap d_selectors;
628 const std::string& field1,
const Type& type1);
632 const std::string& field1,
const Type& type1,
633 const std::string& field2,
const Type& type2);
637 const std::vector<Type>& types);
646 const std::string& constructor,
647 const std::vector<std::string>& selectors,
648 const std::vector<Expr>& types);
655 const std::vector<std::string>& constructors,
656 const std::vector<std::vector<std::string> >& selectors,
657 const std::vector<std::vector<Expr> >& types);
663 virtual void dataType(
const std::vector<std::string>& names,
664 const std::vector<std::vector<std::string> >& constructors,
665 const std::vector<std::vector<std::vector<std::string> > >& selectors,
666 const std::vector<std::vector<std::vector<Expr> > >& types,
667 std::vector<Type>& returnTypes);
778 const std::vector<Expr>& kids);
882 const Expr& elsepart);
929 const Expr& child1,
const Expr& child2);
967 virtual Expr ratExpr(
const std::string& n,
const std::string& d,
int base);
1027 const std::string& field1,
const Expr& expr1);
1032 const std::string& field1,
const Expr& expr1,
1033 const std::string& field2,
const Expr& expr2);
1043 const std::vector<Expr>& exprs);
1056 const Expr& newValue);
1074 const Expr& newValue);
1177 const Expr& newValue);
1197 const std::string& uid,
1204 const Expr& trigger);
1207 const std::vector<Expr>& triggers);
1210 const std::vector<std::vector<Expr> >& triggers);
1221 virtual void setTriggers(
const Expr& e,
const std::vector<std::vector<Expr> > & triggers);
1247 const std::vector<Expr>& inputs,
1527 bool interactive =
false,
1528 bool calledFromParser =
false);
1533 bool interactive =
false);
const int & getInt() const
const bool & getBool() const
CLFlag(const char *s, const std::string &help, bool display=true)
Constructor for a string flag from char*.
std::vector< std::pair< std::string, bool > > * sv
CLFlag(int i, const std::string &help, bool display=true)
Constructor for an integer flag.
CLFlagType getType() const
Return the type of the flag.
CLFlag & operator=(int i)
Assignment of an integer value.
CLFlag & operator=(const std::string &s)
Assignment of a string value.
CLFlag & operator=(const std::vector< std::pair< std::string, bool > > &sv)
Assignment of a vector value.
CLFlag()
Default constructor.
CLFlag & operator=(bool b)
Assignment of a boolean value.
const std::vector< std::pair< std::string, bool > > & getStrVec() const
CLFlag(const std::vector< std::pair< std::string, bool > > &sv, const std::string &help, bool display=true)
Constructor for a vector flag.
CLFlag(const CLFlag &f)
Copy constructor.
bool display() const
Return true if flag should be displayed in regular help.
CLFlag(bool b, const std::string &help, bool display=true)
Constructor for a boolean flag.
const std::string & getString() const
CLFlag & operator=(const CLFlag &f)
Assignment from another flag.
bool modified() const
Return true if the flag was modified from the default value (e.g. set on the command line)
CLFlag & operator=(const std::pair< std::string, bool > &p)
Assignment of a string value with a boolean tag to a vector flag.
const std::string & getHelp() const
CLFlag(const std::string &s, const std::string &help, bool display=true)
Constructor for a string flag.
CLFlag & operator=(const char *s)
Assignment of an string value from char*.
void setFlag(const std::string &name, const std::pair< std::string, bool > &p)
void setFlag(const std::string &name, const CLFlag &f)
const CLFlag & operator[](const std::string &name) const
void addFlag(const std::string &name, const CLFlag &f)
void setFlag(const std::string &name, const std::vector< std::pair< std::string, bool > > &sv)
void setFlag(const std::string &name, bool b)
size_t countFlags(const std::string &name, std::vector< std::string > &names) const
size_t countFlags(const std::string &name) const
void setFlag(const std::string &name, const char *s)
const CLFlag & getFlag(const std::string &name) const
void setFlag(const std::string &name, const std::string &s)
void setFlag(const std::string &name, int i)
void insert(Expr a, Expr b)
std::string getKindName(int kind)
InputLanguage getOutputLang() const
Get the output language for printing.
InputLanguage getInputLang() const
Get the input language for printing.
Expr class for CVC3 compatibility layer.
Expr getExistential() const
bool isInitialized() const
const Rational & getRational() const
Expr iteExpr(const Expr &thenpart, const Expr &elsepart) const
CVC4::Expr::const_iterator iterator
Expr(const CVC4::Expr &e)
Type getType() const
Get the type. Recursively compute if necessary.
std::vector< Expr > getVars() const
bool isBoolConnective() const
Expr operator||(const Expr &right) const
Expr operator[](int i) const
Expr substExpr(const std::vector< Expr > &oldTerms, const std::vector< Expr > &newTerms) const
bool isQuantifier() const
Expr andExpr(const Expr &right) const
bool isAtomicFormula() const
Expr operator&&(const Expr &right) const
std::string getString() const
void pprintnodag() const
Pretty-print without dagifying.
std::string getName() const
bool isPropLiteral() const
ExprManager * getEM() const
Expr iffExpr(const Expr &right) const
static size_t hash(const Expr &e)
std::vector< std::vector< Expr > > getTriggers() const
Get the manual triggers of the closure Expr.
Expr substExpr(const ExprHashMap< Expr > &oldToNew) const
ExprIndex getIndex() const
Type lookupType() const
Look up the current type. Do not recursively compute (i.e. may be NULL)
bool isAbsLiteral() const
Expr xorExpr(const Expr &right) const
void pprint() const
Pretty-print the expression.
int getBoundIndex() const
Expr unnegate() const
Remove leading NOT if any.
Expr orExpr(const Expr &right) const
Theorem getTheorem() const
std::vector< Expr > getKids() const
Expr eqExpr(const Expr &right) const
bool isAbsAtomicFormula() const
std::string getUid() const
Expr impExpr(const Expr &right) const
Type operator[](int i) const
Type(const CVC4::Type &type)
static Type typeBool(ExprManager *em)
static Type funType(const std::vector< Type > &typeDom, const Type &typeRan)
Expr enumerateFinite(Unsigned n) const
Return nth (starting with 0) element in a finite type.
Type funType(const Type &typeRan) const
Cardinality card() const
Return cardinality of type.
Unsigned sizeFinite() const
Return size of a finite type; returns 0 if size cannot be determined.
CVC3 API (compatibility layer for CVC4)
virtual Expr newBVCompExpr(const Expr &t1, const Expr &t2)
virtual Expr stringExpr(const std::string &str)
Create a string Expr.
virtual Expr ratExpr(const std::string &n, const std::string &d, int base)
Create a rational number with numerator n and denominator d.
virtual Expr newBVExtractExpr(const Expr &e, int hi, int low)
virtual CLFlags & getFlags() const
Return the set of command-line flags.
virtual void reprocessFlags()
Force reprocessing of all flags.
virtual Expr newBVSDivExpr(const Expr &t1, const Expr &t2)
virtual Type createType(const std::string &typeName, const Type &def)
Create named user-defined interpreted type (type abbreviation)
virtual Expr datatypeTestExpr(const std::string &constructor, const Expr &arg)
Datatype tester expression.
virtual Expr lookupVar(const std::string &name, Type *type)
Get the variable associated with a name, and its type.
virtual Expr newBVNegExpr(const Expr &t1)
ValidityChecker()
Constructor.
virtual void logAnnotation(const Expr &annot)
Add an annotation to the current script - prints annot when translating.
virtual Type recordType(const std::vector< std::string > &fields, const std::vector< Type > &types)
n-element record (fields and types must be of the same length)
virtual Expr funExpr(const Op &op, const Expr &child0, const Expr &child1, const Expr &child2)
Ternary function application (op must be of function type)
virtual Expr falseExpr()
Return FALSE Expr.
virtual void setTriggers(const Expr &e, const std::vector< std::vector< Expr > > &triggers)
Set triggers for quantifier instantiation.
static ValidityChecker * create()
Create an instance of ValidityChecker using default flag values.
virtual void registerAtom(const Expr &e)
Register an atomic formula of interest.
virtual void popScope()
Restore the current context to its state at the last internal checkpoint. Do not use unless you know ...
virtual Expr parseExpr(const Expr &e)
Parse an expression using a Theory-specific parser.
virtual void setTimeLimit(unsigned limit)
Set a time limit in tenth of a second,.
virtual Expr getTCC()
Returns the TCC of the last assumption or query.
virtual Type 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)
Single datatype, multiple constructors.
virtual void getConcreteModel(ExprMap< Expr > &m)
Will assign concrete values to all user created variables.
virtual QueryResult checkContinue()
Get the next model.
virtual Expr writeExpr(const Expr &array, const Expr &index, const Expr &newValue)
Array update; equivalent to "array WITH index := newValue".
virtual QueryResult restart(const Expr &e)
Restart the most recent query with e as an additional assertion.
virtual Expr listExpr(const std::vector< Expr > &kids)
Create a list Expr.
virtual Type arrayType(const Type &typeIndex, const Type &typeData)
Create an array type (ARRAY typeIndex OF typeData)
virtual Expr andExpr(const std::vector< Expr > &children)
Create n-element conjunction.
virtual Expr multExpr(const Expr &left, const Expr &right)
Create a product (left * right)
virtual Expr newBVOrExpr(const Expr &t1, const Expr &t2)
virtual Expr newBVPlusExpr(int numbits, const std::vector< Expr > &k)
'numbits' is the number of bits in the result
virtual Expr listExpr(const Expr &e1)
Overloaded version of listExpr with one argument.
virtual void reset()
Destroy and recreate validity checker: resets everything except for flags.
virtual void poptoScope(int scopeLevel)
Restore the current context to the given scopeLevel.
virtual Type recordType(const std::string &field0, const Type &type0, const std::string &field1, const Type &type1, const std::string &field2, const Type &type2)
3-element record
virtual Expr newBVOrExpr(const std::vector< Expr > &kids)
virtual bool inconsistent()
Returns true if the current context is inconsistent.
virtual Expr ratExpr(const std::string &n, int base=10)
Create a rational from a single string.
virtual void getCounterExample(std::vector< Expr > &assumptions, bool inOrder=true)
Return the internal assumptions that make the queried formula false.
virtual void pop()
Restore the current context to its state at the last checkpoint.
virtual Op lambdaExpr(const std::vector< Expr > &vars, const Expr &body)
Lambda-expression.
virtual Expr newBVSModExpr(const Expr &t1, const Expr &t2)
virtual Expr newBVPlusExpr(int numbits, const Expr &t1, const Expr &t2)
virtual Expr forallExpr(const std::vector< Expr > &vars, const Expr &body, const std::vector< std::vector< Expr > > &triggers)
Universal quantifier with a set of multi-triggers.
virtual void printStatistics()
Print collected statistics to stdout.
virtual Expr minusExpr(const Expr &left, const Expr &right)
Make a difference (left - right)
virtual Expr listExpr(const std::string &op, const Expr &e1)
Overloaded version of listExpr with string operator and one argument.
virtual Op createOp(const std::string &name, const Type &type)
Create a named uninterpreted function with a given type.
virtual Expr newFixedConstWidthLeftShiftExpr(const Expr &t1, int r)
virtual void pushScope()
Checkpoint the current context and increase the internal scope level. Do not use unless you know what...
virtual ~ValidityChecker()
Destructor.
virtual Expr forallExpr(const std::vector< Expr > &vars, const Expr &body, const std::vector< Expr > &triggers)
Universal quantifier with a set of triggers.
static ValidityChecker * create(const CLFlags &flags)
Create an instance of ValidityChecker.
virtual Expr newBVConstExpr(const std::string &s, int base=2)
virtual Expr newBVSubExpr(const Expr &t1, const Expr &t2)
virtual Expr uminusExpr(const Expr &child)
Unary minus.
virtual bool incomplete(std::vector< std::string > &reasons)
Returns true if the invalid result from last query() is imprecise.
virtual Type subrangeType(const Expr &l, const Expr &r)
Create a subrange type [l..r].
virtual Expr varExpr(const std::string &name, const Type &type, const Expr &def)
Create a variable with a given name, type, and value.
virtual Expr newBVASHR(const Expr &t1, const Expr &t2)
virtual Type dataType(const std::string &name, const std::string &constructor, const std::vector< std::string > &selectors, const std::vector< Expr > &types)
Single datatype, single constructor.
virtual Expr divideExpr(const Expr &numerator, const Expr &denominator)
Create expression x / y.
virtual Type createType(const std::string &typeName)
Create named user-defined uninterpreted type.
virtual Expr idExpr(const std::string &name)
Create an ID Expr.
virtual void assertFormula(const Expr &e)
Assert a new formula in the current context.
virtual void setTrigger(const Expr &e, const Expr &trigger)
Set a single trigger for quantifier instantiation.
virtual Type tupleType(const Type &type0, const Type &type1)
2-element tuple
virtual Expr newBVXorExpr(const std::vector< Expr > &kids)
virtual Expr varExpr(const std::string &name, const Type &type)
Create a variable with a given name and type.
virtual Type recordType(const std::string &field0, const Type &type0, const std::string &field1, const Type &type1)
2-element record
virtual Type funType(const Type &typeDom, const Type &typeRan)
Create a function type typeDom -> typeRan.
virtual Expr newBVSRemExpr(const Expr &t1, const Expr &t2)
virtual Expr recordExpr(const std::string &field, const Expr &expr)
Create a 1-element record value (# field := expr #)
virtual Proof getProof()
Returns the proof term for the last proven query.
virtual Expr listExpr(const Expr &e1, const Expr &e2, const Expr &e3)
Overloaded version of listExpr with three arguments.
virtual Expr tupleSelectExpr(const Expr &tuple, int index)
Tuple select; equivalent to "tuple.n", where n is an numeral (e.g. tup.5)
virtual Expr newBVLTExpr(const Expr &t1, const Expr &t2)
virtual Op createOp(const std::string &name, const Type &type, const Expr &def)
Create a named user-defined function with a given type.
virtual Expr forallExpr(const std::vector< Expr > &vars, const Expr &body, const Expr &trigger)
Universal quantifier with a trigger.
virtual Expr recordExpr(const std::vector< std::string > &fields, const std::vector< Expr > &exprs)
Create an n-element record value (# field_i := expr_i #)
virtual int scopeLevel()
Returns the current scope level. Initially, the scope level is 1.
virtual Expr ltExpr(const Expr &left, const Expr &right)
Create (left < right)
virtual Type parseType(const Expr &e)
Parse a type expression using a Theory-specific parser.
virtual Expr newBVUDivExpr(const Expr &t1, const Expr &t2)
virtual void returnFromCheck()
Returns to context immediately before last invalid query.
virtual Expr recSelectExpr(const Expr &record, const std::string &field)
Create record.field (field selection)
virtual Expr listExpr(const std::string &op, const Expr &e1, const Expr &e2, const Expr &e3)
Overloaded version of listExpr with string operator and three arguments.
virtual Expr importExpr(const Expr &e)
Import the Expr from another instance of ValidityChecker.
virtual void loadFile(std::istream &is, InputLanguage lang=PRESENTATION_LANG, bool interactive=false)
Read and execute the commands from a stream.
virtual Expr newBVAndExpr(const std::vector< Expr > &kids)
virtual Expr newBVLSHR(const Expr &t1, const Expr &t2)
virtual Statistics getStatistics()
Get statistics object.
virtual Expr impliesExpr(const Expr &hyp, const Expr &conc)
Create Boolean implication.
virtual Expr leExpr(const Expr &left, const Expr &right)
Create (left <= right)
virtual void setMultiTrigger(const Expr &e, const std::vector< Expr > &multiTrigger)
Set a single multi-trigger for quantifier instantiation.
virtual Type bitvecType(int n)
Create a bitvector type of length n.
virtual Op lookupOp(const std::string &name, Type *type)
Get the Op associated with a name, and its type.
virtual void printExpr(const Expr &e)
Prints e to the standard output.
virtual Expr tupleExpr(const std::vector< Expr > &exprs)
Tuple expression.
virtual Expr getValue(const Expr &e)
Evaluate an expression and return a concrete value in the model.
virtual void cmdsFromString(const std::string &s, InputLanguage lang=PRESENTATION_LANG)
Parse a sequence of commands from a presentation language string.
virtual void getInternalAssumptions(std::vector< Expr > &assumptions)
Get assumptions made internally in this and all previous contexts.
virtual Expr getTypePred(const Type &t, const Expr &e)
Get the subtype predicate.
virtual bool addPairToArithOrder(const Expr &smaller, const Expr &bigger)
virtual Expr readExpr(const Expr &array, const Expr &index)
Create an expression array[index] (array access)
virtual Expr exprFromString(const std::string &e, InputLanguage lang=PRESENTATION_LANG)
Parse an expression from a presentation language string.
virtual Type getBaseType(const Type &t)
Get the largest supertype of the Type.
virtual void 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)
Multiple datatypes.
virtual Expr newBVConstExpr(const std::vector< bool > &bits)
virtual Expr newBVURemExpr(const Expr &t1, const Expr &t2)
virtual void setResourceLimit(unsigned limit)
Set the resource limit (0==unlimited, 1==exhausted).
virtual Type getBaseType(const Expr &e)
Get the largest supertype of the Expr.
virtual Expr orExpr(const Expr &left, const Expr &right)
Create 2-element disjunction.
virtual void printExpr(const Expr &e, std::ostream &os)
Prints e to the given ostream.
virtual Expr newFixedRightShiftExpr(const Expr &t1, int r)
static CLFlags createFlags()
Create the set of command line flags with default values;.
virtual Expr newBVXorExpr(const Expr &t1, const Expr &t2)
virtual Expr funExpr(const Op &op, const Expr &child)
Unary function application (op must be of function type)
virtual Expr newBVXnorExpr(const std::vector< Expr > &kids)
virtual Expr datatypeSelExpr(const std::string &selector, const Expr &arg)
Datatype selector expression.
virtual Op transClosure(const Op &op)
Transitive closure of a binary predicate.
virtual Expr recUpdateExpr(const Expr &record, const std::string &field, const Expr &newValue)
Record update; equivalent to "record WITH .field := newValue".
virtual Expr newBVAndExpr(const Expr &t1, const Expr &t2)
virtual Expr gtExpr(const Expr &left, const Expr &right)
Create (left > right)
virtual Type funType(const std::vector< Type > &typeDom, const Type &typeRan)
Create a function type (t1,t2,...,tn) -> typeRan.
virtual Expr newBVUminusExpr(const Expr &t1)
virtual Expr newBVSLTExpr(const Expr &t1, const Expr &t2)
virtual Expr funExpr(const Op &op, const std::vector< Expr > &children)
n-ary function application (op must be of function type)
virtual QueryResult checkUnsat(const Expr &e)
Check satisfiability of the expr in the current context.
virtual Expr tupleUpdateExpr(const Expr &tuple, int index, const Expr &newValue)
Tuple update; equivalent to "tuple WITH index := newValue".
virtual Expr newBVConstExpr(const Rational &r, int len=0)
virtual Type tupleType(const std::vector< Type > &types)
n-element tuple (from a vector of types)
virtual Expr newBVMultExpr(int numbits, const Expr &t1, const Expr &t2)
virtual Expr newSXExpr(const Expr &t1, int len)
virtual Context * getCurrentContext()
Get the current context.
virtual Expr forallExpr(const std::vector< Expr > &vars, const Expr &body)
Universal quantifier.
virtual Expr listExpr(const Expr &e1, const Expr &e2)
Overloaded version of listExpr with two arguments.
virtual Expr newBVNandExpr(const Expr &t1, const Expr &t2)
virtual Type getType(const Expr &e)
Get the type of the Expr.
virtual Expr iteExpr(const Expr &ifpart, const Expr &thenpart, const Expr &elsepart)
Create IF ifpart THEN thenpart ELSE elsepart ENDIF.
virtual Expr boundVarExpr(const std::string &name, const std::string &uid, const Type &type)
Create a bound variable with a given name, unique ID (uid) and type.
virtual void getAssumptions(std::vector< Expr > &assumptions)
Get all assumptions made in this and all previous contexts.
virtual int stackLevel()
Returns the current stack level. Initial level is 0.
virtual ExprManager * getEM()
Return the ExprManager.
virtual Expr simulateExpr(const Expr &f, const Expr &s0, const std::vector< Expr > &inputs, const Expr &n)
Symbolic simulation expression.
virtual Type tupleType(const Type &type0, const Type &type1, const Type &type2)
3-element tuple
virtual Expr newConcatExpr(const Expr &t1, const Expr &t2)
virtual Expr newBVLEExpr(const Expr &t1, const Expr &t2)
virtual Expr iffExpr(const Expr &left, const Expr &right)
Create left IFF right (boolean equivalence)
virtual Expr existsExpr(const std::vector< Expr > &vars, const Expr &body)
Existential quantifier.
virtual FormulaValue value(const Expr &e)
virtual Expr recordExpr(const std::string &field0, const Expr &expr0, const std::string &field1, const Expr &expr1)
Create a 2-element record value (# field0 := expr0, field1 := expr1 #)
virtual QueryResult query(const Expr &e)
Check validity of e in the current context.
virtual void getAssumptionsTCC(std::vector< Expr > &assumptions)
Return the set of assumptions used in the proof of the last TCC.
virtual Expr notExpr(const Expr &child)
Create negation.
virtual Type realType()
Create type REAL.
virtual Expr andExpr(const Expr &left, const Expr &right)
Create 2-element conjunction.
virtual Proof getProofClosure()
Construct a proof of the query closure |- Gamma => phi.
virtual Expr plusExpr(const Expr &left, const Expr &right)
Create 2-element sum (left + right)
virtual Expr distinctExpr(const std::vector< Expr > &children)
Create an expression asserting that all the children are different.
virtual Expr recordExpr(const std::string &field0, const Expr &expr0, const std::string &field1, const Expr &expr1, const std::string &field2, const Expr &expr2)
Create a 3-element record value (# field_i := expr_i #)
virtual Expr listExpr(const std::string &op, const Expr &e1, const Expr &e2)
Overloaded version of listExpr with string operator and two arguments.
virtual Expr funExpr(const Op &op, const Expr &left, const Expr &right)
Binary function application (op must be of function type)
virtual Expr powExpr(const Expr &x, const Expr &n)
Create a power expression (x ^ n); n must be integer.
virtual Type importType(const Type &t)
Import the Type from another instance of ValidityChecker.
virtual void push()
Checkpoint the current context and increase the scope level.
virtual Expr getClosure()
After successful query, return its closure |- Gamma => phi.
virtual Expr datatypeConsExpr(const std::string &constructor, const std::vector< Expr > &args)
Datatype constructor expression.
virtual Expr listExpr(const std::string &op, const std::vector< Expr > &kids)
Overloaded version of listExpr with string operator and many arguments.
virtual Expr newBVNorExpr(const Expr &t1, const Expr &t2)
virtual Expr plusExpr(const std::vector< Expr > &children)
Create n-element sum.
virtual Type boolType()
Create type BOOLEAN.
virtual bool inconsistent(std::vector< Expr > &assumptions)
Returns true if the current context is inconsistent.
virtual void getUserAssumptions(std::vector< Expr > &assumptions)
Get assumptions made by the user in this and all previous contexts.
virtual void loadFile(const std::string &fileName, InputLanguage lang=PRESENTATION_LANG, bool interactive=false, bool calledFromParser=false)
Read and execute the commands from a file given by name ("" means stdin)
virtual QueryResult tryModelGeneration()
If the result of the last query was UNKNOWN try to actually build the model to verify the result.
virtual Expr ratExpr(int n, int d=1)
Create a rational number with numerator n and denominator d.
virtual void popto(int stackLevel)
Restore the current context to the given stackLevel.
virtual Expr getProofQuery()
virtual Expr newBVXnorExpr(const Expr &t1, const Expr &t2)
virtual Expr newBVSHL(const Expr &t1, const Expr &t2)
virtual Proof getProofTCC()
Returns the proof of TCC of the last assumption or query.
virtual Rational computeBVConst(const Expr &e)
virtual void setTriggers(const Expr &e, const std::vector< Expr > &triggers)
Set triggers for quantifier instantiation (no multi-triggers)
virtual void getAssumptionsUsed(std::vector< Expr > &assumptions)
Returns the set of assumptions used in the proof of queried formula.
virtual Expr getImpliedLiteral()
Return next literal implied by last assertion. Null Expr if none.
virtual Expr geExpr(const Expr &left, const Expr &right)
Create (left >= right)
virtual Expr orExpr(const std::vector< Expr > &children)
Create n-element disjunction.
virtual Type recordType(const std::string &field, const Type &type)
1-element record
virtual Type intType()
Create type INT.
virtual Expr trueExpr()
Return TRUE Expr.
virtual Type subtypeType(const Expr &pred, const Expr &witness)
Creates a subtype defined by the given predicate.
virtual Expr newConcatExpr(const std::vector< Expr > &kids)
virtual Expr eqExpr(const Expr &child0, const Expr &child1)
Create an equality expression.
virtual Expr newFixedLeftShiftExpr(const Expr &t1, int r)
virtual Type lookupType(const std::string &typeName)
Lookup a user-defined (uninterpreted) type by name. Returns Null if none.
virtual bool incomplete()
Returns true if the invalid result from last query() is imprecise.
virtual Expr simplify(const Expr &e)
Simplify e with respect to the current context.
virtual Expr newBVSLEExpr(const Expr &t1, const Expr &t2)
A simple representation of a cardinality.
Iterator type for the children of an Expr.
Class encapsulating CVC4 expressions and methods for constructing new expressions.
A multi-precision rational constant.
Exception thrown in the case of type-checking errors.
Class encapsulating CVC4 expression types.
This class encapsulates all of the state of a parser, including the name of the file,...
#define PRESENTATION_LANG
Macros that should be defined everywhere during the building of the libraries and driver binary,...
CVC4's exception base class and some associated utilities.
[[ Add one-line brief description here ]]
CVC4::TypeCheckingException TypecheckException
std::string QueryResultToString(QueryResult query_result)
bool operator!=(const Cardinality &c, CVC3CardinalityKind d)
bool operator==(const Cardinality &c, CVC3CardinalityKind d)
int compare(const Expr &e1, const Expr &e2)
CLFlagType
Different types of command line flags.
@ CLFLAG_STRVEC
Vector of pair<string, bool>
CVC4::Statistics Statistics
bool isArrayLiteral(const Expr &)
std::string int2string(int n)
std::ostream & operator<<(std::ostream &, CVC4::Kind)
@ BITVECTOR_PLUS
addition of two or more bit-vectors (67)
@ BITVECTOR_CONCAT
concatenation of two or more bit-vectors (57)
@ STORE
array store; first parameter is an array term, second is the store index, third is the term to store ...
@ SELECT
array select; first parameter is an array term, second is the selection index (109)
@ CONST_BITVECTOR
a fixed-width bit-vector constant; payload is an instance of the CVC4::BitVector class (56)
@ LEQ
less than or equal, x <= y (49)
@ BITVECTOR_UGE
bit-vector unsigned greater than or equal (the two bit-vector parameters must have same width) (83)
@ DIVISION
real division, division by 0 undefined (user symbol) (36)
@ BITVECTOR_UGT
bit-vector unsigned greater than (the two bit-vector parameters must have same width) (82)
@ GEQ
greater than or equal, x >= y (51)
@ BITVECTOR_ULE
bit-vector unsigned less than or equal (the two bit-vector parameters must have same width) (81)
@ EQUAL
equality (two parameters only, sorts must match) (8)
@ BITVECTOR_EXTRACT
bit-vector extract; first parameter is a BITVECTOR_EXTRACT_OP, second is a bit-vector term (99)
@ BITVECTOR_SUB
subtraction of two bit-vectors (68)
@ BITVECTOR_ULT
bit-vector unsigned less than (the two bit-vector parameters must have same width) (80)
A collection of state for use by parser implementations.
SmtEngine: the main public entry point of libcvc4.
Interface for expression types.