ROSE 0.11.145.147
BasicBlockUnit.h
1#ifndef ROSE_BinaryAnalysis_ModelChecker_BasicBlockUnit_H
2#define ROSE_BinaryAnalysis_ModelChecker_BasicBlockUnit_H
3#include <featureTests.h>
4#ifdef ROSE_ENABLE_MODEL_CHECKER
5
6#include <Rose/BinaryAnalysis/ModelChecker/ExecutionUnit.h>
7#include <Rose/BinaryAnalysis/Partitioner2/BasicTypes.h>
8
9namespace Rose {
10namespace BinaryAnalysis {
11namespace ModelChecker {
12
16class BasicBlockUnit: public ExecutionUnit {
17public:
18 using Ptr = BasicBlockUnitPtr;
19
20private:
21 Partitioner2::PartitionerConstPtr partitioner_; // not null
22 Partitioner2::BasicBlockPtr bblock_;
23
24protected:
25 BasicBlockUnit() = delete;
26 BasicBlockUnit(const Partitioner2::PartitionerConstPtr &partitioner, const Partitioner2::BasicBlockPtr&);
27public:
28 ~BasicBlockUnit();
29
30public:
36 static Ptr instance(const Partitioner2::PartitionerConstPtr&, const Partitioner2::BasicBlockPtr&);
37
38public:
45 Partitioner2::BasicBlockPtr basicBlock() const;
46
47public:
48 virtual std::string printableName() const override;
49 virtual void printSteps(const SettingsPtr&, std::ostream&, const std::string &prefix,
50 size_t stepOrigin, size_t maxSteps) const override;
51 virtual void toYamlHeader(const SettingsPtr&, std::ostream&, const std::string &prefix) const override;
52 virtual void toYamlSteps(const SettingsPtr&, std::ostream&, const std::string &prefix,
53 size_t stepOrigin, size_t maxSteps) const override;
54 virtual std::vector<Sarif::LocationPtr> toSarif(size_t maxSteps) const override;
55 virtual size_t nSteps() const override;
56 virtual Sawyer::Optional<rose_addr_t> address() const override;
57 virtual bool containsUnknownInsn() const override;
58
59 virtual std::vector<TagPtr>
60 execute(const SettingsPtr&, const SemanticCallbacksPtr&,
61 const InstructionSemantics::BaseSemantics::RiscOperatorsPtr&) override;
62};
63
64
65} // namespace
66} // namespace
67} // namespace
68
69#endif
70#endif
Holds a value or nothing.
Definition Optional.h:56
Sawyer::SharedPointer< Node > Ptr
Reference counting pointer.
The ROSE library.