ROSE 0.11.145.147
Path.h
1#ifndef ROSE_BinaryAnalysis_ModelChecker_Path_H
2#define ROSE_BinaryAnalysis_ModelChecker_Path_H
3#include <featureTests.h>
4#ifdef ROSE_ENABLE_MODEL_CHECKER
5
6#include <Rose/BinaryAnalysis/ModelChecker/BasicTypes.h>
7
8#include <Rose/BinaryAnalysis/InstructionSemantics/BaseSemantics/BasicTypes.h>
9#include <Rose/BinaryAnalysis/SmtSolver.h>
10#include <Rose/BinaryAnalysis/SymbolicExpression.h>
11#include <Combinatorics.h>
12
13namespace Rose {
14namespace BinaryAnalysis {
15namespace ModelChecker {
16
21class Path {
22public:
23 using Ptr = PathPtr;
24
25private:
26 PathNodePtr end_;
27
28protected:
29 Path() = delete;
30 explicit Path(const PathNodePtr &end);
31public:
32 ~Path();
33
34public:
40 static Ptr instance(const ExecutionUnitPtr&);
41
49 static Ptr instance(const PathPtr &prefix, const ExecutionUnitPtr&, const SymbolicExpression::Ptr &assertion,
50 const SmtSolver::Evidence&, const InstructionSemantics::BaseSemantics::StatePtr &parentOutgoingState);
51
57 bool isEmpty() const;
58
64 size_t nNodes() const;
65
71 size_t nSteps() const;
72
80 double processingTime() const;
81
90 uint64_t hash() const;
91 void hash(Combinatorics::Hasher&) const;
99 bool executionFailed() const;
100
106 std::vector<SymbolicExpression::Ptr> assertions() const;
107
113 PathNodePtr lastNode() const;
114
121 PathNodePtr firstNode() const;
122
131 std::vector<PathNodePtr> nodes() const;
132
136 std::string printableName() const;
137
144 void print(const SettingsPtr&, std::ostream&, const std::string &prefix, size_t maxSteps) const;
145
152 void toYaml(const SettingsPtr&, std::ostream&, const std::string &prefix, size_t maxSteps) const;
153
155 std::vector<Sarif::LocationPtr> toSarif(size_t maxSteps) const;
156};
157
158} // namespace
159} // namespace
160} // namespace
161
162#endif
163#endif
Sawyer::SharedPointer< Node > Ptr
Reference counting pointer.
uint64_t nNodes(InputIterator begin, InputIterator end)
Counts the number of nodes.
Hash hash(const std::vector< Ptr > &)
Hash zero or more expressions.
void print(const StackVariables &, const Partitioner2::PartitionerConstPtr &, std::ostream &out, const std::string &prefix="")
Print info about multiple local variables.
boost::filesystem::path Path
Name of entities in a filesystem.
The ROSE library.