ROSE  0.11.145.0
ModelChecker/Variables.h
1 #ifndef ROSE_BinaryAnalysis_ModelChecker_Variables_H
2 #define ROSE_BinaryAnalysis_ModelChecker_Variables_H
3 #include <featureTests.h>
4 #ifdef ROSE_ENABLE_MODEL_CHECKER
5 
6 #include <Rose/BinaryAnalysis/Partitioner2/BasicTypes.h>
7 #include <Rose/BinaryAnalysis/Variables.h>
8 
9 namespace Rose {
10 namespace BinaryAnalysis {
11 namespace ModelChecker {
12 
16 class FoundVariable {
17  AddressInterval where_; // addresses for the variable
18  Variables::GlobalVariable gvar_; // global variable if found
19  Variables::StackVariable lvar_; // local variable if found and no global variable
20 
21 public:
22  ~FoundVariable();
23 
25  FoundVariable();
26 
28  explicit FoundVariable(const Variables::GlobalVariable&);
29 
34  FoundVariable(const AddressInterval&, const Variables::StackVariable&);
35 
40  const AddressInterval& where() const;
41 
46  const Variables::StackVariable& stackVariable() const;
47 
52  const Variables::GlobalVariable& globalVariable() const;
53 
57  Partitioner2::FunctionPtr function() const;
58 
62  bool isValid() const;
63  explicit operator bool() const;
67  bool operator!() const;
68 
70  void print(std::ostream&) const;
71 
73  std::string toString() const;
74 };
75 
76 std::ostream&
77 operator<<(std::ostream&, const FoundVariable&);
78 
79 } // namespace
80 } // namespace
81 } // namespace
82 
83 #endif
84 #endif
Main namespace for the ROSE library.
ROSE_UTIL_API std::string toString(const Path &)
Convert a path to a string.
Sawyer::SharedPointer< Function > FunctionPtr
Shared-ownership pointer for Function.
void print(const StackVariables &, const Partitioner2::PartitionerConstPtr &, std::ostream &out, const std::string &prefix="")
Print info about multiple local variables.