cprover
Toggle main menu visibility
Loading...
Searching...
No Matches
goto_symex_property_decider.h
Go to the documentation of this file.
1
/*******************************************************************\
2
3
Module: Property Decider for Goto-Symex
4
5
Author: Daniel Kroening, Peter Schrammel
6
7
\*******************************************************************/
8
11
12
#ifndef CPROVER_GOTO_CHECKER_GOTO_SYMEX_PROPERTY_DECIDER_H
13
#define CPROVER_GOTO_CHECKER_GOTO_SYMEX_PROPERTY_DECIDER_H
14
15
#include <
goto-symex/symex_target_equation.h
>
16
17
#include "
properties.h
"
18
#include "
solver_factory.h
"
19
20
class
ui_message_handlert
;
21
23
class
goto_symex_property_decidert
24
{
25
public
:
26
goto_symex_property_decidert
(
27
const
optionst
&
options
,
28
ui_message_handlert
&
ui_message_handler
,
29
symex_target_equationt
&
equation
,
30
const
namespacet
&ns);
31
34
void
35
update_properties_goals_from_symex_target_equation
(
propertiest
&properties);
36
38
void
convert_goals
();
39
41
void
add_constraint_from_goals
(
42
std::function<
bool
(
const
irep_idt
&property_id)> select_property);
43
45
decision_proceduret::resultt
solve
();
46
48
stack_decision_proceduret
&
get_decision_procedure
()
const
;
49
51
boolbvt
&
get_boolbv_decision_procedure
()
const
;
52
54
symex_target_equationt
&
get_equation
()
const
;
55
63
void
update_properties_status_from_goals
(
64
propertiest
&properties,
65
std::unordered_set<irep_idt> &updated_properties,
66
decision_proceduret::resultt
dec_result,
67
bool
set_pass =
true
)
const
;
68
protected
:
69
const
optionst
&
options
;
70
ui_message_handlert
&
ui_message_handler
;
71
symex_target_equationt
&
equation
;
72
std::unique_ptr<solver_factoryt::solvert>
solver
;
73
74
struct
goalt
75
{
77
std::vector<symex_target_equationt::SSA_stepst::iterator>
instances
;
78
80
exprt
condition
;
81
82
exprt
as_expr
()
const
;
83
};
84
89
std::map<std::string, goalt>
goal_map
;
90
};
91
92
#endif
// CPROVER_GOTO_CHECKER_GOTO_SYMEX_PROPERTY_DECIDER_H
boolbvt
Definition
boolbv.h:50
decision_proceduret::resultt
resultt
Result of running the decision procedure.
Definition
decision_procedure.h:45
exprt
Base class for all expressions.
Definition
expr.h:57
goto_symex_property_decidert::get_equation
symex_target_equationt & get_equation() const
Return the equation associated with this instance.
Definition
goto_symex_property_decider.cpp:126
goto_symex_property_decidert::options
const optionst & options
Definition
goto_symex_property_decider.h:69
goto_symex_property_decidert::get_boolbv_decision_procedure
boolbvt & get_boolbv_decision_procedure() const
Returns the solver instance.
Definition
goto_symex_property_decider.cpp:121
goto_symex_property_decidert::goto_symex_property_decidert
goto_symex_property_decidert(const optionst &options, ui_message_handlert &ui_message_handler, symex_target_equationt &equation, const namespacet &ns)
Definition
goto_symex_property_decider.cpp:19
goto_symex_property_decidert::ui_message_handler
ui_message_handlert & ui_message_handler
Definition
goto_symex_property_decider.h:70
goto_symex_property_decidert::get_decision_procedure
stack_decision_proceduret & get_decision_procedure() const
Returns the solver instance.
Definition
goto_symex_property_decider.cpp:116
goto_symex_property_decidert::solve
decision_proceduret::resultt solve()
Calls solve() on the solver instance.
Definition
goto_symex_property_decider.cpp:110
goto_symex_property_decidert::solver
std::unique_ptr< solver_factoryt::solvert > solver
Definition
goto_symex_property_decider.h:72
goto_symex_property_decidert::equation
symex_target_equationt & equation
Definition
goto_symex_property_decider.h:71
goto_symex_property_decidert::goal_map
std::map< std::string, goalt > goal_map
Maintains the relation between a property ID and the corresponding goal variable that encodes the neg...
Definition
goto_symex_property_decider.h:89
goto_symex_property_decidert::update_properties_goals_from_symex_target_equation
void update_properties_goals_from_symex_target_equation(propertiest &properties)
Get the conditions for the properties from the equation and collect all 'instances' of the properties...
Definition
goto_symex_property_decider.cpp:44
goto_symex_property_decidert::update_properties_status_from_goals
void update_properties_status_from_goals(propertiest &properties, std::unordered_set< irep_idt > &updated_properties, decision_proceduret::resultt dec_result, bool set_pass=true) const
Update the property status from the truth value of the goal variable.
Definition
goto_symex_property_decider.cpp:131
goto_symex_property_decidert::add_constraint_from_goals
void add_constraint_from_goals(std::function< bool(const irep_idt &property_id)> select_property)
Add disjunction of negated selected properties to the equation.
Definition
goto_symex_property_decider.cpp:83
goto_symex_property_decidert::convert_goals
void convert_goals()
Convert the instances of a property into a goal variable.
Definition
goto_symex_property_decider.cpp:72
namespacet
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
Definition
namespace.h:91
optionst
Definition
options.h:23
stack_decision_proceduret
Definition
stack_decision_procedure.h:58
symex_target_equationt
Inheriting the interface of symex_targett this class represents the SSA form of the input program as ...
Definition
symex_target_equation.h:34
ui_message_handlert
Definition
ui_message.h:22
properties.h
Properties.
propertiest
std::map< irep_idt, property_infot > propertiest
A map of property IDs to property infos.
Definition
properties.h:76
solver_factory.h
Solver Factory.
goto_symex_property_decidert::goalt
Definition
goto_symex_property_decider.h:75
goto_symex_property_decidert::goalt::instances
std::vector< symex_target_equationt::SSA_stepst::iterator > instances
A property holds if all instances of it are true.
Definition
goto_symex_property_decider.h:77
goto_symex_property_decidert::goalt::as_expr
exprt as_expr() const
Definition
goto_symex_property_decider.cpp:34
goto_symex_property_decidert::goalt::condition
exprt condition
The goal variable.
Definition
goto_symex_property_decider.h:80
symex_target_equation.h
Generate Equation using Symbolic Execution.
irep_idt
dstringt irep_idt
Definition
verification_result.h:16
goto-checker
goto_symex_property_decider.h
Generated by
1.17.0