libTriton  version 0.8 build 1436
Namespaces | Classes | Typedefs | Enumerations | Functions
triton::ast Namespace Reference

The AST namespace. More...

Namespaces

 representations
 The Representations namespace.
 

Classes

class  AbstractNode
 Abstract node. More...
 
class  AssertNode
 (assert <expr>) node More...
 
class  AstContext
 AST Context - Used as AST builder. More...
 
class  BvaddNode
 (bvadd <expr1> <expr2>) node More...
 
class  BvandNode
 (bvand <expr1> <expr2>) node More...
 
class  BvashrNode
 (bvashr <expr1> <expr2>) node More...
 
class  BvlshrNode
 (bvlshr <expr1> <expr2>) node More...
 
class  BvmulNode
 (bvmul <expr1> <expr2>) node More...
 
class  BvnandNode
 (bvnand <expr1> <expr2>) node More...
 
class  BvnegNode
 (bvneg <expr>) node More...
 
class  BvNode
 (_ bv<value> <size>) node More...
 
class  BvnorNode
 (bvnor <expr1> <expr2>) node More...
 
class  BvnotNode
 (bvnot <expr>) node More...
 
class  BvorNode
 (bvor <expr1> <expr2>) node More...
 
class  BvrolNode
 ((_ rotate_left rot) <expr>) node More...
 
class  BvrorNode
 ((_ rotate_right rot) <expr>) node More...
 
class  BvsdivNode
 (bvsdiv <expr1> <expr2>) node More...
 
class  BvsgeNode
 (bvsge <expr1> <expr2>) node More...
 
class  BvsgtNode
 (bvsgt <expr1> <expr2>) node More...
 
class  BvshlNode
 (bvshl <expr1> <expr2>) node More...
 
class  BvsleNode
 (bvsle <expr1> <expr2>) node More...
 
class  BvsltNode
 (bvslt <expr1> <expr2>) node More...
 
class  BvsmodNode
 (bvsmod <expr1> <expr2>) node More...
 
class  BvsremNode
 (bvsrem <expr1> <expr2>) node More...
 
class  BvsubNode
 (bvsub <expr1> <expr2>) node More...
 
class  BvudivNode
 (bvudiv <expr1> <expr2>) node More...
 
class  BvugeNode
 (bvuge <expr1> <expr2>) node More...
 
class  BvugtNode
 (bvugt <expr1> <expr2>) node More...
 
class  BvuleNode
 (bvule <expr1> <expr2>) node More...
 
class  BvultNode
 (bvult <expr1> <expr2>) node More...
 
class  BvuremNode
 (bvurem <expr1> <expr2>) node More...
 
class  BvxnorNode
 (bvxnor <expr1> <expr2>) node More...
 
class  BvxorNode
 (bvxor <expr1> <expr2>) node More...
 
class  CompoundNode
 [<expr1> <expr2> <expr3> ...] node More...
 
class  ConcatNode
 (concat <expr1> <expr2> ...) node More...
 
class  DeclareNode
 (declare-fun <var_name> () (_ BitVec <var_size>)) node More...
 
class  DistinctNode
 (distinct <expr1> <expr2> ...) node More...
 
class  EqualNode
 (= <expr1> <expr2> ...) node More...
 
class  ExtractNode
 ((_ extract <high> <low>) <expr>) node More...
 
class  IffNode
 (iff <expr1> <expr2>) More...
 
class  IntegerNode
 Integer node. More...
 
class  IteNode
 (ite <ifExpr> <thenExpr> <elseExpr>) More...
 
class  LandNode
 (and <expr1> <expr2>) More...
 
class  LetNode
 (let ((<alias> <expr2>)) <expr3>) More...
 
class  LnotNode
 (lnot <expr>) More...
 
class  LorNode
 (or <expr1> <expr2>) More...
 
class  LxorNode
 (xor <expr1> <expr2>) More...
 
class  ReferenceNode
 Reference node. More...
 
class  StringNode
 String node. More...
 
class  SxNode
 ((_ sign_extend sizeExt) <expr>) node More...
 
class  TritonToZ3Ast
 Converts a Triton's AST to Z3's AST. More...
 
class  VariableNode
 Variable node. More...
 
class  Z3ToTritonAst
 Converts a Z3's AST to a Triton's AST. More...
 
class  ZxNode
 ((_ zero_extend sizeExt) <expr>) node More...
 

Typedefs

using SharedAbstractNode = std::shared_ptr< triton::ast::AbstractNode >
 Shared Abstract Node.
 
using WeakAbstractNode = std::weak_ptr< triton::ast::AbstractNode >
 Weak Abstract Node.
 
using SharedAstContext = std::shared_ptr< triton::ast::AstContext >
 Shared AST context.
 

Enumerations

enum  ast_e {
  INVALID_NODE = 0, ANY_NODE = 0, ASSERT_NODE = 3, BVADD_NODE = 5,
  BVAND_NODE = 7, BVASHR_NODE = 12, BVLSHR_NODE = 17, BVMUL_NODE = 19,
  BVNAND_NODE = 23, BVNEG_NODE = 29, BVNOR_NODE = 31, BVNOT_NODE = 37,
  BVOR_NODE = 41, BVROL_NODE = 43, BVROR_NODE = 47, BVSDIV_NODE = 53,
  BVSGE_NODE = 59, BVSGT_NODE = 61, BVSHL_NODE = 67, BVSLE_NODE = 71,
  BVSLT_NODE = 73, BVSMOD_NODE = 79, BVSREM_NODE = 83, BVSUB_NODE = 89,
  BVUDIV_NODE = 97, BVUGE_NODE = 101, BVUGT_NODE = 103, BVULE_NODE = 107,
  BVULT_NODE = 109, BVUREM_NODE = 113, BVXNOR_NODE = 127, BVXOR_NODE = 131,
  BV_NODE = 137, COMPOUND_NODE = 139, CONCAT_NODE = 149, DECLARE_NODE = 151,
  DISTINCT_NODE = 157, EQUAL_NODE = 163, EXTRACT_NODE = 167, IFF_NODE = 173,
  INTEGER_NODE = 179, ITE_NODE = 181, LAND_NODE = 191, LET_NODE = 193,
  LNOT_NODE = 197, LOR_NODE = 199, LXOR_NODE = 211, REFERENCE_NODE = 223,
  STRING_NODE = 227, SX_NODE = 229, VARIABLE_NODE = 233, ZX_NODE = 239
}
 

Functions

std::ostream & operator<< (std::ostream &stream, AbstractNode *node)
 Displays the node in ast representation.
 
triton::uint512 hash2n (triton::uint512 hash, triton::uint32 n)
 Custom hash2n function for hash routine.
 
triton::uint512 rotl (const triton::uint512 &value, triton::uint32 shift)
 Custom rotate left function for hash routine.
 
triton::sint512 modularSignExtend (AbstractNode *node)
 Custom modular sign extend for bitwise operation.
 
SharedAbstractNode newInstance (AbstractNode *node, bool unroll=false)
 AST C++ API - Duplicates the AST.
 
SharedAbstractNode unroll (const SharedAbstractNode &node)
 AST C++ API - Unrolls the SSA form of a given AST.
 
std::vector< SharedAbstractNodechildrenExtraction (const SharedAbstractNode &node, bool unroll, bool revert)
 Returns node and all its children of an AST sorted topologically. If unroll is true, references are unrolled. If revert is true, children are on top of list.
 
std::vector< SharedAbstractNodeparentsExtraction (const SharedAbstractNode &node, bool revert)
 Returns node and all its parents of an AST sorted topologically. If revert is true, oldest parents are on top of list.
 
std::deque< SharedAbstractNodesearch (const SharedAbstractNode &node, triton::ast::ast_e match=ANY_NODE)
 Returns a deque of collected matched nodes via a depth-first pre order traversal.
 

Detailed Description

The AST namespace.