libTriton  version 1.0 build 1532
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. More...
 
TRITON_EXPORT SymbolicExpression (const SymbolicExpression &other)
 Constructor by copy. More...
 
TRITON_EXPORT SymbolicExpressionoperator= (const SymbolicExpression &other)
 Operator. More...
 
TRITON_EXPORT triton::usize getId (void) const
 Returns the symbolic expression id. More...
 
TRITON_EXPORT bool isMemory (void) const
 Returns true if the symbolic expression is assigned to a memory. More...
 
TRITON_EXPORT bool isRegister (void) const
 Returns true if the symbolic expression is assigned to a register. More...
 
TRITON_EXPORT bool isSymbolized (void) const
 Returns true if the expression contains a symbolic variable. More...
 
TRITON_EXPORT triton::engines::symbolic::expression_e getType (void) const
 Returns the type of the symbolic expression assignment. More...
 
TRITON_EXPORT const triton::ast::SharedAbstractNodegetAst (void) const
 Returns the SMT AST root node of the symbolic expression. This is the semantics. More...
 
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. More...
 
TRITON_EXPORT const std::string & getComment (void) const
 Returns the comment of the symbolic expression. More...
 
TRITON_EXPORT std::string getFormattedId (void) const
 Returns the id as string of the symbolic expression according the mode of the AST representation. More...
 
TRITON_EXPORT std::string getFormattedComment (void) const
 Returns the comment as string of the symbolic expression according the mode of the AST representation. More...
 
TRITON_EXPORT std::string getFormattedExpression (void) const
 Returns the symbolic expression representation as string according the mode of the AST representation. More...
 
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. More...
 
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. More...
 
TRITON_EXPORT void setAst (const triton::ast::SharedAbstractNode &node)
 Sets a root node. More...
 
TRITON_EXPORT void setComment (const std::string &comment)
 Sets a comment to the symbolic expression. More...
 
TRITON_EXPORT void setType (triton::engines::symbolic::expression_e type)
 Sets the kind of the symbolic expression. More...
 
TRITON_EXPORT void setOriginMemory (const triton::arch::MemoryAccess &mem)
 Sets the origin memory acccess. More...
 
TRITON_EXPORT void setOriginRegister (const triton::arch::Register &reg)
 Sets the origin register. More...
 
TRITON_EXPORT void writeBackDisassembly (const std::string &disassembly)
 Writes back the instruction disassembly where the symbolic expression comes from. More...
 
TRITON_EXPORT const std::string & getDisassembly (void)
 Gets the instruction disassembly where the symbolic expression comes from. More...
 

Public Attributes

bool isTainted
 True if the symbolic expression is tainted. More...
 

Protected Attributes

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

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 37 of file symbolicExpression.cpp.

Member Function Documentation

◆ 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 60 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 74 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 223 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 99 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 117 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 84 of file symbolicExpression.cpp.

◆ getId()

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

Returns the symbolic expression id.

Definition at line 79 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 67 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 147 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 152 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 142 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 206 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 201 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 211 of file symbolicExpression.cpp.

◆ operator=()

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

Operator.

Definition at line 48 of file symbolicExpression.cpp.

◆ setAst()

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

Sets a root node.

Definition at line 157 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 181 of file symbolicExpression.cpp.

◆ setOriginMemory()

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

Sets the origin memory acccess.

Definition at line 191 of file symbolicExpression.cpp.

◆ setOriginRegister()

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

Sets the origin register.

Definition at line 196 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 186 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 218 of file symbolicExpression.cpp.

Member Data Documentation

◆ 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 60 of file symbolicExpression.hpp.

◆ id

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

The symbolic expression id. This id is unique.

Definition at line 63 of file symbolicExpression.hpp.

◆ isTainted

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

True if the symbolic expression is tainted.

Definition at line 73 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 66 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 69 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: