Skip to content

Commit 42176ce

Browse files
Move the memory to the end in functions (#148)
Co-authored-by: devops <devops@runtimeverification.com>
1 parent efe1f78 commit 42176ce

10 files changed

Lines changed: 61 additions & 61 deletions

File tree

package/version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.111
1+
0.1.112

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "kriscv"
7-
version = "0.1.111"
7+
version = "0.1.112"
88
description = "K tooling for the RISC-V architecture"
99
readme = "README.md"
1010
requires-python = "~=3.10"

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@ module SPARSE-BYTES-SIMPLIFICATIONS
1515
For symbolic execution, we need to tackle the patterns of `#bytes(B +Bytes _) _` and `#bytes(B +Bytes BS) EF` to obtain as exact as possible values for `pickFront`.
1616

1717
```k
18-
rule pickFront(#bytes(substrBytes(B, I, J) +Bytes _) _ , J0) => substrBytes(substrBytes(B, I, J), 0, J0)
18+
rule pickFront(J0, #bytes(substrBytes(B, I, J) +Bytes _) _) => substrBytes(substrBytes(B, I, J), 0, J0)
1919
requires 0 <=Int I andBool I <=Int J andBool J <=Int lengthBytes(B)
2020
andBool J0 <=Int lengthBytes(substrBytes(B, I, J))
2121
[simplification(44), preserves-definedness]
22-
rule pickFront(#bytes(B +Bytes _) _ , I) => substrBytes(B, 0, I)
22+
rule pickFront(I, #bytes(B +Bytes _) _) => substrBytes(B, 0, I)
2323
requires I >Int 0 andBool I <=Int lengthBytes(B) [simplification(45), preserves-definedness]
24-
rule pickFront(#bytes(B +Bytes BS) EF, I) => B +Bytes pickFront(#bytes(BS) EF, I -Int lengthBytes(B))
24+
rule pickFront(I, #bytes(B +Bytes BS) EF) => B +Bytes pickFront(I -Int lengthBytes(B), #bytes(BS) EF)
2525
requires I >Int lengthBytes(B) [simplification(45), preserves-definedness]
2626
27-
rule dropFront(#bytes(B +Bytes BS) EF , I) => dropFront(#bytes(substrBytes(B, I, lengthBytes(B)) +Bytes BS) EF, 0)
27+
rule dropFront(I, #bytes(B +Bytes BS) EF) => dropFront(0, #bytes(substrBytes(B, I, lengthBytes(B)) +Bytes BS) EF)
2828
requires I >Int 0 andBool I <Int lengthBytes(B) [simplification(45), preserves-definedness]
29-
rule dropFront(#bytes(B +Bytes BS) EF, I) => dropFront(#bytes(BS) EF, I -Int lengthBytes(B))
29+
rule dropFront(I, #bytes(B +Bytes BS) EF) => dropFront(I -Int lengthBytes(B), #bytes(BS) EF)
3030
requires I >=Int lengthBytes(B) [simplification(45), preserves-definedness]
3131
```
3232

@@ -36,11 +36,11 @@ For symbolic execution, we need to tackle the patterns of `#bytes(B +Bytes _) _`
3636
To write a byte to a symbolic sparse byte region, we need to:
3737

3838
```k
39-
rule writeBytesBF(#bytes(B +Bytes BS) EF, I, V, NUM) => #bytes(replaceAtBytes(B, I, Int2Bytes(NUM, V, LE)) +Bytes BS) EF
39+
rule writeBytesBF(I, V, NUM, #bytes(B +Bytes BS) EF) => #bytes(replaceAtBytes(B, I, Int2Bytes(NUM, V, LE)) +Bytes BS) EF
4040
requires I >=Int 0 andBool I +Int NUM <=Int lengthBytes(B) [simplification(45)]
41-
rule writeBytesBF(#bytes(B +Bytes BS) EF, I, V, NUM) => prepend(substrBytes(B, 0, I) +Bytes Int2Bytes(NUM, V, LE), dropFront(#bytes(BS) EF, I +Int NUM -Int lengthBytes(B)))
41+
rule writeBytesBF(I, V, NUM, #bytes(B +Bytes BS) EF) => prepend(substrBytes(B, 0, I) +Bytes Int2Bytes(NUM, V, LE), dropFront(I +Int NUM -Int lengthBytes(B), #bytes(BS) EF))
4242
requires I <Int lengthBytes(B) andBool I +Int NUM >Int lengthBytes(B) [simplification(45)]
43-
rule writeBytesBF(#bytes(B +Bytes BS) EF, I, V, NUM) => prepend(B, writeBytesBF(#bytes(BS) EF, I -Int lengthBytes(B), V, NUM))
43+
rule writeBytesBF(I, V, NUM, #bytes(B +Bytes BS) EF) => prepend(B, writeBytesBF(I -Int lengthBytes(B), V, NUM, #bytes(BS) EF))
4444
requires I >=Int lengthBytes(B) [simplification(45)]
4545
```
4646

src/kriscv/kdist/riscv-semantics/riscv.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -93,16 +93,16 @@ module RISCV-MEMORY
9393
```
9494
We abstract the particular memory representation behind `loadBytes` and `storeBytes` functions. For multi-byte loads and stores, we presume a little-endian architecture.
9595
```k
96-
syntax Int ::= loadBytes(memory: Memory, address: Int, numBytes: Int) [function, total, symbol(Memory:loadBytes)]
97-
rule loadBytes(MEM, ADDR, NUM) => readBytes(MEM, ADDR, NUM)
96+
syntax Int ::= loadBytes(address: Int, numBytes: Int, memory: Memory) [function, total, symbol(Memory:loadBytes)]
97+
rule loadBytes(ADDR, NUM, MEM) => readBytes(ADDR, NUM, MEM)
9898
99-
syntax Memory ::= storeBytes(memory: Memory, address: Int, bytes: Int, numBytes: Int) [function, total, symbol(Memory:storeBytes)]
100-
rule storeBytes(MEM, ADDR, BS, NUM) => writeBytes(MEM, ADDR, BS, NUM)
99+
syntax Memory ::= storeBytes(address: Int, bytes: Int, numBytes: Int, memory: Memory) [function, total, symbol(Memory:storeBytes)]
100+
rule storeBytes(ADDR, BS, NUM, MEM) => writeBytes(ADDR, BS, NUM, MEM)
101101
```
102102
Instructions are always 32-bits, and are stored in little-endian format regardless of the endianness of the overall architecture.
103103
```k
104104
syntax Instruction ::= fetchInstr(memory: Memory, address: Int) [function, total]
105-
rule fetchInstr(MEM, ADDR) => disassemble(loadBytes(MEM, ADDR, 4))
105+
rule fetchInstr(MEM, ADDR) => disassemble(loadBytes(ADDR, 4, MEM))
106106
```
107107
Registers should be manipulated with the `writeReg` and `readReg` functions, which account for `x0` always being hard-wired to contain all `0`s.
108108
```k
@@ -314,40 +314,40 @@ The remaining branch instructions proceed analogously, but performing different
314314
`LB`, `LH`, and `LW` load `1`, `2`, and `4` bytes respectively from the memory address which is `OFFSET` greater than the value in register `RS1`, then sign extends the loaded bytes and places them in register `RD`.
315315
```k
316316
rule <instrs> LB RD , OFFSET ( RS1 ) => .K ...</instrs>
317-
<regs> REGS => writeReg(REGS, RD, signExtend(loadBytes(MEM, readReg(REGS, RS1) +Word chop(OFFSET), 1), 8)) </regs>
317+
<regs> REGS => writeReg(REGS, RD, signExtend(loadBytes(readReg(REGS, RS1) +Word chop(OFFSET), 1, MEM), 8)) </regs>
318318
<mem> MEM </mem>
319319
320320
rule <instrs> LH RD , OFFSET ( RS1 ) => .K ...</instrs>
321-
<regs> REGS => writeReg(REGS, RD, signExtend(loadBytes(MEM, readReg(REGS, RS1) +Word chop(OFFSET), 2), 16)) </regs>
321+
<regs> REGS => writeReg(REGS, RD, signExtend(loadBytes(readReg(REGS, RS1) +Word chop(OFFSET), 2, MEM), 16)) </regs>
322322
<mem> MEM </mem>
323323
324324
rule <instrs> LW RD , OFFSET ( RS1 ) => .K ...</instrs>
325-
<regs> REGS => writeReg(REGS, RD, signExtend(loadBytes(MEM, readReg(REGS, RS1) +Word chop(OFFSET), 4), 32)) </regs>
325+
<regs> REGS => writeReg(REGS, RD, signExtend(loadBytes(readReg(REGS, RS1) +Word chop(OFFSET), 4, MEM), 32)) </regs>
326326
<mem> MEM </mem>
327327
```
328328
`LBU` and `LHU` are analogous to `LB` and `LH`, but zero-extending rather than sign-extending.
329329
```k
330330
rule <instrs> LBU RD , OFFSET ( RS1 ) => .K ...</instrs>
331-
<regs> REGS => writeReg(REGS, RD, loadBytes(MEM, readReg(REGS, RS1) +Word chop(OFFSET), 1)) </regs>
331+
<regs> REGS => writeReg(REGS, RD, loadBytes(readReg(REGS, RS1) +Word chop(OFFSET), 1, MEM)) </regs>
332332
<mem> MEM </mem>
333333
334334
rule <instrs> LHU RD , OFFSET ( RS1 ) => .K ...</instrs>
335-
<regs> REGS => writeReg(REGS, RD, loadBytes(MEM, readReg(REGS, RS1) +Word chop(OFFSET), 2)) </regs>
335+
<regs> REGS => writeReg(REGS, RD, loadBytes(readReg(REGS, RS1) +Word chop(OFFSET), 2, MEM)) </regs>
336336
<mem> MEM </mem>
337337
```
338338
Dually, `SB`, `SH`, and `SW` store the least-significant `1`, `2`, and `4` bytes respectively from `RS2` to the memory address which is `OFFSET` greater than the value in register `RS1`.
339339
```k
340340
rule <instrs> SB RS2 , OFFSET ( RS1 ) => .K ...</instrs>
341341
<regs> REGS </regs>
342-
<mem> MEM => storeBytes(MEM, readReg(REGS, RS1) +Word chop(OFFSET), readReg(REGS, RS2) &Int 255, 1) </mem>
342+
<mem> MEM => storeBytes(readReg(REGS, RS1) +Word chop(OFFSET), readReg(REGS, RS2) &Int 255, 1, MEM) </mem>
343343
344344
rule <instrs> SH RS2 , OFFSET ( RS1 ) => .K ...</instrs>
345345
<regs> REGS </regs>
346-
<mem> MEM => storeBytes(MEM, readReg(REGS, RS1) +Word chop(OFFSET), readReg(REGS, RS2) &Int 65535, 2) </mem>
346+
<mem> MEM => storeBytes(readReg(REGS, RS1) +Word chop(OFFSET), readReg(REGS, RS2) &Int 65535, 2, MEM) </mem>
347347
348348
rule <instrs> SW RS2 , OFFSET ( RS1 ) => .K ...</instrs>
349349
<regs> REGS </regs>
350-
<mem> MEM => storeBytes(MEM, readReg(REGS, RS1) +Word chop(OFFSET), readReg(REGS, RS2) &Int 4294967295, 4) </mem>
350+
<mem> MEM => storeBytes(readReg(REGS, RS1) +Word chop(OFFSET), readReg(REGS, RS2) &Int 4294967295, 4, MEM) </mem>
351351
```
352352
We presume a single hart with exclusive access to memory, so `FENCE` and `FENCE.TSO` are no-ops.
353353
```k

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

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -49,62 +49,62 @@ We provide helpers to prepend either data or an empty region to an existing `Spa
4949
```
5050
`pickFront` is a helper function for picking the first `N` bytes from a `SparseBytes` value.
5151
```k
52-
syntax Bytes ::= pickFront(SparseBytes, Int) [function, total]
53-
rule pickFront(_, I) => .Bytes requires I <=Int 0
54-
rule pickFront(.SparseBytes, I) => .Bytes requires I >Int 0
55-
rule pickFront(#empty(N) _, I) => padRightBytes(.Bytes, I, 0)
52+
syntax Bytes ::= pickFront(Int, SparseBytes) [function, total]
53+
rule pickFront(I, _) => .Bytes requires I <=Int 0
54+
rule pickFront(I, .SparseBytes) => .Bytes requires I >Int 0
55+
rule pickFront(I, #empty(N) _) => padRightBytes(.Bytes, I, 0)
5656
requires I >Int 0 andBool I <=Int N
57-
rule pickFront(#empty(N) BF, I) => padRightBytes(.Bytes, I, 0) +Bytes pickFront(BF, I -Int N)
57+
rule pickFront(I, #empty(N) BF) => padRightBytes(.Bytes, I, 0) +Bytes pickFront(I -Int N, BF)
5858
requires I >Int 0 andBool I >Int N
59-
rule pickFront(#bytes(B) _, I) => substrBytes(B, 0, I)
59+
rule pickFront(I, #bytes(B) _) => substrBytes(B, 0, I)
6060
requires I >Int 0 andBool I <=Int lengthBytes(B)
61-
rule pickFront(#bytes(B) EF, I) => B +Bytes pickFront(EF, I -Int lengthBytes(B))
61+
rule pickFront(I, #bytes(B) EF) => B +Bytes pickFront(I -Int lengthBytes(B), EF)
6262
requires I >Int lengthBytes(B)
6363
```
6464
`dropFront` is a helper function for dropping the first `N` bytes from a `SparseBytes` value.
6565
```k
66-
syntax SparseBytes ::= dropFront(SparseBytes, Int) [function, total]
67-
rule dropFront(SBS, I) => SBS requires I <=Int 0
68-
rule dropFront(.SparseBytes, I) => .SparseBytes requires I >Int 0
69-
rule dropFront(#empty(N) BF, I) => #empty(N -Int I) BF requires I >Int 0 andBool I <Int N
70-
rule dropFront(#empty(N) BF, I) => dropFront(BF, I -Int N) requires I >Int 0 andBool I >=Int N
71-
rule dropFront(#bytes(B) EF, I) => dropFront(#bytes(substrBytes(B, I, lengthBytes(B))) EF, 0)
66+
syntax SparseBytes ::= dropFront(Int, SparseBytes) [function, total]
67+
rule dropFront(I, SBS) => SBS requires I <=Int 0
68+
rule dropFront(I, .SparseBytes) => .SparseBytes requires I >Int 0
69+
rule dropFront(I, #empty(N) BF) => #empty(N -Int I) BF requires I >Int 0 andBool I <Int N
70+
rule dropFront(I, #empty(N) BF) => dropFront(I -Int N, BF) requires I >Int 0 andBool I >=Int N
71+
rule dropFront(I, #bytes(B) EF) => dropFront(0, #bytes(substrBytes(B, I, lengthBytes(B))) EF)
7272
requires I >Int 0 andBool I <Int lengthBytes(B)
73-
rule dropFront(#bytes(B) EF, I) => dropFront(EF, I -Int lengthBytes(B)) requires I >=Int lengthBytes(B)
73+
rule dropFront(I, #bytes(B) EF) => dropFront(I -Int lengthBytes(B), EF) requires I >=Int lengthBytes(B)
7474
```
7575
`readBytes(SBS, I, NUM)` reads `NUM` bytes from a given index `I` in `O(E)` time, where `E` is the number of `#empty(_)` or `#bytes(_)` entries in the list up to the location of the index.
7676
```k
77-
syntax Int ::= readBytes(SparseBytes, Int, Int) [function, total]
77+
syntax Int ::= readBytes(Int, Int, SparseBytes) [function, total]
7878
79-
rule readBytes(SBS, I, NUM) => Bytes2Int(pickFront(dropFront(SBS, I), NUM), LE, Unsigned)
79+
rule readBytes(I, NUM, SBS) => Bytes2Int(pickFront(NUM, dropFront(I, SBS)), LE, Unsigned)
8080
```
8181
`writeBytes(SBS, I, V, NUM)` writes value `V` with length `NUM` bytes to a given index `I`. With regards to time complexity,
8282
- If the index is in the middle of an existing `#empty(_)` or `#bytes(_)` region, time complexity is `O(E)` where `E` is the number of entries up to the index.
8383
- If the index happens to be the first or last index in an `#empty(_)` region directly boarding a `#bytes(_)` region, then the `#bytes(_)` region must be re-allocated to append the new value, giving worst-case `O(E + B)` time, where `E` is the number of entries up to the location of the index and `B` is the size of this existing `#bytes(_)`.
8484
```k
8585
syntax SparseBytes ::=
86-
writeBytes (SparseBytes , Int, Int, Int) [function, total]
87-
| writeBytesEF(SparseBytesEF, Int, Int, Int) [function, total]
88-
| writeBytesBF(SparseBytesBF, Int, Int, Int) [function, total]
86+
writeBytes (Int, Int, Int, SparseBytes ) [function, total]
87+
| writeBytesEF(Int, Int, Int, SparseBytesEF) [function, total]
88+
| writeBytesBF(Int, Int, Int, SparseBytesBF) [function, total]
8989
90-
rule writeBytes(BF:SparseBytesBF, I, V, NUM) => writeBytesBF(BF, I, V, NUM)
91-
rule writeBytes(EF:SparseBytesEF, I, V, NUM) => writeBytesEF(EF, I, V, NUM)
90+
rule writeBytes(I, V, NUM, BF:SparseBytesBF) => writeBytesBF(I, V, NUM, BF)
91+
rule writeBytes(I, V, NUM, EF:SparseBytesEF) => writeBytesEF(I, V, NUM, EF)
9292
93-
rule writeBytesEF(_ , I, _, _) => .SparseBytes requires I <Int 0 // error case for totality
94-
rule writeBytesEF(.SparseBytes, I, V, NUM) => prependEmpty(I, #bytes(Int2Bytes(NUM, V, LE)) .SparseBytes) requires I >=Int 0
95-
rule writeBytesEF(#empty(N) BF, I, V, NUM) => prependEmpty(I, prepend(Int2Bytes(NUM, V, LE), prependEmpty(N -Int I -Int NUM, BF)))
93+
rule writeBytesEF(I, _, _ , _ ) => .SparseBytes requires I <Int 0 // error case for totality
94+
rule writeBytesEF(I, V, NUM, .SparseBytes) => prependEmpty(I, #bytes(Int2Bytes(NUM, V, LE)) .SparseBytes) requires I >=Int 0
95+
rule writeBytesEF(I, V, NUM, #empty(N) BF) => prependEmpty(I, prepend(Int2Bytes(NUM, V, LE), prependEmpty(N -Int I -Int NUM, BF)))
9696
requires I >=Int 0 andBool I +Int NUM <=Int N
97-
rule writeBytesEF(#empty(N) BF, I, V, NUM) => prependEmpty(I, prepend(Int2Bytes(NUM, V, LE), dropFront(BF, I +Int NUM -Int N)))
97+
rule writeBytesEF(I, V, NUM, #empty(N) BF) => prependEmpty(I, prepend(Int2Bytes(NUM, V, LE), dropFront(I +Int NUM -Int N, BF)))
9898
requires I <Int N andBool I +Int NUM >Int N
99-
rule writeBytesEF(#empty(N) BF, I, V, NUM) => prependEmpty(N, writeBytesBF(BF, I -Int N, V, NUM))
99+
rule writeBytesEF(I, V, NUM, #empty(N) BF) => prependEmpty(N, writeBytesBF(I -Int N, V, NUM, BF))
100100
requires I >=Int N
101101
102-
rule writeBytesBF(_ , I, _, _ ) => .SparseBytes requires I <Int 0 // error case for totality
103-
rule writeBytesBF(#bytes(B) EF, I, V, NUM) => #bytes(replaceAtBytes(B, I, Int2Bytes(NUM, V, LE))) EF
102+
rule writeBytesBF(I, _, _ , _ ) => .SparseBytes requires I <Int 0 // error case for totality
103+
rule writeBytesBF(I, V, NUM, #bytes(B) EF) => #bytes(replaceAtBytes(B, I, Int2Bytes(NUM, V, LE))) EF
104104
requires I >=Int 0 andBool I +Int NUM <=Int lengthBytes(B)
105-
rule writeBytesBF(#bytes(B) EF, I, V, NUM) => prepend(substrBytes(B, 0, I) +Bytes Int2Bytes(NUM, V, LE), dropFront(EF, I +Int NUM -Int lengthBytes(B)))
105+
rule writeBytesBF(I, V, NUM, #bytes(B) EF) => prepend(substrBytes(B, 0, I) +Bytes Int2Bytes(NUM, V, LE), dropFront(I +Int NUM -Int lengthBytes(B), EF))
106106
requires I <Int lengthBytes(B) andBool I +Int NUM >Int lengthBytes(B)
107-
rule writeBytesBF(#bytes(B) EF, I, V, NUM) => prepend(B, writeBytesEF(EF, I -Int lengthBytes(B), V, NUM))
107+
rule writeBytesBF(I, V, NUM, #bytes(B) EF) => prepend(B, writeBytesEF(I -Int lengthBytes(B), V, NUM, EF))
108108
requires I >=Int lengthBytes(B)
109109
endmodule
110110
```

src/kriscv/term_builder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,11 +278,11 @@ def sort_memory() -> KSort:
278278

279279

280280
def load_bytes(mem: KInner, addr: KInner, num_bytes: KInner) -> KInner:
281-
return KApply('Memory:loadBytes', mem, addr, num_bytes)
281+
return KApply('Memory:loadBytes', addr, num_bytes, mem)
282282

283283

284284
def store_bytes(mem: KInner, addr: KInner, value: KInner, num_bytes: KInner) -> KInner:
285-
return KApply('Memory:storeBytes', mem, addr, value, num_bytes)
285+
return KApply('Memory:storeBytes', addr, value, num_bytes, mem)
286286

287287

288288
def regs(dct: dict[int, int]) -> KInner:

src/tests/integration/test-data/specs/pick-drop0.k

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module PICK-DROP0
44
claim [id]:
55
<instrs> #CHECK_HALT => #HALT </instrs>
66
<regs>
7-
1 |-> (signExtend ( ... bits: Bytes2Int ( pickFront ( dropFront ( #bytes ( W1:Bytes +Bytes b"\x00\x00\x00\x00" ) #empty ( 4 ) #bytes ( Int2Bytes ( 4 , signExtend ( ... bits: Bytes2Int ( substrBytes ( W0:Bytes , 28 , 32 ) , LE , Unsigned ) , signBitIdx: 32 ) &Int 4294967295 , LE ) ) .SparseBytes , 20 ) , 4 ) , LE , Unsigned ) , signBitIdx: 32 ) => Bytes2Int ( substrBytes ( W1 , 20 , 24 ) , LE , Unsigned ))
7+
1 |-> (signExtend ( ... bits: Bytes2Int ( pickFront ( 4 , dropFront ( 20 , #bytes ( W1:Bytes +Bytes b"\x00\x00\x00\x00" ) #empty ( 4 ) #bytes ( Int2Bytes ( 4 , signExtend ( ... bits: Bytes2Int ( substrBytes ( W0:Bytes , 28 , 32 ) , LE , Unsigned ) , signBitIdx: 32 ) &Int 4294967295 , LE ) ) .SparseBytes ) ) , LE , Unsigned ) , signBitIdx: 32 ) => Bytes2Int ( substrBytes ( W1 , 20 , 24 ) , LE , Unsigned ))
88
</regs>
99
<pc> 0 </pc>
1010
<haltCond> ADDRESS ( 0 ) </haltCond>

src/tests/integration/test-data/specs/pickfront0.k

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module PICKFRONT0
88
</regs>
99
<pc> 0 </pc>
1010
<mem>
11-
#bytes(pickFront ( #bytes ( substrBytes ( W0:Bytes , 16 , 32 ) +Bytes W1:Bytes +Bytes b"\x00\x00\x00\x00\x00" ) .SparseBytes , 4 )) .SparseBytes
11+
#bytes(pickFront ( 4 , #bytes ( substrBytes ( W0:Bytes , 16 , 32 ) +Bytes W1:Bytes +Bytes b"\x00\x00\x00\x00\x00" ) .SparseBytes )) .SparseBytes
1212
=> #bytes ( substrBytes ( W0:Bytes , 16 , 20 ) ) .SparseBytes
1313
</mem>
1414
<haltCond> ADDRESS ( 0 ) </haltCond>

src/tests/integration/test-data/specs/store-symbolic-bytes.k renamed to src/tests/integration/test-data/specs/store-symbolic-value.k

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module STORE-SYMBOLIC-BYTES
1+
module STORE-SYMBOLIC-VALUE
22
imports RISCV
33

44
claim [id]:
@@ -9,10 +9,10 @@ module STORE-SYMBOLIC-BYTES
99
<pc> 0 </pc>
1010
<mem>
1111
storeBytes(
12-
#bytes ( b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" ) .SparseBytes,
1312
0,
1413
X:Int,
15-
4
14+
4,
15+
#bytes ( b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" ) .SparseBytes
1616
) =>
1717
#bytes ( Int2Bytes ( 4 , X , LE ) +Bytes b"\x00\x00\x00\x00\x00\x00\x00\x00" ) .SparseBytes
1818
</mem>

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)