8#ifndef TRITON_SYMBOLICEXPRESSION_H
9#define TRITON_SYMBOLICEXPRESSION_H
76 TRITON_EXPORT std::string getBitvectorDefine(
void)
const;
79 TRITON_EXPORT std::string getArrayDefine(
void)
const;
101 TRITON_EXPORT
bool isMemory(
void)
const;
119 TRITON_EXPORT
const std::string&
getComment(
void)
const;
This class is used to represent a memory access.
This class is used when an instruction has a register operand.
The symbolic expression class.
TRITON_EXPORT bool isMemory(void) const
Returns true if the symbolic expression is assigned to a memory.
TRITON_EXPORT triton::usize getId(void) const
Returns the symbolic expression id.
TRITON_EXPORT triton::uint64 getAddress(void) const
Get the address of the symbolic expression, if any.
TRITON_EXPORT const std::string & getDisassembly(void)
Gets the instruction disassembly where the symbolic expression comes from.
triton::usize id
The symbolic expression id. This id is unique.
TRITON_EXPORT SymbolicExpression(const triton::ast::SharedAbstractNode &node, triton::usize id, triton::engines::symbolic::expression_e type, const std::string &comment="")
Constructor.
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 void setAddress(triton::uint64 address)
Sets the symbolic expression address.
TRITON_EXPORT void setAst(const triton::ast::SharedAbstractNode &node)
Sets a root node.
TRITON_EXPORT void setType(triton::engines::symbolic::expression_e type)
Sets the kind of the symbolic expression.
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 std::string getFormattedExpression(void) const
Returns the symbolic expression representation as string according the mode of the AST representation...
TRITON_EXPORT const triton::arch::Register & getOriginRegister(void) const
Returns the origin register if kind is equal to triton::engines::symbolic::REGISTER_EXPRESSION,...
TRITON_EXPORT const std::string & getComment(void) const
Returns the comment of the symbolic expression.
bool isTainted
True if the symbolic expression is tainted.
TRITON_EXPORT const triton::arch::MemoryAccess & getOriginMemory(void) const
Returns the origin memory access if kind is equal to triton::engines::symbolic::MEMORY_EXPRESSION,...
TRITON_EXPORT void setComment(const std::string &comment)
Sets a comment to the symbolic expression.
std::string disassembly
The instruction disassembly where the symbolic expression comes from.
TRITON_EXPORT bool isSymbolized(void) const
Returns true if the expression contains a symbolic variable.
triton::arch::Register originRegister
The origin register if type is equal to triton::engines::symbolic::REG, REG_INVALID otherwise.
TRITON_EXPORT void setOriginRegister(const triton::arch::Register ®)
Sets the origin register.
triton::uint64 address
The address of the instruction behind the symbolic expression. -1 if not defined.
TRITON_EXPORT triton::engines::symbolic::expression_e getType(void) const
Returns the type of the symbolic expression assignment.
triton::ast::SharedAbstractNode ast
The root node (AST) of the symbolic expression.
triton::arch::MemoryAccess originMemory
The origin memory address if type is equal to triton::engines::symbolic::MEM, invalid memory otherwis...
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 o...
TRITON_EXPORT bool isRegister(void) const
Returns true if the symbolic expression is assigned to a register.
TRITON_EXPORT void setOriginMemory(const triton::arch::MemoryAccess &mem)
Sets the origin memory acccess.
triton::engines::symbolic::expression_e type
The type of the symbolic expression assignment.
TRITON_EXPORT void writeBackDisassembly(const std::string &disassembly)
Writes back the instruction disassembly where the symbolic expression comes from.
std::string comment
The comment of the symbolic expression.
TRITON_EXPORT SymbolicExpression & operator=(const SymbolicExpression &other)
Operator.
std::shared_ptr< triton::ast::AbstractNode > SharedAbstractNode
Shared Abstract Node.
std::shared_ptr< triton::engines::symbolic::SymbolicExpression > SharedSymbolicExpression
Shared Symbolic Expression.
std::weak_ptr< triton::engines::symbolic::SymbolicExpression > WeakSymbolicExpression
Weak Symbolic Expression.
expression_e
Type of symbolic expressions.
std::ostream & operator<<(std::ostream &stream, const SymbolicExpression &symExpr)
Displays a symbolic expression.
std::size_t usize
unsigned MAX_INT 32 or 64 bits according to the CPU.
std::uint64_t uint64
unisgned 64-bits