libTriton  version 1.0 build 1558
Public Member Functions | Protected Attributes | List of all members
triton::engines::symbolic::SymbolicEngine Class Reference

The symbolic engine class. More...

#include <symbolicEngine.hpp>

Inheritance diagram for triton::engines::symbolic::SymbolicEngine:

Public Member Functions

TRITON_EXPORT SymbolicEngine (triton::arch::Architecture *architecture, const triton::modes::SharedModes &modes, const triton::ast::SharedAstContext &astCtxt, triton::callbacks::Callbacks *callbacks=nullptr)
 Constructor. More...
 
TRITON_EXPORT SymbolicEngine (const SymbolicEngine &other)
 Constructor by copy. More...
 
TRITON_EXPORT ~SymbolicEngine ()
 Destructor. More...
 
TRITON_EXPORT SymbolicEngineoperator= (const SymbolicEngine &other)
 Copies a SymbolicEngine. More...
 
TRITON_EXPORT SharedSymbolicExpression newSymbolicExpression (const triton::ast::SharedAbstractNode &node, triton::engines::symbolic::expression_e type, const std::string &comment="")
 Creates a new shared symbolic expression. More...
 
TRITON_EXPORT void removeSymbolicExpression (const SharedSymbolicExpression &expr)
 Removes the symbolic expression corresponding to the id. More...
 
TRITON_EXPORT SharedSymbolicVariable newSymbolicVariable (triton::engines::symbolic::variable_e type, triton::uint64 source, triton::uint32 size, const std::string &alias="")
 Adds a symbolic variable. More...
 
TRITON_EXPORT SharedSymbolicVariable getSymbolicVariable (triton::usize symVarId) const
 Returns the symbolic variable corresponding to the symbolic variable id. More...
 
TRITON_EXPORT SharedSymbolicVariable getSymbolicVariable (const std::string &name) const
 Returns the symbolic variable corresponding to the symbolic variable name. More...
 
TRITON_EXPORT SharedSymbolicExpression getSymbolicExpression (triton::usize symExprId) const
 Returns the symbolic expression corresponding to an id. More...
 
TRITON_EXPORT SharedSymbolicExpression getSymbolicMemory (triton::uint64 addr) const
 Returns the shared symbolic expression corresponding to the memory address. More...
 
TRITON_EXPORT const std::unordered_map< triton::uint64, SharedSymbolicExpression > & getSymbolicMemory (void) const
 Returns the map (addr:expr) of all symbolic memory defined. More...
 
TRITON_EXPORT const SharedSymbolicExpressiongetSymbolicRegister (const triton::arch::Register &reg) const
 Returns the shared symbolic expression corresponding to the parent register. More...
 
TRITON_EXPORT std::unordered_map< triton::arch::register_e, SharedSymbolicExpressiongetSymbolicRegisters (void) const
 Returns the map of symbolic registers defined. More...
 
TRITON_EXPORT triton::uint8 getSymbolicMemoryValue (triton::uint64 address)
 Returns the symbolic memory value. More...
 
TRITON_EXPORT triton::uint512 getSymbolicMemoryValue (const triton::arch::MemoryAccess &mem)
 Returns the symbolic memory value. More...
 
TRITON_EXPORT std::vector< triton::uint8getSymbolicMemoryAreaValue (triton::uint64 baseAddr, triton::usize size)
 Returns the symbolic values of a memory area. More...
 
TRITON_EXPORT triton::uint512 getSymbolicRegisterValue (const triton::arch::Register &reg)
 Returns the symbolic register value. More...
 
TRITON_EXPORT triton::ast::SharedAbstractNode getOperandAst (const triton::arch::OperandWrapper &op)
 Returns the AST corresponding to the operand. More...
 
TRITON_EXPORT triton::ast::SharedAbstractNode getOperandAst (triton::arch::Instruction &inst, const triton::arch::OperandWrapper &op)
 Returns the AST corresponding to the operand. More...
 
TRITON_EXPORT triton::ast::SharedAbstractNode getImmediateAst (const triton::arch::Immediate &imm)
 Returns the AST corresponding to the immediate. More...
 
TRITON_EXPORT triton::ast::SharedAbstractNode getImmediateAst (triton::arch::Instruction &inst, const triton::arch::Immediate &imm)
 Returns the AST corresponding to the immediate and defines the immediate as input of the instruction. More...
 
TRITON_EXPORT triton::ast::SharedAbstractNode getMemoryAst (const triton::arch::MemoryAccess &mem)
 Returns the AST corresponding to the memory. More...
 
TRITON_EXPORT triton::ast::SharedAbstractNode getMemoryAst (triton::arch::Instruction &inst, const triton::arch::MemoryAccess &mem)
 Returns the AST corresponding to the memory and defines the memory as input of the instruction. More...
 
TRITON_EXPORT triton::ast::SharedAbstractNode getRegisterAst (const triton::arch::Register &reg)
 Returns the AST corresponding to the register. More...
 
TRITON_EXPORT triton::ast::SharedAbstractNode getRegisterAst (triton::arch::Instruction &inst, const triton::arch::Register &reg)
 Returns the AST corresponding to the register and defines the register as input of the instruction. More...
 
triton::ast::SharedAbstractNode getShiftAst (const triton::arch::arm::ArmOperandProperties &shift, const triton::ast::SharedAbstractNode &node)
 Returns the AST corresponding to the shift operation. Mainly used for Arm32 operands. More...
 
TRITON_EXPORT const SharedSymbolicExpressioncreateSymbolicExpression (triton::arch::Instruction &inst, const triton::ast::SharedAbstractNode &node, const triton::arch::OperandWrapper &dst, const std::string &comment="")
 Returns the new shared symbolic abstract expression and links this expression to the instruction. More...
 
TRITON_EXPORT const SharedSymbolicExpressioncreateSymbolicMemoryExpression (triton::arch::Instruction &inst, const triton::ast::SharedAbstractNode &node, const triton::arch::MemoryAccess &mem, const std::string &comment="")
 Returns the new shared symbolic memory expression expression and links this expression to the instruction. More...
 
TRITON_EXPORT const SharedSymbolicExpressioncreateSymbolicRegisterExpression (triton::arch::Instruction &inst, const triton::ast::SharedAbstractNode &node, const triton::arch::Register &reg, const std::string &comment="")
 Returns the new shared symbolic register expression expression and links this expression to the instruction. More...
 
TRITON_EXPORT const SharedSymbolicExpressioncreateSymbolicVolatileExpression (triton::arch::Instruction &inst, const triton::ast::SharedAbstractNode &node, const std::string &comment="")
 Returns the new shared symbolic volatile expression expression and links this expression to the instruction. More...
 
TRITON_EXPORT void assignSymbolicExpressionToRegister (const SharedSymbolicExpression &se, const triton::arch::Register &reg)
 Assigns a symbolic expression to a register. More...
 
TRITON_EXPORT void assignSymbolicExpressionToMemory (const SharedSymbolicExpression &se, const triton::arch::MemoryAccess &mem)
 Assigns a symbolic expression to a memory. More...
 
TRITON_EXPORT std::unordered_map< triton::usize, SharedSymbolicExpressionsliceExpressions (const SharedSymbolicExpression &expr)
 Slices all expressions from a given one. More...
 
TRITON_EXPORT std::vector< SharedSymbolicExpressiongetTaintedSymbolicExpressions (void) const
 Returns the vector of the tainted symbolic expressions. More...
 
TRITON_EXPORT std::unordered_map< triton::usize, SharedSymbolicExpressiongetSymbolicExpressions (void) const
 Returns all symbolic expressions. More...
 
TRITON_EXPORT std::map< triton::usize, SharedSymbolicVariablegetSymbolicVariables (void) const
 Returns all symbolic variables. More...
 
TRITON_EXPORT SharedSymbolicVariable symbolizeExpression (triton::usize exprId, triton::uint32 symVarSize, const std::string &symVarAlias="")
 Converts a symbolic expression to a symbolic variable. symVarSize must be in bits. More...
 
TRITON_EXPORT SharedSymbolicVariable symbolizeMemory (const triton::arch::MemoryAccess &mem, const std::string &symVarAlias="")
 Converts a symbolic memory expression to a symbolic variable. More...
 
TRITON_EXPORT void symbolizeMemory (triton::uint64 addr, triton::usize size)
 Converts a symbolic memory area to 8-bits symbolic variables. More...
 
TRITON_EXPORT SharedSymbolicVariable symbolizeRegister (const triton::arch::Register &reg, const std::string &symVarAlias="")
 Converts a symbolic register expression to a symbolic variable. More...
 
TRITON_EXPORT void concretizeAllMemory (void)
 Concretizes all symbolic memory references. More...
 
TRITON_EXPORT void concretizeAllRegister (void)
 Concretizes all symbolic register references. More...
 
TRITON_EXPORT void concretizeMemory (const triton::arch::MemoryAccess &mem)
 Concretizes a specific symbolic memory reference. More...
 
TRITON_EXPORT void concretizeMemory (triton::uint64 addr)
 Concretizes a specific symbolic memory reference. More...
 
TRITON_EXPORT void concretizeRegister (const triton::arch::Register &reg)
 Concretizes a specific symbolic register reference. More...
 
TRITON_EXPORT bool isSymbolicExpressionExists (triton::usize symExprId) const
 Returns true if the symbolic expression ID exists. More...
 
TRITON_EXPORT bool isMemorySymbolized (const triton::arch::MemoryAccess &mem) const
 Returns true if memory cell expressions contain symbolic variables. More...
 
TRITON_EXPORT bool isMemorySymbolized (triton::uint64 addr, triton::uint32 size=1) const
 Returns true if memory cell expressions contain symbolic variables. More...
 
TRITON_EXPORT bool isRegisterSymbolized (const triton::arch::Register &reg) const
 Returns true if the register expression contains a symbolic variable. More...
 
TRITON_EXPORT void initLeaAst (triton::arch::MemoryAccess &mem, bool force=true)
 Initializes the memory access AST (LOAD and STORE). More...
 
TRITON_EXPORT triton::uint512 getConcreteVariableValue (const SharedSymbolicVariable &symVar) const
 Gets the concrete value of a symbolic variable. More...
 
TRITON_EXPORT void setConcreteVariableValue (const SharedSymbolicVariable &symVar, const triton::uint512 &value)
 Sets the concrete value of a symbolic variable. More...
 
- Public Member Functions inherited from triton::engines::symbolic::SymbolicSimplification
TRITON_EXPORT SymbolicSimplification (triton::arch::Architecture *architecture, triton::callbacks::Callbacks *callbacks=nullptr)
 Constructor. More...
 
TRITON_EXPORT SymbolicSimplification (const SymbolicSimplification &other)
 Constructor. More...
 
TRITON_EXPORT triton::ast::SharedAbstractNode simplify (const triton::ast::SharedAbstractNode &node) const
 Processes all recorded simplifications. Returns the simplified node. More...
 
TRITON_EXPORT triton::arch::BasicBlock simplify (const triton::arch::BasicBlock &block, bool padding=false) const
 Performs a dead store elimination simplification. If padding is true, keep addresses aligned and padds with NOP instructions. More...
 
TRITON_EXPORT SymbolicSimplificationoperator= (const SymbolicSimplification &other)
 Copies a SymbolicSimplification. More...
 
- Public Member Functions inherited from triton::engines::symbolic::PathManager
TRITON_EXPORT PathManager (const triton::modes::SharedModes &modes, const triton::ast::SharedAstContext &astCtxt)
 Constructor. More...
 
TRITON_EXPORT PathManager (const PathManager &other)
 Constructor by copy. More...
 
TRITON_EXPORT PathManageroperator= (const PathManager &other)
 Copies a PathManager. More...
 
TRITON_EXPORT triton::usize getSizeOfPathConstraints (void) const
 Returns the size of the path constraints. More...
 
TRITON_EXPORT const std::vector< triton::engines::symbolic::PathConstraint > & getPathConstraints (void) const
 Returns the logical conjunction vector of path constraints. More...
 
TRITON_EXPORT std::vector< triton::engines::symbolic::PathConstraintgetPathConstraints (triton::usize start, triton::usize end) const
 Returns the logical conjunction vector of path constraints from a given range. More...
 
TRITON_EXPORT std::vector< triton::engines::symbolic::PathConstraintgetPathConstraintsOfThread (triton::uint32 threadId) const
 Returns the logical conjunction vector of path constraint of a given thread. More...
 
TRITON_EXPORT triton::ast::SharedAbstractNode getPathPredicate (void) const
 Returns the current path predicate as an AST of logical conjunction of each taken branch. More...
 
TRITON_EXPORT std::vector< triton::ast::SharedAbstractNodegetPredicatesToReachAddress (triton::uint64 addr) const
 Returns path predicates which may reach the targeted address. More...
 
TRITON_EXPORT void pushPathConstraint (const triton::arch::Instruction &inst, const triton::engines::symbolic::SharedSymbolicExpression &expr)
 Pushs constraints of a branch instruction to the path predicate. More...
 
TRITON_EXPORT void pushPathConstraint (const triton::ast::SharedAbstractNode &node, const std::string &comment="")
 Pushes constraint created from node to the current path predicate. More...
 
TRITON_EXPORT void pushPathConstraint (const triton::engines::symbolic::PathConstraint &pco)
 Pushes constraint to the current path predicate. More...
 
TRITON_EXPORT void popPathConstraint (void)
 Pops the last constraints added to the path predicate. More...
 
TRITON_EXPORT void clearPathConstraints (void)
 Clears the current path predicate. More...
 

Protected Attributes

triton::uint32 numberOfRegisters
 Number of registers. More...
 
triton::usize uniqueSymExprId
 Symbolic expressions id. More...
 
triton::usize uniqueSymVarId
 Symbolic variables id. More...
 
std::unordered_map< triton::usize, WeakSymbolicVariablesymbolicVariables
 The map of symbolic variables. More...
 
std::unordered_map< triton::usize, WeakSymbolicExpressionsymbolicExpressions
 The map of symbolic expressions. More...
 
std::map< std::pair< triton::uint64, triton::uint32 >, SharedSymbolicExpressionalignedMemoryReference
 map of <address:size> -> symbolic expression. More...
 
std::unordered_map< triton::uint64, SharedSymbolicExpressionmemoryReference
 map of address -> symbolic expression More...
 
std::vector< SharedSymbolicExpressionsymbolicReg
 Symbolic register state. More...
 
- Protected Attributes inherited from triton::engines::symbolic::PathManager
std::vector< triton::engines::symbolic::PathConstraintpathConstraints
 The logical conjunction vector of path constraints. More...
 

Detailed Description

The symbolic engine class.

Definition at line 60 of file symbolicEngine.hpp.

Constructor & Destructor Documentation

◆ SymbolicEngine() [1/2]

triton::engines::symbolic::SymbolicEngine::SymbolicEngine ( triton::arch::Architecture architecture,
const triton::modes::SharedModes modes,
const triton::ast::SharedAstContext astCtxt,
triton::callbacks::Callbacks callbacks = nullptr 
)

Constructor.

Definition at line 23 of file symbolicEngine.cpp.

◆ SymbolicEngine() [2/2]

triton::engines::symbolic::SymbolicEngine::SymbolicEngine ( const SymbolicEngine other)

Constructor by copy.

Definition at line 46 of file symbolicEngine.cpp.

◆ ~SymbolicEngine()

triton::engines::symbolic::SymbolicEngine::~SymbolicEngine ( )

Destructor.

Definition at line 65 of file symbolicEngine.cpp.

Member Function Documentation

◆ assignSymbolicExpressionToMemory()

void triton::engines::symbolic::SymbolicEngine::assignSymbolicExpressionToMemory ( const SharedSymbolicExpression se,
const triton::arch::MemoryAccess mem 
)

Assigns a symbolic expression to a memory.

Definition at line 1096 of file symbolicEngine.cpp.

◆ assignSymbolicExpressionToRegister()

void triton::engines::symbolic::SymbolicEngine::assignSymbolicExpressionToRegister ( const SharedSymbolicExpression se,
const triton::arch::Register reg 
)

Assigns a symbolic expression to a register.

Definition at line 1069 of file symbolicEngine.cpp.

◆ concretizeAllMemory()

void triton::engines::symbolic::SymbolicEngine::concretizeAllMemory ( void  )

Concretizes all symbolic memory references.

Definition at line 142 of file symbolicEngine.cpp.

◆ concretizeAllRegister()

void triton::engines::symbolic::SymbolicEngine::concretizeAllRegister ( void  )

Concretizes all symbolic register references.

Definition at line 108 of file symbolicEngine.cpp.

◆ concretizeMemory() [1/2]

void triton::engines::symbolic::SymbolicEngine::concretizeMemory ( const triton::arch::MemoryAccess mem)

Concretizes a specific symbolic memory reference.

Definition at line 120 of file symbolicEngine.cpp.

◆ concretizeMemory() [2/2]

void triton::engines::symbolic::SymbolicEngine::concretizeMemory ( triton::uint64  addr)

Concretizes a specific symbolic memory reference.

Definition at line 135 of file symbolicEngine.cpp.

◆ concretizeRegister()

void triton::engines::symbolic::SymbolicEngine::concretizeRegister ( const triton::arch::Register reg)

Concretizes a specific symbolic register reference.

Definition at line 98 of file symbolicEngine.cpp.

◆ createSymbolicExpression()

const SharedSymbolicExpression & triton::engines::symbolic::SymbolicEngine::createSymbolicExpression ( triton::arch::Instruction inst,
const triton::ast::SharedAbstractNode node,
const triton::arch::OperandWrapper dst,
const std::string &  comment = "" 
)

Returns the new shared symbolic abstract expression and links this expression to the instruction.

Definition at line 903 of file symbolicEngine.cpp.

◆ createSymbolicMemoryExpression()

const SharedSymbolicExpression & triton::engines::symbolic::SymbolicEngine::createSymbolicMemoryExpression ( triton::arch::Instruction inst,
const triton::ast::SharedAbstractNode node,
const triton::arch::MemoryAccess mem,
const std::string &  comment = "" 
)

Returns the new shared symbolic memory expression expression and links this expression to the instruction.

Definition at line 914 of file symbolicEngine.cpp.

◆ createSymbolicRegisterExpression()

const SharedSymbolicExpression & triton::engines::symbolic::SymbolicEngine::createSymbolicRegisterExpression ( triton::arch::Instruction inst,
const triton::ast::SharedAbstractNode node,
const triton::arch::Register reg,
const std::string &  comment = "" 
)

Returns the new shared symbolic register expression expression and links this expression to the instruction.

Definition at line 1042 of file symbolicEngine.cpp.

◆ createSymbolicVolatileExpression()

const SharedSymbolicExpression & triton::engines::symbolic::SymbolicEngine::createSymbolicVolatileExpression ( triton::arch::Instruction inst,
const triton::ast::SharedAbstractNode node,
const std::string &  comment = "" 
)

Returns the new shared symbolic volatile expression expression and links this expression to the instruction.

Definition at line 1055 of file symbolicEngine.cpp.

◆ getConcreteVariableValue()

triton::uint512 triton::engines::symbolic::SymbolicEngine::getConcreteVariableValue ( const SharedSymbolicVariable symVar) const

Gets the concrete value of a symbolic variable.

Definition at line 1228 of file symbolicEngine.cpp.

◆ getImmediateAst() [1/2]

triton::ast::SharedAbstractNode triton::engines::symbolic::SymbolicEngine::getImmediateAst ( const triton::arch::Immediate imm)

Returns the AST corresponding to the immediate.

Definition at line 794 of file symbolicEngine.cpp.

◆ getImmediateAst() [2/2]

triton::ast::SharedAbstractNode triton::engines::symbolic::SymbolicEngine::getImmediateAst ( triton::arch::Instruction inst,
const triton::arch::Immediate imm 
)

Returns the AST corresponding to the immediate and defines the immediate as input of the instruction.

Definition at line 807 of file symbolicEngine.cpp.

◆ getMemoryAst() [1/2]

triton::ast::SharedAbstractNode triton::engines::symbolic::SymbolicEngine::getMemoryAst ( const triton::arch::MemoryAccess mem)

Returns the AST corresponding to the memory.

Definition at line 815 of file symbolicEngine.cpp.

◆ getMemoryAst() [2/2]

triton::ast::SharedAbstractNode triton::engines::symbolic::SymbolicEngine::getMemoryAst ( triton::arch::Instruction inst,
const triton::arch::MemoryAccess mem 
)

Returns the AST corresponding to the memory and defines the memory as input of the instruction.

Definition at line 854 of file symbolicEngine.cpp.

◆ getOperandAst() [1/2]

triton::ast::SharedAbstractNode triton::engines::symbolic::SymbolicEngine::getOperandAst ( const triton::arch::OperandWrapper op)

Returns the AST corresponding to the operand.

Definition at line 642 of file symbolicEngine.cpp.

◆ getOperandAst() [2/2]

triton::ast::SharedAbstractNode triton::engines::symbolic::SymbolicEngine::getOperandAst ( triton::arch::Instruction inst,
const triton::arch::OperandWrapper op 
)

Returns the AST corresponding to the operand.

Definition at line 654 of file symbolicEngine.cpp.

◆ getRegisterAst() [1/2]

triton::ast::SharedAbstractNode triton::engines::symbolic::SymbolicEngine::getRegisterAst ( const triton::arch::Register reg)

Returns the AST corresponding to the register.

Definition at line 868 of file symbolicEngine.cpp.

◆ getRegisterAst() [2/2]

triton::ast::SharedAbstractNode triton::engines::symbolic::SymbolicEngine::getRegisterAst ( triton::arch::Instruction inst,
const triton::arch::Register reg 
)

Returns the AST corresponding to the register and defines the register as input of the instruction.

Definition at line 895 of file symbolicEngine.cpp.

◆ getShiftAst()

triton::ast::SharedAbstractNode triton::engines::symbolic::SymbolicEngine::getShiftAst ( const triton::arch::arm::ArmOperandProperties shift,
const triton::ast::SharedAbstractNode node 
)

Returns the AST corresponding to the shift operation. Mainly used for Arm32 operands.

Definition at line 665 of file symbolicEngine.cpp.

◆ getSymbolicExpression()

SharedSymbolicExpression triton::engines::symbolic::SymbolicEngine::getSymbolicExpression ( triton::usize  symExprId) const

Returns the symbolic expression corresponding to an id.

Definition at line 423 of file symbolicEngine.cpp.

◆ getSymbolicExpressions()

std::unordered_map< triton::usize, SharedSymbolicExpression > triton::engines::symbolic::SymbolicEngine::getSymbolicExpressions ( void  ) const

Returns all symbolic expressions.

Definition at line 439 of file symbolicEngine.cpp.

◆ getSymbolicMemory() [1/2]

SharedSymbolicExpression triton::engines::symbolic::SymbolicEngine::getSymbolicMemory ( triton::uint64  addr) const

Returns the shared symbolic expression corresponding to the memory address.

Definition at line 209 of file symbolicEngine.cpp.

◆ getSymbolicMemory() [2/2]

const std::unordered_map< triton::uint64, SharedSymbolicExpression > & triton::engines::symbolic::SymbolicEngine::getSymbolicMemory ( void  ) const

Returns the map (addr:expr) of all symbolic memory defined.

Definition at line 520 of file symbolicEngine.cpp.

◆ getSymbolicMemoryAreaValue()

std::vector< triton::uint8 > triton::engines::symbolic::SymbolicEngine::getSymbolicMemoryAreaValue ( triton::uint64  baseAddr,
triton::usize  size 
)

Returns the symbolic values of a memory area.

Definition at line 331 of file symbolicEngine.cpp.

◆ getSymbolicMemoryValue() [1/2]

triton::uint512 triton::engines::symbolic::SymbolicEngine::getSymbolicMemoryValue ( const triton::arch::MemoryAccess mem)

Returns the symbolic memory value.

Definition at line 324 of file symbolicEngine.cpp.

◆ getSymbolicMemoryValue() [2/2]

triton::uint8 triton::engines::symbolic::SymbolicEngine::getSymbolicMemoryValue ( triton::uint64  address)

Returns the symbolic memory value.

Definition at line 317 of file symbolicEngine.cpp.

◆ getSymbolicRegister()

const SharedSymbolicExpression & triton::engines::symbolic::SymbolicEngine::getSymbolicRegister ( const triton::arch::Register reg) const

Returns the shared symbolic expression corresponding to the parent register.

Definition at line 305 of file symbolicEngine.cpp.

◆ getSymbolicRegisters()

std::unordered_map< triton::arch::register_e, SharedSymbolicExpression > triton::engines::symbolic::SymbolicEngine::getSymbolicRegisters ( void  ) const

Returns the map of symbolic registers defined.

Definition at line 506 of file symbolicEngine.cpp.

◆ getSymbolicRegisterValue()

triton::uint512 triton::engines::symbolic::SymbolicEngine::getSymbolicRegisterValue ( const triton::arch::Register reg)

Returns the symbolic register value.

Definition at line 344 of file symbolicEngine.cpp.

◆ getSymbolicVariable() [1/2]

SharedSymbolicVariable triton::engines::symbolic::SymbolicEngine::getSymbolicVariable ( const std::string &  name) const

Returns the symbolic variable corresponding to the symbolic variable name.

Definition at line 234 of file symbolicEngine.cpp.

◆ getSymbolicVariable() [2/2]

SharedSymbolicVariable triton::engines::symbolic::SymbolicEngine::getSymbolicVariable ( triton::usize  symVarId) const

Returns the symbolic variable corresponding to the symbolic variable id.

Definition at line 219 of file symbolicEngine.cpp.

◆ getSymbolicVariables()

std::map< triton::usize, SharedSymbolicVariable > triton::engines::symbolic::SymbolicEngine::getSymbolicVariables ( void  ) const

Returns all symbolic variables.

Definition at line 254 of file symbolicEngine.cpp.

◆ getTaintedSymbolicExpressions()

std::vector< SharedSymbolicExpression > triton::engines::symbolic::SymbolicEngine::getTaintedSymbolicExpressions ( void  ) const

Returns the vector of the tainted symbolic expressions.

Definition at line 483 of file symbolicEngine.cpp.

◆ initLeaAst()

void triton::engines::symbolic::SymbolicEngine::initLeaAst ( triton::arch::MemoryAccess mem,
bool  force = true 
)

Initializes the memory access AST (LOAD and STORE).

Definition at line 1179 of file symbolicEngine.cpp.

◆ isMemorySymbolized() [1/2]

bool triton::engines::symbolic::SymbolicEngine::isMemorySymbolized ( const triton::arch::MemoryAccess mem) const

Returns true if memory cell expressions contain symbolic variables.

Definition at line 1148 of file symbolicEngine.cpp.

◆ isMemorySymbolized() [2/2]

bool triton::engines::symbolic::SymbolicEngine::isMemorySymbolized ( triton::uint64  addr,
triton::uint32  size = 1 
) const

Returns true if memory cell expressions contain symbolic variables.

Definition at line 1157 of file symbolicEngine.cpp.

◆ isRegisterSymbolized()

bool triton::engines::symbolic::SymbolicEngine::isRegisterSymbolized ( const triton::arch::Register reg) const

Returns true if the register expression contains a symbolic variable.

Definition at line 1169 of file symbolicEngine.cpp.

◆ isSymbolicExpressionExists()

bool triton::engines::symbolic::SymbolicEngine::isSymbolicExpressionExists ( triton::usize  symExprId) const

Returns true if the symbolic expression ID exists.

Definition at line 1136 of file symbolicEngine.cpp.

◆ newSymbolicExpression()

SharedSymbolicExpression triton::engines::symbolic::SymbolicEngine::newSymbolicExpression ( const triton::ast::SharedAbstractNode node,
triton::engines::symbolic::expression_e  type,
const std::string &  comment = "" 
)

Creates a new shared symbolic expression.

Definition at line 366 of file symbolicEngine.cpp.

◆ newSymbolicVariable()

SharedSymbolicVariable triton::engines::symbolic::SymbolicEngine::newSymbolicVariable ( triton::engines::symbolic::variable_e  type,
triton::uint64  source,
triton::uint32  size,
const std::string &  alias = "" 
)

Adds a symbolic variable.

Definition at line 628 of file symbolicEngine.cpp.

◆ operator=()

SymbolicEngine & triton::engines::symbolic::SymbolicEngine::operator= ( const SymbolicEngine other)

Copies a SymbolicEngine.

Definition at line 72 of file symbolicEngine.cpp.

◆ removeSymbolicExpression()

void triton::engines::symbolic::SymbolicEngine::removeSymbolicExpression ( const SharedSymbolicExpression expr)

Removes the symbolic expression corresponding to the id.

Definition at line 402 of file symbolicEngine.cpp.

◆ setConcreteVariableValue()

void triton::engines::symbolic::SymbolicEngine::setConcreteVariableValue ( const SharedSymbolicVariable symVar,
const triton::uint512 value 
)

Sets the concrete value of a symbolic variable.

Definition at line 1233 of file symbolicEngine.cpp.

◆ sliceExpressions()

std::unordered_map< triton::usize, SharedSymbolicExpression > triton::engines::symbolic::SymbolicEngine::sliceExpressions ( const SharedSymbolicExpression expr)

Slices all expressions from a given one.

Definition at line 460 of file symbolicEngine.cpp.

◆ symbolizeExpression()

SharedSymbolicVariable triton::engines::symbolic::SymbolicEngine::symbolizeExpression ( triton::usize  exprId,
triton::uint32  symVarSize,
const std::string &  symVarAlias = "" 
)

Converts a symbolic expression to a symbolic variable. symVarSize must be in bits.

Definition at line 532 of file symbolicEngine.cpp.

◆ symbolizeMemory() [1/2]

SharedSymbolicVariable triton::engines::symbolic::SymbolicEngine::symbolizeMemory ( const triton::arch::MemoryAccess mem,
const std::string &  symVarAlias = "" 
)

Converts a symbolic memory expression to a symbolic variable.

Definition at line 556 of file symbolicEngine.cpp.

◆ symbolizeMemory() [2/2]

void triton::engines::symbolic::SymbolicEngine::symbolizeMemory ( triton::uint64  addr,
triton::usize  size 
)

Converts a symbolic memory area to 8-bits symbolic variables.

Definition at line 548 of file symbolicEngine.cpp.

◆ symbolizeRegister()

SharedSymbolicVariable triton::engines::symbolic::SymbolicEngine::symbolizeRegister ( const triton::arch::Register reg,
const std::string &  symVarAlias = "" 
)

Converts a symbolic register expression to a symbolic variable.

Definition at line 597 of file symbolicEngine.cpp.

Member Data Documentation

◆ alignedMemoryReference

std::map<std::pair<triton::uint64, triton::uint32>, SharedSymbolicExpression> triton::engines::symbolic::SymbolicEngine::alignedMemoryReference
protected

map of <address:size> -> symbolic expression.

item1: <addr:size>
item2: shared symbolic expression

Definition at line 96 of file symbolicEngine.hpp.

◆ memoryReference

std::unordered_map<triton::uint64, SharedSymbolicExpression> triton::engines::symbolic::SymbolicEngine::memoryReference
protected

map of address -> symbolic expression

item1: memory address
item2: shared symbolic expression

Definition at line 104 of file symbolicEngine.hpp.

◆ numberOfRegisters

triton::uint32 triton::engines::symbolic::SymbolicEngine::numberOfRegisters
protected

Number of registers.

Definition at line 66 of file symbolicEngine.hpp.

◆ symbolicExpressions

std::unordered_map<triton::usize, WeakSymbolicExpression> triton::engines::symbolic::SymbolicEngine::symbolicExpressions
mutableprotected

The map of symbolic expressions.

item1: symbolic reference id
item2: symbolic expression

Definition at line 88 of file symbolicEngine.hpp.

◆ symbolicReg

std::vector<SharedSymbolicExpression> triton::engines::symbolic::SymbolicEngine::symbolicReg
protected

Symbolic register state.

Definition at line 107 of file symbolicEngine.hpp.

◆ symbolicVariables

std::unordered_map<triton::usize, WeakSymbolicVariable> triton::engines::symbolic::SymbolicEngine::symbolicVariables
mutableprotected

The map of symbolic variables.

item1: variable id
item2: symbolic variable

Definition at line 80 of file symbolicEngine.hpp.

◆ uniqueSymExprId

triton::usize triton::engines::symbolic::SymbolicEngine::uniqueSymExprId
protected

Symbolic expressions id.

Definition at line 69 of file symbolicEngine.hpp.

◆ uniqueSymVarId

triton::usize triton::engines::symbolic::SymbolicEngine::uniqueSymVarId
protected

Symbolic variables id.

Definition at line 72 of file symbolicEngine.hpp.


The documentation for this class was generated from the following files: