1 #ifndef ROSE_BinaryAnalysis_Concolic_BasicTypes_H
2 #define ROSE_BinaryAnalysis_Concolic_BasicTypes_H
3 #include <featureTests.h>
4 #ifdef ROSE_ENABLE_CONCOLIC_TESTING
6 #include <rose_strtoull.h>
10 namespace BinaryAnalysis {
67 explicit Exception(
const std::string &mesg):
Rose::Exception(mesg) {}
68 ~Exception() throw () {}
78 class ConcolicExecutor;
81 class ConcreteExecutor;
83 class ConcreteExecutorResult;
96 class ExecutionLocation;
98 class ExecutionManager;
101 class InputVariables;
110 class SharedMemoryCallback;
115 class SharedMemoryContext;
120 class SyscallCallback;
121 using SyscallCallbackPtr = std::shared_ptr<SyscallCallback>;
125 class SyscallContext;
133 class LinuxExitStatus;
144 using Value = size_t;
152 ObjectId(
const Value& v)
155 ObjectId(
const ObjectId& rhs)
166 explicit ObjectId(
const std::string &s) {
168 uint64_t
id = rose_strtoull(s.c_str(), &rest, 0);
169 while (*rest && isspace(*rest)) ++rest;
173 *
this = boost::numeric_cast<Value>(id);
174 }
catch (
const boost::bad_numeric_cast&) {
180 ObjectId<Tag>& operator=(
const ObjectId<Tag>& lhs) {
181 this->Super::operator=(lhs);
186 ObjectId<Tag>& operator=(
const Value& v) {
187 this->Super::operator=(v);
191 explicit operator bool()
const {
198 bool operator<(const ObjectId<_Tag>& lhs,
const ObjectId<_Tag>& rhs);
201 const Super& optional()
const {
209 bool operator<(const ObjectId<Tag>& lhs,
const ObjectId<Tag>& rhs)
211 if (!rhs)
return false;
212 if (!lhs)
return true;
214 return lhs.get() < rhs.get();
217 using TestSuiteId = ObjectId<TestSuite>;
218 using SpecimenId = ObjectId<Specimen>;
219 using TestCaseId = ObjectId<TestCase>;
220 using ExecutionEventId = ObjectId<ExecutionEvent>;
226 struct ObjectTraits {
231 struct ObjectTraits<TestSuite> {
232 using Id = TestSuiteId;
236 struct ObjectTraits<Specimen> {
237 using Id = SpecimenId;
241 struct ObjectTraits<TestCase> {
242 using Id = TestCaseId;
246 struct ObjectTraits<ExecutionEvent> {
247 using Id = ExecutionEventId;
const char * IoDirection(int64_t)
Convert Rose::BinaryAnalysis::Concolic::IoDirection enum constant to a string.
Only query an allocation.
ROSE_DLL_API Sawyer::Message::Facility mlog
Diagnostic facility for the ROSE library as a whole.
const char * ShowAssertions(int64_t)
Convert Rose::BinaryAnalysis::Concolic::ShowAssertions enum constant to a string. ...
Holds a value or nothing.
Main namespace for the ROSE library.
ROSE_UTIL_API std::string cEscape(const std::string &, char context= '"')
Escapes characters that are special to C/C++.
const char * When(int64_t)
Convert Rose::BinaryAnalysis::Concolic::When enum constant to a string.
Reference-counting intrusive smart pointer.
Object
The five kind of objects manipulated by Rose::CodeGen::API and associated Rose::CodeGen::Factory.
Allocate memory for real.
boost::shared_ptr< class RiscOperators > RiscOperatorsPtr
Shared-ownership pointer to concrete RISC operations.
const char * Update(int64_t)
Convert Rose::BinaryAnalysis::Concolic::Update enum constant to a string.
const char * ConcolicPhase(int64_t)
Convert Rose::BinaryAnalysis::Concolic::ConcolicPhase enum constant to a string.
size_t Id
Attribute identification.
const char * ShowEvents(int64_t)
Convert Rose::BinaryAnalysis::Concolic::ShowEvents enum constant to a string.
void initDiagnostics()
Initialize diagnostics.
const char * InputType(int64_t)
Convert Rose::BinaryAnalysis::Concolic::InputType enum constant to a string.
Base class for all ROSE exceptions.
const char * Architecture(int64_t)
Convert Rose::BinaryAnalysis::DisassemblerMips::Mips32::Architecture enum constant to a string...