Create a generic Value
class that seamlessly wraps both Expr
and Number
#19
Labels
bindings
Python bindings
core
Maat core internals
enhancement
New feature or request
refactoring
Code refactoring & restructuration
Related to #5
More thoughts on having a
Value
class equivalent tostd::variant<Expr, Number>
:Expr
andNumber
/cst_t
. That includes:IRContext
andTmpContext
instead of maintaining two listsProcessedInst::Param
CPU
'spreprocess_inst
andpostprocess_inst
methodsMemEngine
read/write APIInfo
,RegAccess
,MemAccess
, ...is_abstract()
andis_concrete()
methodsis_concrete
,is_concolic
, ..., wrappers methods for convenience useNumber
class, except that they automatically use the internalNumber
orExpr
depending on whether theValue
is abstract or concrete. Using in-place operators is a must for performanceExpr
operatorsBasically we should start off from the current
ProcessedInst::Param
implementation and build a fully functionalValue
class on top of it, then progressively start to useValue
everywhere.Implementation notes
nullptr
for the expression fieldValue
vsExpr
in the API:Expr
when we are sure we are dealing with abstract expressions (likenew_symbolic_buffer
, ...)Value
when we are unsure if data is concrete or abstractExpr
andValue
when the user inputs symbolic data to the engine (assigning registers, writing memory, creating symbolic buffers, ...), but use mainlyValue
when returning information back to the user (reading registers and memory,info
field in event callbacks, ...)The text was updated successfully, but these errors were encountered: