2 #ifndef __AST_BITVEC_HPP_DEFINED__ 3 #define __AST_BITVEC_HPP_DEFINED__ 5 #include <boost/lexical_cast.hpp> 6 #include <boost/multiprecision/cpp_int.hpp> 7 #include <boost/python.hpp> 8 #include <boost/shared_ptr.hpp> 47 virtual bool equal(
const Node* that)
const;
49 virtual std::ostream&
write(std::ostream& out)
const;
70 virtual bool equal(
const Node* that)
const;
76 virtual std::ostream&
write(std::ostream& out)
const;
78 std::string
vstr()
const {
return boost::lexical_cast<std::string>(
value); }
147 std::vector<int>&
params);
153 int param,
int width);
181 virtual bool equal(
const Node* that)
const;
184 virtual std::ostream&
write(std::ostream& out)
const;
187 virtual unsigned nArgs()
const;
198 int param(
unsigned i)
const;
static bool checkUnaryOpWidth(Op op, const nptr_t &n, int width)
Definition: bitvec.hpp:83
Definition: bitvec.hpp:94
Arity
Definition: bitvec.hpp:86
virtual nptr_t arg(unsigned i) const
Definition: bitvec.hpp:117
Definition: bitvec.hpp:119
Definition: bitvec.hpp:101
Definition: bitvec.hpp:86
Definition: bitvec.hpp:95
Definition: bitvec.hpp:86
virtual bool equal(const Node *that) const
virtual Node * clone() const
Definition: bitvec.hpp:104
Definition: bitvec.hpp:124
Definition: bitvec.hpp:115
enum ilasynth::BitvectorOp::Op op
Definition: bitvec.hpp:123
Definition: bitvec.hpp:118
Definition: bitvec.hpp:103
int param(unsigned i) const
std::string vstr() const
Definition: bitvec.hpp:78
virtual ~BitvectorConst()
static int checkNaryOpWidth(Op op, nptr_vec_t &args, int width)
Definition: bitvec.hpp:99
Definition: bitvec.hpp:98
static int getBinaryResultWidth(Op op, const nptr_t &n1, const nptr_t &n2)
std::vector< nptr_t > nptr_vec_t
Definition: node.hpp:27
virtual std::ostream & write(std::ostream &out) const
Definition: bitvec.hpp:93
nptr_vec_t args
Definition: bitvec.hpp:131
Definition: bitvec.hpp:121
boost::multiprecision::cpp_int mp_int_t
Definition: common.hpp:9
Definition: funcReduct.hpp:13
static bool isTernary(Op op)
Definition: bitvec.hpp:137
Definition: bitvec.hpp:97
Definition: bitvec.hpp:108
Definition: bitvec.hpp:120
static int getNaryResultWidth(Op op, nptr_vec_t &args)
Definition: bitvec.hpp:106
Definition: bitvec.hpp:113
Definition: bitvec.hpp:109
boost::shared_ptr< Node > nptr_t
Definition: node.hpp:24
Op getOp() const
Definition: bitvec.hpp:192
Definition: bitvec.hpp:91
Definition: bitvec.hpp:111
virtual Node * clone() const
Definition: bitvec.hpp:107
virtual std::ostream & write(std::ostream &out) const
mp_int_t value
Definition: bitvec.hpp:56
virtual std::ostream & write(std::ostream &out) const
Definition: bitvec.hpp:102
static bool isNary(Op op)
Definition: bitvec.hpp:138
Definition: bitvec.hpp:96
static const std::string operatorNames[]
Definition: bitvec.hpp:127
static bool isBinary(Op op)
Definition: bitvec.hpp:136
Definition: abstraction.hpp:21
const mp_int_t & val() const
Definition: bitvec.hpp:72
Definition: bitvec.hpp:26
Definition: bitvec.hpp:38
virtual bool equal(const Node *that) const
BitvectorVar(const std::string &n, int width)
enum ilasynth::BitvectorOp::Arity arity
Definition: bitvec.hpp:86
static int checkBinaryOpWidth(Op op, const nptr_t &n1, const nptr_t &n2, int width)
BitvectorOp(Op op, const nptr_t &n1)
Definition: bitvec.hpp:105
Definition: bitvec.hpp:116
endianness_t
Definition: common.hpp:10
Definition: bitvec.hpp:86
virtual bool equal(const Node *that) const
virtual py::object getValue() const
std::vector< int > params
Definition: bitvec.hpp:132
Definition: bitvec.hpp:54
Definition: bitvec.hpp:112
Definition: bitvec.hpp:110
static int getUnaryResultWidth(Op op, const nptr_t &n)
virtual unsigned nArgs() const
Op
Definition: bitvec.hpp:89
Definition: bitvec.hpp:114
static bool isUnary(Op op)
Definition: bitvec.hpp:135
BitvectorConst(const mp_int_t &v, int width)
virtual Node * clone() const