4 #ifndef ILANG_ILA_AST_EXPR_OP_H__
5 #define ILANG_ILA_AST_EXPR_OP_H__
67 ExprOp(
const ExprPtr& arg0,
const int& param1,
const int& param2);
82 bool is_op()
const {
return true; }
87 const std::string& suffix)
const = 0;
90 std::ostream&
Print(std::ostream& out)
const;
116 const std::string& suffix)
const;
126 const std::string& suffix)
const;
136 const std::string& suffix)
const;
150 const std::string& suffix)
const;
160 const std::string& suffix)
const;
170 const std::string& suffix)
const;
180 const std::string& suffix)
const;
190 const std::string& suffix)
const;
200 const std::string& suffix)
const;
210 const std::string& suffix)
const;
220 const std::string& suffix)
const;
230 const std::string& suffix)
const;
240 const std::string& suffix)
const;
250 const std::string& suffix)
const;
260 const std::string& suffix)
const;
272 const std::string& suffix)
const;
286 const std::string& suffix)
const;
298 const std::string& suffix)
const;
308 const std::string& suffix)
const;
322 const std::string& suffix)
const;
332 const std::string& suffix)
const;
350 const std::string& suffix)
const;
360 const std::string& suffix)
const;
374 const std::string& suffix)
const;
384 const std::string& suffix)
const;
394 const std::string& suffix)
const;
404 const std::string& suffix)
const;
414 const std::string& suffix)
const;
424 const std::string& suffix)
const;
441 const std::string& suffix)
const;
442 inline FuncPtr func()
const {
return f; }
460 const std::string& suffix)
const;
471 const std::string& suffix)
const;
476 #endif // ILANG_ILA_AST_EXPR_OP_H__
z3::expr GetZ3Expr(z3::context &ctx, const Z3ExprVec &expr_vec, const std::string &suffix) const
Return the z3 expression for the node.
z3::expr GetZ3Expr(z3::context &ctx, const Z3ExprVec &expr_vec, const std::string &suffix) const
Return the z3 expression for the node.
The class wrapper for binary comparison unsigned less than.
Definition: expr_op.h:316
std::shared_ptr< Expr > ExprPtr
Pointer type for normal use of Expr.
Definition: expr.h:28
The class wrapper for logical imply.
Definition: expr_op.h:454
AstUidExprOp uid() const
Return the unified ID of the corresponding operation.
Definition: expr_op.h:330
SortPtr GetSortBinaryOperation(const ExprPtr &e0, const ExprPtr &e1)
Derived the sort for binary operations.
The class wrapper for zero-extend.
Definition: expr_op.h:388
ExprOpXor(const ExprPtr &arg0, const ExprPtr &arg1)
Constructor for XOR operation.
ExprOpLRotate(const ExprPtr &bv, const int &immediate)
Constructor for LRotate operation.
AstUidExprOp uid() const
Return the unified ID of the corresponding operation.
Definition: expr_op.h:270
The wrapper for unary bit-wise complement "~". (bv only)
Definition: expr_op.h:130
ExprOpAshr(const ExprPtr &bv, const ExprPtr &n)
Constructor for arithmetic right shifting a bit-vector.
Expr::ExprPtr ExprPtr
Pointer type for normal use of Expr.
Definition: expr.h:138
ExprOpConcat(const ExprPtr &hi, const ExprPtr &lo)
Constructor for bitvector concatenation.
ExprOpGt(const ExprPtr &arg0, const ExprPtr &arg1)
Constructor for Gt comparison.
The class for expression, which is the basic type for variables, constraints, state update expression...
Definition: expr.h:25
ExprOpSMod(const ExprPtr &arg0, const ExprPtr &arg1)
Constructor for SREM operation.
z3::expr GetZ3Expr(z3::context &ctx, const Z3ExprVec &expr_vec, const std::string &suffix) const
Return the z3 expression for the node.
AstUidExprOp uid() const
Return the unified ID of the corresponding operation.
Definition: expr_op.h:412
virtual ~ExprOp()
Default destructor.
z3::expr GetZ3Expr(z3::context &ctx, const Z3ExprVec &expr_vec, const std::string &suffix) const
Return the z3 expression for the node.
The wrapper for left shifting a bit-vector.
Definition: expr_op.h:174
ExprOpRRotate(const ExprPtr &bv, const int &immediate)
Constructor for LRotate operation.
z3::expr GetZ3Expr(z3::context &ctx, const Z3ExprVec &expr_vec, const std::string &suffix) const
Return the z3 expression for the node.
z3::expr GetZ3Expr(z3::context &ctx, const Z3ExprVec &expr_vec, const std::string &suffix) const
Return the z3 expression for the node.
AstUidExprOp
Unified ID for ExprOp.
Definition: expr_op.h:14
The wrapper for unsigned addition.
Definition: expr_op.h:204
ExprPtr arg(const size_t &i) const
Return the i-th argument.
Definition: expr.h:51
z3::expr GetZ3Expr(z3::context &ctx, const Z3ExprVec &expr_vec, const std::string &suffix) const
Return the z3 expression for the node.
Sort::SortPtr SortPtr
Pointer type for storing/passing Sort.
Definition: sort.h:82
z3::expr GetZ3Expr(z3::context &ctx, const Z3ExprVec &expr_vec, const std::string &suffix) const
Return the z3 expression for the node.
The wrapper for unsigned division.
Definition: expr_op.h:224
z3::expr GetZ3Expr(z3::context &ctx, const Z3ExprVec &expr_vec, const std::string &suffix) const
Return the z3 expression for the node.
ExprOpSExt(const ExprPtr &bv, const int &bit_width)
Constructor for bitvector sign-extend.
z3::expr GetZ3Expr(z3::context &ctx, const Z3ExprVec &expr_vec, const std::string &suffix) const
Return the z3 expression for the node.
AstUidExprOp uid() const
Return the unified ID of the corresponding operation.
Definition: expr_op.h:372
ExprOpIte(const ExprPtr &cnd, const ExprPtr &true_expr, const ExprPtr &false_expr)
Constructor for if-then-else.
AstUidExprOp uid() const
Return the unified ID of the corresponding operation.
Definition: expr_op.h:422
ExprOpLt(const ExprPtr &arg0, const ExprPtr &arg1)
Construtor for Lt comparison.
AstUidExprOp uid() const
Return the unified ID of the corresponding operation.
Definition: expr_op.h:238
z3::expr GetZ3Expr(z3::context &ctx, const Z3ExprVec &expr_vec, const std::string &suffix) const
Return the z3 expression for the node.
AstUidExprOp uid() const
Return the unified ID of the corresponding operation.
Definition: expr_op.h:198
AstUidExprOp uid() const
Return the unified ID of the corresponding operation.
Definition: expr_op.h:178
ExprOpUgt(const ExprPtr &arg0, const ExprPtr &arg1)
Constructor for UGt comparison.
The class wrapper for sign-extend.
Definition: expr_op.h:398
ExprOpNot(const ExprPtr &arg)
Constructor for Not operation.
The wrapper for unary not operation "!". (bool only)
Definition: expr_op.h:120
ExprOpSub(const ExprPtr &arg0, const ExprPtr &arg1)
Constructor for SUB operation.
The wrapper for unary negate operation "-".
Definition: expr_op.h:110
z3::expr GetZ3Expr(z3::context &ctx, const Z3ExprVec &expr_vec, const std::string &suffix) const
Return the z3 expression for the node.
std::vector< z3::expr > Z3ExprVec
Vector type for z3 expression.
Definition: defines.h:19
The class wrapper for apply uninterpreted function.
Definition: expr_op.h:432
AstUidExprOp uid() const
Return the unified ID of the corresponding operation.
Definition: expr_op.h:134
ExprOpZExt(const ExprPtr &bv, const int &bit_width)
Constructor for bitvector zero-extend.
The class wrapper for binary comparison signed less than "<".
Definition: expr_op.h:292
std::unordered_set< ExprPtr, ExprHash > ExprSet
Type for storing a set of Expr.
Definition: expr.h:153
std::vector< ExprPtr > ExprPtrVec
Type for storing a set of Expr.
Definition: expr.h:30
virtual AstUidExprOp uid() const =0
Return the unified ID of the corresponding operation.
The wrapper for unsigned remainder.
Definition: expr_op.h:244
AstUidExprOp uid() const
Return the unified ID of the corresponding operation.
Definition: expr_op.h:208
z3::expr GetZ3Expr(z3::context &ctx, const Z3ExprVec &expr_vec, const std::string &suffix) const
Return the z3 expression for the node.
AstUidExprOp uid() const
Return the unified ID of the corresponding operation.
Definition: expr_op.h:439
z3::expr GetZ3Expr(z3::context &ctx, const Z3ExprVec &expr_vec, const std::string &suffix) const
Return the z3 expression for the node.
z3::expr GetZ3Expr(z3::context &ctx, const Z3ExprVec &expr_vec, const std::string &suffix) const
Return the z3 expression for the node.
z3::expr GetZ3Expr(z3::context &ctx, const Z3ExprVec &expr_vec, const std::string &suffix) const
Return the z3 expression for the node.
z3::expr GetZ3Expr(z3::context &ctx, const Z3ExprVec &expr_vec, const std::string &suffix) const
Return the z3 expression for the node.
AstUidExprOp uid() const
Return the unified ID of the corresponding operation.
Definition: expr_op.h:320
AstUidExprOp uid() const
Return the unified ID of the corresponding operation.
Definition: expr_op.h:218
The wrapper for logical right shifting a bit-vector.
Definition: expr_op.h:194
AstUidExprOp uid() const
Return the unified ID of the corresponding operation.
Definition: expr_op.h:168
The class wrapper for right-rotate.
Definition: expr_op.h:418
ExprOpAnd(const ExprPtr &arg0, const ExprPtr &arg1)
Constructor for AND operation.
ExprOpNeg(const ExprPtr &arg)
Constructor for Negate operation.
The wrapper for binary logical XOR operation "^".
Definition: expr_op.h:164
z3::expr GetZ3Expr(z3::context &ctx, const Z3ExprVec &expr_vec, const std::string &suffix) const
Return the z3 expression for the node.
The class wrapper for if-then-else.
Definition: expr_op.h:464
AstUidExprOp uid() const
Return the unified ID of the corresponding operation.
Definition: expr_op.h:148
The wrapper for binary logical AND operation "&".
Definition: expr_op.h:144
ExprOpUlt(const ExprPtr &arg0, const ExprPtr &arg1)
Construtor for ULt comparison.
Func::FuncPtr FuncPtr
Pointer type for normal use of Func.
Definition: func.h:83
The class wrapper for binary comparison EQ "==".
Definition: expr_op.h:280
The class wrapper for memory load.
Definition: expr_op.h:344
AstUidExprOp uid() const
Return the unified ID of the corresponding operation.
Definition: expr_op.h:392
ExprOpMul(const ExprPtr &arg0, const ExprPtr &arg1)
Constructor for MUL operation.
z3::expr GetZ3Expr(z3::context &ctx, const Z3ExprVec &expr_vec, const std::string &suffix) const
Return the z3 expression for the node.
SortPtr GetSortBinaryComparison(const ExprPtr &e0, const ExprPtr &e1)
Derived the sort for binary comparisons.
The class wrapper for left-rotate.
Definition: expr_op.h:408
AstUidExprOp uid() const
Return the unified ID of the corresponding operation.
Definition: expr_op.h:458
ExprOpSRem(const ExprPtr &arg0, const ExprPtr &arg1)
Constructor for SREM operation.
The wrapper for signed remainder.
Definition: expr_op.h:234
The wrapper for binary logical OR operation "|".
Definition: expr_op.h:154
z3::expr GetZ3Expr(z3::context &ctx, const Z3ExprVec &expr_vec, const std::string &suffix) const
Return the z3 expression for the node.
ExprOpImply(const ExprPtr &ante, const ExprPtr &cons)
Constructor for imply.
AstUidExprOp uid() const
Return the unified ID of the corresponding operation.
Definition: expr_op.h:284
ExprOpEq(const ExprPtr &arg0, const ExprPtr &arg1)
Constructor for Equal comparison.
AstUidExprOp uid() const
Return the unified ID of the corresponding operation.
Definition: expr_op.h:124
std::ostream & Print(std::ostream &out) const
Output to stream.
z3::expr GetZ3Expr(z3::context &ctx, const Z3ExprVec &expr_vec, const std::string &suffix) const
Return the z3 expression for the node.
AstUidExprOp uid() const
Return the unified ID of the corresponding operation.
Definition: expr_op.h:306
ExprOpDiv(const ExprPtr &arg0, const ExprPtr &arg1)
Constructor for DIV operation.
The class wrapper for binary comparison signed greater than ">".
Definition: expr_op.h:302
InstrLvlAbs::InstrLvlAbsPtr InstrLvlAbsPtr
Pointer type for normal use of InstrLvlAbs.
Definition: instr_lvl_abs.h:326
AstUidExprOp uid() const
Return the unified ID of the corresponding operation.
Definition: expr_op.h:158
AstUidExprOp uid() const
Return the unified ID of the corresponding operation.
Definition: expr_op.h:248
virtual z3::expr GetZ3Expr(z3::context &ctx, const Z3ExprVec &expr_vec, const std::string &suffix) const =0
Return the z3 expression for the node.
z3::expr GetZ3Expr(z3::context &ctx, const Z3ExprVec &expr_vec, const std::string &suffix) const
Return the z3 expression for the node.
ExprOpAppFunc(const FuncPtr &f, const ExprPtrVec &args)
Constructor for apply uninterpreted function.
std::string op_name() const
Return the name of the operation.
AstUidExprOp uid() const
Return the unified ID of the corresponding operation.
Definition: expr_op.h:114
AstUidExprOp uid() const
Return the unified ID of the corresponding operation.
Definition: expr_op.h:188
z3::expr GetZ3Expr(z3::context &ctx, const Z3ExprVec &expr_vec, const std::string &suffix) const
Return the z3 expression for the node.
ExprOpLoad(const ExprPtr &mem, const ExprPtr &addr)
Constructor for memory load.
std::shared_ptr< Func > FuncPtr
Type for forware declaring Func.
Definition: expr_op.h:435
Expression for operations, e.g. AND, OR, ADD, etc. Operations are non-terminating nodes in the AST...
Definition: expr_op.h:55
AstUidExprOp uid() const
Return the unified ID of the corresponding operation.
Definition: expr_op.h:469
z3::expr GetZ3Expr(z3::context &ctx, const Z3ExprVec &expr_vec, const std::string &suffix) const
Return the z3 expression for the node.
AstUidExprOp uid() const
Return the unified ID of the corresponding operation.
Definition: expr_op.h:258
ExprOpCompl(const ExprPtr &arg)
Constructor for Complement operation.
ExprOpAdd(const ExprPtr &arg0, const ExprPtr &arg1)
Constructor for ADD operation.
ExprOpLshr(const ExprPtr &bv, const ExprPtr &n)
Constructor for logical right shifting a bit-vector.
AstUidExprOp uid() const
Return the unified ID of the corresponding operation.
Definition: expr_op.h:358
The wrapper for unsigned subtraction.
Definition: expr_op.h:214
ExprOpShl(const ExprPtr &bv, const ExprPtr &n)
Constructor for left shifting a bit-vector.
ExprOpURem(const ExprPtr &arg0, const ExprPtr &arg1)
Constructor for UREM operation.
ExprOpOr(const ExprPtr &arg0, const ExprPtr &arg1)
Constructor for OR operation.
z3::expr GetZ3Expr(z3::context &ctx, const Z3ExprVec &expr_vec, const std::string &suffix) const
Return the z3 expression for the node.
ExprOpStore(const ExprPtr &mem, const ExprPtr &addr, const ExprPtr &data)
Constructor for memory store.
AstUidExprOp uid() const
Return the unified ID of the corresponding operation.
Definition: expr_op.h:348
The wrapper for signed remainder.
Definition: expr_op.h:254
z3::expr GetZ3Expr(z3::context &ctx, const Z3ExprVec &expr_vec, const std::string &suffix) const
Return the z3 expression for the node.
bool is_op() const
Return trus since this is an operation.
Definition: expr_op.h:82
The class wrapper for binary comparison unsigned greater than.
Definition: expr_op.h:326
z3::expr GetZ3Expr(z3::context &ctx, const Z3ExprVec &expr_vec, const std::string &suffix) const
Return the z3 expression for the node.
AstUidExprOp uid() const
Return the unified ID of the corresponding operation.
Definition: expr_op.h:296
The class wrapper for memory store.
Definition: expr_op.h:354
AstUidExprOp uid() const
Return the unified ID of the corresponding operation.
Definition: expr_op.h:402
AstUidExprOp uid() const
Return the unified ID of the corresponding operation.
Definition: expr_op.h:228
ExprOp(const ExprPtr &arg)
Constructor for unary operators.
z3::expr GetZ3Expr(z3::context &ctx, const Z3ExprVec &expr_vec, const std::string &suffix) const
Return the z3 expression for the node.
The wrapper for unsigned multiplication.
Definition: expr_op.h:266
z3::expr GetZ3Expr(z3::context &ctx, const Z3ExprVec &expr_vec, const std::string &suffix) const
Return the z3 expression for the node.
z3::expr GetZ3Expr(z3::context &ctx, const Z3ExprVec &expr_vec, const std::string &suffix) const
Return the z3 expression for the node.
The class wrapper for bitvector concatenation.
Definition: expr_op.h:368
z3::expr GetZ3Expr(z3::context &ctx, const Z3ExprVec &expr_vec, const std::string &suffix) const
Return the z3 expression for the node.
The wrapper for arithmetic right shifting a bit-vector.
Definition: expr_op.h:184