libTriton version 1.0 build 1592
Loading...
Searching...
No Matches
symbolicVariable.hpp
Go to the documentation of this file.
1
2/*
3** Copyright (C) - Triton
4**
5** This program is under the terms of the Apache License 2.0.
6*/
7
8#ifndef TRITON_SYMBOLICVARIABLE_H
9#define TRITON_SYMBOLICVARIABLE_H
10
11#include <memory>
12#include <string>
13
14#include <triton/dllexport.hpp>
17
18
19
21namespace triton {
28 namespace engines {
36 namespace symbolic {
43 class SymbolicVariable;
44
46 using SharedSymbolicVariable = std::shared_ptr<triton::engines::symbolic::SymbolicVariable>;
47
49 using WeakSymbolicVariable = std::weak_ptr<triton::engines::symbolic::SymbolicVariable>;
50
54 protected:
57
59 std::string alias;
60
62 std::string comment;
63
65 std::string name;
66
69
77
80
81 public:
87 const std::string& alias);
88
90 TRITON_EXPORT SymbolicVariable(const SymbolicVariable& other);
91
93 TRITON_EXPORT SymbolicVariable& operator=(const SymbolicVariable& other);
94
96 TRITON_EXPORT triton::engines::symbolic::variable_e getType(void) const;
97
99 TRITON_EXPORT const std::string& getAlias(void) const;
100
102 TRITON_EXPORT const std::string& getComment(void) const;
103
105 TRITON_EXPORT const std::string& getName(void) const;
106
108 TRITON_EXPORT triton::usize getId(void) const;
109
111 TRITON_EXPORT triton::uint64 getOrigin(void) const;
112
114 TRITON_EXPORT triton::uint32 getSize(void) const;
115
117 TRITON_EXPORT void setAlias(const std::string& alias);
118
120 TRITON_EXPORT void setComment(const std::string& comment);
121 };
122
124 TRITON_EXPORT std::ostream& operator<<(std::ostream& stream, const SymbolicVariable& symVar);
125
127 TRITON_EXPORT std::ostream& operator<<(std::ostream& stream, const SymbolicVariable* symVar);
128
130 TRITON_EXPORT bool operator<(const SymbolicVariable& symvar1, const SymbolicVariable& symvar2);
131
133 };
135 };
137};
138
139#endif /* TRITON_SYMBOLICVARIABLE_H */
TRITON_EXPORT const std::string & getName(void) const
Returns the name of the symbolic variable.
std::string comment
The comment of the symbolic variable.
TRITON_EXPORT SymbolicVariable & operator=(const SymbolicVariable &other)
Operator.
triton::uint32 size
The size (in bits) of the symbolic variable.
TRITON_EXPORT triton::uint32 getSize(void) const
Returns the size (in bits) of the symbolic variable.
TRITON_EXPORT triton::engines::symbolic::variable_e getType(void) const
Returns the symbolic variable type assignment.
triton::usize id
The id of the symbolic variable. This id is unique.
std::string name
The name of the symbolic variable. Names are always something like this: SymVar_X.
TRITON_EXPORT const std::string & getAlias(void) const
Returns the alias of the symbolic variable.
triton::uint64 origin
The origin of the symbolic variable.
triton::engines::symbolic::variable_e type
The symbolic variable type assignment.
TRITON_EXPORT triton::uint64 getOrigin(void) const
Returns the source value of the symbolic variable.
TRITON_EXPORT void setComment(const std::string &comment)
Sets the comment of the symbolic variable.
TRITON_EXPORT triton::usize getId(void) const
Returns the id of the symbolic variable. This id is unique.
TRITON_EXPORT const std::string & getComment(void) const
Returns the comment of the symbolic variable.
TRITON_EXPORT void setAlias(const std::string &alias)
Sets the alias of the symbolic variable.
TRITON_EXPORT SymbolicVariable(triton::engines::symbolic::variable_e type, triton::uint64 origin, triton::usize id, triton::uint32 size, const std::string &alias)
Constructor.
std::string alias
The alias of the symbolic variable.
std::shared_ptr< triton::engines::symbolic::SymbolicVariable > SharedSymbolicVariable
Shared Symbolic variable.
Definition ast.hpp:43
std::ostream & operator<<(std::ostream &stream, const SymbolicExpression &symExpr)
Displays a symbolic expression.
bool operator<(const SymbolicVariable &symvar1, const SymbolicVariable &symvar2)
Compares two symbolic variables.
variable_e
Type of symbolic variable.
std::weak_ptr< triton::engines::symbolic::SymbolicVariable > WeakSymbolicVariable
Weak Symbolic variable.
std::size_t usize
unsigned MAX_INT 32 or 64 bits according to the CPU.
std::uint64_t uint64
unisgned 64-bits
std::uint32_t uint32
unisgned 32-bits
The Triton namespace.