CBMC
taint_parser.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: Taint Parser
4 
5 Author: Daniel Kroening, kroening@kroening.com
6 
7 \*******************************************************************/
8 
11 
12 #ifndef CPROVER_GOTO_ANALYZER_TAINT_PARSER_H
13 #define CPROVER_GOTO_ANALYZER_TAINT_PARSER_H
14 
15 #include <string>
16 #include <list>
17 #include <iosfwd>
18 
19 #include <util/irep.h>
20 
21 class message_handlert;
22 
24 {
25 public:
26  class rulet
27  {
28  public:
29  enum { SOURCE, SINK, SANITIZER } kind;
31 
32  bool is_source() const
33  {
34  return kind==SOURCE;
35  }
36 
37  bool is_sink() const
38  {
39  return kind==SINK;
40  }
41 
42  bool is_sanitizer() const
43  {
44  return kind==SANITIZER;
45  }
46 
50  unsigned parameter_number; // the first one is '1'
51  std::string message;
52 
53  void output(std::ostream &) const;
54 
55  rulet():
57  // The other class members are initialized by taint_parser().
58  {
59  }
60  };
61 
62  typedef std::list<rulet> rulest;
64 
65  void output(std::ostream &) const;
66 };
67 
68 bool taint_parser(
69  const std::string &taint_file_name,
72 
73 #endif // CPROVER_GOTO_ANALYZER_TAINT_PARSER_H
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Definition: dstring.h:38
bool is_sanitizer() const
Definition: taint_parser.h:42
enum taint_parse_treet::rulet::@2 where
void output(std::ostream &) const
enum taint_parse_treet::rulet::@1 kind
void output(std::ostream &) const
std::list< rulet > rulest
Definition: taint_parser.h:62
bool taint_parser(const std::string &taint_file_name, taint_parse_treet &, message_handlert &)