ROSE  0.11.51.0
NullDerefTag.h
1 #ifndef ROSE_BinaryAnalysis_ModelChecker_NullDerefTag_H
2 #define ROSE_BinaryAnalysis_ModelChecker_NullDerefTag_H
3 #include <featureTests.h>
4 #ifdef ROSE_ENABLE_BINARY_ANALYSIS
5 
6 #include <Rose/BinaryAnalysis/ModelChecker/Tag.h>
7 #include <Rose/BinaryAnalysis/InstructionSemantics2/BaseSemantics/Types.h>
8 
9 namespace Rose {
10 namespace BinaryAnalysis {
11 namespace ModelChecker {
12 
14 class NullDerefTag: public Tag {
15 public:
16  using Ptr = NullDerefTagPtr;
17 
18 private:
19  const TestMode testMode_; // may or must, but not off
20  const IoMode ioMode_; // read or write
21  SgAsmInstruction* const insn_; // instruction where the dereference occurs (optional)
22  const InstructionSemantics2::BaseSemantics::SValuePtr addr_; // memory address that is considered to be null
23 
24 protected:
25  NullDerefTag() = delete;
28 public:
29  ~NullDerefTag();
30 
34  static Ptr instance(size_t nodeStep, TestMode, IoMode, SgAsmInstruction*,
36 
37 public:
38  virtual std::string name() const override;
39  virtual std::string printableName() const override;
40  virtual void print(std::ostream&, const std::string &prefix) const override;
41  virtual void toYaml(std::ostream&, const std::string &prefix) const override;
42 };
43 
44 } // namespace
45 } // namespace
46 } // namespace
47 
48 #endif
49 #endif
static Ptr instance(size_t nodeStep, TestMode, IoMode, SgAsmInstruction *, const InstructionSemantics2::BaseSemantics::SValuePtr &addr)
Allocating constructor.
Base class for machine instructions.
TestMode
Mode by which comparisons are made.
virtual std::string printableName() const override
String to identify this tag.
virtual void toYaml(std::ostream &, const std::string &prefix) const override
Print multi-line information about the tag in YAML format.
Main namespace for the ROSE library.
IoMode
Direction of data wrt storage.
Information tagged to a path node.
Definition: Tag.h:22
Tag that describes a null pointer dereference.
Definition: NullDerefTag.h:14
size_t nodeStep() const
Property: Node step.
virtual void print(std::ostream &, const std::string &prefix) const override
Print multi-line information about the tag.
virtual std::string name() const override
Property: Generic name of tag.