CBMC
Loading...
Searching...
No Matches
goto_symex_property_decider.h
Go to the documentation of this file.
1/*******************************************************************\
2
3Module: Property Decider for Goto-Symex
4
5Author: 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
16
17#include "properties.h"
18#include "solver_factory.h"
19
21
24{
25public:
27 const optionst &options,
30 const namespacet &ns);
31
34 void
36
38 void convert_goals();
39
42 std::function<bool(const irep_idt &property_id)> select_property);
43
46
49
52
55
64 propertiest &properties,
65 std::unordered_set<irep_idt> &updated_properties,
67 bool set_pass = true) const;
68protected:
72 std::unique_ptr<solver_factoryt::solvert> solver;
73
74 struct goalt
75 {
77 std::vector<symex_target_equationt::SSA_stepst::iterator> instances;
78
81
82 exprt as_expr() const;
83 };
84
88 std::map<irep_idt, goalt> goal_map;
89};
90
91#endif // CPROVER_GOTO_CHECKER_GOTO_SYMEX_PROPERTY_DECIDER_H
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Definition ai.h:562
resultt
Result of running the decision procedure.
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Definition dstring.h:38
Base class for all expressions.
Definition expr.h:56
Provides management of goal variables that encode properties.
symex_target_equationt & get_equation() const
Return the equation associated with this instance.
boolbvt & get_boolbv_decision_procedure() const
Returns the solver instance.
stack_decision_proceduret & get_decision_procedure() const
Returns the solver instance.
decision_proceduret::resultt solve()
Calls solve() on the solver instance.
std::unique_ptr< solver_factoryt::solvert > solver
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...
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.
void add_constraint_from_goals(std::function< bool(const irep_idt &property_id)> select_property)
Add disjunction of negated selected properties to the equation.
void convert_goals()
Convert the instances of a property into a goal variable.
std::map< irep_idt, goalt > goal_map
Maintains the relation between a property ID and the corresponding goal variable that encodes the neg...
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
Definition namespace.h:91
Inheriting the interface of symex_targett this class represents the SSA form of the input program as ...
Properties.
std::map< irep_idt, property_infot > propertiest
A map of property IDs to property infos.
Definition properties.h:76
Solver Factory.
std::vector< symex_target_equationt::SSA_stepst::iterator > instances
A property holds if all instances of it are true.
Generate Equation using Symbolic Execution.