cprover
Toggle main menu visibility
Loading...
Searching...
No Matches
axioms.h
Go to the documentation of this file.
1
/*******************************************************************\
2
3
Module: Axioms
4
5
Author: Daniel Kroening, dkr@amazon.com
6
7
\*******************************************************************/
8
11
12
#ifndef CPROVER_CPROVER_AXIOMS_H
13
#define CPROVER_CPROVER_AXIOMS_H
14
15
#include <
util/std_expr.h
>
// IWYU pragma: keep
16
17
#include "
sentinel_dll.h
"
18
#include "
state.h
"
19
20
#include <map>
21
#include <set>
22
#include <unordered_map>
23
#include <unordered_set>
24
#include <vector>
25
26
class
decision_proceduret
;
27
28
class
axiomst
29
{
30
public
:
31
axiomst
(
32
decision_proceduret
&__dest,
33
const
std::unordered_set<symbol_exprt, irep_hash> &__address_taken,
34
bool
__verbose,
35
const
namespacet
&__ns)
36
:
dest
(__dest),
address_taken
(__address_taken),
verbose
(__verbose),
ns
(__ns)
37
{
38
}
39
40
void
set_to_true
(
exprt
);
41
void
set_to_false
(
exprt
);
42
void
emit
();
43
44
exprt
translate
(
exprt
)
const
;
45
46
protected
:
47
decision_proceduret
&
dest
;
48
const
std::unordered_set<symbol_exprt, irep_hash> &
address_taken
;
49
bool
verbose
=
false
;
50
const
namespacet
&
ns
;
51
52
std::vector<exprt>
constraints
;
53
54
exprt
replace
(
exprt
);
55
typet
replace
(
typet
);
56
std::unordered_map<exprt, symbol_exprt, irep_hash>
replacement_map
;
57
std::map<irep_idt, std::size_t>
counters
;
58
59
void
node
(
const
exprt
&);
60
61
std::set<address_of_exprt>
address_of_exprs
;
62
63
std::set<object_address_exprt>
object_address_exprs
;
64
65
std::set<state_ok_exprt>
ok_exprs
;
66
void
add
(
const
state_ok_exprt
&);
67
void
ok_fc
();
68
69
std::set<evaluate_exprt>
evaluate_exprs
;
70
void
evaluate_fc
();
71
72
std::set<state_is_cstring_exprt>
is_cstring_exprs
;
73
void
add
(
const
state_is_cstring_exprt
&,
bool
recursive);
74
void
is_cstring_fc
();
75
76
std::set<state_is_dynamic_object_exprt>
is_dynamic_object_exprs
;
77
void
is_dynamic_object_fc
();
78
79
std::set<state_live_object_exprt>
live_object_exprs
;
80
void
live_object
();
81
void
live_object_fc
();
82
83
std::set<state_writeable_object_exprt>
writeable_object_exprs
;
84
void
writeable_object
();
85
void
writeable_object_fc
();
86
87
std::set<state_object_size_exprt>
object_size_exprs
;
88
void
object_size
();
89
void
object_size_fc
();
90
91
std::set<state_is_sentinel_dll_exprt>
is_sentinel_dll_exprs
;
92
void
is_sentinel_dll
();
93
94
std::set<initial_state_exprt>
initial_state_exprs
;
95
void
initial_state
();
96
};
97
98
static
inline
axiomst
&
operator<<
(
axiomst
&axioms,
exprt
src)
99
{
100
axioms.
set_to_true
(std::move(src));
101
return
axioms;
102
}
103
104
#endif
// CPROVER_CPROVER_AXIOMS_H
operator<<
static axiomst & operator<<(axiomst &axioms, exprt src)
Definition
axioms.h:98
axiomst
Definition
axioms.h:29
axiomst::is_dynamic_object_fc
void is_dynamic_object_fc()
Definition
axioms.cpp:219
axiomst::address_of_exprs
std::set< address_of_exprt > address_of_exprs
Definition
axioms.h:61
axiomst::ok_exprs
std::set< state_ok_exprt > ok_exprs
Definition
axioms.h:65
axiomst::replacement_map
std::unordered_map< exprt, symbol_exprt, irep_hash > replacement_map
Definition
axioms.h:56
axiomst::object_address_exprs
std::set< object_address_exprt > object_address_exprs
Definition
axioms.h:63
axiomst::live_object_exprs
std::set< state_live_object_exprt > live_object_exprs
Definition
axioms.h:79
axiomst::evaluate_exprs
std::set< evaluate_exprt > evaluate_exprs
Definition
axioms.h:69
axiomst::object_size
void object_size()
Definition
axioms.cpp:241
axiomst::verbose
bool verbose
Definition
axioms.h:49
axiomst::object_size_fc
void object_size_fc()
Definition
axioms.cpp:278
axiomst::is_dynamic_object_exprs
std::set< state_is_dynamic_object_exprt > is_dynamic_object_exprs
Definition
axioms.h:76
axiomst::is_sentinel_dll_exprs
std::set< state_is_sentinel_dll_exprt > is_sentinel_dll_exprs
Definition
axioms.h:91
axiomst::initial_state_exprs
std::set< initial_state_exprt > initial_state_exprs
Definition
axioms.h:94
axiomst::writeable_object_exprs
std::set< state_writeable_object_exprt > writeable_object_exprs
Definition
axioms.h:83
axiomst::live_object_fc
void live_object_fc()
Definition
axioms.cpp:126
axiomst::emit
void emit()
Definition
axioms.cpp:749
axiomst::ns
const namespacet & ns
Definition
axioms.h:50
axiomst::live_object
void live_object()
Definition
axioms.cpp:108
axiomst::ok_fc
void ok_fc()
Definition
axioms.cpp:298
axiomst::counters
std::map< irep_idt, std::size_t > counters
Definition
axioms.h:57
axiomst::translate
exprt translate(exprt) const
Definition
axioms.cpp:350
axiomst::set_to_true
void set_to_true(exprt)
Definition
axioms.cpp:29
axiomst::is_cstring_fc
void is_cstring_fc()
Definition
axioms.cpp:85
axiomst::evaluate_fc
void evaluate_fc()
Definition
axioms.cpp:58
axiomst::set_to_false
void set_to_false(exprt)
Definition
axioms.cpp:34
axiomst::axiomst
axiomst(decision_proceduret &__dest, const std::unordered_set< symbol_exprt, irep_hash > &__address_taken, bool __verbose, const namespacet &__ns)
Definition
axioms.h:31
axiomst::initial_state
void initial_state()
Definition
axioms.cpp:324
axiomst::is_cstring_exprs
std::set< state_is_cstring_exprt > is_cstring_exprs
Definition
axioms.h:72
axiomst::writeable_object
void writeable_object()
Definition
axioms.cpp:146
axiomst::address_taken
const std::unordered_set< symbol_exprt, irep_hash > & address_taken
Definition
axioms.h:48
axiomst::dest
decision_proceduret & dest
Definition
axioms.h:47
axiomst::object_size_exprs
std::set< state_object_size_exprt > object_size_exprs
Definition
axioms.h:87
axiomst::constraints
std::vector< exprt > constraints
Definition
axioms.h:52
axiomst::is_sentinel_dll
void is_sentinel_dll()
axiomst::replace
exprt replace(exprt)
Definition
axioms.cpp:359
axiomst::add
void add(const state_ok_exprt &)
Definition
axioms.cpp:628
axiomst::writeable_object_fc
void writeable_object_fc()
Definition
axioms.cpp:197
axiomst::node
void node(const exprt &)
Definition
axioms.cpp:399
decision_proceduret
An interface for a decision procedure for satisfiability problems.
Definition
decision_procedure.h:22
exprt
Base class for all expressions.
Definition
expr.h:57
namespacet
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
Definition
namespace.h:91
state_is_cstring_exprt
Definition
state.h:573
state_ok_exprt
Definition
state.h:823
typet
The type of an expression, extends irept.
Definition
type.h:29
sentinel_dll.h
state.h
std_expr.h
API to expression classes.
cprover
axioms.h
Generated by
1.17.0