Commit 2fb4f61
authored
The [`bitRangeInt` equation in
`domains.md`](https://github.com/runtimeverification/k/blob/c376de7d91e5f14cff13b7e32e1c997983a2859b/k-distribution/include/kframework/builtin/domains.md?plain=1#L1438)
uses partial bit-shift symbols and is therefore not applied by booster.
A better alternative is to use the `truncate` function locally defined
in `mir-semantics`. Expressions are equivalent:
```
bitRangeInt(VAL, 0, WIDTH)
(def) == (VAL >>Int 0) modInt (1 <<Int WIDTH)
(>> 0) == VAL modInt (1 <<Int WIDTH)
(mod via mask) == VAL &Int ((1<<Int WIDTH) -Int 1) == truncate(VAL, WIDTH, Unsigned)
```
Also marking some relevant simplifications as smt-lemmas.
Altogether, this avoids a number of observed fall-backs in p-token
execution.
1 parent d401761 commit 2fb4f61
3 files changed
Lines changed: 13 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
327 | | - | |
| 327 | + | |
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
| 85 | + | |
85 | 86 | | |
86 | | - | |
| 87 | + | |
87 | 88 | | |
88 | 89 | | |
89 | | - | |
| 90 | + | |
| 91 | + | |
90 | 92 | | |
91 | | - | |
| 93 | + | |
92 | 94 | | |
93 | 95 | | |
94 | 96 | | |
| |||
97 | 99 | | |
98 | 100 | | |
99 | 101 | | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | 102 | | |
112 | 103 | | |
113 | 104 | | |
| |||
120 | 111 | | |
121 | 112 | | |
122 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
123 | 119 | | |
124 | 120 | | |
125 | 121 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| |||
0 commit comments