cprover
Toggle main menu visibility
Loading...
Searching...
No Matches
object_id.h
Go to the documentation of this file.
1
/*******************************************************************\
2
3
Module: Object Identifiers
4
5
Author: Daniel Kroening, kroening@kroening.com
6
7
\*******************************************************************/
8
11
12
#ifndef CPROVER_GOTO_INSTRUMENT_OBJECT_ID_H
13
#define CPROVER_GOTO_INSTRUMENT_OBJECT_ID_H
14
15
#include <iosfwd>
16
#include <set>
17
18
#include <
util/std_expr.h
>
19
20
class
code_assignt
;
21
22
class
object_idt
23
{
24
public
:
25
object_idt
() { }
26
27
explicit
object_idt
(
const
symbol_exprt
&symbol_expr)
28
{
29
id
=symbol_expr.
get_identifier
();
30
}
31
32
explicit
object_idt
(
const
irep_idt
&identifier)
33
{
34
id
=identifier;
35
}
36
37
bool
operator<
(
const
object_idt
&other)
const
38
{
39
return
id
<other.
id
;
40
}
41
42
const
irep_idt
&
get_id
()
const
43
{
44
return
id
;
45
}
46
47
protected
:
48
irep_idt
id
;
49
};
50
51
inline
std::ostream &
operator<<
(
52
std::ostream &out,
53
const
object_idt
&object_id)
54
{
55
return
out << object_id.
get_id
();
56
}
57
58
typedef
std::set<object_idt>
object_id_sett
;
59
60
void
get_objects
(
const
exprt
&expr,
object_id_sett
&dest);
61
void
get_objects_r
(
const
code_assignt
&assign,
object_id_sett
&);
62
void
get_objects_w
(
const
code_assignt
&assign,
object_id_sett
&);
63
void
get_objects_w_lhs
(
const
exprt
&lhs,
object_id_sett
&);
64
void
get_objects_r_lhs
(
const
exprt
&lhs,
object_id_sett
&);
65
66
#endif
// CPROVER_GOTO_INSTRUMENT_OBJECT_ID_H
code_assignt
A goto_instruction_codet representing an assignment in the program.
Definition
goto_instruction_code.h:22
exprt
Base class for all expressions.
Definition
expr.h:57
object_idt
Definition
object_id.h:23
object_idt::id
irep_idt id
Definition
object_id.h:48
object_idt::object_idt
object_idt(const irep_idt &identifier)
Definition
object_id.h:32
object_idt::get_id
const irep_idt & get_id() const
Definition
object_id.h:42
object_idt::operator<
bool operator<(const object_idt &other) const
Definition
object_id.h:37
object_idt::object_idt
object_idt()
Definition
object_id.h:25
object_idt::object_idt
object_idt(const symbol_exprt &symbol_expr)
Definition
object_id.h:27
symbol_exprt
Expression to hold a symbol (variable).
Definition
std_expr.h:132
symbol_exprt::get_identifier
const irep_idt & get_identifier() const
Definition
std_expr.h:161
object_id_sett
std::set< object_idt > object_id_sett
Definition
object_id.h:58
get_objects_w
void get_objects_w(const code_assignt &assign, object_id_sett &)
Definition
object_id.cpp:89
get_objects_r
void get_objects_r(const code_assignt &assign, object_id_sett &)
Definition
object_id.cpp:83
get_objects_r_lhs
void get_objects_r_lhs(const exprt &lhs, object_id_sett &)
Definition
object_id.cpp:99
get_objects
void get_objects(const exprt &expr, object_id_sett &dest)
Definition
object_id.cpp:78
operator<<
std::ostream & operator<<(std::ostream &out, const object_idt &object_id)
Definition
object_id.h:51
get_objects_w_lhs
void get_objects_w_lhs(const exprt &lhs, object_id_sett &)
std_expr.h
API to expression classes.
irep_idt
dstringt irep_idt
Definition
verification_result.h:16
goto-instrument
object_id.h
Generated by
1.17.0