1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*++
Copyright (c) 2012 Microsoft Corporation
Module Name:
diff_neq_tactic.h
Author:
Leonardo de Moura (leonardo) 2012-02-07.
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.
--*/
class ast_manager;
class tactic;
tactic * ;
/*
ADD_TACTIC("diff-neq", "specialized solver for integer arithmetic problems that contain only atoms of the form (<= k x) (<= x k) and (not (= (- x y) k)), where x and y are constants and k is a numeral, and all constants are bounded.", "mk_diff_neq_tactic(m, p)")
*/