Abstract node.
More...
#include <ast.hpp>
Inherits std::enable_shared_from_this< AbstractNode >.
Inherited by triton::ast::ArrayNode, triton::ast::AssertNode, triton::ast::BswapNode, triton::ast::BvNode, triton::ast::BvaddNode, triton::ast::BvandNode, triton::ast::BvashrNode, triton::ast::BvlshrNode, triton::ast::BvmulNode, triton::ast::BvnandNode, triton::ast::BvnegNode, triton::ast::BvnorNode, triton::ast::BvnotNode, triton::ast::BvorNode, triton::ast::BvrolNode, triton::ast::BvrorNode, triton::ast::BvsdivNode, triton::ast::BvsgeNode, triton::ast::BvsgtNode, triton::ast::BvshlNode, triton::ast::BvsleNode, triton::ast::BvsltNode, triton::ast::BvsmodNode, triton::ast::BvsremNode, triton::ast::BvsubNode, triton::ast::BvudivNode, triton::ast::BvugeNode, triton::ast::BvugtNode, triton::ast::BvuleNode, triton::ast::BvultNode, triton::ast::BvuremNode, triton::ast::BvxnorNode, triton::ast::BvxorNode, triton::ast::CompoundNode, triton::ast::ConcatNode, triton::ast::DeclareNode, triton::ast::DistinctNode, triton::ast::EqualNode, triton::ast::ExtractNode, triton::ast::ForallNode, triton::ast::IffNode, triton::ast::IntegerNode, triton::ast::IteNode, triton::ast::LandNode, triton::ast::LetNode, triton::ast::LnotNode, triton::ast::LorNode, triton::ast::LxorNode, triton::ast::ReferenceNode, triton::ast::SelectNode, triton::ast::StoreNode, triton::ast::StringNode, triton::ast::SxNode, triton::ast::VariableNode, and triton::ast::ZxNode.
Abstract node.
Definition at line 68 of file ast.hpp.
◆ AbstractNode()
Constructor.
Definition at line 31 of file ast.cpp.
◆ ~AbstractNode()
triton::ast::AbstractNode::~AbstractNode |
( |
| ) |
|
|
virtual |
Destructor.
Definition at line 44 of file ast.cpp.
◆ addChild()
Adds a child.
Definition at line 245 of file ast.cpp.
◆ canReplaceNodeWithoutUpdate()
bool triton::ast::AbstractNode::canReplaceNodeWithoutUpdate |
( |
const SharedAbstractNode & | other | ) |
const |
Returns true if the node's value, value type and properties match those of the second one.
Definition at line 145 of file ast.cpp.
◆ equalTo()
Returns true if the current tree is equal to the second one.
Definition at line 151 of file ast.cpp.
◆ evaluate()
Evaluates the tree.
Definition at line 159 of file ast.cpp.
◆ getBitvectorMask()
Returns the vector mask according the size of the node.
Definition at line 65 of file ast.cpp.
◆ getBitvectorSize()
triton::uint32 triton::ast::AbstractNode::getBitvectorSize |
( |
void | | ) |
const |
Returns the size of the node.
Definition at line 60 of file ast.cpp.
◆ getChildren()
Returns the children of the node.
Definition at line 182 of file ast.cpp.
◆ getContext()
Access to its context.
Definition at line 50 of file ast.cpp.
◆ getHash()
Returns the hash of the tree.
Definition at line 164 of file ast.cpp.
◆ getLevel()
Returns the deep level of the tree.
Definition at line 169 of file ast.cpp.
◆ getParents()
Returns the parents of node or an empty set if there is still no parent defined.
Definition at line 187 of file ast.cpp.
◆ getType()
Returns the type of the node.
Definition at line 55 of file ast.cpp.
◆ hasSameConcreteValueAndTypeAs()
bool triton::ast::AbstractNode::hasSameConcreteValueAndTypeAs |
( |
const SharedAbstractNode & | other | ) |
const |
Returns true if the node's concrete value and value type match those of the second one.
Definition at line 138 of file ast.cpp.
◆ init()
virtual TRITON_EXPORT void triton::ast::AbstractNode::init |
( |
bool | withParents = false | ) |
|
|
pure virtual |
Init properties of the node. If withParents is true, init also properties of parents.
Implemented in triton::ast::ArrayNode, triton::ast::AssertNode, triton::ast::BswapNode, triton::ast::BvaddNode, triton::ast::BvandNode, triton::ast::BvashrNode, triton::ast::BvlshrNode, triton::ast::BvmulNode, triton::ast::BvnandNode, triton::ast::BvnegNode, triton::ast::BvnorNode, triton::ast::BvnotNode, triton::ast::BvorNode, triton::ast::BvrolNode, triton::ast::BvrorNode, triton::ast::BvsdivNode, triton::ast::BvsgeNode, triton::ast::BvsgtNode, triton::ast::BvshlNode, triton::ast::BvsleNode, triton::ast::BvsltNode, triton::ast::BvsmodNode, triton::ast::BvsremNode, triton::ast::BvsubNode, triton::ast::BvudivNode, triton::ast::BvugeNode, triton::ast::BvugtNode, triton::ast::BvuleNode, triton::ast::BvultNode, triton::ast::BvuremNode, triton::ast::BvxnorNode, triton::ast::BvxorNode, triton::ast::BvNode, triton::ast::CompoundNode, triton::ast::ConcatNode, triton::ast::DeclareNode, triton::ast::DistinctNode, triton::ast::EqualNode, triton::ast::ExtractNode, triton::ast::ForallNode, triton::ast::IffNode, triton::ast::IntegerNode, triton::ast::IteNode, triton::ast::LandNode, triton::ast::LetNode, triton::ast::LnotNode, triton::ast::LorNode, triton::ast::LxorNode, triton::ast::ReferenceNode, triton::ast::SelectNode, triton::ast::StoreNode, triton::ast::StringNode, triton::ast::SxNode, triton::ast::VariableNode, and triton::ast::ZxNode.
◆ initParents()
void triton::ast::AbstractNode::initParents |
( |
void | | ) |
|
Initializes parents.
Definition at line 174 of file ast.cpp.
◆ isArray()
bool triton::ast::AbstractNode::isArray |
( |
void | | ) |
const |
Returns true if it's an array node.
Definition at line 116 of file ast.cpp.
◆ isLogical()
bool triton::ast::AbstractNode::isLogical |
( |
void | | ) |
const |
Returns true if it's a logical node.
Definition at line 84 of file ast.cpp.
◆ isSigned()
bool triton::ast::AbstractNode::isSigned |
( |
void | | ) |
const |
According to the size of the expression, returns true if the MSB is 1.
Definition at line 72 of file ast.cpp.
◆ isSymbolized()
bool triton::ast::AbstractNode::isSymbolized |
( |
void | | ) |
const |
Returns true if the tree contains a symbolic variable.
Definition at line 79 of file ast.cpp.
◆ removeParent()
void triton::ast::AbstractNode::removeParent |
( |
AbstractNode * | p | ) |
|
Removes a parent node.
Definition at line 226 of file ast.cpp.
◆ setBitvectorSize()
void triton::ast::AbstractNode::setBitvectorSize |
( |
triton::uint32 | size | ) |
|
Sets the size of the node.
Definition at line 273 of file ast.cpp.
◆ setChild()
Sets a child at an index.
Definition at line 250 of file ast.cpp.
◆ setParent() [1/2]
void triton::ast::AbstractNode::setParent |
( |
AbstractNode * | p | ) |
|
Sets a parent node.
Definition at line 205 of file ast.cpp.
◆ setParent() [2/2]
void triton::ast::AbstractNode::setParent |
( |
std::unordered_set< AbstractNode * > & | p | ) |
|
Sets the parent nodes.
Definition at line 238 of file ast.cpp.
◆ str()
std::string triton::ast::AbstractNode::str |
( |
void | | ) |
const |
Returns the string representation of the node.
Definition at line 278 of file ast.cpp.
◆ array
bool triton::ast::AbstractNode::array |
|
protected |
True if it's an array node.
Definition at line 103 of file ast.hpp.
◆ children
The children of the node.
Definition at line 81 of file ast.hpp.
◆ ctxt
Contect use to create this node.
Definition at line 106 of file ast.hpp.
◆ eval
The value of the tree from this root node.
Definition at line 91 of file ast.hpp.
◆ hash
The hash of the tree.
Definition at line 94 of file ast.hpp.
◆ level
Deep level for computing hash.
Definition at line 75 of file ast.hpp.
◆ logical
bool triton::ast::AbstractNode::logical |
|
protected |
True if it's a logical node.
Definition at line 100 of file ast.hpp.
◆ parents
◆ size
The size of the node.
Definition at line 88 of file ast.hpp.
◆ symbolized
bool triton::ast::AbstractNode::symbolized |
|
protected |
True if the tree contains a symbolic variable.
Definition at line 97 of file ast.hpp.
◆ type
The type of the node.
Definition at line 78 of file ast.hpp.
The documentation for this class was generated from the following files:
- /Users/jonathan/Works/Tools/Triton/src/libtriton/includes/triton/ast.hpp
- /Users/jonathan/Works/Tools/Triton/src/libtriton/ast/ast.cpp