3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-12 06:00:53 +00:00
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2022-12-12 17:29:58 -08:00
parent e82c8e78ae
commit e648e68d36
3 changed files with 63 additions and 18 deletions

View file

@ -5,19 +5,45 @@ Module Name:
diff_neq_tactic.h
Abstract:
Solver for integer problems that contains literals of the form
k <= x
x <= k
x - y != k
And all variables are bounded.
Author:
Leonardo de Moura (leonardo) 2012-02-07.
Revision History:
Tactic Documentation:
## Tactic diff-neq
### Short Description
A specialized solver for integer problems using only constant bounds and differences to constants.
### Long Description
Solver for integer problems that contains literals of the form
```
k <= x
x <= k
x - y != k
```
### Example
```z3
(declare-const x Int)
(declare-const y Int)
(assert (<= 0 x))
(assert (<= x 1))
(assert (<= 0 y))
(assert (<= y 1))
(assert (not (= (+ x (* -1 y)) -1)))
(assert (not (= (+ x (* -1 y)) 1)))
(assert (not (= (+ x (* -1 y)) 0)))
(apply diff-neq)
```
### Notes
* The tactic works only when the lower bounds are 0 and disequalities use multiplication with -1. Use normalize-bounds to ensure all lower bounds are 0.
--*/
#pragma once