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
62
63
64
65
66
/*++
Copyright (c) 2011 Microsoft Corporation
Module Name:
bv_slice_tactic.h
Abstract:
Tactic for simplifying with bit-vector slices
Author:
Nikolaj Bjorner (nbjorner) 2022-10-30
Tactic Documentation
## Tactic bv-slice
### Short Description
Slices bit-vectors into sub-ranges to allow simplifying sub-ranges.
### Long Description
It rewrites a state using bit-vector slices.
Slices are extracted from bit-vector equality assertions.
An equality assertion may equate a sub-range of a bit-vector
with a constant. The tactic ensures that all occurrences of the
subrange are replaced by the constants to allow additional
simplification
### Example
```z3 ignore-errors
(declare-const x (_ BitVec 32))
(declare-const y (_ BitVec 32))
(assert (= ((_ extract 31 16) x) (_ bv123 16)))
(assert (= ((_ extract 15 0) x) ((_ extract 16 1) y)))
(assert (= (bvadd x x) y))
(apply bv-slice)
```
--*/
class ast_manager;
class tactic;
inline tactic*
/*
ADD_TACTIC("bv-slice", "simplify using bit-vector slices.", "mk_bv_slice_tactic(m, p)")
ADD_SIMPLIFIER("bv-slice", "simplify using bit-vector slices.", "alloc(bv::slice, m, s)")
*/