ROSE  0.11.50.0
InputVariables.h
1 #ifndef ROSE_BinaryAnalysis_Concolic_InputVariables_H
2 #define ROSE_BinaryAnalysis_Concolic_InputVariables_H
3 #include <featureTests.h>
4 #ifdef ROSE_ENABLE_CONCOLIC_TESTING
5 #include <Rose/BinaryAnalysis/Concolic/BasicTypes.h>
6 
7 #include <Rose/BinaryAnalysis/SymbolicExpr.h>
8 
9 namespace Rose {
10 namespace BinaryAnalysis {
11 namespace Concolic {
12 
20 class InputVariables {
21 private:
22  typedef Sawyer::Container::Map<uint64_t, ExecutionEventPtr> Variables; // map symbolic variable ID to program input
23  Variables variables_;
24 
25 public:
27  void insertProgramArgumentCount(const ExecutionEventPtr&, const SymbolicExpr::Ptr &variable);
28 
32  void insertProgramArgument(const ExecutionEventPtr&, size_t i, size_t j, const SymbolicExpr::Ptr &variable);
33 
37  void insertEnvironmentVariable(const ExecutionEventPtr&, size_t i, size_t j, const SymbolicExpr::Ptr &variable);
38 
40  void insertSystemCallReturn(const ExecutionEventPtr&, const SymbolicExpr::Ptr &variable);
41 
43  void insertSharedMemoryRead(const ExecutionEventPtr&, const SymbolicExpr::Ptr &variable);
44 
46  void insertEvent(const ExecutionEventPtr&);
47 
49  ExecutionEventPtr get(const std::string &symbolicVarName) const;
50 
52  void print(std::ostream&, const std::string &prefix = "") const;
53 
54  friend std::ostream& operator<<(std::ostream &out, const InputVariables &x) {
55  x.print(out);
56  return out;
57  }
58 };
59 
60 } // namespace
61 } // namespace
62 } // namespace
63 
64 #endif
65 #endif
Sawyer::SharedPointer< Node > Ptr
Shared-ownership pointer to an expression Node.
Definition: SymbolicExpr.h:156
void print(const StackVariables &, const Partitioner2::Partitioner &, std::ostream &out, const std::string &prefix="")
Print info about multiple local variables.
Main namespace for the ROSE library.
Container associating values with keys.
Definition: Sawyer/Map.h:66