Skip to content

Commit bc01f10

Browse files
committed
EBMC: tautology checker
This adds a property tautology check ask the first step to the engine selection. While it should be rare that this pass proves a property, the fact that it does may suggest that the property is unintentionally vacuous.
1 parent f817354 commit bc01f10

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

src/ebmc/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ SRC = \
3636
show_formula_solver.cpp \
3737
show_properties.cpp \
3838
show_trans.cpp \
39+
tautology_check.cpp \
3940
transition_system.cpp \
4041
waveform.cpp \
4142
#empty line

src/ebmc/property_checker.cpp

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Author: Daniel Kroening, [email protected]
2525
#include "netlist.h"
2626
#include "output_file.h"
2727
#include "report_results.h"
28+
#include "tautology_check.h"
2829

2930
#include <chrono>
3031
#include <iostream>
@@ -382,7 +383,22 @@ property_checker_resultt engine_heuristic(
382383
message.status() << "No engine given, attempting heuristic engine selection"
383384
<< messaget::eom;
384385

385-
// First check whether we have a low completenes threshold
386+
// First check if we can tell that the property is a tautology
387+
message.status() << "Tautology check" << messaget::eom;
388+
389+
auto tautology_check_result =
390+
tautology_check(cmdline, properties, solver_factory, message_handler);
391+
392+
properties.properties = tautology_check_result.properties;
393+
394+
if(!properties.has_unfinished_property())
395+
return tautology_check_result; // done
396+
397+
properties.reset_failure();
398+
properties.reset_inconclusive();
399+
properties.reset_unsupported();
400+
401+
// Check whether we have a low completenes threshold
386402
message.status() << "Attempting completeness threshold" << messaget::eom;
387403

388404
auto completeness_threshold_result = completeness_threshold(

0 commit comments

Comments
 (0)