cprover
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/message.h>
20 #include <util/irep.h>
21 
23 {
24 public:
25  class rulet
26  {
27  public:
28  enum { SOURCE, SINK, SANITIZER } kind;
30 
31  bool is_source() const
32  {
33  return kind==SOURCE;
34  }
35 
36  bool is_sink() const
37  {
38  return kind==SINK;
39  }
40 
41  bool is_sanitizer() const
42  {
43  return kind==SANITIZER;
44  }
45 
49  unsigned parameter_number; // the first one is '1'
50  std::string message;
51 
52  void output(std::ostream &) const;
53 
54  rulet():
56  // The other class members are initialized by taint_parser().
57  {
58  }
59  };
60 
61  typedef std::list<rulet> rulest;
63 
64  void output(std::ostream &) const;
65 };
66 
67 bool taint_parser(
68  const std::string &taint_file_name,
71 
72 #endif // CPROVER_GOTO_ANALYZER_TAINT_PARSER_H
void output(std::ostream &) const
void output(std::ostream &) const
std::list< rulet > rulest
Definition: taint_parser.h:61
bool taint_parser(const std::string &taint_file_name, taint_parse_treet &, message_handlert &)
enum taint_parse_treet::rulet::@0 kind
bool is_sanitizer() const
Definition: taint_parser.h:41
enum taint_parse_treet::rulet::@1 where