ROSE 0.11.145.147
ConcreteExecutor.h
1#ifndef ROSE_BinaryAnalysis_Concolic_ConcreteExecutor_H
2#define ROSE_BinaryAnalysis_Concolic_ConcreteExecutor_H
3#include <featureTests.h>
4#ifdef ROSE_ENABLE_CONCOLIC_TESTING
5#include <Rose/BinaryAnalysis/Concolic/BasicTypes.h>
6
7#include <boost/filesystem.hpp>
8#include <Sawyer/SharedObject.h>
9#include <Sawyer/SharedPointer.h>
10
11namespace Rose {
12namespace BinaryAnalysis {
13namespace Concolic {
14
25class ConcreteExecutor: public Sawyer::SharedObject {
26public:
28 using Ptr = ConcreteExecutorPtr;
29
30private:
31 std::string name_;
32 DatabasePtr db_;
33
34protected:
35 // Allocating `instance` constructors should be implemented by the non-abstract subclasses.
36 explicit ConcreteExecutor(const std::string&); // for instantiating factories
37 explicit ConcreteExecutor(const DatabasePtr&);
38public:
39 ~ConcreteExecutor();
40
42 // Factories
44public:
53 static void registerFactory(const Ptr &factory);
54
61 static bool deregisterFactory(const Ptr &factory);
62
69 static std::vector<Ptr> registeredFactories();
70
79 static Ptr forge(const DatabasePtr&, const std::string &name);
80
82 virtual bool matchFactory(const std::string &name) const = 0;
83
88 virtual Ptr instanceFromFactory(const DatabasePtr&) = 0;
89
95 bool isFactory() const;
96
98 // Properties
100public:
107 const std::string& name() const;
108 void name(const std::string&);
112 DatabasePtr database() const;
113
115 // Execution
117public:
122 virtual ConcreteResultPtr execute(const TestCasePtr&) = 0;
123
125 // Old stuff
127public:
128 // FIXME[Robb Matzke 2020-07-14]: This should be in a subclass
151 void executionMonitor(const boost::filesystem::path& executorName)
152 {
153 execmon = executorName;
154 }
155
156 // FIXME[Robb Matzke 2020-07-14]: This should be in a subclass
157 boost::filesystem::path executionMonitor() const
158 {
159 return execmon;
160 }
163private:
164 // FIXME[Robb Matzke 2020-07-14]: This should be in a subclass
165 boost::filesystem::path execmon; // the execution monitor
166};
167
168} // namespace
169} // namespace
170} // namespace
171
172#endif
173#endif
Base class for reference counted objects.
Sawyer::SharedPointer< Node > Ptr
Reference counting pointer.
The ROSE library.