libTriton version 1.0 build 1592
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Attributes | List of all members
triton::engines::symbolic::SymbolicExpression Class Reference

The symbolic expression class. More...

#include <symbolicExpression.hpp>

Public Member Functions

TRITON_EXPORT SymbolicExpression (const triton::ast::SharedAbstractNode &node, triton::usize id, triton::engines::symbolic::expression_e type, const std::string &comment="")
 Constructor.
 
TRITON_EXPORT SymbolicExpression (const SymbolicExpression &other)
 Constructor by copy.
 
TRITON_EXPORT SymbolicExpressionoperator= (const SymbolicExpression &other)
 Operator.
 
TRITON_EXPORT triton::usize getId (void) const
 Returns the symbolic expression id.
 
TRITON_EXPORT bool isMemory (void) const
 Returns true if the symbolic expression is assigned to a memory.
 
TRITON_EXPORT bool isRegister (void) const
 Returns true if the symbolic expression is assigned to a register.
 
TRITON_EXPORT bool isSymbolized (void) const
 Returns true if the expression contains a symbolic variable.
 
TRITON_EXPORT triton::engines::symbolic::expression_e getType (void) const
 Returns the type of the symbolic expression assignment.
 
TRITON_EXPORT const triton::ast::SharedAbstractNodegetAst (void) const
 Returns the SMT AST root node of the symbolic expression. This is the semantics.
 
TRITON_EXPORT triton::ast::SharedAbstractNode getNewAst (void) const
 Returns a new SMT AST root node of the symbolic expression. This new instance is a duplicate of the original node and may be changed without changing the original semantics.
 
TRITON_EXPORT const std::string & getComment (void) const
 Returns the comment of the symbolic expression.
 
TRITON_EXPORT std::string getFormattedId (void) const
 Returns the id as string of the symbolic expression according the mode of the AST representation.
 
TRITON_EXPORT std::string getFormattedComment (void) const
 Returns the comment as string of the symbolic expression according the mode of the AST representation.
 
TRITON_EXPORT std::string getFormattedExpression (void) const
 Returns the symbolic expression representation as string according the mode of the AST representation.
 
TRITON_EXPORT const triton::arch::MemoryAccessgetOriginMemory (void) const
 Returns the origin memory access if kind is equal to triton::engines::symbolic::MEMORY_EXPRESSION, invalid memory otherwise.
 
TRITON_EXPORT const triton::arch::RegistergetOriginRegister (void) const
 Returns the origin register if kind is equal to triton::engines::symbolic::REGISTER_EXPRESSION, invalid register otherwise.
 
TRITON_EXPORT void setAst (const triton::ast::SharedAbstractNode &node)
 Sets a root node.
 
TRITON_EXPORT void setComment (const std::string &comment)
 Sets a comment to the symbolic expression.
 
TRITON_EXPORT void setType (triton::engines::symbolic::expression_e type)
 Sets the kind of the symbolic expression.
 
TRITON_EXPORT void setAddress (triton::uint64 address)
 Sets the symbolic expression address.
 
TRITON_EXPORT triton::uint64 getAddress (void) const
 Get the address of the symbolic expression, if any.
 
TRITON_EXPORT void setOriginMemory (const triton::arch::MemoryAccess &mem)
 Sets the origin memory acccess.
 
TRITON_EXPORT void setOriginRegister (const triton::arch::Register &reg)
 Sets the origin register.
 
TRITON_EXPORT void writeBackDisassembly (const std::string &disassembly)
 Writes back the instruction disassembly where the symbolic expression comes from.
 
TRITON_EXPORT const std::string & getDisassembly (void)
 Gets the instruction disassembly where the symbolic expression comes from.
 

Public Attributes

bool isTainted
 True if the symbolic expression is tainted.
 

Protected Attributes

triton::engines::symbolic::expression_e type
 The type of the symbolic expression assignment.
 
triton::ast::SharedAbstractNode ast
 The root node (AST) of the symbolic expression.
 
std::string comment
 The comment of the symbolic expression.
 
triton::uint64 address
 The address of the instruction behind the symbolic expression. -1 if not defined.
 
std::string disassembly
 The instruction disassembly where the symbolic expression comes from.
 
triton::usize id
 The symbolic expression id. This id is unique.
 
triton::arch::MemoryAccess originMemory
 The origin memory address if type is equal to triton::engines::symbolic::MEM, invalid memory otherwise.
 
triton::arch::Register originRegister
 The origin register if type is equal to triton::engines::symbolic::REG, REG_INVALID otherwise.
 

Detailed Description

The symbolic expression class.

Definition at line 48 of file symbolicExpression.hpp.

Constructor & Destructor Documentation

◆ SymbolicExpression() [1/2]

triton::engines::symbolic::SymbolicExpression::SymbolicExpression ( const triton::ast::SharedAbstractNode & node,
triton::usize id,
triton::engines::symbolic::expression_e type,
const std::string & comment = "" )

Constructor.

Definition at line 26 of file symbolicExpression.cpp.

◆ SymbolicExpression() [2/2]

triton::engines::symbolic::SymbolicExpression::SymbolicExpression ( const SymbolicExpression & other)

Constructor by copy.

Definition at line 38 of file symbolicExpression.cpp.

Member Function Documentation

◆ getAddress()

triton::uint64 triton::engines::symbolic::SymbolicExpression::getAddress ( void ) const

Get the address of the symbolic expression, if any.

Definition at line 236 of file symbolicExpression.cpp.

◆ getAst()

const triton::ast::SharedAbstractNode & triton::engines::symbolic::SymbolicExpression::getAst ( void ) const

Returns the SMT AST root node of the symbolic expression. This is the semantics.

Definition at line 63 of file symbolicExpression.cpp.

◆ getComment()

const std::string & triton::engines::symbolic::SymbolicExpression::getComment ( void ) const

Returns the comment of the symbolic expression.

Definition at line 77 of file symbolicExpression.cpp.

◆ getDisassembly()

const std::string & triton::engines::symbolic::SymbolicExpression::getDisassembly ( void )

Gets the instruction disassembly where the symbolic expression comes from.

Definition at line 278 of file symbolicExpression.cpp.

◆ getFormattedComment()

std::string triton::engines::symbolic::SymbolicExpression::getFormattedComment ( void ) const

Returns the comment as string of the symbolic expression according the mode of the AST representation.

Definition at line 118 of file symbolicExpression.cpp.

◆ getFormattedExpression()

std::string triton::engines::symbolic::SymbolicExpression::getFormattedExpression ( void ) const

Returns the symbolic expression representation as string according the mode of the AST representation.

Definition at line 160 of file symbolicExpression.cpp.

◆ getFormattedId()

std::string triton::engines::symbolic::SymbolicExpression::getFormattedId ( void ) const

Returns the id as string of the symbolic expression according the mode of the AST representation.

Definition at line 87 of file symbolicExpression.cpp.

◆ getId()

triton::usize triton::engines::symbolic::SymbolicExpression::getId ( void ) const

Returns the symbolic expression id.

Definition at line 82 of file symbolicExpression.cpp.

◆ getNewAst()

triton::ast::SharedAbstractNode triton::engines::symbolic::SymbolicExpression::getNewAst ( void ) const

Returns a new SMT AST root node of the symbolic expression. This new instance is a duplicate of the original node and may be changed without changing the original semantics.

Definition at line 70 of file symbolicExpression.cpp.

◆ getOriginMemory()

const triton::arch::MemoryAccess & triton::engines::symbolic::SymbolicExpression::getOriginMemory ( void ) const

Returns the origin memory access if kind is equal to triton::engines::symbolic::MEMORY_EXPRESSION, invalid memory otherwise.

Definition at line 192 of file symbolicExpression.cpp.

◆ getOriginRegister()

const triton::arch::Register & triton::engines::symbolic::SymbolicExpression::getOriginRegister ( void ) const

Returns the origin register if kind is equal to triton::engines::symbolic::REGISTER_EXPRESSION, invalid register otherwise.

Definition at line 197 of file symbolicExpression.cpp.

◆ getType()

triton::engines::symbolic::expression_e triton::engines::symbolic::SymbolicExpression::getType ( void ) const

Returns the type of the symbolic expression assignment.

Definition at line 187 of file symbolicExpression.cpp.

◆ isMemory()

bool triton::engines::symbolic::SymbolicExpression::isMemory ( void ) const

Returns true if the symbolic expression is assigned to a memory.

Definition at line 261 of file symbolicExpression.cpp.

◆ isRegister()

bool triton::engines::symbolic::SymbolicExpression::isRegister ( void ) const

Returns true if the symbolic expression is assigned to a register.

Definition at line 256 of file symbolicExpression.cpp.

◆ isSymbolized()

bool triton::engines::symbolic::SymbolicExpression::isSymbolized ( void ) const

Returns true if the expression contains a symbolic variable.

Definition at line 266 of file symbolicExpression.cpp.

◆ operator=()

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

Operator.

Definition at line 50 of file symbolicExpression.cpp.

◆ setAddress()

void triton::engines::symbolic::SymbolicExpression::setAddress ( triton::uint64 address)

Sets the symbolic expression address.

Definition at line 231 of file symbolicExpression.cpp.

◆ setAst()

void triton::engines::symbolic::SymbolicExpression::setAst ( const triton::ast::SharedAbstractNode & node)

Sets a root node.

Definition at line 202 of file symbolicExpression.cpp.

◆ setComment()

void triton::engines::symbolic::SymbolicExpression::setComment ( const std::string & comment)

Sets a comment to the symbolic expression.

Definition at line 226 of file symbolicExpression.cpp.

◆ setOriginMemory()

void triton::engines::symbolic::SymbolicExpression::setOriginMemory ( const triton::arch::MemoryAccess & mem)

Sets the origin memory acccess.

Definition at line 246 of file symbolicExpression.cpp.

◆ setOriginRegister()

void triton::engines::symbolic::SymbolicExpression::setOriginRegister ( const triton::arch::Register & reg)

Sets the origin register.

Definition at line 251 of file symbolicExpression.cpp.

◆ setType()

void triton::engines::symbolic::SymbolicExpression::setType ( triton::engines::symbolic::expression_e type)

Sets the kind of the symbolic expression.

Definition at line 241 of file symbolicExpression.cpp.

◆ writeBackDisassembly()

void triton::engines::symbolic::SymbolicExpression::writeBackDisassembly ( const std::string & disassembly)

Writes back the instruction disassembly where the symbolic expression comes from.

Definition at line 273 of file symbolicExpression.cpp.

Member Data Documentation

◆ address

triton::uint64 triton::engines::symbolic::SymbolicExpression::address
protected

The address of the instruction behind the symbolic expression. -1 if not defined.

Definition at line 60 of file symbolicExpression.hpp.

◆ ast

triton::ast::SharedAbstractNode triton::engines::symbolic::SymbolicExpression::ast
protected

The root node (AST) of the symbolic expression.

Definition at line 54 of file symbolicExpression.hpp.

◆ comment

std::string triton::engines::symbolic::SymbolicExpression::comment
protected

The comment of the symbolic expression.

Definition at line 57 of file symbolicExpression.hpp.

◆ disassembly

std::string triton::engines::symbolic::SymbolicExpression::disassembly
protected

The instruction disassembly where the symbolic expression comes from.

Definition at line 63 of file symbolicExpression.hpp.

◆ id

triton::usize triton::engines::symbolic::SymbolicExpression::id
protected

The symbolic expression id. This id is unique.

Definition at line 66 of file symbolicExpression.hpp.

◆ isTainted

bool triton::engines::symbolic::SymbolicExpression::isTainted

True if the symbolic expression is tainted.

Definition at line 83 of file symbolicExpression.hpp.

◆ originMemory

triton::arch::MemoryAccess triton::engines::symbolic::SymbolicExpression::originMemory
protected

The origin memory address if type is equal to triton::engines::symbolic::MEM, invalid memory otherwise.

Definition at line 69 of file symbolicExpression.hpp.

◆ originRegister

triton::arch::Register triton::engines::symbolic::SymbolicExpression::originRegister
protected

The origin register if type is equal to triton::engines::symbolic::REG, REG_INVALID otherwise.

Definition at line 72 of file symbolicExpression.hpp.

◆ type

triton::engines::symbolic::expression_e triton::engines::symbolic::SymbolicExpression::type
protected

The type of the symbolic expression assignment.

Definition at line 51 of file symbolicExpression.hpp.


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