CBMC
single_path_symex_checker.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: Goto Checker using Single Path Symbolic Execution
4 
5 Author: Daniel Kroening, Peter Schrammel
6 
7 \*******************************************************************/
8 
11 
12 #ifndef CPROVER_GOTO_CHECKER_SINGLE_PATH_SYMEX_CHECKER_H
13 #define CPROVER_GOTO_CHECKER_SINGLE_PATH_SYMEX_CHECKER_H
14 
15 #include <chrono>
16 
18 #include "goto_trace_provider.h"
20 #include "witness_provider.h"
21 
25  public witness_providert,
27 {
28 public:
30  const optionst &options,
33 
34  resultt operator()(propertiest &) override;
35 
36  goto_tracet build_full_trace() const override;
37  goto_tracet build_shortest_trace() const override;
38  goto_tracet build_trace(const irep_idt &) const override;
39  const namespacet &get_namespace() const override;
40 
41  void output_error_witness(const goto_tracet &) override;
42  void output_proof() override;
43 
44  virtual ~single_path_symex_checkert() = default;
45 
46 protected:
47  bool symex_initialized = false;
48  std::unique_ptr<goto_symex_property_decidert> property_decider;
49 
50  bool
51  is_ready_to_decide(const symex_bmct &, const path_storaget::patht &) override;
52 
57  virtual std::chrono::duration<double> prepare_property_decider(
58  propertiest &properties,
59  symex_target_equationt &equation,
61 
67  virtual void run_property_decider(
69  propertiest &properties,
71  std::chrono::duration<double> solver_runtime);
72 };
73 
74 #endif // CPROVER_GOTO_CHECKER_SINGLE_PATH_SYMEX_CHECKER_H
single_path_symex_checkert::build_trace
goto_tracet build_trace(const irep_idt &) const override
Builds and returns the trace for the FAILed property with the given property_id.
Definition: single_path_symex_checker.cpp:162
dstringt
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Definition: dstring.h:36
ui_message_handlert
Definition: ui_message.h:21
incremental_goto_checkert::resultt
Definition: incremental_goto_checker.h:42
optionst
Definition: options.h:22
incremental_goto_checkert::options
const optionst & options
Definition: incremental_goto_checker.h:91
single_path_symex_checkert::~single_path_symex_checkert
virtual ~single_path_symex_checkert()=default
single_path_symex_checkert::symex_initialized
bool symex_initialized
Definition: single_path_symex_checker.h:47
goto_symex_property_decider.h
goto_trace_providert
An implementation of incremental_goto_checkert may implement this interface to provide goto traces.
Definition: goto_trace_provider.h:22
single_path_symex_checkert::prepare_property_decider
virtual std::chrono::duration< double > prepare_property_decider(propertiest &properties, symex_target_equationt &equation, goto_symex_property_decidert &property_decider)
Prepare the property_decider for solving.
Definition: single_path_symex_checker.cpp:102
propertiest
std::map< irep_idt, property_infot > propertiest
A map of property IDs to property infos.
Definition: properties.h:76
goto_trace_provider.h
single_path_symex_checkert::is_ready_to_decide
bool is_ready_to_decide(const symex_bmct &, const path_storaget::patht &) override
Returns whether the given path produced by symex is ready to be checked.
Definition: single_path_symex_checker.cpp:94
single_path_symex_only_checkert::goto_model
abstract_goto_modelt & goto_model
Definition: single_path_symex_only_checker.h:39
single_path_symex_checkert
Uses goto-symex to symbolically execute each path in the goto model and calls a solver to find proper...
Definition: single_path_symex_checker.h:24
namespacet
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
Definition: namespace.h:90
single_path_symex_checkert::build_shortest_trace
goto_tracet build_shortest_trace() const override
Builds and returns the trace up to the first failed property.
Definition: single_path_symex_checker.cpp:141
single_path_symex_checkert::run_property_decider
virtual void run_property_decider(incremental_goto_checkert::resultt &result, propertiest &properties, goto_symex_property_decidert &property_decider, std::chrono::duration< double > solver_runtime)
Run the property_decider, which calls the SAT solver, and set the status of checked properties accord...
Definition: single_path_symex_checker.cpp:113
single_path_symex_checkert::single_path_symex_checkert
single_path_symex_checkert(const optionst &options, ui_message_handlert &ui_message_handler, abstract_goto_modelt &goto_model)
Definition: single_path_symex_checker.cpp:20
witness_provider.h
single_path_symex_checkert::output_error_witness
void output_error_witness(const goto_tracet &) override
Definition: single_path_symex_checker.cpp:180
single_path_symex_checkert::operator()
resultt operator()(propertiest &) override
Check whether the given properties with status NOT_CHECKED, UNKNOWN or properties newly discovered by...
Definition: single_path_symex_checker.cpp:29
path_storaget::patht
Information saved at a conditional goto to resume execution.
Definition: path_storage.h:41
single_path_symex_checkert::build_full_trace
goto_tracet build_full_trace() const override
Builds and returns the complete trace.
Definition: single_path_symex_checker.cpp:128
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:33
single_path_symex_checkert::output_proof
void output_proof() override
Definition: single_path_symex_checker.cpp:186
goto_tracet
Trace of a GOTO program.
Definition: goto_trace.h:174
single_path_symex_checkert::get_namespace
const namespacet & get_namespace() const override
Returns the namespace associated with the traces.
Definition: single_path_symex_checker.cpp:175
goto_symex_property_decidert
Provides management of goal variables that encode properties.
Definition: goto_symex_property_decider.h:23
witness_providert
An implementation of incremental_goto_checkert may implement this interface to provide GraphML witnes...
Definition: witness_provider.h:19
single_path_symex_checkert::property_decider
std::unique_ptr< goto_symex_property_decidert > property_decider
Definition: single_path_symex_checker.h:48
single_path_symex_only_checkert
Uses goto-symex to generate a symex_target_equationt for each path.
Definition: single_path_symex_only_checker.h:26
abstract_goto_modelt
Abstract interface to eager or lazy GOTO models.
Definition: abstract_goto_model.h:20
symex_bmct
Definition: symex_bmc.h:23
incremental_goto_checkert::ui_message_handler
ui_message_handlert & ui_message_handler
Definition: incremental_goto_checker.h:92
single_path_symex_only_checker.h