-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This resurrects the defunct CEGAR implementation in ebmc.
- Loading branch information
Showing
5 changed files
with
64 additions
and
66 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 |
---|---|---|
|
@@ -6,47 +6,46 @@ Author: Daniel Kroening, [email protected] | |
\*******************************************************************/ | ||
|
||
#include <util/std_expr.h> | ||
#ifndef EBMC_CEGAR_BMC_CEGAR_H | ||
#define EBMC_CEGAR_BMC_CEGAR_H | ||
|
||
#include <util/message.h> | ||
#include <util/namespace.h> | ||
#include <util/std_expr.h> | ||
|
||
#include <ebmc/ebmc_properties.h> | ||
#include <ebmc/transition_system.h> | ||
#include <trans-netlist/bmc_map.h> | ||
#include <trans-netlist/netlist.h> | ||
|
||
class bmc_cegart:public messaget | ||
{ | ||
public: | ||
bmc_cegart( | ||
symbol_table_baset &_symbol_table, | ||
const irep_idt &_main_module, | ||
message_handlert &_message_handler, | ||
const std::list<exprt> &_properties) | ||
const netlistt &_netlist, | ||
ebmc_propertiest &_properties, | ||
const namespacet &_ns, | ||
message_handlert &_message_handler) | ||
: messaget(_message_handler), | ||
symbol_table(_symbol_table), | ||
ns(_symbol_table), | ||
main_module(_main_module), | ||
properties(_properties) | ||
properties(_properties), | ||
concrete_netlist(_netlist), | ||
ns(_ns) | ||
{ | ||
} | ||
|
||
void bmc_cegar(); | ||
|
||
protected: | ||
symbol_table_baset &symbol_table; | ||
const namespacet ns; | ||
const irep_idt &main_module; | ||
const std::list<exprt> &properties; | ||
|
||
ebmc_propertiest &properties; | ||
bmc_mapt bmc_map; | ||
netlistt concrete_netlist, abstract_netlist; | ||
const namespacet &ns; | ||
|
||
bool initial_abstraction; | ||
|
||
typedef std::set<literalt> cut_pointst; | ||
cut_pointst cut_points; | ||
|
||
void make_netlist(); | ||
|
||
|
||
void cegar_loop(); | ||
|
||
void abstract(); | ||
|
@@ -62,3 +61,15 @@ class bmc_cegart:public messaget | |
|
||
std::list<bvt> prop_bv; | ||
}; | ||
|
||
class ebmc_propertiest; | ||
class message_handlert; | ||
class netlistt; | ||
|
||
int do_bmc_cegar( | ||
const netlistt &, | ||
ebmc_propertiest &, | ||
const namespacet &, | ||
message_handlert &); | ||
|
||
#endif // EBMC_CEGAR_BMC_CEGAR_H |
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
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 |
---|---|---|
|
@@ -27,6 +27,8 @@ Author: Daniel Kroening, [email protected] | |
|
||
#include <iostream> | ||
|
||
#include "cegar/bmc_cegar.h" | ||
|
||
#ifdef HAVE_INTERPOLATION | ||
#include "interpolation/interpolation_expr.h" | ||
#include "interpolation/interpolation_netlist.h" | ||
|
@@ -111,26 +113,6 @@ int ebmc_parse_optionst::doit() | |
if(cmdline.isset("show-symbol-table")) | ||
return show_symbol_table(cmdline, ui_message_handler); | ||
|
||
if(cmdline.isset("cegar")) | ||
{ | ||
throw ebmc_errort() << "This option is currently disabled"; | ||
|
||
#if 0 | ||
namespacet ns(symbol_table); | ||
var_mapt var_map(symbol_table, main_symbol->name); | ||
|
||
bmc_cegart bmc_cegar( | ||
var_map, | ||
*trans_expr, | ||
ns, | ||
*this, | ||
prop_expr_list); | ||
|
||
bmc_cegar.bmc_cegar(); | ||
return 0; | ||
#endif | ||
} | ||
|
||
if(cmdline.isset("coverage")) | ||
{ | ||
throw ebmc_errort() << "This option is currently disabled"; | ||
|
@@ -288,7 +270,15 @@ int ebmc_parse_optionst::doit() | |
if(result != -1) | ||
return result; | ||
|
||
if(cmdline.isset("compute-ct")) | ||
if(cmdline.isset("cegar")) | ||
{ | ||
netlistt netlist; | ||
ebmc_base.make_netlist(netlist); | ||
const namespacet ns(ebmc_base.transition_system.symbol_table); | ||
return do_bmc_cegar( | ||
netlist, ebmc_base.properties, ns, ui_message_handler); | ||
} | ||
else if(cmdline.isset("compute-ct")) | ||
return ebmc_base.do_compute_ct(); | ||
else if(cmdline.isset("aig") || cmdline.isset("dimacs")) | ||
return ebmc_base.do_bit_level_bmc(); | ||
|