libTriton  version 0.8 build 1436
Modules | Namespaces | Classes | Typedefs | Enumerations | Functions
Collaboration diagram for Ast:

Modules

 Representations
 

Namespaces

 triton::ast::representations
 The Representations namespace.
 

Classes

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

Typedefs

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

Enumerations

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

Functions

triton::uint512 triton::ast::hash2n (triton::uint512 hash, triton::uint32 n)
 Custom hash2n function for hash routine.
 
triton::uint512 triton::ast::rotl (const triton::uint512 &value, triton::uint32 shift)
 Custom rotate left function for hash routine.
 
triton::sint512 triton::ast::modularSignExtend (AbstractNode *node)
 Custom modular sign extend for bitwise operation.
 
std::ostream & triton::ast::operator<< (std::ostream &stream, AbstractNode *node)
 Displays the node in ast representation.
 
SharedAbstractNode triton::ast::newInstance (AbstractNode *node, bool unroll=false)
 AST C++ API - Duplicates the AST.
 
SharedAbstractNode triton::ast::unroll (const SharedAbstractNode &node)
 AST C++ API - Unrolls the SSA form of a given AST.
 
std::vector< SharedAbstractNodetriton::ast::childrenExtraction (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< SharedAbstractNodetriton::ast::parentsExtraction (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< SharedAbstractNodetriton::ast::search (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

Enumeration Type Documentation

◆ ast_e

Enumerates all types of node. Must be prime numbers.

Enumerator
INVALID_NODE 

Invalid node

ANY_NODE 

Any node

ASSERT_NODE 

(assert x)

BVADD_NODE 

(bvadd x y)

BVAND_NODE 

(bvand x y)

BVASHR_NODE 

(bvashr x y)

BVLSHR_NODE 

(bvlshr x y)

BVMUL_NODE 

(bvmul x y)

BVNAND_NODE 

(bvnand x y)

BVNEG_NODE 

(bvneg x)

BVNOR_NODE 

(bvnor x y)

BVNOT_NODE 

(bvnot x)

BVOR_NODE 

(bvor x y)

BVROL_NODE 

((_ rotate_left x) y)

BVROR_NODE 

((_ rotate_right x) y)

BVSDIV_NODE 

(bvsdiv x y)

BVSGE_NODE 

(bvsge x y)

BVSGT_NODE 

(bvsgt x y)

BVSHL_NODE 

(bvshl x y)

BVSLE_NODE 

(bvsle x y)

BVSLT_NODE 

(bvslt x y)

BVSMOD_NODE 

(bvsmod x y)

BVSREM_NODE 

(bvsrem x y)

BVSUB_NODE 

(bvsub x y)

BVUDIV_NODE 

(bvudiv x y)

BVUGE_NODE 

(bvuge x y)

BVUGT_NODE 

(bvugt x y)

BVULE_NODE 

(bvule x y)

BVULT_NODE 

(bvult x y)

BVUREM_NODE 

(bvurem x y)

BVXNOR_NODE 

(bvxnor x y)

BVXOR_NODE 

(bvxor x y)

BV_NODE 

(_ bvx y)

COMPOUND_NODE 

A compound of nodes

CONCAT_NODE 

(concat x y z ...)

DECLARE_NODE 

(declare-fun <var_name> () (_ BitVec <var_size>))

DISTINCT_NODE 

(distinct x y)

EQUAL_NODE 

(= x y)

EXTRACT_NODE 

((_ extract x y) z)

IFF_NODE 

(iff x y)

INTEGER_NODE 

Integer node

ITE_NODE 

(ite x y z)

LAND_NODE 

(and x y)

LET_NODE 

(let ((x y)) z)

LNOT_NODE 

(and x y)

LOR_NODE 

(or x y)

LXOR_NODE 

(xor x y)

REFERENCE_NODE 

Reference node

STRING_NODE 

String node

SX_NODE 

((_ sign_extend x) y)

VARIABLE_NODE 

Variable node

ZX_NODE 

((_ zero_extend x) y)

Definition at line 29 of file astEnums.hpp.