ROSE 0.11.145.147
InstructionUnit.h
1#ifndef ROSE_BinaryAnalysis_ModelChecker_InstructionUnit_H
2#define ROSE_BinaryAnalysis_ModelChecker_InstructionUnit_H
3#include <featureTests.h>
4#ifdef ROSE_ENABLE_MODEL_CHECKER
5
6#include <Rose/BinaryAnalysis/Address.h>
7#include <Rose/BinaryAnalysis/ModelChecker/ExecutionUnit.h>
8
10
11namespace Rose {
12namespace BinaryAnalysis {
13namespace ModelChecker {
14
18class InstructionUnit: public ExecutionUnit {
19public:
20 using Ptr = InstructionUnitPtr;
21
22private:
23 SgAsmInstruction *insn_;
24
25protected:
26 InstructionUnit() = delete;
27 InstructionUnit(SgAsmInstruction*, const SourceLocation&);
28public:
29 ~InstructionUnit();
30
31public:
37 static Ptr instance(SgAsmInstruction*, const SourceLocation&);
38
39public:
46 SgAsmInstruction* instruction() const;
47
48public:
49 virtual std::string printableName() const override;
50 virtual void printSteps(const SettingsPtr&, std::ostream&, const std::string &prefix,
51 size_t stepOrigin, size_t maxSteps) const override;
52 virtual void toYamlHeader(const SettingsPtr&, std::ostream&, const std::string &prefix) const override;
53 virtual void toYamlSteps(const SettingsPtr&, std::ostream&, const std::string &prefix,
54 size_t stepOrigin, size_t maxSteps) const override;
55 virtual std::vector<Sarif::LocationPtr> toSarif(size_t maxSteps) const override;
56 virtual size_t nSteps() const override;
57 virtual Sawyer::Optional<rose_addr_t> address() const override;
58
59 virtual std::vector<TagPtr>
60 execute(const SettingsPtr&, const SemanticCallbacksPtr&,
61 const InstructionSemantics::BaseSemantics::RiscOperatorsPtr&) override;
62};
63
64} // namespace
65} // namespace
66} // namespace
67
68#endif
69#endif
Holds a value or nothing.
Definition Optional.h:56
Base class for machine instructions.
Sawyer::SharedPointer< Node > Ptr
Reference counting pointer.
The ROSE library.