ilang  1.1.4
ILAng: A Modeling and Verification Platform for SoCs
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Macros
Namespaces | Functions
ast_hub.h File Reference
#include <ilang/ila/ast/expr_const.h>
#include <ilang/ila/ast/expr_op.h>
#include <ilang/ila/ast/expr_var.h>
#include <ilang/ila/ast/func.h>

Go to the source code of this file.

Namespaces

 ilang
 

Functions

AstUidSort ilang::asthub::GetUidSort (const ExprPtr &expr)
 Helper to get the unified id of expr's sort.
 
AstUidExprOp ilang::asthub::GetUidExprOp (const ExprPtr &expr)
 Helper to get the unified id of expr's operation.
 
ExprPtr ilang::asthub::NewBoolVar (const std::string &name)
 Create new Boolean variable.
 
ExprPtr ilang::asthub::NewBvVar (const std::string &name, const int &bit_width)
 Create new bitvector variable.
 
ExprPtr ilang::asthub::NewMemVar (const std::string &name, const int &addr_width, const int &data_width)
 Create new memory variable.
 
ExprPtr ilang::asthub::BoolConst (const bool &val)
 Create a Boolean constant.
 
ExprPtr ilang::asthub::BoolConst (const BoolVal &val)
 Create a Boolean constant from BoolVal.
 
ExprPtr ilang::asthub::BvConst (const BvValType &val, const int &bit_width)
 Create a bitvector constant.
 
ExprPtr ilang::asthub::BvConst (const BvVal &val, const int &bit_width)
 Create a bitvector constant from BvVal.
 
ExprPtr ilang::asthub::MemConst (const BvValType &def_val, const int &addr_width, const int &data_width)
 Create a memory constant with only the defauly value.
 
ExprPtr ilang::asthub::MemConst (const MemVal &val, const int &addr_width, const int &data_width)
 Create a memory constant from MemVal.
 
ExprPtr ilang::asthub::Negate (const ExprPtr &obj)
 Arithematic negate (bv only)
 
ExprPtr ilang::asthub::Not (const ExprPtr &obj)
 Boolean not (bool only)
 
ExprPtr ilang::asthub::Complement (const ExprPtr &obj)
 Bit-wise Complement (bv only)
 
ExprPtr ilang::asthub::And (const ExprPtr &l, const ExprPtr &r)
 Logical AND.
 
ExprPtr ilang::asthub::Or (const ExprPtr &l, const ExprPtr &r)
 Logical OR.
 
ExprPtr ilang::asthub::Xor (const ExprPtr &l, const ExprPtr &r)
 Logical XOR.
 
ExprPtr ilang::asthub::Shl (const ExprPtr &l, const ExprPtr &r)
 Left shift (bv only) (l << r)
 
ExprPtr ilang::asthub::Ashr (const ExprPtr &l, const ExprPtr &r)
 Arithmetic right shift (bv only) (l >> r)
 
ExprPtr ilang::asthub::Lshr (const ExprPtr &l, const ExprPtr &r)
 Logical right shift (bv only) (l >> r)
 
ExprPtr ilang::asthub::Add (const ExprPtr &l, const ExprPtr &r)
 Arithmetic addition (bv only)
 
ExprPtr ilang::asthub::Sub (const ExprPtr &l, const ExprPtr &r)
 Arithmetic subtraction (bv only)
 
ExprPtr ilang::asthub::Div (const ExprPtr &l, const ExprPtr &r)
 Arithmetic unsigned division (bv only)
 
ExprPtr ilang::asthub::SRem (const ExprPtr &l, const ExprPtr &r)
 Arithmetic signed remainder (bv only)
 
ExprPtr ilang::asthub::URem (const ExprPtr &l, const ExprPtr &r)
 Arithmetic unsigned remainder (bv only)
 
ExprPtr ilang::asthub::SMod (const ExprPtr &l, const ExprPtr &r)
 Arithmetic signed modular (bv only)
 
ExprPtr ilang::asthub::Mod (const ExprPtr &l, const ExprPtr &r)
 Arithmetic unsigned modular (bv only)
 
ExprPtr ilang::asthub::Mul (const ExprPtr &l, const ExprPtr &r)
 Arithmetic unsigned multiply (bv only)
 
ExprPtr ilang::asthub::And (const ExprPtr &l, const bool &r)
 Logical AND with Boolean constant.
 
ExprPtr ilang::asthub::Or (const ExprPtr &l, const bool &r)
 Logical OR with Boolean constant.
 
ExprPtr ilang::asthub::Xor (const ExprPtr &l, const bool &r)
 Logical XOR with Boolean constant.
 
ExprPtr ilang::asthub::Shl (const ExprPtr &l, const int &r)
 Left shift with int.
 
ExprPtr ilang::asthub::Ashr (const ExprPtr &l, const int &r)
 Arithmetic right shift with int.
 
ExprPtr ilang::asthub::Lshr (const ExprPtr &l, const int &r)
 Logical right shift with int.
 
ExprPtr ilang::asthub::Add (const ExprPtr &l, const BvValType &r)
 Arithmetic addition with constant.
 
ExprPtr ilang::asthub::Sub (const ExprPtr &l, const BvValType &r)
 Arithmetic subtraction with constant.
 
ExprPtr ilang::asthub::Mul (const ExprPtr &l, const BvValType &r)
 Arithmetic unsigned multiply with constant (bv only).
 
ExprPtr ilang::asthub::Eq (const ExprPtr &l, const ExprPtr &r)
 Comparison: equal.
 
ExprPtr ilang::asthub::Ne (const ExprPtr &l, const ExprPtr &r)
 Comparison: not equal.
 
ExprPtr ilang::asthub::Lt (const ExprPtr &l, const ExprPtr &r)
 Comparison: signed less than (bv only)
 
ExprPtr ilang::asthub::Gt (const ExprPtr &l, const ExprPtr &r)
 Comparison: signed greater than (bv only)
 
ExprPtr ilang::asthub::Le (const ExprPtr &l, const ExprPtr &r)
 Comparison: signed less than or equal to (bv only)
 
ExprPtr ilang::asthub::Ge (const ExprPtr &l, const ExprPtr &r)
 Comparison: signed greater than or equal to (bv only)
 
ExprPtr ilang::asthub::Ult (const ExprPtr &l, const ExprPtr &r)
 Comparison: unsigned less than (bv only)
 
ExprPtr ilang::asthub::Ugt (const ExprPtr &l, const ExprPtr &r)
 Comparison: unsigned greater than (bv only)
 
ExprPtr ilang::asthub::Ule (const ExprPtr &l, const ExprPtr &r)
 Comparison: unsigned less than or equal to (bv only)
 
ExprPtr ilang::asthub::Uge (const ExprPtr &l, const ExprPtr &r)
 Comparison: unsigned greater than or equal to (bv only)
 
ExprPtr ilang::asthub::Eq (const ExprPtr &l, const BvValType &r)
 Equal to constant.
 
ExprPtr ilang::asthub::Ne (const ExprPtr &l, const BvValType &r)
 Not equal to constant.
 
ExprPtr ilang::asthub::Lt (const ExprPtr &l, const BvValType &r)
 Signed less than constant.
 
ExprPtr ilang::asthub::Gt (const ExprPtr &l, const BvValType &r)
 Signed greater than constant.
 
ExprPtr ilang::asthub::Le (const ExprPtr &l, const BvValType &r)
 Signed less than or equal to constant.
 
ExprPtr ilang::asthub::Ge (const ExprPtr &l, const BvValType &r)
 Signed greater than or equal to constant.
 
ExprPtr ilang::asthub::Ult (const ExprPtr &l, const BvValType &r)
 Unsgned less than constant.
 
ExprPtr ilang::asthub::Ugt (const ExprPtr &l, const BvValType &r)
 Unsigned greater than constant.
 
ExprPtr ilang::asthub::Ule (const ExprPtr &l, const BvValType &r)
 Unsigned less than or equal to constant.
 
ExprPtr ilang::asthub::Uge (const ExprPtr &l, const BvValType &r)
 Unsigned greater than or equal to constant.
 
ExprPtr ilang::asthub::Load (const ExprPtr &mem, const ExprPtr &addr)
 Memory load.
 
ExprPtr ilang::asthub::Store (const ExprPtr &mem, const ExprPtr &addr, const ExprPtr &data)
 Memory store.
 
ExprPtr ilang::asthub::Load (const ExprPtr &mem, const BvValType &addr)
 Memory load from constant address.
 
ExprPtr ilang::asthub::Store (const ExprPtr &mem, const BvValType &addr, const BvValType &data)
 Memory store to constant address and data.
 
bool ilang::asthub::SetMemSize (const ExprPtr &mem, const int &size=0)
 Set memory size.
 
int ilang::asthub::GetMemSize (const ExprPtr &mem)
 Get memory size.
 
ExprPtr ilang::asthub::Concat (const ExprPtr &hi, const ExprPtr &lo)
 Concatenate two bitvectors (bv only)
 
ExprPtr ilang::asthub::Extract (const ExprPtr &bv, const int &hi, const int &lo)
 Extract bit field in the bitvector (bv only)
 
ExprPtr ilang::asthub::ZExt (const ExprPtr &bv, const int &out_width)
 Zero extend the bitvector to the specified length.
 
ExprPtr ilang::asthub::SExt (const ExprPtr &bv, const int &out_width)
 Sign extend the bitvector to the specified length.
 
ExprPtr ilang::asthub::LRotate (const ExprPtr &bv, const int &immediate)
 Left rotate the bitvector to immediate number of times.
 
ExprPtr ilang::asthub::RRotate (const ExprPtr &bv, const int &immediate)
 Right rotate the bitvector to immediate number of times.
 
ExprPtr ilang::asthub::AppFunc (const FuncPtr &func)
 Apply function with zero argument.
 
ExprPtr ilang::asthub::AppFunc (const FuncPtr &func, const ExprPtr &arg0)
 Apply function with one argument.
 
ExprPtr ilang::asthub::AppFunc (const FuncPtr &func, const ExprPtr &arg0, const ExprPtr &arg1)
 Apply function with two argument.
 
ExprPtr ilang::asthub::AppFunc (const FuncPtr &func, const ExprPtrVec &args)
 Apply function with arguments.
 
ExprPtr ilang::asthub::Imply (const ExprPtr &p, const ExprPtr &q)
 Logical imply (bool only)
 
ExprPtr ilang::asthub::Ite (const ExprPtr &cnd, const ExprPtr &true_expr, const ExprPtr &false_expr)
 If-then-else (condition bool only)
 
bool ilang::asthub::TopEq (const ExprPtr &a, const ExprPtr &b)
 Topologically equivalent.