1 #ifndef ROSE_BinaryAnalysis_Concolic_BasicTypes_H
2 #define ROSE_BinaryAnalysis_Concolic_BasicTypes_H
3 #include <featureTests.h>
4 #ifdef ROSE_ENABLE_CONCOLIC_TESTING
7 #include <Rose/StringUtility/Escape.h>
9 #include <Rose/Exception.h>
10 #include <rose_strtoull.h>
12 #include <Sawyer/Callbacks.h>
13 #include <Sawyer/Message.h>
14 #include <Sawyer/SharedPointer.h>
16 #include <boost/shared_ptr.hpp>
20 namespace BinaryAnalysis {
82 explicit Exception(
const std::string &mesg):
Rose::Exception(mesg) {}
83 ~Exception() throw () {}
89 bool isRunningInContainer();
98 std::string
toString(uint64_t value,
size_t nBits);
109 class ConcolicExecutor;
112 class ConcolicExecutorSettings;
114 class ConcreteExecutor;
117 class ConcreteResult;
123 namespace Emulation {
128 class ExecutionEvent;
131 class ExecutionLocation;
133 class ExecutionManager;
136 class InputVariables;
139 class SharedMemoryCallback;
144 class SharedMemoryContext;
149 class SyscallCallback;
150 using SyscallCallbackPtr = std::shared_ptr<SyscallCallback>;
154 class SyscallContext;
170 using Value = size_t;
178 ObjectId(
const Value& v)
181 ObjectId(
const ObjectId& rhs)
192 explicit ObjectId(
const std::string &s) {
194 uint64_t
id = rose_strtoull(s.c_str(), &rest, 0);
195 while (*rest && isspace(*rest)) ++rest;
199 *
this = boost::numeric_cast<Value>(id);
200 }
catch (
const boost::bad_numeric_cast&) {
206 ObjectId<Tag>& operator=(
const ObjectId<Tag>& lhs) {
207 this->Super::operator=(lhs);
212 ObjectId<Tag>& operator=(
const Value& v) {
213 this->Super::operator=(v);
217 explicit operator bool()
const {
224 bool operator<(const ObjectId<_Tag>& lhs,
const ObjectId<_Tag>& rhs);
227 const Super& optional()
const {
235 bool operator<(const ObjectId<Tag>& lhs,
const ObjectId<Tag>& rhs)
237 if (!rhs)
return false;
238 if (!lhs)
return true;
240 return lhs.get() < rhs.get();
243 using TestSuiteId = ObjectId<TestSuite>;
244 using SpecimenId = ObjectId<Specimen>;
245 using TestCaseId = ObjectId<TestCase>;
246 using ExecutionEventId = ObjectId<ExecutionEvent>;
252 struct ObjectTraits {
257 struct ObjectTraits<TestSuite> {
258 using Id = TestSuiteId;
262 struct ObjectTraits<Specimen> {
263 using Id = SpecimenId;
267 struct ObjectTraits<TestCase> {
268 using Id = TestCaseId;
272 struct ObjectTraits<ExecutionEvent> {
273 using Id = ExecutionEventId;
283 #include <Rose/BinaryAnalysis/Concolic/Callback/BasicTypes.h>
284 #include <Rose/BinaryAnalysis/Concolic/I386Linux/BasicTypes.h>
285 #include <Rose/BinaryAnalysis/Concolic/M68kSystem/BasicTypes.h>
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++.
When
When something should be done.
Reference-counting intrusive smart pointer.
Object
The five kind of objects manipulated by Rose::CodeGen::API and associated Rose::CodeGen::Factory.
ROSE_UTIL_API std::string toString(const Path &)
Convert a path to a string.
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 * Architecture(int64_t)
Convert Rose::BinaryAnalysis::Disassembler::Mips::Decoder::Architecture 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.
Sawyer::SharedPointer< Node > Ptr
Reference counting pointer.
const char * InputType(int64_t)
Convert Rose::BinaryAnalysis::Concolic::InputType enum constant to a string.
Base class for all ROSE exceptions.