Skip to content

Commit

Permalink
bugfix to flatten-clases simplifier
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
  • Loading branch information
NikolajBjorner committed Jan 6, 2023
1 parent c07b6ab commit 25112e4
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/ast/simplifiers/flatten_clauses.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class flatten_clauses : public dependent_expr_simplifier {
if (decomposed) {
expr* na = mk_not(m, a);
for (expr* arg : *to_app(b))
m_fmls.add(dependent_expr(m, m.mk_or(na, arg), nullptr, de.dep()));
m_fmls.add(dependent_expr(m, m.mk_or(na, mk_not(m, arg)), nullptr, de.dep()));
m_fmls.update(idx, dependent_expr(m, m.mk_true(), nullptr, nullptr));
++m_num_flat;
continue;
Expand Down
24 changes: 22 additions & 2 deletions src/tactic/arith/add_bounds_tactic.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,33 @@ Module Name:
Abstract:
Tactic for bounding unbounded variables.
Author:
Leonardo de Moura (leonardo) 2011-06-30.
Revision History:
Tactic Documentation:
## Tactic add-bounds
### Short Description
Tactic for bounding unbounded variables.
### Long Description
The tactic creates a stronger sub-goal by adding bounds to variables.
The new goal may not be satisfiable even if the original goal is.
### Example
```z3
(declare-const x Int)
(declare-const y Int)
(assert (> (+ x y) 10))
(apply add-bounds)
```
--*/
#pragma once
Expand Down
24 changes: 20 additions & 4 deletions src/tactic/arith/lia2pb_tactic.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,31 @@ Module Name:
lia2pb_tactic.h
Abstract:
Reduce bounded LIA benchmark into 0-1 LIA benchmark.
Author:
Leonardo de Moura (leonardo) 2012-02-07.
Revision History:
Tactic Documentation:
## Tactic lia2pb
### Short Description
Reduce bounded LIA benchmark into 0-1 LIA benchmark.
### Example
```z3
(declare-const x Int)
(declare-const y Int)
(assert (<= 0 x))
(assert (<= x 5))
(assert (<= 0 y))
(assert (<= y 5))
(assert (>= (+ (* 2 x) y) 5))
(apply lia2pb)
```
--*/
#pragma once
Expand Down

0 comments on commit 25112e4

Please sign in to comment.