libTriton  version 0.9 build 1502
astContext.hpp
Go to the documentation of this file.
1 /*
3 ** Copyright (C) - Triton
4 **
5 ** This program is under the terms of the Apache License 2.0.
6 */
7 
8 #ifndef TRITON_AST_CONTEXT_H
9 #define TRITON_AST_CONTEXT_H
10 
11 #include <deque>
12 #include <list>
13 #include <memory>
14 #include <unordered_map>
15 #include <vector>
16 
17 #include <triton/ast.hpp>
19 #include <triton/dllexport.hpp>
20 #include <triton/exceptions.hpp>
21 #include <triton/modes.hpp>
22 
23 
24 
26 namespace triton {
32  /* Forward declarations */
33  namespace engines {
34  namespace symbolic {
35  class SymbolicExpression;
36  using SharedSymbolicExpression = std::shared_ptr<triton::engines::symbolic::SymbolicExpression>;
37 
38  class SymbolicVariable;
39  using SharedSymbolicVariable = std::shared_ptr<triton::engines::symbolic::SymbolicVariable>;
40  };
41  };
42 
44  namespace ast {
52 
53  class AstContext : public std::enable_shared_from_this<AstContext> {
54  private:
57 
60 
62  std::unordered_map<std::string, std::pair<triton::ast::WeakAbstractNode, triton::uint512>> valueMapping;
63 
65  std::deque<SharedAbstractNode> nodes;
66 
68  SharedAbstractNode simplify_concat(std::vector<SharedAbstractNode> exprs);
69 
71  SharedAbstractNode simplify_extract(triton::uint32 high, triton::uint32 low, const SharedAbstractNode& expr);
72 
73  public:
75  TRITON_EXPORT AstContext(const triton::modes::SharedModes& modes);
76 
78  TRITON_EXPORT ~AstContext();
79 
81  TRITON_EXPORT AstContext& operator=(const AstContext& other);
82 
84  TRITON_EXPORT SharedAbstractNode collect(const SharedAbstractNode& node);
85 
87  TRITON_EXPORT void garbage(void);
88 
90  TRITON_EXPORT SharedAbstractNode assert_(const SharedAbstractNode& expr);
91 
93  TRITON_EXPORT SharedAbstractNode bv(const triton::uint512& value, triton::uint32 size);
94 
96  TRITON_EXPORT SharedAbstractNode bvadd(const SharedAbstractNode& expr1, const SharedAbstractNode& expr2);
97 
99  TRITON_EXPORT SharedAbstractNode bvand(const SharedAbstractNode& expr1, const SharedAbstractNode& expr2);
100 
102  TRITON_EXPORT SharedAbstractNode bvashr(const SharedAbstractNode& expr1, const SharedAbstractNode& expr2);
103 
105  TRITON_EXPORT SharedAbstractNode bvfalse(void);
106 
108  TRITON_EXPORT SharedAbstractNode bvlshr(const SharedAbstractNode& expr1, const SharedAbstractNode& expr2);
109 
111  TRITON_EXPORT SharedAbstractNode bvmul(const SharedAbstractNode& expr1, const SharedAbstractNode& expr2);
112 
114  TRITON_EXPORT SharedAbstractNode bvnand(const SharedAbstractNode& expr1, const SharedAbstractNode& expr2);
115 
117  TRITON_EXPORT SharedAbstractNode bvneg(const SharedAbstractNode& expr);
118 
120  TRITON_EXPORT SharedAbstractNode bvnor(const SharedAbstractNode& expr1, const SharedAbstractNode& expr2);
121 
123  TRITON_EXPORT SharedAbstractNode bvnot(const SharedAbstractNode& expr);
124 
126  TRITON_EXPORT SharedAbstractNode bvor(const SharedAbstractNode& expr1, const SharedAbstractNode& expr2);
127 
129  TRITON_EXPORT SharedAbstractNode bvrol(const SharedAbstractNode& expr, triton::uint32 rot);
130 
132  TRITON_EXPORT SharedAbstractNode bvrol(const SharedAbstractNode& expr, const SharedAbstractNode& rot);
133 
135  TRITON_EXPORT SharedAbstractNode bvror(const SharedAbstractNode& expr, triton::uint32 rot);
136 
138  TRITON_EXPORT SharedAbstractNode bvror(const SharedAbstractNode& expr, const SharedAbstractNode& rot);
139 
141  TRITON_EXPORT SharedAbstractNode bvsdiv(const SharedAbstractNode& expr1, const SharedAbstractNode& expr2);
142 
144  TRITON_EXPORT SharedAbstractNode bvsge(const SharedAbstractNode& expr1, const SharedAbstractNode& expr2);
145 
147  TRITON_EXPORT SharedAbstractNode bvsgt(const SharedAbstractNode& expr1, const SharedAbstractNode& expr2);
148 
150  TRITON_EXPORT SharedAbstractNode bvshl(const SharedAbstractNode& expr1, const SharedAbstractNode& expr2);
151 
153  TRITON_EXPORT SharedAbstractNode bvsle(const SharedAbstractNode& expr1, const SharedAbstractNode& expr2);
154 
156  TRITON_EXPORT SharedAbstractNode bvslt(const SharedAbstractNode& expr1, const SharedAbstractNode& expr2);
157 
159  TRITON_EXPORT SharedAbstractNode bvsmod(const SharedAbstractNode& expr1, const SharedAbstractNode& expr2);
160 
162  TRITON_EXPORT SharedAbstractNode bvsrem(const SharedAbstractNode& expr1, const SharedAbstractNode& expr2);
163 
165  TRITON_EXPORT SharedAbstractNode bvsub(const SharedAbstractNode& expr1, const SharedAbstractNode& expr2);
166 
168  TRITON_EXPORT SharedAbstractNode bvtrue(void);
169 
171  TRITON_EXPORT SharedAbstractNode bvudiv(const SharedAbstractNode& expr1, const SharedAbstractNode& expr2);
172 
174  TRITON_EXPORT SharedAbstractNode bvuge(const SharedAbstractNode& expr1, const SharedAbstractNode& expr2);
175 
177  TRITON_EXPORT SharedAbstractNode bvugt(const SharedAbstractNode& expr1, const SharedAbstractNode& expr2);
178 
180  TRITON_EXPORT SharedAbstractNode bvule(const SharedAbstractNode& expr1, const SharedAbstractNode& expr2);
181 
183  TRITON_EXPORT SharedAbstractNode bvult(const SharedAbstractNode& expr1, const SharedAbstractNode& expr2);
184 
186  TRITON_EXPORT SharedAbstractNode bvurem(const SharedAbstractNode& expr1, const SharedAbstractNode& expr2);
187 
189  TRITON_EXPORT SharedAbstractNode bvxnor(const SharedAbstractNode& expr1, const SharedAbstractNode& expr2);
190 
192  TRITON_EXPORT SharedAbstractNode bvxor(const SharedAbstractNode& expr1, const SharedAbstractNode& expr2);
193 
195  template <typename T> SharedAbstractNode compound(const T& exprs) {
196  SharedAbstractNode node = std::make_shared<CompoundNode>(exprs, this->shared_from_this());
197  if (node == nullptr)
198  throw triton::exceptions::Ast("Node builders - Not enough memory");
199  node->init();
200  return this->collect(node);
201  }
202 
204  TRITON_EXPORT SharedAbstractNode concat(const SharedAbstractNode& expr1, const SharedAbstractNode& expr2);
205 
207  template <typename T> SharedAbstractNode concat(const T& exprs) {
208  SharedAbstractNode node = std::make_shared<ConcatNode>(exprs, this->shared_from_this());
209  if (node == nullptr)
210  throw triton::exceptions::Ast("Node builders - Not enough memory");
211  node->init();
212 
213  if (this->modes->isModeEnabled(triton::modes::CONSTANT_FOLDING)) {
214  if (node->isSymbolized() == false) {
215  return this->bv(node->evaluate(), node->getBitvectorSize());
216  }
217  }
218 
219  if (this->modes->isModeEnabled(triton::modes::AST_OPTIMIZATIONS)) {
220  /* Optimization: concatenate extractions in one if possible */
221  auto n = this->simplify_concat(std::vector<SharedAbstractNode>(exprs.begin(), exprs.end()));
222  if (n) {
223  return n;
224  }
225  }
226 
227  return this->collect(node);
228  }
229 
231  TRITON_EXPORT SharedAbstractNode declare(const SharedAbstractNode& var);
232 
234  TRITON_EXPORT SharedAbstractNode distinct(const SharedAbstractNode& expr1, const SharedAbstractNode& expr2);
235 
237  TRITON_EXPORT SharedAbstractNode equal(const SharedAbstractNode& expr1, const SharedAbstractNode& expr2);
238 
240  TRITON_EXPORT SharedAbstractNode extract(triton::uint32 high, triton::uint32 low, const SharedAbstractNode& expr);
241 
243  template <typename T> SharedAbstractNode forall(const T& vars, const SharedAbstractNode& body) {
244  SharedAbstractNode node = std::make_shared<ForallNode>(vars, body);
245  if (node == nullptr)
246  throw triton::exceptions::Ast("Node builders - Not enough memory");
247  node->init();
248  return this->collect(node);
249  }
250 
252  TRITON_EXPORT SharedAbstractNode iff(const SharedAbstractNode& expr1, const SharedAbstractNode& expr2);
253 
255  TRITON_EXPORT SharedAbstractNode integer(const triton::uint512& value);
256 
258  TRITON_EXPORT SharedAbstractNode ite(const SharedAbstractNode& ifExpr, const SharedAbstractNode& thenExpr, const SharedAbstractNode& elseExpr);
259 
261  TRITON_EXPORT SharedAbstractNode land(const SharedAbstractNode& expr1, const SharedAbstractNode& expr2);
262 
264  template <typename T> SharedAbstractNode land(const T& exprs) {
265  SharedAbstractNode node = std::make_shared<LandNode>(exprs, this->shared_from_this());
266  if (node == nullptr)
267  throw triton::exceptions::Ast("Node builders - Not enough memory");
268  node->init();
269  return this->collect(node);
270  }
271 
273  TRITON_EXPORT SharedAbstractNode let(std::string alias, const SharedAbstractNode& expr2, const SharedAbstractNode& expr3);
274 
276  TRITON_EXPORT SharedAbstractNode lnot(const SharedAbstractNode& expr);
277 
279  TRITON_EXPORT SharedAbstractNode lor(const SharedAbstractNode& expr1, const SharedAbstractNode& expr2);
280 
282  template <typename T> SharedAbstractNode lor(const T& exprs) {
283  SharedAbstractNode node = std::make_shared<LorNode>(exprs, this->shared_from_this());
284  if (node == nullptr)
285  throw triton::exceptions::Ast("Node builders - Not enough memory");
286  node->init();
287  return this->collect(node);
288  }
289 
291  TRITON_EXPORT SharedAbstractNode lxor(const SharedAbstractNode& expr1, const SharedAbstractNode& expr2);
292 
294  template <typename T> SharedAbstractNode lxor(const T& exprs) {
295  SharedAbstractNode node = std::make_shared<LxorNode>(exprs, this->shared_from_this());
296  if (node == nullptr)
297  throw triton::exceptions::Ast("Node builders - Not enough memory");
298  node->init();
299  return this->collect(node);
300  }
301 
304 
306  TRITON_EXPORT SharedAbstractNode string(std::string value);
307 
309  TRITON_EXPORT SharedAbstractNode sx(triton::uint32 sizeExt, const SharedAbstractNode& expr);
310 
313 
315  TRITON_EXPORT SharedAbstractNode zx(triton::uint32 sizeExt, const SharedAbstractNode& expr);
316 
318  TRITON_EXPORT void initVariable(const std::string& name, const triton::uint512& value, const SharedAbstractNode& node);
319 
321  TRITON_EXPORT void updateVariable(const std::string& name, const triton::uint512& value);
322 
324  SharedAbstractNode getVariableNode(const std::string& name);
325 
327  TRITON_EXPORT const triton::uint512& getVariableValue(const std::string& name) const;
328 
330  TRITON_EXPORT void setRepresentationMode(triton::uint32 mode);
331 
333  TRITON_EXPORT triton::uint32 getRepresentationMode(void) const;
334 
336  TRITON_EXPORT std::ostream& print(std::ostream& stream, AbstractNode* node);
337  };
338 
340  using SharedAstContext = std::shared_ptr<triton::ast::AstContext>;
341 
343  };
345 };
346 
347 #endif /* TRITON_AST_CONTEXT_H */
Abstract node.
Definition: ast.hpp:66
AST Context - Used as AST builder.
Definition: astContext.hpp:53
TRITON_EXPORT SharedAbstractNode bvsgt(const SharedAbstractNode &expr1, const SharedAbstractNode &expr2)
AST C++ API - bvsgt node builder.
Definition: astContext.cpp:488
TRITON_EXPORT SharedAbstractNode bvmul(const SharedAbstractNode &expr1, const SharedAbstractNode &expr2)
AST C++ API - bvmul node builder.
Definition: astContext.cpp:221
TRITON_EXPORT SharedAbstractNode bvnand(const SharedAbstractNode &expr1, const SharedAbstractNode &expr2)
AST C++ API - bvnand node builder.
Definition: astContext.cpp:255
TRITON_EXPORT SharedAbstractNode bvsub(const SharedAbstractNode &expr1, const SharedAbstractNode &expr2)
AST C++ API - bvsub node builder.
Definition: astContext.cpp:577
TRITON_EXPORT SharedAbstractNode distinct(const SharedAbstractNode &expr1, const SharedAbstractNode &expr2)
AST C++ API - distinct node builder.
Definition: astContext.cpp:777
TRITON_EXPORT SharedAbstractNode land(const SharedAbstractNode &expr1, const SharedAbstractNode &expr2)
AST C++ API - land node builder.
Definition: astContext.cpp:862
TRITON_EXPORT void garbage(void)
Garbage unused nodes.
Definition: astContext.cpp:65
SharedAbstractNode concat(const T &exprs)
AST C++ API - concat node builder.
Definition: astContext.hpp:207
TRITON_EXPORT SharedAbstractNode bvuge(const SharedAbstractNode &expr1, const SharedAbstractNode &expr2)
AST C++ API - bvuge node builder.
Definition: astContext.cpp:638
TRITON_EXPORT SharedAbstractNode bvshl(const SharedAbstractNode &expr1, const SharedAbstractNode &expr2)
AST C++ API - bvshl node builder.
Definition: astContext.cpp:497
SharedAbstractNode compound(const T &exprs)
AST C++ API - compound node builder.
Definition: astContext.hpp:195
TRITON_EXPORT SharedAbstractNode iff(const SharedAbstractNode &expr1, const SharedAbstractNode &expr2)
AST C++ API - iff node builder.
Definition: astContext.cpp:826
SharedAbstractNode land(const T &exprs)
AST C++ API - land node builder.
Definition: astContext.hpp:264
TRITON_EXPORT SharedAbstractNode bvfalse(void)
AST C++ API - bvfalse node builder.
Definition: astContext.cpp:182
TRITON_EXPORT SharedAbstractNode bvxnor(const SharedAbstractNode &expr1, const SharedAbstractNode &expr2)
AST C++ API - bvxnor node builder.
Definition: astContext.cpp:690
TRITON_EXPORT SharedAbstractNode bvor(const SharedAbstractNode &expr1, const SharedAbstractNode &expr2)
AST C++ API - bvor node builder.
Definition: astContext.cpp:319
TRITON_EXPORT SharedAbstractNode bvrol(const SharedAbstractNode &expr, triton::uint32 rot)
AST C++ API - bvrol node builder.
Definition: astContext.cpp:357
TRITON_EXPORT ~AstContext()
Destructor.
Definition: astContext.cpp:28
TRITON_EXPORT AstContext & operator=(const AstContext &other)
Operator.
Definition: astContext.cpp:34
SharedAbstractNode lor(const T &exprs)
AST C++ API - lor node builder.
Definition: astContext.hpp:282
TRITON_EXPORT AstContext(const triton::modes::SharedModes &modes)
Constructor.
Definition: astContext.cpp:23
TRITON_EXPORT SharedAbstractNode bvule(const SharedAbstractNode &expr1, const SharedAbstractNode &expr2)
AST C++ API - bvule node builder.
Definition: astContext.cpp:656
TRITON_EXPORT SharedAbstractNode concat(const SharedAbstractNode &expr1, const SharedAbstractNode &expr2)
AST C++ API - concat node builder.
Definition: astContext.cpp:740
SharedAbstractNode forall(const T &vars, const SharedAbstractNode &body)
AST C++ API - forall node builder.
Definition: astContext.hpp:243
TRITON_EXPORT SharedAbstractNode bvand(const SharedAbstractNode &expr1, const SharedAbstractNode &expr2)
AST C++ API - bvand node builder.
Definition: astContext.cpp:118
TRITON_EXPORT SharedAbstractNode bvudiv(const SharedAbstractNode &expr1, const SharedAbstractNode &expr2)
AST C++ API - bvudiv node builder.
Definition: astContext.cpp:616
TRITON_EXPORT SharedAbstractNode string(std::string value)
AST C++ API - string node builder.
Definition: astContext.cpp:928
SharedAbstractNode lxor(const T &exprs)
AST C++ API - lxor node builder.
Definition: astContext.hpp:294
TRITON_EXPORT SharedAbstractNode bvxor(const SharedAbstractNode &expr1, const SharedAbstractNode &expr2)
AST C++ API - bvxor node builder.
Definition: astContext.cpp:706
TRITON_EXPORT SharedAbstractNode reference(const triton::engines::symbolic::SharedSymbolicExpression &expr)
AST C++ API - reference node builder.
Definition: astContext.cpp:919
TRITON_EXPORT SharedAbstractNode zx(triton::uint32 sizeExt, const SharedAbstractNode &expr)
AST C++ API - zx node builder.
Definition: astContext.cpp:983
TRITON_EXPORT SharedAbstractNode sx(triton::uint32 sizeExt, const SharedAbstractNode &expr)
AST C++ API - sx node builder.
Definition: astContext.cpp:937
TRITON_EXPORT SharedAbstractNode bvsge(const SharedAbstractNode &expr1, const SharedAbstractNode &expr2)
AST C++ API - bvsge node builder.
Definition: astContext.cpp:479
TRITON_EXPORT SharedAbstractNode bvsrem(const SharedAbstractNode &expr1, const SharedAbstractNode &expr2)
AST C++ API - bvsrem node builder.
Definition: astContext.cpp:561
TRITON_EXPORT SharedAbstractNode bvtrue(void)
AST C++ API - bvtrue node builder.
Definition: astContext.cpp:607
TRITON_EXPORT SharedAbstractNode bv(const triton::uint512 &value, triton::uint32 size)
AST C++ API - bv node builder.
Definition: astContext.cpp:83
TRITON_EXPORT SharedAbstractNode bvult(const SharedAbstractNode &expr1, const SharedAbstractNode &expr2)
AST C++ API - bvult node builder.
Definition: astContext.cpp:665
TRITON_EXPORT SharedAbstractNode bvashr(const SharedAbstractNode &expr1, const SharedAbstractNode &expr2)
AST C++ API - bvashr node builder.
Definition: astContext.cpp:156
TRITON_EXPORT SharedAbstractNode bvsdiv(const SharedAbstractNode &expr1, const SharedAbstractNode &expr2)
AST C++ API - bvsdiv node builder.
Definition: astContext.cpp:457
SharedAbstractNode getVariableNode(const std::string &name)
Gets a variable node from its name.
TRITON_EXPORT SharedAbstractNode lor(const SharedAbstractNode &expr1, const SharedAbstractNode &expr2)
AST C++ API - lor node builder.
Definition: astContext.cpp:893
TRITON_EXPORT SharedAbstractNode bvnor(const SharedAbstractNode &expr1, const SharedAbstractNode &expr2)
AST C++ API - bvnor node builder.
Definition: astContext.cpp:287
TRITON_EXPORT SharedAbstractNode bvsle(const SharedAbstractNode &expr1, const SharedAbstractNode &expr2)
AST C++ API - bvsle node builder.
Definition: astContext.cpp:527
TRITON_EXPORT SharedAbstractNode lxor(const SharedAbstractNode &expr1, const SharedAbstractNode &expr2)
AST C++ API - lxor node builder.
Definition: astContext.cpp:906
TRITON_EXPORT SharedAbstractNode variable(const triton::engines::symbolic::SharedSymbolicVariable &symVar)
AST C++ API - variable node builder.
Definition: astContext.cpp:957
TRITON_EXPORT SharedAbstractNode bvlshr(const SharedAbstractNode &expr1, const SharedAbstractNode &expr2)
AST C++ API - bvlshr node builder.
Definition: astContext.cpp:191
TRITON_EXPORT std::ostream & print(std::ostream &stream, AbstractNode *node)
Prints the given node with this context representation.
TRITON_EXPORT triton::uint32 getRepresentationMode(void) const
Gets the representations mode of this astContext.
TRITON_EXPORT void updateVariable(const std::string &name, const triton::uint512 &value)
Updates a variable value in this context.
TRITON_EXPORT SharedAbstractNode ite(const SharedAbstractNode &ifExpr, const SharedAbstractNode &thenExpr, const SharedAbstractNode &elseExpr)
AST C++ API - ite node builder.
Definition: astContext.cpp:844
TRITON_EXPORT SharedAbstractNode assert_(const SharedAbstractNode &expr)
AST C++ API - assert node builder.
Definition: astContext.cpp:74
TRITON_EXPORT SharedAbstractNode lnot(const SharedAbstractNode &expr)
AST C++ API - lnot node builder.
Definition: astContext.cpp:884
TRITON_EXPORT SharedAbstractNode bvneg(const SharedAbstractNode &expr)
AST C++ API - bvneg node builder.
Definition: astContext.cpp:271
TRITON_EXPORT SharedAbstractNode collect(const SharedAbstractNode &node)
Collect new nodes.
Definition: astContext.cpp:46
TRITON_EXPORT void setRepresentationMode(triton::uint32 mode)
Sets the representation mode for this astContext.
TRITON_EXPORT const triton::uint512 & getVariableValue(const std::string &name) const
Gets a variable value from its name.
TRITON_EXPORT SharedAbstractNode bvugt(const SharedAbstractNode &expr1, const SharedAbstractNode &expr2)
AST C++ API - bvugt node builder.
Definition: astContext.cpp:647
TRITON_EXPORT SharedAbstractNode bvslt(const SharedAbstractNode &expr1, const SharedAbstractNode &expr2)
AST C++ API - bvslt node builder.
Definition: astContext.cpp:536
TRITON_EXPORT SharedAbstractNode equal(const SharedAbstractNode &expr1, const SharedAbstractNode &expr2)
AST C++ API - equal node builder.
Definition: astContext.cpp:786
TRITON_EXPORT SharedAbstractNode integer(const triton::uint512 &value)
AST C++ API - integer node builder.
Definition: astContext.cpp:835
TRITON_EXPORT SharedAbstractNode bvror(const SharedAbstractNode &expr, triton::uint32 rot)
AST C++ API - bvror node builder.
Definition: astContext.cpp:407
TRITON_EXPORT SharedAbstractNode bvadd(const SharedAbstractNode &expr1, const SharedAbstractNode &expr2)
AST C++ API - bvadd node builder.
Definition: astContext.cpp:92
TRITON_EXPORT SharedAbstractNode let(std::string alias, const SharedAbstractNode &expr2, const SharedAbstractNode &expr3)
AST C++ API - let node builder.
Definition: astContext.cpp:875
TRITON_EXPORT void initVariable(const std::string &name, const triton::uint512 &value, const SharedAbstractNode &node)
Initializes a variable in the context.
TRITON_EXPORT SharedAbstractNode extract(triton::uint32 high, triton::uint32 low, const SharedAbstractNode &expr)
AST C++ API - extract node builder.
Definition: astContext.cpp:795
TRITON_EXPORT SharedAbstractNode bvsmod(const SharedAbstractNode &expr1, const SharedAbstractNode &expr2)
AST C++ API - bvsmod node builder.
Definition: astContext.cpp:545
TRITON_EXPORT SharedAbstractNode bvurem(const SharedAbstractNode &expr1, const SharedAbstractNode &expr2)
AST C++ API - bvurem node builder.
Definition: astContext.cpp:674
TRITON_EXPORT SharedAbstractNode bvnot(const SharedAbstractNode &expr)
AST C++ API - bvnot node builder.
Definition: astContext.cpp:303
TRITON_EXPORT SharedAbstractNode declare(const SharedAbstractNode &var)
AST C++ API - declare node builder.
Definition: astContext.cpp:768
The exception class used by all AST nodes.
Definition: exceptions.hpp:353
std::shared_ptr< triton::ast::AbstractNode > SharedAbstractNode
Shared Abstract Node.
Definition: ast.hpp:57
std::shared_ptr< triton::ast::AstContext > SharedAstContext
Shared AST context.
Definition: ast.hpp:63
std::shared_ptr< triton::modes::Modes > SharedModes
Shared Modes.
Definition: modes.hpp:66
@ CONSTANT_FOLDING
[symbolic] Perform a constant folding optimization of sub ASTs which do not contain symbolic variable...
Definition: modesEnums.hpp:33
@ AST_OPTIMIZATIONS
[AST] Classical arithmetic optimisations to reduce the depth of the trees.
Definition: modesEnums.hpp:31
std::shared_ptr< triton::engines::symbolic::SymbolicVariable > SharedSymbolicVariable
Shared Symbolic variable.
Definition: ast.hpp:41
std::shared_ptr< triton::engines::symbolic::SymbolicExpression > SharedSymbolicExpression
Shared Symbolic Expression.
Definition: ast.hpp:38
boost::multiprecision::uint512_t uint512
unsigned 512-bits
Definition: tritonTypes.hpp:43
std::uint32_t uint32
unisgned 32-bits
Definition: tritonTypes.hpp:31
The Triton namespace.
Definition: api.cpp:227