From bc3d8580c9bf0c28e7aa2b4b9eadac59480dd0bd Mon Sep 17 00:00:00 2001 From: Bernhard Gleiss Date: Tue, 1 Aug 2017 10:12:29 +0200 Subject: [PATCH 1/3] fixed typo in optimized unsat core plugin code --- src/muz/spacer/spacer_unsat_core_plugin.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/muz/spacer/spacer_unsat_core_plugin.cpp b/src/muz/spacer/spacer_unsat_core_plugin.cpp index 66abb32c6..5383fdc12 100644 --- a/src/muz/spacer/spacer_unsat_core_plugin.cpp +++ b/src/muz/spacer/spacer_unsat_core_plugin.cpp @@ -330,8 +330,7 @@ void unsat_core_plugin_farkas_lemma::compute_linear_combination(const vector Date: Tue, 1 Aug 2017 11:06:17 +0200 Subject: [PATCH 2/3] refactored variable names and added comments to min_cut-related methods for unsat-core-computation --- src/muz/spacer/spacer_unsat_core_plugin.cpp | 56 ++++++++++++++++----- src/muz/spacer/spacer_unsat_core_plugin.h | 2 +- 2 files changed, 44 insertions(+), 14 deletions(-) diff --git a/src/muz/spacer/spacer_unsat_core_plugin.cpp b/src/muz/spacer/spacer_unsat_core_plugin.cpp index 5383fdc12..0d90d2653 100644 --- a/src/muz/spacer/spacer_unsat_core_plugin.cpp +++ b/src/muz/spacer/spacer_unsat_core_plugin.cpp @@ -588,6 +588,17 @@ void unsat_core_plugin_farkas_lemma::compute_linear_combination(const vector todo; @@ -603,21 +614,28 @@ void unsat_core_plugin_farkas_lemma::compute_linear_combination(const vector& todo2) + + void unsat_core_plugin_min_cut::advance_to_lowest_partial_cut(proof* step, ptr_vector& todo) { bool is_sink = true; ast_manager &m = m_learner.m; - ptr_vector todo; + ptr_vector todo_subproof; for (unsigned i = 0, sz = m.get_num_parents(step); i < sz; ++i) { @@ -625,16 +643,16 @@ void unsat_core_plugin_farkas_lemma::compute_linear_combination(const vectorget_arg(i))); proof* premise = m.get_parent (current, i); - todo.push_back(premise); + todo_subproof.push_back(premise); } } } @@ -679,6 +699,12 @@ void unsat_core_plugin_farkas_lemma::compute_linear_combination(const vector cut_nodes; diff --git a/src/muz/spacer/spacer_unsat_core_plugin.h b/src/muz/spacer/spacer_unsat_core_plugin.h index 388a2bd38..743d7af4a 100644 --- a/src/muz/spacer/spacer_unsat_core_plugin.h +++ b/src/muz/spacer/spacer_unsat_core_plugin.h @@ -104,7 +104,7 @@ private: ast_mark m_visited; // saves for each node i whether the subproof with root i has already been added to the min-cut-problem obj_map m_proof_to_node_minus; // maps proof-steps to the corresponding minus-nodes (the ones which are closer to source) obj_map m_proof_to_node_plus; // maps proof-steps to the corresponding plus-nodes (the ones which are closer to sink) - void advance_to_lowest_partial_cut(proof* step, ptr_vector& todo2); + void advance_to_lowest_partial_cut(proof* step, ptr_vector& todo); void add_edge(proof* i, proof* j); vector m_node_to_formula; // maps each node to the corresponding formula in the original proof From aefed78f1a599e1ac172332f96b70fb91db74cff Mon Sep 17 00:00:00 2001 From: "Christoph M. Wintersteiger" Date: Tue, 1 Aug 2017 17:02:04 +0100 Subject: [PATCH 3/3] Fixed ML API build again --- src/api/ml/z3native_stubs.c.pre | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/ml/z3native_stubs.c.pre b/src/api/ml/z3native_stubs.c.pre index cbc0ffda6..1b1ea3fde 100644 --- a/src/api/ml/z3native_stubs.c.pre +++ b/src/api/ml/z3native_stubs.c.pre @@ -34,7 +34,7 @@ extern "C" { CAMLlocal5(X1,X2,X3,X4,X5); \ CAMLlocal3(X6,X7,X8) -#define CAMLparam6(X1,X2,X3,X4,X5,X6,X7) \ +#define CAMLparam6(X1,X2,X3,X4,X5,X6) \ CAMLparam5(X1,X2,X3,X4,X5); \ CAMLxparam1(X6) #define CAMLparam7(X1,X2,X3,X4,X5,X6,X7) \