1 #ifndef __AST_NODE_HPP_DEFINED__ 2 #define __AST_NODE_HPP_DEFINED__ 7 #include <unordered_map> 15 #include <boost/multiprecision/cpp_int.hpp> 16 #include <boost/python.hpp> 17 #include <boost/shared_ptr.hpp> 26 typedef boost::shared_ptr<Node>
nptr_t;
53 typedef std::map<std::string, npair_t>
nmap_t;
109 virtual bool equal(
const Node* that)
const;
111 virtual std::ostream&
write(std::ostream& out)
const;
114 virtual py::object
getValue()
const;
136 unsigned n =
nArgs();
137 for (
unsigned i = 0; i != n; i++) {
139 arg_i->depthFirstVisit<F>(func);
151 virtual unsigned nArgs()
const;
virtual bool isConstant() const
NodeType getType()
Definition: node.hpp:103
virtual void preVisit(const Node *)
std::string & getName()
Definition: node.hpp:94
size_t hash_value
Definition: node.hpp:75
nptr_t init
Definition: node.hpp:33
void depthFirstVisit(F &func) const
Definition: node.hpp:135
npair_t(const nptr_t &v, const nptr_t &n, const nptr_t &i, const npair_t *p)
Definition: node.hpp:43
~npair_t()
Definition: node.hpp:51
virtual void postVisit(const Node *)
std::string refName
Definition: node.hpp:69
bool hash_inited
Definition: node.hpp:73
void getSupportVars(nodeset_t &sup)
npair_t(const npair_t *p)
Definition: node.hpp:46
std::vector< nptr_t > nptr_vec_t
Definition: node.hpp:27
std::string name
Definition: node.hpp:67
std::map< std::string, npair_t > nmap_t
Definition: node.hpp:53
virtual std::ostream & write(std::ostream &out) const
virtual bool equal(const Node *that) const
npair_t(const nptr_t &v, const nptr_t &n)
Definition: node.hpp:40
Definition: funcReduct.hpp:13
virtual py::object getValue() const
nptr_t next
Definition: node.hpp:36
static void _getSupportVarsHelper(nodeset_t &supp, const Node *n)
boost::shared_ptr< Node > nptr_t
Definition: node.hpp:24
bool nodeEqual(const Node *left, const Node *right)
nptr_t ipred
Definition: node.hpp:34
static int totalObjCnt
Definition: node.hpp:57
static nptr_t ite(const nptr_t &cond, const nptr_t &t, const nptr_t &f)
size_t nodeHash(const Node *n)
int getId()
Definition: node.hpp:102
Definition: abstraction.hpp:21
nptr_vec_t next_vec
Definition: node.hpp:35
bool hasSynthesisConstructs() const
void setRefName(const std::string &refN)
Definition: node.hpp:100
void visit(NodeVisitorI &vi)
const std::string & getRefName() const
Definition: node.hpp:98
virtual unsigned nArgs() const
const std::string & getName() const
Definition: node.hpp:96
std::set< const Node * > nodeset_t
Definition: node.hpp:29
std::vector< const Node * > nodevec_t
Definition: node.hpp:28
virtual Node * clone() const
const int id
Definition: node.hpp:71
nptr_t var
Definition: node.hpp:32
NodeType type
Definition: node.hpp:82
virtual nptr_t arg(unsigned i) const
std::ostream & operator<<(std::ostream &out, const Node &that)
const npair_t * parent
Definition: node.hpp:37
std::unordered_map< const Node *, nptr_t, decltype(&nodeHash), decltype(&nodeEqual)> rwmap_t
Definition: node.hpp:177