Skip to content

Commit d95f68c

Browse files
committed
bring ==Int to the require clause for more general cases
1 parent 2d3d815 commit d95f68c

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/kriscv/kdist/riscv-semantics/lemmas/sparse-bytes-simplifications.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,14 @@ The `#WB` wrapper serves several purposes:
6060
6161
// Reordering for Optimization
6262
rule #WB(false, I0, V0, NUM0, #WB(true, I1, V1, NUM1, B:SparseBytes)) => #WB(true, I1, V1, NUM1, #WB(false, I0, V0, NUM0, B)) [simplification]
63-
rule #WB(false, I, V0, NUM0, #WB(true, I, V1, NUM1, B:SparseBytes)) => #WB(true, I, V0, NUM0, #WB(true, I, V1, NUM1, B)) [simplification]
63+
rule #WB(false, I0, V0, NUM0, #WB(true, I1, V1, NUM1, B:SparseBytes)) => #WB(true, I0, V0, NUM0, #WB(true, I1, V1, NUM1, B))
64+
requires I0 ==Int I1 [simplification]
6465
6566
// Write Consolidation
66-
rule #WB(false, I, V, NUM0, #WB(_, I, _, NUM1, B:SparseBytes)) => #WB(false, I, V, NUM0, B)
67-
requires NUM0 ==Int NUM1 [simplification(45)]
68-
rule #WB(false, I, V0, NUM0, #WB(_, I, _, NUM1, B:SparseBytes)) => #WB(false, I, V0, NUM0, B)
69-
requires NUM1 <Int NUM0 [simplification(45)]
67+
rule #WB(false, I0, V0, NUM0, #WB(_, I1, _, NUM1, B:SparseBytes)) => #WB(false, I0, V0, NUM0, B)
68+
requires NUM0 ==Int NUM1 andBool I0 ==Int I1 [simplification(45)]
69+
rule #WB(false, I0, V0, NUM0, #WB(_, I1, _, NUM1, B:SparseBytes)) => #WB(false, I0, V0, NUM0, B)
70+
requires NUM1 <Int NUM0 andBool I0 ==Int I1 [simplification(45)]
7071
```
7172

7273
## writeByteBF

0 commit comments

Comments
 (0)