-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #935 from diffblue/bmc-result
BMC: return `property_checker_resultt`
- Loading branch information
Showing
4 changed files
with
22 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,19 +12,19 @@ Author: Daniel Kroening, [email protected] | |
#ifndef EBMC_BMC_H | ||
#define EBMC_BMC_H | ||
|
||
#include "ebmc_properties.h" | ||
#include "ebmc_solver_factory.h" | ||
#include "property_checker.h" | ||
|
||
class exprt; | ||
class transition_systemt; | ||
|
||
/// This is word-level BMC. | ||
void bmc( | ||
[[nodiscard]] property_checker_resultt bmc( | ||
std::size_t bound, | ||
bool convert_only, | ||
bool bmc_with_assumptions, | ||
const transition_systemt &, | ||
ebmc_propertiest &, | ||
const ebmc_propertiest &, | ||
const ebmc_solver_factoryt &, | ||
message_handlert &); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ Author: Daniel Kroening, [email protected] | |
property_checker_resultt word_level_bmc( | ||
const cmdlinet &cmdline, | ||
const transition_systemt &transition_system, | ||
ebmc_propertiest &properties, | ||
const ebmc_propertiest &properties, | ||
message_handlert &message_handler) | ||
{ | ||
auto solver_factory = ebmc_solver_factory(cmdline); | ||
|
@@ -61,6 +61,8 @@ property_checker_resultt word_level_bmc( | |
result=finish_word_level_bmc(solver); | ||
#endif | ||
} | ||
|
||
return property_checker_resultt{properties}; | ||
} | ||
else | ||
{ | ||
|
@@ -83,7 +85,7 @@ property_checker_resultt word_level_bmc( | |
|
||
bool bmc_with_assumptions = cmdline.isset("bmc-with-assumptions"); | ||
|
||
bmc( | ||
auto result = bmc( | ||
bound, | ||
convert_only, | ||
bmc_with_assumptions, | ||
|
@@ -94,6 +96,8 @@ property_checker_resultt word_level_bmc( | |
|
||
if(convert_only) | ||
return property_checker_resultt::success(); | ||
|
||
return result; | ||
} | ||
} | ||
|
||
|
@@ -115,8 +119,6 @@ property_checker_resultt word_level_bmc( | |
{ | ||
return property_checker_resultt::error(); | ||
} | ||
|
||
return property_checker_resultt{properties}; | ||
} | ||
|
||
property_checker_resultt finish_bit_level_bmc( | ||
|
@@ -394,7 +396,7 @@ property_checker_resultt engine_heuristic( | |
// Now try BMC with bound 5, word-level | ||
message.status() << "Attempting BMC with bound 5" << messaget::eom; | ||
|
||
bmc( | ||
auto bmc_result = bmc( | ||
5, // bound | ||
false, // convert_only | ||
cmdline.isset("bmc-with-assumptions"), | ||
|
@@ -403,6 +405,8 @@ property_checker_resultt engine_heuristic( | |
solver_factory, | ||
message_handler); | ||
|
||
properties.properties = std::move(bmc_result.properties); | ||
|
||
if(!properties.has_unfinished_property()) | ||
return property_checker_resultt{properties}; // done | ||
|
||
|