1#ifndef ROSE_BinaryAnalysis_AbstractLocation_H
2#define ROSE_BinaryAnalysis_AbstractLocation_H
3#include <featureTests.h>
4#ifdef ROSE_ENABLE_BINARY_ANALYSIS
6#include <Rose/Location.h>
7#include <Rose/BinaryAnalysis/BasicTypes.h>
8#include <Rose/BinaryAnalysis/SmtSolver.h>
14namespace BinaryAnalysis {
75 virtual void print(std::ostream&)
const override;
78 virtual bool operator<(
const Location&)
const override;
79 virtual bool operator<=(
const Location&)
const override;
80 virtual bool operator>(
const Location&)
const override;
81 virtual bool operator>=(
const Location&)
const override;
void print(std::ostream &out, InstructionSemantics::BaseSemantics::Formatter &fmt) const
Print an abstract location.
AbstractLocation(const AbstractLocation &)
Copy constructor.
bool isRegister() const
Checks register reference.
void print(std::ostream &out, const RegisterDictionaryPtr ®dict, InstructionSemantics::BaseSemantics::Formatter &fmt) const
Print an abstract location.
AbstractLocation(const Address &, size_t nBytes=0)
Memory referent.
AbstractLocation()
Default constructor.
virtual std::string printableName() const override
Convert location to escaped, parsable string.
static AbstractLocation parse(const std::string &)
Parse an abstract location from a string.
int compare(const AbstractLocation &other) const
Compare two abstract locations.
bool mayAlias(const AbstractLocation &other, const SmtSolverPtr &solver=SmtSolverPtr()) const
True if two abstract locations could be aliases.
bool mustAlias(const AbstractLocation &other, const SmtSolverPtr &solver=SmtSolverPtr()) const
True if two abstract locations are certainly aliases.
AbstractLocation & operator=(const AbstractLocation &)
Assignment operator.
virtual void print(std::ostream &) const override
Output location to a stream.
void print(std::ostream &out, const RegisterDictionaryPtr ®dict) const
Print an abstract location.
bool isAddress() const
Checks memory reference.
const Address getAddress() const
Returns memory address.
size_t nBytes() const
Returns size of memory location in bytes.
virtual std::string toString() const override
Convert location to string.
RegisterDescriptor getRegister() const
Returns register.
AbstractLocation(RegisterDescriptor, const RegisterDictionaryPtr ®dict)
Register referent.
virtual bool isValid() const override
Test whether this object is valid.
virtual bool isEqual(const Location &) const override
Equality and inequality.
AbstractLocation(RegisterDescriptor)
Register referent.
Describes (part of) a physical CPU register.
Base class for location types.
Sawyer::SharedPointer< SValue > SValuePtr
Shared-ownership pointer to a semantic value in any domain.
std::shared_ptr< SmtSolver > SmtSolverPtr
Reference counting pointer.