Skip to content

Commit

Permalink
fix #4028
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
  • Loading branch information
NikolajBjorner committed Apr 20, 2020
1 parent ad8eb8f commit c8b9eba
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
19 changes: 13 additions & 6 deletions src/smt/seq_axioms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -667,12 +667,19 @@ void seq_axioms::ensure_digit_axiom() {


/**
e1 < e2 => prefix(e1, e2) or e1 = xcy e1 < e2 => prefix(e1, e2) or
c < d e1 < e2 => prefix(e1, e2) or e2 = xdz e1 < e2 => e1 != e2
!(e1 < e2) => prefix(e2, e1) or e2 = xdz !(e1 < e2) => prefix(e2,
e1) or d < c !(e1 < e2) => prefix(e2, e1) or e1 = xcy !(e1 = e2) or
!(e1 < e2) optional: e1 < e2 or e1 = e2 or e2 < e1 !(e1 = e2) or
!(e2 < e1) !(e1 < e2) or !(e2 < e1)
e1 < e2 => prefix(e1, e2) or e1 = xcy
e1 < e2 => prefix(e1, e2) or c < d
e1 < e2 => prefix(e1, e2) or e2 = xdz
e1 < e2 => e1 != e2
!(e1 < e2) => prefix(e2, e1) or e2 = xdz
!(e1 < e2) => prefix(e2, e1) or d < c
!(e1 < e2) => prefix(e2, e1) or e1 = xcy
!(e1 = e2) or !(e1 < e2)
optional:
e1 < e2 or e1 = e2 or e2 < e1
!(e1 = e2) or !(e2 < e1)
!(e1 < e2) or !(e2 < e1)
*/
void seq_axioms::add_lt_axiom(expr* n) {
expr* e1 = nullptr, *e2 = nullptr;
Expand Down
2 changes: 1 addition & 1 deletion src/smt/theory_dense_diff_logic_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ namespace smt {

template<typename Ext>
theory* theory_dense_diff_logic<Ext>::mk_fresh(context * new_ctx) {
return alloc(theory_dense_diff_logic<Ext>, new_ctx->get_manager(), m_params);
return alloc(theory_dense_diff_logic<Ext>, new_ctx->get_manager(), new_ctx->get_fparams());
}

template<typename Ext>
Expand Down
6 changes: 4 additions & 2 deletions src/smt/theory_diff_logic_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ template<typename Ext>
void theory_diff_logic<Ext>::propagate() {
if (m_params.m_arith_adaptive) {

switch(m_params.m_arith_propagation_strategy) {
switch (m_params.m_arith_propagation_strategy) {

case ARITH_PROP_PROPORTIONAL: {

Expand Down Expand Up @@ -528,6 +528,8 @@ void theory_diff_logic<Ext>::propagate() {
break;
}
default:
std::cout << m_params.m_arith_propagation_strategy << "\n";
SASSERT(false);
UNREACHABLE();
propagate_core();
}
Expand Down Expand Up @@ -1416,7 +1418,7 @@ bool theory_diff_logic<Ext>::internalize_objective(expr * n, rational const& m,

template<typename Ext>
theory* theory_diff_logic<Ext>::mk_fresh(context* new_ctx) {
return alloc(theory_diff_logic<Ext>, new_ctx->get_manager(), m_params);
return alloc(theory_diff_logic<Ext>, new_ctx->get_manager(), new_ctx->get_fparams());
}

template<typename Ext>
Expand Down

0 comments on commit c8b9eba

Please sign in to comment.