Skip to content

Commit

Permalink
update tests for recent updates. disable model hints until available …
Browse files Browse the repository at this point in the history
…in yices2 master.
  • Loading branch information
Dejan Jovanovic committed Jul 3, 2019
1 parent 78fa7f5 commit 719a8d9
Show file tree
Hide file tree
Showing 19 changed files with 26 additions and 88 deletions.
2 changes: 1 addition & 1 deletion src/smt/d4y2/d4y2_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ struct d4y2_info {
static void setup_options(boost::program_options::options_description& options) {
using namespace boost::program_options;
options.add_options()
("d4y2-model-as-hint", "Use the dReal model as hint for Yices2 if Dreal is not certain.")
// ("d4y2-model-as-hint", "Use the dReal model as hint for Yices2 if Dreal is not certain.")
("d4y2-relaxed-check", "Allow relaxed check, i.e. not call Yices2 in relaxed checking mode.");
}

Expand Down
9 changes: 6 additions & 3 deletions src/smt/dreal/dreal_internal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,11 @@ dreal_internal::dreal_internal(expr::term_manager& tm, const options& opts)
// some basic options
d_config->mutable_produce_models() = true;

//default precision
double prec = opts.get_double("dreal-precision");
//default precision (only has default from command line)
double prec = 0.0001;
if (opts.has_option("dreal-precision")) {
prec = opts.get_double("dreal-precision");
}
d_config->mutable_precision() = prec;

if (opts.has_option("dreal-polytope")) {
Expand Down Expand Up @@ -458,7 +461,6 @@ void dreal_internal::add(expr::term_ref ref, solver::formula_class f_class) {

solver::result dreal_internal::check() {


// Set bounds if needed
if (d_ctx_bounded) {
TRACE("dreal") << "dreal[" << instance() << "]: bounded check, precision = " << d_ctx_bounded->config().precision() << std::endl;
Expand All @@ -481,6 +483,7 @@ solver::result dreal_internal::check() {
}

if (optional<Box> res = d_ctx->CheckSat()) {
TRACE("dreal") << "dreal[" << instance() << "]: checking model" << std::endl;
// If sat then dreal returns a mapping from a variable to an interval.
// We return sat only if all intervals are singleton
if (save_dreal_model(*res)) {
Expand Down
17 changes: 9 additions & 8 deletions src/smt/yices2/yices2_internal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1560,14 +1560,15 @@ void yices2_internal::generalize(smt::solver::generalization_type type, expr::mo
}

void yices2_internal::set_hint(expr::model::ref m) {
if (d_ctx_mcsat) {
// Get the yices model
model_t* m_y = get_yices_model(m);
// Give yices the model as hint
yices_set_model_hint(d_ctx_mcsat, m_y);
// Free the model
yices_free_model(m_y);
}
throw exception("set_hint: unsupported yet.");
// if (d_ctx_mcsat) {
// // Get the yices model
// model_t* m_y = get_yices_model(m);
// // Give yices the model as hint
// yices_set_model_hint(d_ctx_mcsat, m_y);
// // Free the model
// yices_free_model(m_y);
// }
}

void yices2_internal::gc() {
Expand Down
31 changes: 0 additions & 31 deletions test/regress/bmc/d4y2/dumortier_llibre_artes_ex_10_15_i.mcmt

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
--engine bmc --lsal-extensions --solver dreal --dreal-precision=0.001
--engine bmc --lsal-extensions --solver dreal --dreal-precision=0.001 --bmc-max 2
2 changes: 1 addition & 1 deletion test/regress/bmc/dreal/cfa_test0005.mcmt.options
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
--engine bmc --lsal-extensions --solver dreal --dreal-precision=0.0001 --bmc-max 16
--engine bmc --lsal-extensions --solver dreal --dreal-precision=0.0001 --bmc-max 15

2 changes: 1 addition & 1 deletion test/regress/bmc/dreal/collin_goriely_page_60.mcmt.options
Original file line number Diff line number Diff line change
@@ -1 +1 @@
--engine bmc --lsal-extensions --solver dreal --dreal-precision=0.001
--engine bmc --lsal-extensions --solver dreal --dreal-precision=0.001 --bmc-max 2
31 changes: 0 additions & 31 deletions test/regress/bmc/dreal/dumortier_llibre_artes_ex_10_15_i.mcmt

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
--engine bmc --lsal-extensions --solver dreal --dreal-precision=0.001
--engine bmc --lsal-extensions --solver dreal --dreal-precision=0.001 --bmc-max 1
Original file line number Diff line number Diff line change
@@ -1 +1 @@
--engine bmc --lsal-extensions --solver dreal --dreal-precision=0.001
--engine bmc --lsal-extensions --solver dreal --dreal-precision=0.001 --bmc-max 1
Original file line number Diff line number Diff line change
@@ -1 +1 @@
--engine bmc --lsal-extensions --solver dreal --dreal-precision=0.001
--engine bmc --lsal-extensions --solver dreal --dreal-precision=0.001 --bmc-max 2
2 changes: 1 addition & 1 deletion test/regress/bmc/dreal/hamiltonian_system_1.mcmt.options
Original file line number Diff line number Diff line change
@@ -1 +1 @@
--engine bmc --lsal-extensions --solver dreal --dreal-precision=0.001
--engine bmc --lsal-extensions --solver dreal --dreal-precision=0.001 --bmc-max 5
2 changes: 1 addition & 1 deletion test/regress/bmc/dreal/sas13-floatitp-test1.mcmt.gold
Original file line number Diff line number Diff line change
@@ -1 +1 @@
invalid
unknown
2 changes: 1 addition & 1 deletion test/regress/bmc/dreal/sas13-floatitp-test1.mcmt.options
Original file line number Diff line number Diff line change
@@ -1 +1 @@
--engine bmc --lsal-extensions --solver dreal --dreal-precision=0.001
--engine bmc --lsal-extensions --solver dreal --dreal-precision=0.001 --bmc-max 10
2 changes: 1 addition & 1 deletion test/regress/kind/d4y2/unstable_unit_circle3.mcmt.options
Original file line number Diff line number Diff line change
@@ -1 +1 @@
--engine kind --solver d4y2 --lsal-extensions
--engine kind --solver d4y2 --lsal-extensions --d4y2-relaxed-check

0 comments on commit 719a8d9

Please sign in to comment.