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
22
class
taint_parse_treet
23
{
24
public
:
25
class
rulet
26
{
27
public
:
28
enum
{
SOURCE
,
SINK
,
SANITIZER
}
kind
;
29
enum
{
THIS
,
PARAMETER
,
RETURN_VALUE
}
where
;
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
46
irep_idt
id
;
47
irep_idt
function_identifier
;
48
irep_idt
taint
;
49
unsigned
parameter_number
;
// the first one is '1'
50
std::string
message
;
51
52
void
output
(std::ostream &)
const
;
53
54
rulet
():
55
parameter_number
(0)
56
// The other class members are initialized by taint_parser().
57
{
58
}
59
};
60
61
typedef
std::list<rulet>
rulest
;
62
rulest
rules
;
63
64
void
output
(std::ostream &)
const
;
65
};
66
67
bool
taint_parser
(
68
const
std::string &taint_file_name,
69
taint_parse_treet
&,
70
message_handlert
&);
71
72
#endif // CPROVER_GOTO_ANALYZER_TAINT_PARSER_H
taint_parse_treet::rulet::taint
irep_idt taint
Definition:
taint_parser.h:48
dstringt
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Definition:
dstring.h:37
taint_parse_treet::rules
rulest rules
Definition:
taint_parser.h:62
taint_parse_treet::rulet::is_sanitizer
bool is_sanitizer() const
Definition:
taint_parser.h:41
taint_parse_treet::rulet::RETURN_VALUE
@ RETURN_VALUE
Definition:
taint_parser.h:29
taint_parse_treet::rulet::parameter_number
unsigned parameter_number
Definition:
taint_parser.h:49
taint_parse_treet
Definition:
taint_parser.h:23
taint_parse_treet::rulet::id
irep_idt id
Definition:
taint_parser.h:46
taint_parse_treet::rulet::SANITIZER
@ SANITIZER
Definition:
taint_parser.h:28
taint_parse_treet::rulet::rulet
rulet()
Definition:
taint_parser.h:54
taint_parse_treet::rulet::function_identifier
irep_idt function_identifier
Definition:
taint_parser.h:47
taint_parse_treet::rulet::kind
enum taint_parse_treet::rulet::@0 kind
taint_parse_treet::rulest
std::list< rulet > rulest
Definition:
taint_parser.h:61
taint_parse_treet::rulet::PARAMETER
@ PARAMETER
Definition:
taint_parser.h:29
message_handlert
Definition:
message.h:28
taint_parse_treet::rulet::is_sink
bool is_sink() const
Definition:
taint_parser.h:36
taint_parse_treet::rulet::output
void output(std::ostream &) const
Definition:
taint_parser.cpp:121
taint_parse_treet::rulet::SINK
@ SINK
Definition:
taint_parser.h:28
taint_parse_treet::rulet::THIS
@ THIS
Definition:
taint_parser.h:29
taint_parse_treet::rulet::where
enum taint_parse_treet::rulet::@1 where
taint_parse_treet::rulet
Definition:
taint_parser.h:26
taint_parse_treet::output
void output(std::ostream &) const
Definition:
taint_parser.cpp:146
taint_parser
bool taint_parser(const std::string &taint_file_name, taint_parse_treet &, message_handlert &)
Definition:
taint_parser.cpp:20
taint_parse_treet::rulet::message
std::string message
Definition:
taint_parser.h:50
taint_parse_treet::rulet::is_source
bool is_source() const
Definition:
taint_parser.h:31
message.h
taint_parse_treet::rulet::SOURCE
@ SOURCE
Definition:
taint_parser.h:28
irep.h
goto-analyzer
taint_parser.h
Generated by
1.8.20