Skip to content

Commit ed58c2a

Browse files
Make multi-path symex checker a fault localization provider
Uses goto_symex_fault_localizert to provide the functionality.
1 parent 0f108e3 commit ed58c2a

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

src/goto-checker/multi_path_symex_checker.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Author: Daniel Kroening, Peter Schrammel
1515

1616
#include "bmc_util.h"
1717
#include "counterexample_beautification.h"
18+
#include "goto_symex_fault_localizer.h"
1819

1920
multi_path_symex_checkert::multi_path_symex_checkert(
2021
const optionst &options,
@@ -77,6 +78,9 @@ operator()(propertiest &properties)
7778
property_decider.convert_goals();
7879
property_decider.freeze_goal_variables();
7980

81+
if(options.get_bool_option("localize-faults"))
82+
freeze_guards(equation, property_decider.get_solver());
83+
8084
const auto solver_stop = std::chrono::steady_clock::now();
8185
solver_runtime += std::chrono::duration<double>(solver_stop - solver_start);
8286

@@ -165,3 +169,15 @@ void multi_path_symex_checkert::output_error_witness(
165169
{
166170
output_graphml(error_trace, ns, options);
167171
}
172+
173+
fault_location_infot
174+
multi_path_symex_checkert::localize_fault(const irep_idt &property_id) const
175+
{
176+
goto_symex_fault_localizert fault_localizer(
177+
options,
178+
ui_message_handler,
179+
equation,
180+
property_decider.get_solver());
181+
182+
return fault_localizer(property_id);
183+
}

src/goto-checker/multi_path_symex_checker.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Author: Daniel Kroening, Peter Schrammel
1212
#ifndef CPROVER_GOTO_CHECKER_MULTI_PATH_SYMEX_CHECKER_H
1313
#define CPROVER_GOTO_CHECKER_MULTI_PATH_SYMEX_CHECKER_H
1414

15+
#include "fault_localization_provider.h"
1516
#include "goto_symex_property_decider.h"
1617
#include "goto_trace_provider.h"
1718
#include "multi_path_symex_only_checker.h"
@@ -21,7 +22,8 @@ Author: Daniel Kroening, Peter Schrammel
2122
/// and calls a SAT/SMT solver to check the status of the properties.
2223
class multi_path_symex_checkert : public multi_path_symex_only_checkert,
2324
public goto_trace_providert,
24-
public witness_providert
25+
public witness_providert,
26+
public fault_localization_providert
2527
{
2628
public:
2729
multi_path_symex_checkert(
@@ -47,6 +49,9 @@ class multi_path_symex_checkert : public multi_path_symex_only_checkert,
4749
void output_error_witness(const goto_tracet &) override;
4850
void output_proof() override;
4951

52+
fault_location_infot
53+
localize_fault(const irep_idt &property_id) const override;
54+
5055
protected:
5156
bool equation_generated;
5257
goto_symex_property_decidert property_decider;

0 commit comments

Comments
 (0)