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
59
60
61
/*++
Copyright (c) 2012 Microsoft Corporation
Module Name:
bv_size_reduction.h
Abstract:
Author:
Leonardo (leonardo) 2012-02-19
Notes:
Tactic Documentation:
## Tactic reduce-bv-size
### Short Description
Rry to reduce bit-vector sizes using inequalities.
### Long Description
Reduce the number of bits used to encode constants, by using signed bounds.
Example: suppose $x$ is a bit-vector of size 8, and we have
signed bounds for $x$ such that:
```
-2 <= x <= 2
```
Then, $x$ can be replaced by `((sign-extend 5) k)`
where `k` is a fresh bit-vector constant of size 3.
### Example
```z3
(declare-const x (_ BitVec 32))
(assert (bvsle (bvneg (_ bv2 32)) x))
(assert (bvsle x (_ bv2 32)))
(assert (= (bvmul x x) (_ bv9 32)))
(apply (and-then simplify reduce-bv-size))
```
### Notes
* does not support proofs, nor unsat cores
--*/
class ast_manager;
class tactic;
tactic * ;
;