expr.h
Go to the documentation of this file.
/********************* */
/* THIS FILE IS AUTOMATICALLY GENERATED, DO NOT EDIT ! */
/* THIS FILE IS AUTOMATICALLY GENERATED, DO NOT EDIT ! */
/* THIS FILE IS AUTOMATICALLY GENERATED, DO NOT EDIT ! */
/* THIS FILE IS AUTOMATICALLY GENERATED, DO NOT EDIT ! */
/* THIS FILE IS AUTOMATICALLY GENERATED, DO NOT EDIT ! */
/* THIS FILE IS AUTOMATICALLY GENERATED, DO NOT EDIT ! */
/* THIS FILE IS AUTOMATICALLY GENERATED, DO NOT EDIT ! */
/* THIS FILE IS AUTOMATICALLY GENERATED, DO NOT EDIT ! */
/* THIS FILE IS AUTOMATICALLY GENERATED, DO NOT EDIT ! */
/* THIS FILE IS AUTOMATICALLY GENERATED, DO NOT EDIT ! */
/* THIS FILE IS AUTOMATICALLY GENERATED, DO NOT EDIT ! */
/* THIS FILE IS AUTOMATICALLY GENERATED, DO NOT EDIT ! */
/* Edit the template file instead: */
/* /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_cvc4/cvc4/work/cvc4-1.4/builds/powerpc-apple-darwin10.0.0d2/production/../../../src/expr/expr_template.h */
/********************* */
#include "cvc4_public.h"
// putting the constant-payload #includes up here allows circularity
// (some of them may require a completely-defined Expr type). This
// way, those #includes can forward-declare some stuff to get Expr's
// getConst<> template instantiations correct, and then #include
// "expr.h" safely, then go on to completely declare their own stuff.
#include "util/uninterpreted_constant.h"
#include "util/abstract_value.h"
#include "expr/kind.h"
#include "util/chain.h"
#include "expr/kind.h"
#include "util/predicate.h"
#include "util/bool.h"
#include "util/divisible.h"
#include "util/subrange_bound.h"
#include "util/rational.h"
#include "util/bitvector.h"
#include "util/bitvector.h"
#include "util/bitvector.h"
#include "util/bitvector.h"
#include "util/bitvector.h"
#include "util/bitvector.h"
#include "util/bitvector.h"
#include "util/bitvector.h"
#include "util/bitvector.h"
#include "util/bitvector.h"
#include "util/array_store_all.h"
#include "util/datatype.h"
#include "util/ascription_type.h"
#include "util/tuple.h"
#include "util/tuple.h"
#include "util/record.h"
#include "util/record.h"
#include "util/record.h"
#include "util/emptyset.h"
#include "util/regexp.h"
#include "util/regexp.h"
#ifndef __CVC4__EXPR_H
#define __CVC4__EXPR_H
#include <string>
#include <iostream>
#include <iterator>
#include <stdint.h>
#include "util/exception.h"
#include "util/language.h"
#include "util/hash.h"
#include "expr/options.h"
// This is a hack, but an important one: if there's an error, the
// compiler directs the user to the template file instead of the
// generated one. We don't want the user to modify the generated one,
// since it'll get overwritten on a later build.
#line 44 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_cvc4/cvc4/work/cvc4-1.4/builds/powerpc-apple-darwin10.0.0d2/production/../../../src/expr/expr_template.h"
namespace CVC4 {
// The internal expression representation
template <bool ref_count>
class NodeTemplate;
class NodeManager;
class Expr;
class ExprManager;
class SmtEngine;
class Type;
class TypeCheckingException;
class TypeCheckingExceptionPrivate;
namespace expr {
namespace pickle {
class Pickler;
}/* CVC4::expr::pickle namespace */
}/* CVC4::expr namespace */
namespace prop {
class TheoryProxy;
}/* CVC4::prop namespace */
struct ExprManagerMapCollection;
struct ExprHashFunction;
namespace smt {
class SmtEnginePrivate;
}/* CVC4::smt namespace */
namespace expr {
class CVC4_PUBLIC ExprSetDepth;
class CVC4_PUBLIC ExprPrintTypes;
class CVC4_PUBLIC ExprDag;
class CVC4_PUBLIC ExprSetLanguage;
class ExportPrivate;
}/* CVC4::expr namespace */
class CVC4_PUBLIC TypeCheckingException : public Exception {
friend class SmtEngine;
friend class smt::SmtEnginePrivate;
private:
Expr* d_expr;
protected:
TypeCheckingException() throw() : Exception() {}
TypeCheckingException(ExprManager* em,
const TypeCheckingExceptionPrivate* exc) throw();
public:
TypeCheckingException(const Expr& expr, std::string message) throw();
TypeCheckingException(const TypeCheckingException& t) throw();
~TypeCheckingException() throw();
Expr getExpression() const throw();
void toStream(std::ostream& out) const throw();
friend class ExprManager;
};/* class TypeCheckingException */
class CVC4_PUBLIC ExportUnsupportedException : public Exception {
public:
ExportUnsupportedException() throw():
Exception("export unsupported") {
}
ExportUnsupportedException(const char* msg) throw():
Exception(msg) {
}
};/* class DatatypeExportUnsupportedException */
std::ostream& operator<<(std::ostream& out,
const TypeCheckingException& e) CVC4_PUBLIC;
std::ostream& operator<<(std::ostream& out, const Expr& e) CVC4_PUBLIC;
// for hash_maps, hash_sets..
struct ExprHashFunction {
size_t operator()(CVC4::Expr e) const;
};/* struct ExprHashFunction */
class CVC4_PUBLIC Expr {
NodeTemplate<true>* d_node;
ExprManager* d_exprManager;
Expr(ExprManager* em, NodeTemplate<true>* node);
public:
Expr();
Expr(const Expr& e);
~Expr();
Expr& operator=(const Expr& e);
bool operator==(const Expr& e) const;
bool operator!=(const Expr& e) const;
bool operator<(const Expr& e) const;
bool operator>(const Expr& e) const;
bool operator<=(const Expr& e) const { return !(*this > e); }
bool operator>=(const Expr& e) const { return !(*this < e); }
unsigned long getId() const;
Kind getKind() const;
size_t getNumChildren() const;
Expr operator[](unsigned i) const;
std::vector<Expr> getChildren() const {
return std::vector<Expr>(begin(), end());
}
Expr notExpr() const;
Expr andExpr(const Expr& e) const;
Expr orExpr(const Expr& e) const;
Expr xorExpr(const Expr& e) const;
Expr iffExpr(const Expr& e) const;
Expr impExpr(const Expr& e) const;
Expr iteExpr(const Expr& then_e, const Expr& else_e) const;
class const_iterator : public std::iterator<std::input_iterator_tag, Expr> {
ExprManager* d_exprManager;
void* d_iterator;
explicit const_iterator(ExprManager*, void*);
friend class Expr;// to access void* constructor
public:
const_iterator();
const_iterator(const const_iterator& it);
const_iterator& operator=(const const_iterator& it);
~const_iterator();
bool operator==(const const_iterator& it) const;
bool operator!=(const const_iterator& it) const {
return !(*this == it);
}
const_iterator& operator++();
const_iterator operator++(int);
Expr operator*() const;
};/* class Expr::const_iterator */
const_iterator begin() const;
const_iterator end() const;
bool hasOperator() const;
Expr getOperator() const;
Type getType(bool check = false) const throw (TypeCheckingException);
Expr substitute(Expr e, Expr replacement) const;
Expr substitute(const std::vector<Expr> exes,
const std::vector<Expr>& replacements) const;
Expr substitute(const std::hash_map<Expr, Expr, ExprHashFunction> map) const;
std::string toString() const;
void toStream(std::ostream& out, int toDepth = -1, bool types = false, size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const;
bool isNull() const;
bool isVariable() const;
bool isConst() const;
/* A note on isAtomic() and isAtomicFormula() (in CVC3 parlance)..
*
* It has been decided for now to hold off on implementations of
* these functions, as they may only be needed in CNF conversion,
* where it's pointless to do a lazy isAtomic determination by
* searching through the DAG, and storing it, since the result will
* only be used once. For more details see the 4/27/2010 CVC4
* developer's meeting notes at:
*
* http://goedel.cims.nyu.edu/wiki/Meeting_Minutes_-_April_27,_2010#isAtomic.28.29_and_isAtomicFormula.28.29
*/
// bool containsDecision(); // is "atomic"
// bool properlyContainsDecision(); // maybe not atomic but all children are
template <class T>
const T& getConst() const;
ExprManager* getExprManager() const;
Expr exportTo(ExprManager* exprManager, ExprManagerMapCollection& variableMap, uint32_t flags = 0) const;
typedef expr::ExprSetDepth setdepth;
typedef expr::ExprPrintTypes printtypes;
typedef expr::ExprDag dag;
typedef expr::ExprSetLanguage setlanguage;
void printAst(std::ostream& out, int indent = 0) const;
private:
void debugPrint();
NodeTemplate<true> getNode() const throw();
NodeTemplate<false> getTNode() const throw();
// Friend to access the actual internal expr information and private methods
friend class SmtEngine;
friend class smt::SmtEnginePrivate;
friend class ExprManager;
friend class NodeManager;
friend class TypeCheckingException;
friend class expr::pickle::Pickler;
friend class prop::TheoryProxy;
friend class expr::ExportPrivate;
friend std::ostream& CVC4::operator<<(std::ostream& out, const Expr& e);
template <bool ref_count> friend class NodeTemplate;
};/* class Expr */
namespace expr {
class CVC4_PUBLIC ExprSetDepth {
static const int s_iosIndex;
static const int s_defaultPrintDepth = -1;
long d_depth;
public:
ExprSetDepth(long depth) : d_depth(depth) {}
inline void applyDepth(std::ostream& out) {
out.iword(s_iosIndex) = d_depth;
}
static inline long getDepth(std::ostream& out) {
long& l = out.iword(s_iosIndex);
if(l == 0) {
// set the default print depth on this ostream
if(&Options::current() != NULL) {
l = options::defaultExprDepth();
}
if(l == 0) {
// if called from outside the library, we may not have options
// available to us at this point (or perhaps the output language
// is not set in Options). Default to something reasonable, but
// don't set "l" since that would make it "sticky" for this
// stream.
return s_defaultPrintDepth;
}
}
return l;
}
static inline void setDepth(std::ostream& out, long depth) {
out.iword(s_iosIndex) = depth;
}
class Scope {
std::ostream& d_out;
long d_oldDepth;
public:
inline Scope(std::ostream& out, long depth) :
d_out(out),
d_oldDepth(ExprSetDepth::getDepth(out)) {
ExprSetDepth::setDepth(out, depth);
}
inline ~Scope() {
ExprSetDepth::setDepth(d_out, d_oldDepth);
}
};/* class ExprSetDepth::Scope */
};/* class ExprSetDepth */
class CVC4_PUBLIC ExprPrintTypes {
static const int s_iosIndex;
bool d_printTypes;
public:
ExprPrintTypes(bool printTypes) : d_printTypes(printTypes) {}
inline void applyPrintTypes(std::ostream& out) {
out.iword(s_iosIndex) = d_printTypes;
}
static inline bool getPrintTypes(std::ostream& out) {
return out.iword(s_iosIndex);
}
static inline void setPrintTypes(std::ostream& out, bool printTypes) {
out.iword(s_iosIndex) = printTypes;
}
class Scope {
std::ostream& d_out;
bool d_oldPrintTypes;
public:
inline Scope(std::ostream& out, bool printTypes) :
d_out(out),
d_oldPrintTypes(ExprPrintTypes::getPrintTypes(out)) {
ExprPrintTypes::setPrintTypes(out, printTypes);
}
inline ~Scope() {
ExprPrintTypes::setPrintTypes(d_out, d_oldPrintTypes);
}
};/* class ExprPrintTypes::Scope */
};/* class ExprPrintTypes */
class CVC4_PUBLIC ExprDag {
static const int s_iosIndex;
static const size_t s_defaultDag = 1;
size_t d_dag;
public:
explicit ExprDag(bool dag) : d_dag(dag ? 1 : 0) {}
explicit ExprDag(int dag) : d_dag(dag < 0 ? 0 : dag) {}
inline void applyDag(std::ostream& out) {
// (offset by one to detect whether default has been set yet)
out.iword(s_iosIndex) = static_cast<long>(d_dag) + 1;
}
static inline size_t getDag(std::ostream& out) {
long& l = out.iword(s_iosIndex);
if(l == 0) {
// set the default dag setting on this ostream
// (offset by one to detect whether default has been set yet)
if(&Options::current() != NULL) {
l = options::defaultDagThresh() + 1;
}
if(l == 0) {
// if called from outside the library, we may not have options
// available to us at this point (or perhaps the output language
// is not set in Options). Default to something reasonable, but
// don't set "l" since that would make it "sticky" for this
// stream.
return s_defaultDag + 1;
}
}
return static_cast<size_t>(l - 1);
}
static inline void setDag(std::ostream& out, size_t dag) {
// (offset by one to detect whether default has been set yet)
out.iword(s_iosIndex) = static_cast<long>(dag) + 1;
}
class Scope {
std::ostream& d_out;
size_t d_oldDag;
public:
inline Scope(std::ostream& out, size_t dag) :
d_out(out),
d_oldDag(ExprDag::getDag(out)) {
ExprDag::setDag(out, dag);
}
inline ~Scope() {
ExprDag::setDag(d_out, d_oldDag);
}
};/* class ExprDag::Scope */
};/* class ExprDag */
class CVC4_PUBLIC ExprSetLanguage {
static const int s_iosIndex;
static const int s_defaultOutputLanguage = language::output::LANG_AUTO;
OutputLanguage d_language;
public:
ExprSetLanguage(OutputLanguage l) : d_language(l) {}
inline void applyLanguage(std::ostream& out) {
// (offset by one to detect whether default has been set yet)
out.iword(s_iosIndex) = int(d_language) + 1;
}
static inline OutputLanguage getLanguage(std::ostream& out) {
long& l = out.iword(s_iosIndex);
if(l == 0) {
// set the default language on this ostream
// (offset by one to detect whether default has been set yet)
if(&Options::current() != NULL) {
l = options::outputLanguage() + 1;
}
if(l <= 0 || l > language::output::LANG_MAX) {
// if called from outside the library, we may not have options
// available to us at this point (or perhaps the output language
// is not set in Options). Default to something reasonable, but
// don't set "l" since that would make it "sticky" for this
// stream.
return OutputLanguage(s_defaultOutputLanguage);
}
}
return OutputLanguage(l - 1);
}
static inline void setLanguage(std::ostream& out, OutputLanguage l) {
// (offset by one to detect whether default has been set yet)
out.iword(s_iosIndex) = int(l) + 1;
}
class Scope {
std::ostream& d_out;
OutputLanguage d_oldLanguage;
public:
inline Scope(std::ostream& out, OutputLanguage language) :
d_out(out),
d_oldLanguage(ExprSetLanguage::getLanguage(out)) {
ExprSetLanguage::setLanguage(out, language);
}
inline ~Scope() {
ExprSetLanguage::setLanguage(d_out, d_oldLanguage);
}
};/* class ExprSetLanguage::Scope */
};/* class ExprSetLanguage */
}/* CVC4::expr namespace */
#line 266 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_cvc4/cvc4/work/cvc4-1.4/builds/powerpc-apple-darwin10.0.0d2/production/../../../src/theory/builtin/kinds"
template <> ::CVC4::UninterpretedConstant const & Expr::getConst< ::CVC4::UninterpretedConstant >() const;
#line 276 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_cvc4/cvc4/work/cvc4-1.4/builds/powerpc-apple-darwin10.0.0d2/production/../../../src/theory/builtin/kinds"
template <> ::CVC4::AbstractValue const & Expr::getConst< ::CVC4::AbstractValue >() const;
#line 287 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_cvc4/cvc4/work/cvc4-1.4/builds/powerpc-apple-darwin10.0.0d2/production/../../../src/theory/builtin/kinds"
template <> ::CVC4::Kind const & Expr::getConst< ::CVC4::Kind >() const;
#line 309 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_cvc4/cvc4/work/cvc4-1.4/builds/powerpc-apple-darwin10.0.0d2/production/../../../src/theory/builtin/kinds"
template <> ::CVC4::Chain const & Expr::getConst< ::CVC4::Chain >() const;
#line 315 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_cvc4/cvc4/work/cvc4-1.4/builds/powerpc-apple-darwin10.0.0d2/production/../../../src/theory/builtin/kinds"
template <> ::CVC4::TypeConstant const & Expr::getConst< ::CVC4::TypeConstant >() const;
#line 343 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_cvc4/cvc4/work/cvc4-1.4/builds/powerpc-apple-darwin10.0.0d2/production/../../../src/theory/builtin/kinds"
template <> ::CVC4::Predicate const & Expr::getConst< ::CVC4::Predicate >() const;
#line 21 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_cvc4/cvc4/work/cvc4-1.4/builds/powerpc-apple-darwin10.0.0d2/production/../../../src/theory/booleans/kinds"
template <> bool const & Expr::getConst< bool >() const;
#line 29 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_cvc4/cvc4/work/cvc4-1.4/builds/powerpc-apple-darwin10.0.0d2/production/../../../src/theory/arith/kinds"
template <> ::CVC4::Divisible const & Expr::getConst< ::CVC4::Divisible >() const;
#line 48 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_cvc4/cvc4/work/cvc4-1.4/builds/powerpc-apple-darwin10.0.0d2/production/../../../src/theory/arith/kinds"
template <> ::CVC4::SubrangeBounds const & Expr::getConst< ::CVC4::SubrangeBounds >() const;
#line 61 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_cvc4/cvc4/work/cvc4-1.4/builds/powerpc-apple-darwin10.0.0d2/production/../../../src/theory/arith/kinds"
template <> ::CVC4::Rational const & Expr::getConst< ::CVC4::Rational >() const;
#line 15 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_cvc4/cvc4/work/cvc4-1.4/builds/powerpc-apple-darwin10.0.0d2/production/../../../src/theory/bv/kinds"
template <> ::CVC4::BitVectorSize const & Expr::getConst< ::CVC4::BitVectorSize >() const;
#line 24 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_cvc4/cvc4/work/cvc4-1.4/builds/powerpc-apple-darwin10.0.0d2/production/../../../src/theory/bv/kinds"
template <> ::CVC4::BitVector const & Expr::getConst< ::CVC4::BitVector >() const;
#line 77 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_cvc4/cvc4/work/cvc4-1.4/builds/powerpc-apple-darwin10.0.0d2/production/../../../src/theory/bv/kinds"
template <> ::CVC4::BitVectorBitOf const & Expr::getConst< ::CVC4::BitVectorBitOf >() const;
#line 83 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_cvc4/cvc4/work/cvc4-1.4/builds/powerpc-apple-darwin10.0.0d2/production/../../../src/theory/bv/kinds"
template <> ::CVC4::BitVectorExtract const & Expr::getConst< ::CVC4::BitVectorExtract >() const;
#line 89 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_cvc4/cvc4/work/cvc4-1.4/builds/powerpc-apple-darwin10.0.0d2/production/../../../src/theory/bv/kinds"
template <> ::CVC4::BitVectorRepeat const & Expr::getConst< ::CVC4::BitVectorRepeat >() const;
#line 95 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_cvc4/cvc4/work/cvc4-1.4/builds/powerpc-apple-darwin10.0.0d2/production/../../../src/theory/bv/kinds"
template <> ::CVC4::BitVectorZeroExtend const & Expr::getConst< ::CVC4::BitVectorZeroExtend >() const;
#line 101 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_cvc4/cvc4/work/cvc4-1.4/builds/powerpc-apple-darwin10.0.0d2/production/../../../src/theory/bv/kinds"
template <> ::CVC4::BitVectorSignExtend const & Expr::getConst< ::CVC4::BitVectorSignExtend >() const;
#line 107 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_cvc4/cvc4/work/cvc4-1.4/builds/powerpc-apple-darwin10.0.0d2/production/../../../src/theory/bv/kinds"
template <> ::CVC4::BitVectorRotateLeft const & Expr::getConst< ::CVC4::BitVectorRotateLeft >() const;
#line 113 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_cvc4/cvc4/work/cvc4-1.4/builds/powerpc-apple-darwin10.0.0d2/production/../../../src/theory/bv/kinds"
template <> ::CVC4::BitVectorRotateRight const & Expr::getConst< ::CVC4::BitVectorRotateRight >() const;
#line 127 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_cvc4/cvc4/work/cvc4-1.4/builds/powerpc-apple-darwin10.0.0d2/production/../../../src/theory/bv/kinds"
template <> ::CVC4::IntToBitVector const & Expr::getConst< ::CVC4::IntToBitVector >() const;
#line 35 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_cvc4/cvc4/work/cvc4-1.4/builds/powerpc-apple-darwin10.0.0d2/production/../../../src/theory/arrays/kinds"
template <> ::CVC4::ArrayStoreAll const & Expr::getConst< ::CVC4::ArrayStoreAll >() const;
#line 45 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_cvc4/cvc4/work/cvc4-1.4/builds/powerpc-apple-darwin10.0.0d2/production/../../../src/theory/datatypes/kinds"
template <> ::CVC4::Datatype const & Expr::getConst< ::CVC4::Datatype >() const;
#line 77 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_cvc4/cvc4/work/cvc4-1.4/builds/powerpc-apple-darwin10.0.0d2/production/../../../src/theory/datatypes/kinds"
template <> ::CVC4::AscriptionType const & Expr::getConst< ::CVC4::AscriptionType >() const;
#line 108 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_cvc4/cvc4/work/cvc4-1.4/builds/powerpc-apple-darwin10.0.0d2/production/../../../src/theory/datatypes/kinds"
template <> ::CVC4::TupleSelect const & Expr::getConst< ::CVC4::TupleSelect >() const;
#line 116 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_cvc4/cvc4/work/cvc4-1.4/builds/powerpc-apple-darwin10.0.0d2/production/../../../src/theory/datatypes/kinds"
template <> ::CVC4::TupleUpdate const & Expr::getConst< ::CVC4::TupleUpdate >() const;
#line 124 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_cvc4/cvc4/work/cvc4-1.4/builds/powerpc-apple-darwin10.0.0d2/production/../../../src/theory/datatypes/kinds"
template <> ::CVC4::Record const & Expr::getConst< ::CVC4::Record >() const;
#line 144 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_cvc4/cvc4/work/cvc4-1.4/builds/powerpc-apple-darwin10.0.0d2/production/../../../src/theory/datatypes/kinds"
template <> ::CVC4::RecordSelect const & Expr::getConst< ::CVC4::RecordSelect >() const;
#line 152 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_cvc4/cvc4/work/cvc4-1.4/builds/powerpc-apple-darwin10.0.0d2/production/../../../src/theory/datatypes/kinds"
template <> ::CVC4::RecordUpdate const & Expr::getConst< ::CVC4::RecordUpdate >() const;
#line 18 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_cvc4/cvc4/work/cvc4-1.4/builds/powerpc-apple-darwin10.0.0d2/production/../../../src/theory/sets/kinds"
template <> ::CVC4::EmptySet const & Expr::getConst< ::CVC4::EmptySet >() const;
#line 62 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_cvc4/cvc4/work/cvc4-1.4/builds/powerpc-apple-darwin10.0.0d2/production/../../../src/theory/strings/kinds"
template <> ::CVC4::String const & Expr::getConst< ::CVC4::String >() const;
#line 68 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_cvc4/cvc4/work/cvc4-1.4/builds/powerpc-apple-darwin10.0.0d2/production/../../../src/theory/strings/kinds"
template <> ::CVC4::RegExp const & Expr::getConst< ::CVC4::RegExp >() const;
#line 938 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_cvc4/cvc4/work/cvc4-1.4/builds/powerpc-apple-darwin10.0.0d2/production/../../../src/expr/expr_template.h"
namespace expr {
inline std::ostream& operator<<(std::ostream& out, ExprSetDepth sd) {
sd.applyDepth(out);
return out;
}
inline std::ostream& operator<<(std::ostream& out, ExprPrintTypes pt) {
pt.applyPrintTypes(out);
return out;
}
inline std::ostream& operator<<(std::ostream& out, ExprDag d) {
d.applyDag(out);
return out;
}
inline std::ostream& operator<<(std::ostream& out, ExprSetLanguage l) {
l.applyLanguage(out);
return out;
}
}/* CVC4::expr namespace */
inline size_t ExprHashFunction::operator()(CVC4::Expr e) const {
return (size_t) e.getId();
}
}/* CVC4 namespace */
#endif /* __CVC4__EXPR_H */
abstract_value.h
Representation of abstract values.
array_store_all.h
Representation of a constant array (an array in which the element is the same for all indices)
ascription_type.h
A class representing a type ascription.
bitvector.h
[[ Add one-line brief description here ]]
bool.h
A hash function for Boolean.
Expr
void * Expr
Definition c_interface_defs.h:46
chain.h
[[ Add one-line brief description here ]]
CVC4::AbstractValue
Definition abstract_value.h:26
CVC4::ArrayStoreAll
Definition array_store_all.h:35
CVC4::AscriptionType
A class used to parameterize a type ascription.
Definition ascription_type.h:33
CVC4::BitVector
Definition bitvector.h:29
CVC4::Chain
A class to represent a chained, built-in operator.
Definition chain.h:29
CVC4::Datatype
The representation of an inductive datatype.
Definition datatype.h:423
CVC4::EmptySet
Definition emptyset.h:34
CVC4::Exception
Definition exception.h:32
CVC4::ExportUnsupportedException
Exception thrown in case of failure to export.
Definition expr.h:197
CVC4::ExportUnsupportedException::ExportUnsupportedException
ExportUnsupportedException(const char *msg)
Definition expr.h:202
CVC4::ExportUnsupportedException::ExportUnsupportedException
ExportUnsupportedException()
Definition expr.h:199
CVC4::ExprManager
Definition expr_manager.h:124
CVC4::Expr::const_iterator
Iterator type for the children of an Expr.
Definition expr.h:415
CVC4::Expr::const_iterator::~const_iterator
~const_iterator()
CVC4::Expr::const_iterator::operator*
Expr operator*() const
CVC4::Expr::const_iterator::operator++
const_iterator operator++(int)
CVC4::Expr::const_iterator::operator++
const_iterator & operator++()
CVC4::Expr::const_iterator::const_iterator
const_iterator(const const_iterator &it)
CVC4::Expr::const_iterator::const_iterator
const_iterator()
CVC4::Expr::const_iterator::operator=
const_iterator & operator=(const const_iterator &it)
CVC4::Expr::const_iterator::operator!=
bool operator!=(const const_iterator &it) const
Definition expr.h:429
CVC4::Expr::const_iterator::operator==
bool operator==(const const_iterator &it) const
CVC4::Expr
Class encapsulating CVC4 expressions and methods for constructing new expressions.
Definition expr.h:227
CVC4::Expr::getType
Type getType(bool check=false) const
Get the type for this Expr and optionally do type checking.
CVC4::Expr::notExpr
Expr notExpr() const
Returns the Boolean negation of this Expr.
CVC4::Expr::Expr
Expr(const Expr &e)
Copy constructor, makes a copy of a given expression.
CVC4::Expr::operator==
bool operator==(const Expr &e) const
Syntactic comparison operator.
CVC4::Expr::Expr
Expr()
Default constructor, makes a null expression.
CVC4::Expr::getKind
Kind getKind() const
Returns the kind of the expression (AND, PLUS ...).
CVC4::Expr::operator[]
Expr operator[](unsigned i) const
Returns the i'th child of this expression.
CVC4::Expr::operator>=
bool operator>=(const Expr &e) const
Order comparison operator.
Definition expr.h:331
CVC4::Expr::operator<
bool operator<(const Expr &e) const
Order comparison operator.
CVC4::Expr::operator=
Expr & operator=(const Expr &e)
Assignment operator, makes a copy of the given expression.
CVC4::Expr::impExpr
Expr impExpr(const Expr &e) const
Returns the implication of this expression and the given expression.
CVC4::Expr::getId
unsigned long getId() const
Get the ID of this expression (used for the comparison operators).
CVC4::Expr::operator<=
bool operator<=(const Expr &e) const
Order comparison operator.
Definition expr.h:319
CVC4::Expr::getOperator
Expr getOperator() const
Get the operator of this expression.
CVC4::Expr::operator>
bool operator>(const Expr &e) const
Order comparison operator.
CVC4::Expr::hasOperator
bool hasOperator() const
Check if this is an expression that has an operator.
CVC4::Expr::xorExpr
Expr xorExpr(const Expr &e) const
Returns the exclusive disjunction of this expression and the given expression.
CVC4::Expr::getNumChildren
size_t getNumChildren() const
Returns the number of children of this expression.
CVC4::Expr::iffExpr
Expr iffExpr(const Expr &e) const
Returns the Boolean equivalence of this expression and the given expression.
CVC4::Expr::~Expr
~Expr()
Destructor.
CVC4::Expr::begin
const_iterator begin() const
Returns an iterator to the first child of this Expr.
CVC4::Expr::end
const_iterator end() const
Returns an iterator to one-off-the-last child of this Expr.
CVC4::Expr::iteExpr
Expr iteExpr(const Expr &then_e, const Expr &else_e) const
Returns the if-then-else expression with this expression as the Boolean condition and the given expre...
CVC4::Expr::andExpr
Expr andExpr(const Expr &e) const
Returns the conjunction of this expression and the given expression.
CVC4::Expr::operator!=
bool operator!=(const Expr &e) const
Syntactic disequality operator.
CVC4::Expr::getChildren
std::vector< Expr > getChildren() const
Returns the children of this Expr.
Definition expr.h:366
CVC4::Expr::orExpr
Expr orExpr(const Expr &e) const
Returns the disjunction of this expression and the given expression.
CVC4::NodeTemplate
Definition smt_engine.h:46
CVC4::Predicate
Definition predicate.h:42
CVC4::Rational
A multi-precision rational constant.
Definition rational_gmp_imp.h:51
CVC4::RecordSelect
Definition record.h:34
CVC4::RecordUpdate
Definition record.h:43
CVC4::Record
Definition record.h:84
CVC4::RegExp
Definition regexp.h:302
CVC4::SmtEngine
Definition smt_engine.h:113
CVC4::String
Definition regexp.h:33
CVC4::SubrangeBounds
Definition subrange_bound.h:150
CVC4::TupleSelect
Definition tuple.h:29
CVC4::TupleUpdate
Definition tuple.h:38
CVC4::TypeCheckingException
Exception thrown in the case of type-checking errors.
Definition expr.h:151
CVC4::TypeCheckingException::TypeCheckingException
TypeCheckingException(const Expr &expr, std::string message)
CVC4::TypeCheckingException::~TypeCheckingException
~TypeCheckingException()
Destructor.
CVC4::TypeCheckingException::TypeCheckingException
TypeCheckingException(const TypeCheckingException &t)
Copy constructor.
CVC4::TypeCheckingException::TypeCheckingException
TypeCheckingException()
Definition expr.h:163
CVC4::TypeCheckingException::TypeCheckingException
TypeCheckingException(ExprManager *em, const TypeCheckingExceptionPrivate *exc)
CVC4::Type
Class encapsulating CVC4 expression types.
Definition type.h:89
CVC4::UninterpretedConstant
Definition uninterpreted_constant.h:26
CVC4::expr::ExprDag::Scope
Set the dag state on the output stream for the current stack scope.
Definition expr.h:891
CVC4::expr::ExprDag::Scope::~Scope
~Scope()
Definition expr.h:903
CVC4::expr::ExprDag::Scope::Scope
Scope(std::ostream &out, size_t dag)
Definition expr.h:897
CVC4::expr::ExprDag
IOStream manipulator to print expressions as a dag (or not).
Definition expr.h:825
CVC4::expr::ExprDag::getDag
static size_t getDag(std::ostream &out)
Definition expr.h:860
CVC4::expr::ExprDag::applyDag
void applyDag(std::ostream &out)
Definition expr.h:855
CVC4::expr::ExprDag::setDag
static void setDag(std::ostream &out, size_t dag)
Definition expr.h:880
CVC4::expr::ExprDag::ExprDag
ExprDag(bool dag)
Construct a ExprDag with the given setting (dagification on or off).
Definition expr.h:846
CVC4::expr::ExprDag::ExprDag
ExprDag(int dag)
Construct a ExprDag with the given setting (letify only common subexpressions that appear more than '...
Definition expr.h:853
CVC4::expr::ExprPrintTypes::Scope
Set the print-types state on the output stream for the current stack scope.
Definition expr.h:802
CVC4::expr::ExprPrintTypes::Scope::Scope
Scope(std::ostream &out, bool printTypes)
Definition expr.h:808
CVC4::expr::ExprPrintTypes::Scope::~Scope
~Scope()
Definition expr.h:814
CVC4::expr::ExprPrintTypes
IOStream manipulator to print type ascriptions or not.
Definition expr.h:767
CVC4::expr::ExprPrintTypes::ExprPrintTypes
ExprPrintTypes(bool printTypes)
Construct a ExprPrintTypes with the given setting.
Definition expr.h:782
CVC4::expr::ExprPrintTypes::setPrintTypes
static void setPrintTypes(std::ostream &out, bool printTypes)
Definition expr.h:792
CVC4::expr::ExprPrintTypes::getPrintTypes
static bool getPrintTypes(std::ostream &out)
Definition expr.h:788
CVC4::expr::ExprPrintTypes::applyPrintTypes
void applyPrintTypes(std::ostream &out)
Definition expr.h:784
CVC4::expr::ExprSetDepth::Scope
Set the expression depth on the output stream for the current stack scope.
Definition expr.h:738
CVC4::expr::ExprSetDepth::Scope::~Scope
~Scope()
Definition expr.h:750
CVC4::expr::ExprSetDepth::Scope::Scope
Scope(std::ostream &out, long depth)
Definition expr.h:744
CVC4::expr::ExprSetDepth
IOStream manipulator to set the maximum depth of Exprs when pretty-printing.
Definition expr.h:682
CVC4::expr::ExprSetDepth::applyDepth
void applyDepth(std::ostream &out)
Definition expr.h:705
CVC4::expr::ExprSetDepth::setDepth
static void setDepth(std::ostream &out, long depth)
Definition expr.h:728
CVC4::expr::ExprSetDepth::ExprSetDepth
ExprSetDepth(long depth)
Construct a ExprSetDepth with the given depth.
Definition expr.h:703
CVC4::expr::ExprSetDepth::getDepth
static long getDepth(std::ostream &out)
Definition expr.h:709
CVC4::expr::ExprSetLanguage::Scope
Set a language on the output stream for the current stack scope.
Definition expr.h:974
CVC4::expr::ExprSetLanguage::Scope::~Scope
~Scope()
Definition expr.h:986
CVC4::expr::ExprSetLanguage::Scope::Scope
Scope(std::ostream &out, OutputLanguage language)
Definition expr.h:980
CVC4::expr::ExprSetLanguage
IOStream manipulator to set the output language for Exprs.
Definition expr.h:914
CVC4::expr::ExprSetLanguage::applyLanguage
void applyLanguage(std::ostream &out)
Definition expr.h:938
CVC4::expr::ExprSetLanguage::getLanguage
static OutputLanguage getLanguage(std::ostream &out)
Definition expr.h:943
CVC4::expr::ExprSetLanguage::setLanguage
static void setLanguage(std::ostream &out, OutputLanguage l)
Definition expr.h:963
CVC4::expr::ExprSetLanguage::ExprSetLanguage
ExprSetLanguage(OutputLanguage l)
Construct a ExprSetLanguage with the given setting.
Definition expr.h:936
CVC4::expr::pickle::Pickler
Definition pickler.h:61
cvc4_public.h
Macros that should be defined everywhere during the building of the libraries and driver binary,...
CVC4_PUBLIC
#define CVC4_PUBLIC
Definition cvc4_public.h:30
datatype.h
A class representing a Datatype definition.
divisible.h
[[ Add one-line brief description here ]]
emptyset.h
[[ Add one-line brief description here ]]
exception.h
CVC4's exception base class and some associated utilities.
options.h
hash.h
[[ Add one-line brief description here ]]
kind.h
language.h
Definition of input and output languages.
CVC4::kind::Kind_t
Kind_t
Definition kind.h:60
CVC4::language::output::Language
Language
Definition language.h:95
CVC4
Definition expr.h:106
CVC4::getConst< ::CVC4::UninterpretedConstant >
::CVC4::UninterpretedConstant const & Expr::getConst< ::CVC4::UninterpretedConstant >() const
CVC4::getConst< ::CVC4::BitVectorRotateLeft >
::CVC4::BitVectorRotateLeft const & Expr::getConst< ::CVC4::BitVectorRotateLeft >() const
CVC4::getConst< ::CVC4::SubrangeBounds >
::CVC4::SubrangeBounds const & Expr::getConst< ::CVC4::SubrangeBounds >() const
CVC4::getConst< ::CVC4::AbstractValue >
::CVC4::AbstractValue const & Expr::getConst< ::CVC4::AbstractValue >() const
CVC4::getConst< ::CVC4::AscriptionType >
::CVC4::AscriptionType const & Expr::getConst< ::CVC4::AscriptionType >() const
CVC4::getConst< ::CVC4::Record >
::CVC4::Record const & Expr::getConst< ::CVC4::Record >() const
CVC4::getConst< ::CVC4::BitVector >
::CVC4::BitVector const & Expr::getConst< ::CVC4::BitVector >() const
CVC4::getConst< ::CVC4::Divisible >
::CVC4::Divisible const & Expr::getConst< ::CVC4::Divisible >() const
CVC4::getConst< ::CVC4::Rational >
::CVC4::Rational const & Expr::getConst< ::CVC4::Rational >() const
CVC4::getConst< ::CVC4::Kind >
::CVC4::Kind const & Expr::getConst< ::CVC4::Kind >() const
CVC4::getConst< ::CVC4::EmptySet >
::CVC4::EmptySet const & Expr::getConst< ::CVC4::EmptySet >() const
CVC4::getConst< ::CVC4::RecordUpdate >
::CVC4::RecordUpdate const & Expr::getConst< ::CVC4::RecordUpdate >() const
CVC4::getConst< ::CVC4::BitVectorRotateRight >
::CVC4::BitVectorRotateRight const & Expr::getConst< ::CVC4::BitVectorRotateRight >() const
CVC4::getConst< ::CVC4::BitVectorSize >
::CVC4::BitVectorSize const & Expr::getConst< ::CVC4::BitVectorSize >() const
CVC4::getConst< ::CVC4::Predicate >
::CVC4::Predicate const & Expr::getConst< ::CVC4::Predicate >() const
CVC4::getConst< ::CVC4::TypeConstant >
::CVC4::TypeConstant const & Expr::getConst< ::CVC4::TypeConstant >() const
CVC4::getConst< ::CVC4::BitVectorSignExtend >
::CVC4::BitVectorSignExtend const & Expr::getConst< ::CVC4::BitVectorSignExtend >() const
CVC4::getConst< ::CVC4::String >
::CVC4::String const & Expr::getConst< ::CVC4::String >() const
CVC4::getConst< ::CVC4::BitVectorRepeat >
::CVC4::BitVectorRepeat const & Expr::getConst< ::CVC4::BitVectorRepeat >() const
CVC4::getConst< ::CVC4::BitVectorBitOf >
::CVC4::BitVectorBitOf const & Expr::getConst< ::CVC4::BitVectorBitOf >() const
CVC4::getConst< ::CVC4::BitVectorZeroExtend >
::CVC4::BitVectorZeroExtend const & Expr::getConst< ::CVC4::BitVectorZeroExtend >() const
CVC4::getConst< ::CVC4::Chain >
::CVC4::Chain const & Expr::getConst< ::CVC4::Chain >() const
CVC4::getConst< ::CVC4::ArrayStoreAll >
::CVC4::ArrayStoreAll const & Expr::getConst< ::CVC4::ArrayStoreAll >() const
CVC4::getConst< ::CVC4::IntToBitVector >
::CVC4::IntToBitVector const & Expr::getConst< ::CVC4::IntToBitVector >() const
CVC4::getConst< ::CVC4::RegExp >
::CVC4::RegExp const & Expr::getConst< ::CVC4::RegExp >() const
CVC4::operator<<
std::ostream & operator<<(std::ostream &out, const TypeCheckingException &e)
CVC4::getConst< ::CVC4::Datatype >
::CVC4::Datatype const & Expr::getConst< ::CVC4::Datatype >() const
CVC4::getConst< ::CVC4::TupleSelect >
::CVC4::TupleSelect const & Expr::getConst< ::CVC4::TupleSelect >() const
CVC4::getConst< ::CVC4::BitVectorExtract >
::CVC4::BitVectorExtract const & Expr::getConst< ::CVC4::BitVectorExtract >() const
CVC4::getConst< ::CVC4::TupleUpdate >
::CVC4::TupleUpdate const & Expr::getConst< ::CVC4::TupleUpdate >() const
CVC4::TypeConstant
TypeConstant
The enumeration for the built-in atomic types.
Definition kind.h:543
CVC4::getConst< ::CVC4::RecordSelect >
::CVC4::RecordSelect const & Expr::getConst< ::CVC4::RecordSelect >() const
std
STL namespace.
predicate.h
Representation of predicates for predicate subtyping.
record.h
A class representing a Record definition.
regexp.h
[[ Add one-line brief description here ]]
CVC4::BitVectorBitOf
The structure representing the extraction of one Boolean bit.
Definition bitvector.h:432
CVC4::BitVectorExtract
The structure representing the extraction operation for bit-vectors.
Definition bitvector.h:403
CVC4::BitVectorRepeat
Definition bitvector.h:461
CVC4::BitVectorRotateLeft
Definition bitvector.h:482
CVC4::BitVectorRotateRight
Definition bitvector.h:489
CVC4::BitVectorSignExtend
Definition bitvector.h:475
CVC4::BitVectorSize
Definition bitvector.h:454
CVC4::BitVectorZeroExtend
Definition bitvector.h:468
CVC4::Divisible
The structure representing the divisibility-by-k predicate.
Definition divisible.h:32
CVC4::ExprHashFunction
Definition expr.h:219
CVC4::ExprManagerMapCollection
Definition variable_type_map.h:54
CVC4::IntToBitVector
Definition bitvector.h:496
subrange_bound.h
Representation of subrange bounds.
tuple.h
Tuple operators.
uninterpreted_constant.h
Representation of constants of uninterpreted sorts.