libTriton version 1.0 build 1592
Loading...
Searching...
No Matches
Namespaces | Classes | Typedefs | Enumerations | Functions
triton::ast Namespace Reference

The AST namespace. More...

Namespaces

namespace  representations
 The Representations namespace.
 

Classes

class  AbstractNode
 Abstract node. More...
 
class  ArrayNode
 (Array (_ BitVec indexSize) (_ BitVec 8)) node More...
 
class  AssertNode
 (assert <expr>) node More...
 
class  AstContext
 AST Context - Used as AST builder. More...
 
class  BswapNode
 (bswap <expr>) node 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  ForallNode
 (forall ((x (_ BitVec <size>)), ...) body) 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  LLVMToTriton
 Converts a LLVM IR to a Triton AST. More...
 
class  LnotNode
 (lnot <expr>) More...
 
class  LorNode
 (or <expr1> <expr2>) More...
 
class  LxorNode
 (xor <expr1> <expr2>) More...
 
class  ReferenceNode
 Reference node. More...
 
class  SelectNode
 (select array index) More...
 
class  StoreNode
 (store array index expr) More...
 
class  StringNode
 String node. More...
 
class  SxNode
 ((_ sign_extend sizeExt) <expr>) node More...
 
class  TritonToBitwuzla
 Converts a Triton's AST to Bitwuzla's AST. More...
 
class  TritonToLLVM
 Converts a Triton's AST to LVM IR. More...
 
class  TritonToZ3
 Converts a Triton's AST to Z3's AST. More...
 
class  VariableNode
 Variable node. More...
 
class  Z3ToTriton
 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 , BSWAP_NODE = 5 ,
  BVADD_NODE = 7 , BVAND_NODE = 13 , BVASHR_NODE = 17 , BVLSHR_NODE = 19 ,
  BVMUL_NODE = 23 , BVNAND_NODE = 29 , BVNEG_NODE = 31 , BVNOR_NODE = 37 ,
  BVNOT_NODE = 41 , BVOR_NODE = 43 , BVROL_NODE = 47 , BVROR_NODE = 53 ,
  BVSDIV_NODE = 59 , BVSGE_NODE = 61 , BVSGT_NODE = 67 , BVSHL_NODE = 71 ,
  BVSLE_NODE = 73 , BVSLT_NODE = 79 , BVSMOD_NODE = 83 , BVSREM_NODE = 89 ,
  BVSUB_NODE = 97 , BVUDIV_NODE = 101 , BVUGE_NODE = 103 , BVUGT_NODE = 107 ,
  BVULE_NODE = 109 , BVULT_NODE = 113 , BVUREM_NODE = 127 , BVXNOR_NODE = 131 ,
  BVXOR_NODE = 137 , BV_NODE = 139 , COMPOUND_NODE = 149 , CONCAT_NODE = 151 ,
  DECLARE_NODE = 157 , DISTINCT_NODE = 163 , EQUAL_NODE = 167 , EXTRACT_NODE = 173 ,
  FORALL_NODE = 179 , IFF_NODE = 181 , INTEGER_NODE = 191 , ITE_NODE = 193 ,
  LAND_NODE = 197 , LET_NODE = 199 , LNOT_NODE = 211 , LOR_NODE = 223 ,
  LXOR_NODE = 227 , REFERENCE_NODE = 229 , STRING_NODE = 233 , SX_NODE = 239 ,
  VARIABLE_NODE = 241 , ZX_NODE = 251 , ARRAY_NODE = 257 , SELECT_NODE = 263 ,
  STORE_NODE = 269
}
 

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.
 
SharedAbstractNode dereference (const SharedAbstractNode &node)
 Returns the first non referene node encountered.
 
triton::uint32 getIndexSize (const SharedAbstractNode &node)
 Gets the index size of an array.
 
template<typename T >
getInteger (const SharedAbstractNode &node)
 Gets the value of an integer node.
 
template<>
std::string getInteger (const SharedAbstractNode &node)
 std::string specialization
 

Detailed Description

The AST namespace.