ROSE  0.11.109.0
UninitializedVariableTag.h
1 #ifndef ROSE_BinaryAnalysis_ModelChecker_UninitializedVariableTag_H
2 #define ROSE_BinaryAnalysis_ModelChecker_UninitializedVariableTag_H
3 #include <featureTests.h>
4 #ifdef ROSE_ENABLE_MODEL_CHECKER
5 
6 #include <Rose/BinaryAnalysis/ModelChecker/Tag.h>
7 #include <Rose/BinaryAnalysis/InstructionSemantics/BaseSemantics/Types.h>
8 #include <Rose/BinaryAnalysis/Variables.h>
9 
10 namespace Rose {
11 namespace BinaryAnalysis {
12 namespace ModelChecker {
13 
15 class UninitializedVariableTag: public Tag {
16 public:
17  using Ptr = UninitializedVariableTagPtr;
18 
19 private:
20  const TestMode testMode_; // may or must, but not off
21  const SgAsmInstruction *insn_; // instruction where the oob access occurs (optional)
22  const InstructionSemantics::BaseSemantics::SValuePtr addr_; // memory address that is accessed
23  const Variables::StackVariable variable_; // variable that was read before being written
24  const AddressInterval variableLocation_; // location and size of stack variable in memory
25 
26 protected:
27  UninitializedVariableTag() = delete;
28  UninitializedVariableTag(size_t nodeStep, TestMode, SgAsmInstruction*,
30  const Variables::StackVariable &variable, const AddressInterval &variableLocation);
31 
32  UninitializedVariableTag(const UninitializedVariableTag&) = delete;
33 
34 public:
35  ~UninitializedVariableTag();
36 
43  static Ptr instance(size_t nodeStep, TestMode, SgAsmInstruction*,
45  const Variables::StackVariable &variable, const AddressInterval &variableLocation);
46 
47 public:
48  virtual std::string name() const override;
49  virtual std::string printableName() const override;
50  virtual void print(std::ostream&, const std::string &prefix) const override;
51  virtual void toYaml(std::ostream&, const std::string &prefix) const override;
52 };
53 
54 } // namespace
55 } // namespace
56 } // namespace
57 
58 #endif
59 #endif
const char * TestMode(int64_t)
Convert Rose::BinaryAnalysis::ModelChecker::TestMode enum constant to a string.
Base class for machine instructions.
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.
Sawyer::SharedPointer< SValue > SValuePtr
Shared-ownership pointer to a semantic value in any domain.
Sawyer::SharedPointer< Node > Ptr
Reference counting pointer.