libTriton version 1.0 build 1592
|
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 SymbolicExpression & | operator= (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::SharedAbstractNode & | getAst (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::MemoryAccess & | getOriginMemory (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::Register & | getOriginRegister (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 ®) |
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. | |
The symbolic expression class.
Definition at line 48 of file symbolicExpression.hpp.
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.
triton::engines::symbolic::SymbolicExpression::SymbolicExpression | ( | const SymbolicExpression & | other | ) |
Constructor by copy.
Definition at line 38 of file symbolicExpression.cpp.
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.
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.
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.
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.
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.
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.
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.
triton::usize triton::engines::symbolic::SymbolicExpression::getId | ( | void | ) | const |
Returns the symbolic expression id.
Definition at line 82 of file symbolicExpression.cpp.
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.
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.
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.
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.
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.
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.
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.
SymbolicExpression & triton::engines::symbolic::SymbolicExpression::operator= | ( | const SymbolicExpression & | other | ) |
Operator.
Definition at line 50 of file symbolicExpression.cpp.
void triton::engines::symbolic::SymbolicExpression::setAddress | ( | triton::uint64 | address | ) |
Sets the symbolic expression address.
Definition at line 231 of file symbolicExpression.cpp.
void triton::engines::symbolic::SymbolicExpression::setAst | ( | const triton::ast::SharedAbstractNode & | node | ) |
Sets a root node.
Definition at line 202 of file symbolicExpression.cpp.
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.
void triton::engines::symbolic::SymbolicExpression::setOriginMemory | ( | const triton::arch::MemoryAccess & | mem | ) |
Sets the origin memory acccess.
Definition at line 246 of file symbolicExpression.cpp.
void triton::engines::symbolic::SymbolicExpression::setOriginRegister | ( | const triton::arch::Register & | reg | ) |
Sets the origin register.
Definition at line 251 of file symbolicExpression.cpp.
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.
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.
|
protected |
The address of the instruction behind the symbolic expression. -1 if not defined.
Definition at line 60 of file symbolicExpression.hpp.
|
protected |
The root node (AST) of the symbolic expression.
Definition at line 54 of file symbolicExpression.hpp.
|
protected |
The comment of the symbolic expression.
Definition at line 57 of file symbolicExpression.hpp.
|
protected |
The instruction disassembly where the symbolic expression comes from.
Definition at line 63 of file symbolicExpression.hpp.
|
protected |
The symbolic expression id. This id is unique.
Definition at line 66 of file symbolicExpression.hpp.
bool triton::engines::symbolic::SymbolicExpression::isTainted |
True if the symbolic expression is tainted.
Definition at line 83 of file symbolicExpression.hpp.
|
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.
|
protected |
The origin register if type
is equal to triton::engines::symbolic::REG
, REG_INVALID
otherwise.
Definition at line 72 of file symbolicExpression.hpp.
|
protected |
The type of the symbolic expression assignment.
Definition at line 51 of file symbolicExpression.hpp.