Skip to content

Commit

Permalink
improve quantifier elimination for arithmetic
Browse files Browse the repository at this point in the history
This update changes the handling of mod and adds support for nested div terms.

Simple use cases that are handled using small results are given below.

```
(declare-const x Int)
(declare-const y Int)
(declare-const z Int)
(assert (exists ((x Int)) (and (<= y (* 10 x)) (<= (* 10 x) z))))
(apply qe2)
(reset)

(declare-const y Int)
(assert (exists ((x Int)) (and (> x 0) (= (div x 41) y))))
(apply qe2)
(reset)

(declare-const y Int)
(assert (exists ((x Int)) (= (mod x 41) y)))
(apply qe2)
(reset)
```

The main idea is to introduce definition rows for mod/div terms.
Elimination of variables under mod/div is defined by rewriting the variable to multiples of the mod/divisior and remainder.

The functionality is disabled in this push.
  • Loading branch information
NikolajBjorner committed Aug 12, 2022
1 parent 786280c commit 03385bf
Show file tree
Hide file tree
Showing 3 changed files with 1,793 additions and 1,430 deletions.
Loading

0 comments on commit 03385bf

Please sign in to comment.