forked from diffblue/cbmc
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Group bv_refinement config variables
- Loading branch information
Lukasz A.J. Wrona
committed
Sep 12, 2017
1 parent
bf47f81
commit 317c1c6
Showing
6 changed files
with
25 additions
and
48 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,11 +20,9 @@ Author: Daniel Kroening, [email protected] | |
|
||
class bv_refinementt:public bv_pointerst | ||
{ | ||
public: | ||
struct infot | ||
private: | ||
struct configt | ||
{ | ||
const namespacet *ns=nullptr; | ||
propt *prop=nullptr; | ||
ui_message_handlert::uit ui=ui_message_handlert::uit::PLAIN; | ||
/// Max number of times we refine a formula node | ||
unsigned max_node_refinement=5; | ||
|
@@ -33,6 +31,12 @@ class bv_refinementt:public bv_pointerst | |
/// Enable arithmetic refinement | ||
bool refine_arithmetic=true; | ||
}; | ||
public: | ||
struct infot : public configt | ||
{ | ||
const namespacet *ns=nullptr; | ||
propt *prop=nullptr; | ||
}; | ||
|
||
explicit bv_refinementt(const infot &info); | ||
|
||
|
@@ -103,18 +107,12 @@ class bv_refinementt:public bv_pointerst | |
|
||
// MEMBERS | ||
|
||
// Maximum number of times we refine a formula node | ||
const unsigned max_node_refinement; | ||
// Refinement toggles | ||
const bool do_array_refinement; | ||
const bool do_arithmetic_refinement; | ||
bool progress; | ||
std::vector<approximationt> approximations; | ||
bvt parent_assumptions; | ||
|
||
protected: | ||
// use gui format | ||
ui_message_handlert::uit ui; | ||
configt config_; | ||
}; | ||
|
||
#endif // CPROVER_SOLVERS_REFINEMENT_BV_REFINEMENT_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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,11 +14,8 @@ Author: Daniel Kroening, [email protected] | |
|
||
bv_refinementt::bv_refinementt(const infot &info): | ||
bv_pointerst(*info.ns, *info.prop), | ||
max_node_refinement(info.max_node_refinement), | ||
do_array_refinement(info.refine_arrays), | ||
do_arithmetic_refinement(info.refine_arithmetic), | ||
progress(false), | ||
ui(info.ui) | ||
config_(info) | ||
{ | ||
// check features we need | ||
PRECONDITION(prop.has_set_assumptions()); | ||
|
@@ -44,7 +41,7 @@ decision_proceduret::resultt bv_refinementt::dec_solve() | |
status() << "BV-Refinement: iteration " << iteration << eom; | ||
|
||
// output the very same information in a structured fashion | ||
if(ui==ui_message_handlert::uit::XML_UI) | ||
if(config_.ui==ui_message_handlert::uit::XML_UI) | ||
{ | ||
xmlt xml("refinement-iteration"); | ||
xml.data=std::to_string(iteration); | ||
|
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
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,13 +31,8 @@ Author: Alberto Griggio, [email protected] | |
|
||
class string_refinementt final: public bv_refinementt | ||
{ | ||
public: | ||
/// string_refinementt constructor arguments | ||
struct infot | ||
{ | ||
const namespacet *ns=nullptr; | ||
propt *prop=nullptr; | ||
ui_message_handlert::uit ui=ui_message_handlert::uit::PLAIN; | ||
private: | ||
struct configt { | ||
unsigned refinement_bound=0; | ||
size_t string_max_length=std::numeric_limits<size_t>::max(); | ||
/// Make non-deterministic character arrays have at least one character | ||
|
@@ -46,11 +41,11 @@ class string_refinementt final: public bv_refinementt | |
bool trace=false; | ||
/// Make non-deterministic characters printable | ||
bool string_printable=false; | ||
unsigned max_node_refinement=5; | ||
bool refine_arrays=false; | ||
bool refine_arithmetic=false; | ||
bool use_counter_example=false; | ||
}; | ||
public: | ||
/// string_refinementt constructor arguments | ||
struct infot:public bv_refinementt::infot, public configt { }; | ||
|
||
explicit string_refinementt(const infot &); | ||
|
||
|