1#ifndef ROSE_BinaryAnalysis_InstructionSemantics_SymbolicSemantics_H
2#define ROSE_BinaryAnalysis_InstructionSemantics_SymbolicSemantics_H
3#include <featureTests.h>
4#ifdef ROSE_ENABLE_BINARY_ANALYSIS
5#include <Rose/BinaryAnalysis/BasicTypes.h>
7#include <Rose/BinaryAnalysis/InstructionSemantics/BaseSemantics/Formatter.h>
8#include <Rose/BinaryAnalysis/InstructionSemantics/BaseSemantics/FrameState.h>
9#include <Rose/BinaryAnalysis/InstructionSemantics/BaseSemantics/MemoryCellList.h>
10#include <Rose/BinaryAnalysis/InstructionSemantics/BaseSemantics/MemoryCellMap.h>
11#include <Rose/BinaryAnalysis/InstructionSemantics/BaseSemantics/MemoryState.h>
12#include <Rose/BinaryAnalysis/InstructionSemantics/BaseSemantics/Merger.h>
13#include <Rose/BinaryAnalysis/InstructionSemantics/BaseSemantics/RegisterStateGeneric.h>
14#include <Rose/BinaryAnalysis/InstructionSemantics/BaseSemantics/RiscOperators.h>
15#include <Rose/BinaryAnalysis/InstructionSemantics/BaseSemantics/State.h>
16#include <Rose/BinaryAnalysis/InstructionSemantics/BaseSemantics/SValue.h>
17#include <Rose/BinaryAnalysis/SymbolicExpression.h>
19#include <Cxx_GrammarSerialization.h>
21#ifdef ROSE_ENABLE_BOOST_SERIALIZATION
22#include <boost/serialization/access.hpp>
23#include <boost/serialization/base_object.hpp>
24#include <boost/serialization/export.hpp>
25#include <boost/serialization/set.hpp>
33namespace BinaryAnalysis {
34namespace InstructionSemantics {
55namespace SymbolicSemantics {
63using InsnSet = std::set<SgAsmInstruction*>;
70namespace AllowSideEffects {
84 size_t setSizeLimit_ = 1;
215#ifdef ROSE_ENABLE_BOOST_SERIALIZATION
217 friend class boost::serialization::access;
220 void serialize(S &s,
const unsigned ) {
221 roseAstSerializationRegistration(s);
222 s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(
Super);
223 s & BOOST_SERIALIZATION_NVP(
expr);
224 s & BOOST_SERIALIZATION_NVP(
defs);
232 explicit SValue(
size_t nbits);
233 SValue(
size_t nbits, uint64_t number);
494#ifdef ROSE_ENABLE_BOOST_SERIALIZATION
496 friend class boost::serialization::access;
499 void serialize(S &s,
const unsigned ) {
500 s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(
Super);
575 AllowSideEffects::Flag allowSideEffects);
629#ifdef ROSE_ENABLE_BOOST_SERIALIZATION
631 friend class boost::serialization::access;
634 void serialize(S &s,
const unsigned ) {
635 s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(
Super);
761 uint64_t trimThreshold_;
762 bool reinterpretMemoryReads_;
763 bool reinterpretRegisterReads_;
764 size_t nTrimmed_ = 0;
769#ifdef ROSE_ENABLE_BOOST_SERIALIZATION
771 friend class boost::serialization::access;
774 void serialize(S &s,
const unsigned ) {
775 s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(
Super);
776 s & BOOST_SERIALIZATION_NVP(omit_cur_insn);
777 s & BOOST_SERIALIZATION_NVP(computingDefiners_);
778 s & BOOST_SERIALIZATION_NVP(computingMemoryWriters_);
779 s & BOOST_SERIALIZATION_NVP(computingRegisterWriters_);
780 s & BOOST_SERIALIZATION_NVP(trimThreshold_);
841 SValuePtr svalueUnspecified(
size_t nbits);
842 SValuePtr svalueNumber(
size_t nbits, uint64_t value);
918 bool getset_omit_cur_insn(
bool b) {
bool retval = omit_cur_insn; omit_cur_insn=b;
return retval; }
1048 size_t begin_bit,
size_t end_bit)
override;
1094 template<
class FloatOp>
1134 AllowSideEffects::Flag);
1142#include <Rose/BinaryAnalysis/InstructionSemantics/SymbolicSemantics.tpp>
1144#ifdef ROSE_ENABLE_BOOST_SERIALIZATION
Purely symbolic memory state.
Simple list-based memory state.
Simple map-based memory state.
uint64_t CellKey
Key used to look up memory cells.
Controls state merge operations.
A RegisterState for any architecture.
Base class for most instruction semantics RISC operators.
IteStatus
Status for iteWithStatus operation.
Base class for semantic values.
Base class for semantics machine states.
Functor for handling a memory read whose address matches more than one memory cell.
static Ptr instance()
Allocating constructor.
SValuePtr operator()(const SValuePtr &address, const BaseSemantics::SValuePtr &dflt, BaseSemantics::RiscOperators *addrOps, BaseSemantics::RiscOperators *valOps, const BaseSemantics::CellList &cells) override
Compress the cells into a single value.
Functor for handling a memory read whose address matches more than one memory cell.
static Ptr instance()
Allocating constructor.
SValuePtr operator()(const SValuePtr &address, const BaseSemantics::SValuePtr &dflt, BaseSemantics::RiscOperators *addrOps, BaseSemantics::RiscOperators *valOps, const BaseSemantics::CellList &cells) override
Compress the cells into a single value.
Functor for handling a memory read whose address matches more than one memory cell.
static Ptr instance()
Allocating constructor.
SValuePtr operator()(const SValuePtr &address, const BaseSemantics::SValuePtr &dflt, BaseSemantics::RiscOperators *addrOps, BaseSemantics::RiscOperators *valOps, const BaseSemantics::CellList &cells) override
Compress the cells into a single value.
Functor for handling a memory read whose address matches more than one memory cell.
SValuePtr operator()(const SValuePtr &address, const BaseSemantics::SValuePtr &dflt, BaseSemantics::RiscOperators *addrOps, BaseSemantics::RiscOperators *valOps, const BaseSemantics::CellList &cells) override
Compress the cells into a single value.
static Ptr instance()
Allocating constructor.
Functor for handling a memory read that found more than one cell that might alias the requested addre...
virtual SValuePtr operator()(const SValuePtr &address, const BaseSemantics::SValuePtr &dflt, BaseSemantics::RiscOperators *addrOps, BaseSemantics::RiscOperators *valOps, const BaseSemantics::CellList &cells)=0
Compress the cells into a single value.
BaseSemantics::MemoryStatePtr create(const BaseSemantics::SValuePtr &addrProtoval, const BaseSemantics::SValuePtr &valProtoval) const override
Virtual constructor.
static MemoryListStatePtr instance(const MemoryListStatePtr &other)
Instantiates a new deep copy of an existing state.
void writeMemory(const BaseSemantics::SValuePtr &addr, const BaseSemantics::SValuePtr &value, BaseSemantics::RiscOperators *addrOps, BaseSemantics::RiscOperators *valOps) override
Write a byte to memory.
static MemoryListStatePtr instance(const BaseSemantics::MemoryCellPtr &protocell)
Instantiates a new memory state having specified prototypical cells and value.
MemoryListStatePtr Ptr
Shared-ownership pointer.
static MemoryListStatePtr instance(const BaseSemantics::SValuePtr &addrProtoval, const BaseSemantics::SValuePtr &valProtoval)
Instantiates a new memory state having specified prototypical value.
BaseSemantics::SValuePtr readMemory(const BaseSemantics::SValuePtr &addr, const BaseSemantics::SValuePtr &dflt, BaseSemantics::RiscOperators *addrOps, BaseSemantics::RiscOperators *valOps) override
Read a byte from memory.
static MemoryListStatePtr promote(const BaseSemantics::AddressSpacePtr &)
Recasts a base pointer to a symbolic memory state.
CellCompressor::Ptr cellCompressor() const
Callback for handling a memory read whose address matches more than one memory cell.
BaseSemantics::MemoryStatePtr create(const BaseSemantics::MemoryCellPtr &protocell) const override
Virtual constructor.
BaseSemantics::AddressSpacePtr clone() const override
Virtual copy constructor.
BaseSemantics::SValuePtr peekMemory(const BaseSemantics::SValuePtr &addr, const BaseSemantics::SValuePtr &dflt, BaseSemantics::RiscOperators *addrOps, BaseSemantics::RiscOperators *valOps) override
Read a byte from memory with no side effects.
void cellCompressor(const CellCompressor::Ptr &)
Callback for handling a memory read whose address matches more than one memory cell.
MemoryMapStatePtr Ptr
Shared-ownership pointer.
BaseSemantics::AddressSpacePtr clone() const override
Virtual copy constructor.
static MemoryMapStatePtr instance(const BaseSemantics::MemoryCellPtr &protocell)
Instantiates a new memory state having specified prototypical cells and value.
virtual BaseSemantics::MemoryStatePtr create(const BaseSemantics::MemoryCellPtr &protocell) const
Virtual constructor.
CellKey generateCellKey(const BaseSemantics::SValuePtr &addr_) const override
Generate a cell lookup key.
static MemoryMapStatePtr promote(const BaseSemantics::AddressSpacePtr &)
Recasts a base pointer to a symbolic memory state.
static MemoryMapStatePtr instance(const MemoryMapStatePtr &other)
Instantiates a new deep copy of an existing state.
BaseSemantics::MemoryStatePtr create(const BaseSemantics::SValuePtr &addrProtoval, const BaseSemantics::SValuePtr &valProtoval) const override
Virtual constructor.
static MemoryMapStatePtr instance(const BaseSemantics::SValuePtr &addrProtoval, const BaseSemantics::SValuePtr &valProtoval)
Instantiates a new memory state having specified prototypical value.
Controls merging of symbolic values.
static Ptr instance()
Allocating constructor.
static Ptr instance(size_t)
Allocating constructor.
size_t setSizeLimit() const
Property: Maximum set size.
void setSizeLimit(size_t n)
Property: Maximum set size.
MergerPtr Ptr
Shared-ownership pointer for a Merger object.
Defines RISC operators for the SymbolicSemantics domain.
RiscOperatorsPtr Ptr
Shared-ownership pointer.
BaseSemantics::SValuePtr unsignedExtend(const BaseSemantics::SValuePtr &a_, size_t new_width) override
Extend (or shrink) operand a so it is nbits wide by adding or removing high-order bits.
BaseSemantics::SValuePtr fpDivide(const BaseSemantics::SValuePtr &lhs, const BaseSemantics::SValuePtr &rhs) override
Divide one floating-point value by another.
static RiscOperatorsPtr instanceFromProtoval(const BaseSemantics::SValuePtr &protoval, const SmtSolverPtr &solver=SmtSolverPtr())
Instantiates a new RiscOperators object with specified prototypical values.
void computingDefiners(DefinersMode m)
Property: Track which instructions define a semantic value.
BaseSemantics::SValuePtr number_(size_t nbits, uint64_t value) override
Returns a number of the specified bit width.
BaseSemantics::SValuePtr rotateLeft(const BaseSemantics::SValuePtr &a_, const BaseSemantics::SValuePtr &sa_) override
Rotate bits to the left.
BaseSemantics::SValuePtr fpMultiply(const BaseSemantics::SValuePtr &lhs, const BaseSemantics::SValuePtr &rhs) override
Multiply two floating-point values.
BaseSemantics::SValuePtr shiftRight(const BaseSemantics::SValuePtr &a_, const BaseSemantics::SValuePtr &sa_) override
Returns arg shifted right logically (no sign bit).
static SgAsmFloatType * sgIsIeee754(SgAsmType *)
Tests whether a SgAsmType is an IEEE-754 floating-point type.
BaseSemantics::SValuePtr add(const BaseSemantics::SValuePtr &a_, const BaseSemantics::SValuePtr &b_) override
Adds two integers of equal size.
BaseSemantics::SValuePtr fpSubtract(const BaseSemantics::SValuePtr &lhs, const BaseSemantics::SValuePtr &rhs) override
Subtract one floating-point value from another.
void computingMemoryWriters(WritersMode m)
Property: Track which instructions write to each memory location.
BaseSemantics::SValuePtr unsignedDivide(const BaseSemantics::SValuePtr &a_, const BaseSemantics::SValuePtr &b_) override
Divides two unsigned values.
BaseSemantics::SValuePtr equalToZero(const BaseSemantics::SValuePtr &a_) override
Determines whether a value is equal to zero.
void interrupt(int majr, int minr) override
Unconditionally raise an interrupt.
BaseSemantics::SValuePtr invert(const BaseSemantics::SValuePtr &a_) override
One's complement.
size_t nTrimmed() const
Property: Number of symbolic expressions trimmed.
BaseSemantics::SValuePtr extract(const BaseSemantics::SValuePtr &a_, size_t begin_bit, size_t end_bit) override
Extracts bits from a value.
BaseSemantics::SValuePtr and_(const BaseSemantics::SValuePtr &a_, const BaseSemantics::SValuePtr &b_) override
Computes bit-wise AND of two values.
BaseSemantics::SValuePtr or_(const BaseSemantics::SValuePtr &a_, const BaseSemantics::SValuePtr &b_) override
Computes bit-wise OR of two values.
BaseSemantics::SValuePtr rotateRight(const BaseSemantics::SValuePtr &a_, const BaseSemantics::SValuePtr &sa_) override
Rotate bits to the right.
BaseSemantics::SValuePtr boolean_(bool b) override
Returns a Boolean value.
BaseSemantics::SValuePtr iteWithStatus(const BaseSemantics::SValuePtr &sel_, const BaseSemantics::SValuePtr &a_, const BaseSemantics::SValuePtr &b_, IteStatus &) override
If-then-else with status.
BaseSemantics::SValuePtr shiftRightArithmetic(const BaseSemantics::SValuePtr &a_, const BaseSemantics::SValuePtr &sa_) override
Returns arg shifted right arithmetically (with sign bit).
BaseSemantics::SValuePtr fpConvert(const BaseSemantics::SValuePtr &, BaseSemantics::ValueKind) override
Convert from one floating-point type to another.
WritersMode computingRegisterWriters() const
Property: Track latest writer to each register.
BaseSemantics::SValuePtr signedDivide(const BaseSemantics::SValuePtr &a_, const BaseSemantics::SValuePtr &b_) override
Divides two signed values.
BaseSemantics::SValuePtr fpFromInteger(const BaseSemantics::SValuePtr &, BaseSemantics::ValueKind) override
Constructs a floating-point value from an integer value.
BaseSemantics::SValuePtr peekMemory(RegisterDescriptor segreg, const BaseSemantics::SValuePtr &addr, const BaseSemantics::SValuePtr &dflt) override
Read memory without side effects.
BaseSemantics::SValuePtr leastSignificantSetBit(const BaseSemantics::SValuePtr &a_) override
Returns position of least significant set bit; zero when no bits are set.
BaseSemantics::SValuePtr readRegister(RegisterDescriptor reg, const BaseSemantics::SValuePtr &dflt) override
Reads a value from a register.
BaseSemantics::RiscOperatorsPtr create(const BaseSemantics::StatePtr &, const SmtSolverPtr &solver=SmtSolverPtr()) const override
Virtual allocating constructor.
BaseSemantics::SValuePtr reinterpret(const BaseSemantics::SValuePtr &, SgAsmType *) override
Reinterpret an expression as a different type.
BaseSemantics::SValuePtr readLocal(size_t index) override
Reads a value from the local variable table in the current frame.
virtual BaseSemantics::SValuePtr filterResult(const BaseSemantics::SValuePtr &)
Filters results from RISC operators.
static RiscOperatorsPtr promote(const BaseSemantics::RiscOperatorsPtr &)
Run-time promotion of a base RiscOperators pointer to symbolic operators.
void nTrimmed(size_t n)
Property: Number of symbolic expressions trimmed.
void computingRegisterWriters(WritersMode m)
Property: Track latest writer to each register.
void reinterpretMemoryReads(bool b)
Property: Reinterpret data as unsigned integers when reading from memory or registers.
BaseSemantics::SValuePtr xor_(const BaseSemantics::SValuePtr &a_, const BaseSemantics::SValuePtr &b_) override
Computes bit-wise XOR of two values.
static RiscOperatorsPtr instanceFromState(const BaseSemantics::StatePtr &, const SmtSolverPtr &solver=SmtSolverPtr())
Instantiates a new RiscOperators object with specified state.
void trimThreshold(uint64_t n)
Property: Maximum size of expressions.
BaseSemantics::SValuePtr fpModulo(const BaseSemantics::SValuePtr &lhs, const BaseSemantics::SValuePtr &rhs) override
Computes the floating-point remainder of a divided by b.
void writeRegister(RegisterDescriptor reg, const BaseSemantics::SValuePtr &a_) override
Writes a value to a register.
BaseSemantics::SValuePtr shiftLeft(const BaseSemantics::SValuePtr &a_, const BaseSemantics::SValuePtr &sa_) override
Returns arg shifted left.
void pushOperand(const BaseSemantics::SValuePtr &value) override
Pushes a value to the Frame Operand Stack.
BaseSemantics::SValuePtr popOperand() override
Pops a value from the Frame Operand Stack.
BaseSemantics::SValuePtr unsignedModulo(const BaseSemantics::SValuePtr &a_, const BaseSemantics::SValuePtr &b_) override
Calculates modulo with unsigned values.
BaseSemantics::SValuePtr signedModulo(const BaseSemantics::SValuePtr &a_, const BaseSemantics::SValuePtr &b_) override
Calculates modulo with signed values.
bool reinterpretRegisterReads() const
Property: Reinterpret data as unsigned integers when reading from memory or registers.
BaseSemantics::SValuePtr addWithCarries(const BaseSemantics::SValuePtr &a_, const BaseSemantics::SValuePtr &b_, const BaseSemantics::SValuePtr &c_, BaseSemantics::SValuePtr &carry_out) override
Add two values of equal size and a carry bit.
BaseSemantics::SValuePtr fpToInteger(const BaseSemantics::SValuePtr &, BaseSemantics::ValueKind) override
Converts a floating-point value to an integer value.
BaseSemantics::SValuePtr mostSignificantSetBit(const BaseSemantics::SValuePtr &a_) override
Returns position of most significant set bit; zero when no bits are set.
WritersMode computingMemoryWriters() const
Property: Track which instructions write to each memory location.
virtual void substitute(const SValuePtr &from, const SValuePtr &to)
Substitute all occurrences of from with to in the current state.
DefinersMode computingDefiners() const
Property: Track which instructions define a semantic value.
BaseSemantics::SValuePtr negate(const BaseSemantics::SValuePtr &a_) override
Two's complement.
void reinterpretRegisterReads(bool b)
Property: Reinterpret data as unsigned integers when reading from memory or registers.
BaseSemantics::RiscOperatorsPtr create(const BaseSemantics::SValuePtr &protoval, const SmtSolverPtr &solver=SmtSolverPtr()) const override
Virtual allocating constructor.
BaseSemantics::SValuePtr signExtend(const BaseSemantics::SValuePtr &a_, size_t new_width) override
Sign extends a value.
BaseSemantics::SValuePtr readMemory(RegisterDescriptor segreg, const BaseSemantics::SValuePtr &addr, const BaseSemantics::SValuePtr &dflt, const BaseSemantics::SValuePtr &cond) override
Reads a value from memory.
void writeMemory(RegisterDescriptor segreg, const BaseSemantics::SValuePtr &addr, const BaseSemantics::SValuePtr &data, const BaseSemantics::SValuePtr &cond) override
Writes a value to memory.
BaseSemantics::SValuePtr unsignedMultiply(const BaseSemantics::SValuePtr &a_, const BaseSemantics::SValuePtr &b_) override
Multiply two unsigned values.
BaseSemantics::SValuePtr concat(const BaseSemantics::SValuePtr &a_, const BaseSemantics::SValuePtr &b_) override
Concatenates the bits of two values.
bool reinterpretMemoryReads() const
Property: Reinterpret data as unsigned integers when reading from memory or registers.
BaseSemantics::SValuePtr peekRegister(RegisterDescriptor reg, const BaseSemantics::SValuePtr &dflt) override
Obtain a register value without side effects.
uint64_t trimThreshold() const
Property: Maximum size of expressions.
BaseSemantics::SValuePtr fpAdd(const BaseSemantics::SValuePtr &lhs, const BaseSemantics::SValuePtr &rhs) override
Add two floating-point values.
BaseSemantics::SValuePtr signedMultiply(const BaseSemantics::SValuePtr &a_, const BaseSemantics::SValuePtr &b_) override
Multiplies two signed values.
static RiscOperatorsPtr instanceFromRegisters(const RegisterDictionaryPtr &, const SmtSolverPtr &solver=SmtSolverPtr())
Instantiates a new RiscOperators object and configures it to use semantic values and states that are ...
virtual SymbolicExpression::Type sgTypeToSymbolicType(SgAsmType *)
Convert a SgAsmType to a symbolic type.
Type of values manipulated by the SymbolicSemantics domain.
virtual const InsnSet & get_defining_instructions() const
Returns the set of instructions that defined this value.
virtual size_t add_defining_instructions(const InsnSet &to_add)
Adds definitions to the list of defining instructions.
static SValuePtr instance()
Instantiate a new prototypical value.
BaseSemantics::SValuePtr undefined_(size_t nbits) const override
Create a new undefined semantic value.
virtual void defined_by(SgAsmInstruction *insn, const InsnSet &set1, const InsnSet &set2)
Adds instructions to the list of defining instructions.
ExprPtr expr
The symbolic expression for this value.
static SValuePtr instance_integer(size_t nbits, uint64_t value)
Instantiate a new concrete value.
virtual void set_expression(const ExprPtr &new_expr)
Changes the expression stored in the value.
static SValuePtr promote(const BaseSemantics::SValuePtr &)
Promote a base value to a SymbolicSemantics value.
virtual void defined_by(SgAsmInstruction *insn)
Adds instructions to the list of defining instructions.
void hash(Combinatorics::Hasher &) const override
Hash this semantic value.
static SValuePtr instance_symbolic(const SymbolicExpression::Ptr &value)
Instantiate a new symbolic value.
BaseSemantics::SValuePtr bottom_(size_t nbits) const override
Data-flow bottom value.
Sawyer::Optional< BaseSemantics::SValuePtr > createOptionalMerge(const BaseSemantics::SValuePtr &other, const BaseSemantics::MergerPtr &, const SmtSolverPtr &) const override
Possibly create a new value by merging two existing values.
bool must_equal(const BaseSemantics::SValuePtr &other, const SmtSolverPtr &solver=SmtSolverPtr()) const override
Virtual API.
bool isBottom() const override
Determines whether a value is a data-flow bottom.
static SValuePtr instance_undefined(size_t nbits)
Instantiate a new undefined value of specified width.
uint64_t get_number() const override
Virtual API.
BaseSemantics::SValuePtr copy(size_t new_width=0) const override
Create a new value from an existing value, changing the width if new_width is non-zero.
BaseSemantics::SValuePtr unspecified_(size_t nbits) const override
Create a new unspecified semantic value.
BaseSemantics::SValuePtr boolean_(bool value) const override
Create a new, Boolean value.
virtual void defined_by(SgAsmInstruction *insn, const InsnSet &set1, const InsnSet &set2, const InsnSet &set3)
Adds instructions to the list of defining instructions.
static SValuePtr instance_unspecified(size_t nbits)
Instantiate a new unspecified value of specified width.
virtual size_t add_defining_instructions(const SValuePtr &source)
Adds definitions to the list of defining instructions.
virtual void set_defining_instructions(SgAsmInstruction *insn)
Set defining instructions.
InsnSet defs
Instructions defining this value.
virtual void defined_by(SgAsmInstruction *insn, const InsnSet &set1)
Adds instructions to the list of defining instructions.
bool is_number() const override
Virtual API.
std::string get_comment() const override
Some subclasses support the ability to add comments to values.
BaseSemantics::SValuePtr number_(size_t nbits, uint64_t value) const override
Create a new concrete semantic value.
virtual size_t add_defining_instructions(SgAsmInstruction *insn)
Adds definitions to the list of defining instructions.
static SValuePtr instance_bottom(size_t nbits)
Instantiate a new data-flow bottom value of specified width.
bool may_equal(const BaseSemantics::SValuePtr &other, const SmtSolverPtr &solver=SmtSolverPtr()) const override
Virtual API.
virtual void set_defining_instructions(const InsnSet &new_defs)
Set defining instructions.
void print(std::ostream &, BaseSemantics::Formatter &) const override
Print a value to a stream using default format.
virtual void set_expression(const SValuePtr &source)
Changes the expression stored in the value.
virtual const ExprPtr & get_expression() const
Returns the expression stored in this value.
virtual SValuePtr substitute(const SValuePtr &from, const SValuePtr &to, const SmtSolverPtr &solver) const
Substitute one value for another throughout a value.
void set_comment(const std::string &) const override
Some subclasses support the ability to add comments to values.
void set_width(size_t nbits) override
Virtual API.
virtual void set_defining_instructions(const SValuePtr &source)
Set defining instructions.
Describes (part of) a physical CPU register.
Interior node of an expression tree for instruction semantics.
Leaf node of an expression tree for instruction semantics.
Base class for symbolic expression nodes.
Type of symbolic expression.
Holds a value or nothing.
Base class for reference counted objects.
Reference-counting intrusive smart pointer.
Base class for machine instructions.
Base class for binary types.
Base classes for instruction semantics.
boost::shared_ptr< RiscOperators > RiscOperatorsPtr
Shared-ownership pointer to a RISC operators object.
boost::shared_ptr< MemoryState > MemoryStatePtr
Shared-ownership pointer to a memory state.
boost::shared_ptr< MemoryCell > MemoryCellPtr
Shared-ownership pointer to a memory cell.
std::list< MemoryCellPtr > CellList
List of memory cells.
boost::shared_ptr< State > StatePtr
Shared-ownership pointer to a semantic state.
ValueKind
Kind of an SValue for emulating JVM and CIL instructions.
boost::shared_ptr< class RegisterStateGeneric > RegisterStateGenericPtr
Shared-ownership pointer to generic register states.
boost::shared_ptr< AddressSpace > AddressSpacePtr
Shared-ownership pointer for AddressSpace objects.
boost::shared_ptr< FrameState > FrameStatePtr
Shared-ownership pointer to a frame state.
WritersMode
How to update the list of writers stored at each abstract location.
@ TRACK_NO_WRITERS
Do not track writers.
@ TRACK_ALL_WRITERS
Save all writers.
@ TRACK_LATEST_WRITER
Save only the latest writer.
boost::shared_ptr< class MemoryMapState > MemoryMapStatePtr
Shared-ownership pointer to symbolic memory state.
boost::shared_ptr< class MemoryListState > MemoryListStatePtr
Shared-ownership pointer for symbolic list-based memory state.
Sawyer::SharedPointer< class SValue > SValuePtr
Shared-ownership pointer for symbolic semantic value.
DefinersMode
How to update the list of definers stored in each semantic value.
@ TRACK_LATEST_DEFINER
Save only the latest definer.
@ TRACK_NO_DEFINERS
Do not track definers.
@ TRACK_ALL_DEFINERS
Save all definers.
boost::shared_ptr< class RiscOperators > RiscOperatorsPtr
Shared-ownership pointer to symbolic RISC operations.
Sawyer::SharedPointer< Interior > InteriorPtr
Reference counting pointer.
Sawyer::SharedPointer< Node > Ptr
Reference counting pointer.
Sawyer::SharedPointer< Leaf > LeafPtr
Reference counting pointer.
std::shared_ptr< SmtSolver > SmtSolverPtr
Reference counting pointer.