libTriton version 1.0 build 1592
Loading...
Searching...
No Matches
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.
 
TRITON_EXPORT SymbolicEngine (const SymbolicEngine &other)
 Constructor by copy.
 
TRITON_EXPORT ~SymbolicEngine ()
 Destructor.
 
TRITON_EXPORT SymbolicEngineoperator= (const SymbolicEngine &other)
 Copies a SymbolicEngine.
 
TRITON_EXPORT SharedSymbolicExpression newSymbolicExpression (const triton::ast::SharedAbstractNode &node, triton::engines::symbolic::expression_e type, const std::string &comment="")
 Creates a new symbolic expression.
 
TRITON_EXPORT void removeSymbolicExpression (const SharedSymbolicExpression &expr)
 Removes the symbolic expression corresponding to the id.
 
TRITON_EXPORT SharedSymbolicVariable newSymbolicVariable (triton::engines::symbolic::variable_e type, triton::uint64 source, triton::uint32 size, const std::string &alias="")
 Adds a symbolic variable.
 
TRITON_EXPORT SharedSymbolicVariable getSymbolicVariable (triton::usize symVarId) const
 Returns the symbolic variable corresponding to the symbolic variable id.
 
TRITON_EXPORT SharedSymbolicVariable getSymbolicVariable (const std::string &name) const
 Returns the symbolic variable corresponding to the symbolic variable name.
 
TRITON_EXPORT SharedSymbolicExpression getSymbolicExpression (triton::usize symExprId) const
 Returns the symbolic expression corresponding to an id.
 
TRITON_EXPORT SharedSymbolicExpression getSymbolicMemory (triton::uint64 addr) const
 Returns the symbolic expression assigned to the memory address.
 
TRITON_EXPORT const std::unordered_map< triton::uint64, SharedSymbolicExpression > & getSymbolicMemory (void) const
 Returns the map (addr:expr) of all symbolic memory assigned.
 
TRITON_EXPORT const SharedSymbolicExpressiongetSymbolicRegister (const triton::arch::Register &reg) const
 Returns the symbolic expression assigned to the register.
 
TRITON_EXPORT std::unordered_map< triton::arch::register_e, SharedSymbolicExpressiongetSymbolicRegisters (void) const
 Returns the map of symbolic registers defined.
 
TRITON_EXPORT triton::uint8 getSymbolicMemoryValue (triton::uint64 address)
 Returns the symbolic memory value.
 
TRITON_EXPORT triton::uint512 getSymbolicMemoryValue (const triton::arch::MemoryAccess &mem)
 Returns the symbolic memory value.
 
TRITON_EXPORT std::vector< triton::uint8getSymbolicMemoryAreaValue (triton::uint64 baseAddr, triton::usize size)
 Returns the symbolic values of a memory area.
 
TRITON_EXPORT triton::uint512 getSymbolicRegisterValue (const triton::arch::Register &reg)
 Returns the symbolic register value.
 
TRITON_EXPORT triton::ast::SharedAbstractNode getOperandAst (const triton::arch::OperandWrapper &op)
 Returns the AST corresponding to the operand.
 
TRITON_EXPORT triton::ast::SharedAbstractNode getOperandAst (triton::arch::Instruction &inst, const triton::arch::OperandWrapper &op)
 Returns the AST corresponding to the operand.
 
TRITON_EXPORT triton::ast::SharedAbstractNode getImmediateAst (const triton::arch::Immediate &imm)
 Returns the AST corresponding to the immediate.
 
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.
 
TRITON_EXPORT triton::ast::SharedAbstractNode getMemoryAst (const triton::arch::MemoryAccess &mem)
 Returns the AST corresponding to the memory.
 
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.
 
TRITON_EXPORT triton::ast::SharedAbstractNode getRegisterAst (const triton::arch::Register &reg)
 Returns the AST corresponding to the register.
 
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.
 
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.
 
triton::ast::SharedAbstractNode getIndexAst (const triton::arch::arm::ArmOperandProperties &vas_index, const triton::ast::SharedAbstractNode &node)
 Returns the AST corresponding to the VAS vector index operation. Mainly used for Arm Neon vector operands.
 
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 symbolic expression and links this expression to the instruction.
 
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 symbolic memory expression expression and links this expression to the instruction.
 
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 symbolic register expression expression and links this expression to the instruction.
 
TRITON_EXPORT const SharedSymbolicExpressioncreateSymbolicVolatileExpression (triton::arch::Instruction &inst, const triton::ast::SharedAbstractNode &node, const std::string &comment="")
 Returns the new symbolic volatile expression expression and links this expression to the instruction.
 
TRITON_EXPORT void assignSymbolicExpressionToRegister (const SharedSymbolicExpression &se, const triton::arch::Register &reg)
 Assigns a symbolic expression to a register.
 
TRITON_EXPORT void assignSymbolicExpressionToMemory (const SharedSymbolicExpression &se, const triton::arch::MemoryAccess &mem)
 Assigns a symbolic expression to a memory.
 
TRITON_EXPORT std::unordered_map< triton::usize, SharedSymbolicExpressionsliceExpressions (const SharedSymbolicExpression &expr)
 Slices all expressions from a given one.
 
TRITON_EXPORT std::vector< SharedSymbolicExpressiongetTaintedSymbolicExpressions (void) const
 Returns the vector of the tainted symbolic expressions.
 
TRITON_EXPORT std::unordered_map< triton::usize, SharedSymbolicExpressiongetSymbolicExpressions (void) const
 Returns all symbolic expressions.
 
TRITON_EXPORT std::map< triton::usize, SharedSymbolicVariablegetSymbolicVariables (void) const
 Returns all symbolic variables.
 
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.
 
TRITON_EXPORT SharedSymbolicVariable symbolizeMemory (const triton::arch::MemoryAccess &mem, const std::string &symVarAlias="")
 Converts a symbolic memory expression to a symbolic variable.
 
TRITON_EXPORT void symbolizeMemory (triton::uint64 addr, triton::usize size)
 Converts a symbolic memory area to 8-bits symbolic variables.
 
TRITON_EXPORT SharedSymbolicVariable symbolizeRegister (const triton::arch::Register &reg, const std::string &symVarAlias="")
 Converts a symbolic register expression to a symbolic variable.
 
TRITON_EXPORT void concretizeAllMemory (void)
 Concretizes all the symbolic memory.
 
TRITON_EXPORT void concretizeAllRegister (void)
 Concretizes all symbolic registers.
 
TRITON_EXPORT void concretizeMemory (const triton::arch::MemoryAccess &mem, bool array=true)
 Concretizes specific symbolic memory cells.
 
TRITON_EXPORT void concretizeMemory (triton::uint64 addr, bool array=true)
 Concretizes a specific symbolic memory cell.
 
TRITON_EXPORT void concretizeRegister (const triton::arch::Register &reg)
 Concretizes a specific symbolic register.
 
TRITON_EXPORT bool isSymbolicExpressionExists (triton::usize symExprId) const
 Returns true if the symbolic expression ID exists.
 
TRITON_EXPORT bool isMemorySymbolized (const triton::arch::MemoryAccess &mem) const
 Returns true if memory cell expressions contain symbolic variables.
 
TRITON_EXPORT bool isMemorySymbolized (triton::uint64 addr, triton::uint32 size=1) const
 Returns true if memory cell expressions contain symbolic variables.
 
TRITON_EXPORT bool isRegisterSymbolized (const triton::arch::Register &reg) const
 Returns true if the register expression contains a symbolic variable.
 
TRITON_EXPORT void initLeaAst (triton::arch::MemoryAccess &mem, bool force=true)
 Initializes the effective address of a memory access.
 
TRITON_EXPORT triton::uint512 getConcreteVariableValue (const SharedSymbolicVariable &symVar) const
 Gets the concrete value of a symbolic variable.
 
TRITON_EXPORT void setConcreteVariableValue (const SharedSymbolicVariable &symVar, const triton::uint512 &value)
 Sets the concrete value of a symbolic variable.
 
- Public Member Functions inherited from triton::engines::symbolic::SymbolicSimplification
TRITON_EXPORT SymbolicSimplification (triton::arch::Architecture *architecture, triton::callbacks::Callbacks *callbacks=nullptr)
 Constructor.
 
TRITON_EXPORT SymbolicSimplification (const SymbolicSimplification &other)
 Constructor.
 
TRITON_EXPORT triton::ast::SharedAbstractNode simplify (const triton::ast::SharedAbstractNode &node) const
 Processes all recorded simplifications. Returns the simplified node.
 
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.
 
TRITON_EXPORT SymbolicSimplificationoperator= (const SymbolicSimplification &other)
 Copies a SymbolicSimplification.
 
- Public Member Functions inherited from triton::engines::symbolic::PathManager
TRITON_EXPORT PathManager (const triton::modes::SharedModes &modes, const triton::ast::SharedAstContext &astCtxt)
 Constructor.
 
TRITON_EXPORT PathManager (const PathManager &other)
 Constructor by copy.
 
TRITON_EXPORT PathManageroperator= (const PathManager &other)
 Copies a PathManager.
 
TRITON_EXPORT triton::usize getSizeOfPathConstraints (void) const
 Returns the size of the path constraints.
 
TRITON_EXPORT const std::vector< triton::engines::symbolic::PathConstraint > & getPathConstraints (void) const
 Returns the logical conjunction vector of path constraints.
 
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.
 
TRITON_EXPORT std::vector< triton::engines::symbolic::PathConstraintgetPathConstraintsOfThread (triton::uint32 threadId) const
 Returns the logical conjunction vector of path constraint of a given thread.
 
TRITON_EXPORT triton::ast::SharedAbstractNode getPathPredicate (void) const
 Returns the current path predicate as an AST of logical conjunction of each taken branch.
 
TRITON_EXPORT std::vector< triton::ast::SharedAbstractNodegetPredicatesToReachAddress (triton::uint64 addr) const
 Returns path predicates which may reach the targeted address.
 
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.
 
TRITON_EXPORT void pushPathConstraint (const triton::ast::SharedAbstractNode &node, const std::string &comment="")
 Pushes constraint created from node to the current path predicate.
 
TRITON_EXPORT void pushPathConstraint (const triton::engines::symbolic::PathConstraint &pco)
 Pushes constraint to the current path predicate.
 
TRITON_EXPORT void popPathConstraint (void)
 Pops the last constraints added to the path predicate.
 
TRITON_EXPORT void clearPathConstraints (void)
 Clears the current path predicate.
 

Protected Attributes

triton::uint32 numberOfRegisters
 Number of registers.
 
triton::usize uniqueSymExprId
 Symbolic expressions id.
 
triton::usize uniqueSymVarId
 Symbolic variables id.
 
std::unordered_map< triton::usize, WeakSymbolicVariablesymbolicVariables
 The map of symbolic variables <id : SymbolicVariable>
 
std::unordered_map< triton::usize, WeakSymbolicExpressionsymbolicExpressions
 The map of symbolic expressions <id : SymbolicExpression>
 
std::map< std::pair< triton::uint64, triton::uint32 >, SharedSymbolicExpressionalignedBitvectorMemory
 The map of aligned symbolic expressions (used for symbolic optimizations) <<addr : size> : SharedSymbolicExpression>
 
std::vector< SharedSymbolicExpressionsymbolicReg
 The list of all symbolic registers.
 
std::unordered_map< triton::uint64, SharedSymbolicExpressionmemoryBitvector
 A bitvector memory model represented by a map of <address:SymbolicExpression>
 
SharedSymbolicExpression memoryArray
 An array memory model.
 
- Protected Attributes inherited from triton::engines::symbolic::PathManager
std::vector< triton::engines::symbolic::PathConstraintpathConstraints
 The logical conjunction vector of path constraints.
 

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 47 of file symbolicEngine.cpp.

◆ ~SymbolicEngine()

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

Destructor.

Definition at line 67 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 1170 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 1143 of file symbolicEngine.cpp.

◆ concretizeAllMemory()

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

Concretizes all the symbolic memory.

Definition at line 154 of file symbolicEngine.cpp.

◆ concretizeAllRegister()

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

Concretizes all symbolic registers.

Definition at line 111 of file symbolicEngine.cpp.

◆ concretizeMemory() [1/2]

void triton::engines::symbolic::SymbolicEngine::concretizeMemory ( const triton::arch::MemoryAccess & mem,
bool array = true )

Concretizes specific symbolic memory cells.

Definition at line 123 of file symbolicEngine.cpp.

◆ concretizeMemory() [2/2]

void triton::engines::symbolic::SymbolicEngine::concretizeMemory ( triton::uint64 addr,
bool array = true )

Concretizes a specific symbolic memory cell.

Definition at line 138 of file symbolicEngine.cpp.

◆ concretizeRegister()

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

Concretizes a specific symbolic register.

Definition at line 101 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 symbolic expression and links this expression to the instruction.

Definition at line 968 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 symbolic memory expression expression and links this expression to the instruction.

Definition at line 979 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 symbolic register expression expression and links this expression to the instruction.

Definition at line 1116 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 symbolic volatile expression expression and links this expression to the instruction.

Definition at line 1129 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 1311 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 838 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 851 of file symbolicEngine.cpp.

◆ getIndexAst()

triton::ast::SharedAbstractNode triton::engines::symbolic::SymbolicEngine::getIndexAst ( const triton::arch::arm::ArmOperandProperties & vas_index,
const triton::ast::SharedAbstractNode & node )

Returns the AST corresponding to the VAS vector index operation. Mainly used for Arm Neon vector operands.

Definition at line 793 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 859 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 914 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 677 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 689 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 928 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 960 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 700 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 450 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 466 of file symbolicEngine.cpp.

◆ getSymbolicMemory() [1/2]

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

Returns the symbolic expression assigned to the memory address.

Definition at line 226 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 assigned.

Definition at line 547 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 348 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 341 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 334 of file symbolicEngine.cpp.

◆ getSymbolicRegister()

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

Returns the symbolic expression assigned to the register.

Definition at line 322 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 533 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 361 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 251 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 236 of file symbolicEngine.cpp.

◆ getSymbolicVariables()

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

Returns all symbolic variables.

Definition at line 271 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 510 of file symbolicEngine.cpp.

◆ initLeaAst()

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

Initializes the effective address of a memory access.

Definition at line 1262 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 1231 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 1240 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 1252 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 1219 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 symbolic expression.

Definition at line 393 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 663 of file symbolicEngine.cpp.

◆ operator=()

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

Copies a SymbolicEngine.

Definition at line 75 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 429 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 1316 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 487 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 559 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 583 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 575 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 632 of file symbolicEngine.cpp.

Member Data Documentation

◆ alignedBitvectorMemory

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

The map of aligned symbolic expressions (used for symbolic optimizations) <<addr : size> : SharedSymbolicExpression>

Definition at line 81 of file symbolicEngine.hpp.

◆ memoryArray

SharedSymbolicExpression triton::engines::symbolic::SymbolicEngine::memoryArray
protected

An array memory model.

Definition at line 90 of file symbolicEngine.hpp.

◆ memoryBitvector

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

A bitvector memory model represented by a map of <address:SymbolicExpression>

Definition at line 87 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 <id : SymbolicExpression>

Definition at line 78 of file symbolicEngine.hpp.

◆ symbolicReg

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

The list of all symbolic registers.

Definition at line 84 of file symbolicEngine.hpp.

◆ symbolicVariables

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

The map of symbolic variables <id : SymbolicVariable>

Definition at line 75 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: