Skip to content

Commit c9a237f

Browse files
Baltolirv-auditor
andauthoredFeb 21, 2024
Drop . in favour of .K (#581)
* Drop . in favour of .K * Set Version: 0.1.4 --------- Co-authored-by: devops <devops@runtimeverification.com>
1 parent a31accc commit c9a237f

File tree

5 files changed

+74
-74
lines changed

5 files changed

+74
-74
lines changed
 

‎auxil.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module WASM-AUXIL
2121
imports WASM
2222
2323
rule [clearConfig]:
24-
<instrs> #clearConfig => . ... </instrs>
24+
<instrs> #clearConfig => .K ... </instrs>
2525
<curModIdx> _ => .Int </curModIdx>
2626
<valstack> _ => .ValStack </valstack>
2727
<locals> _ => .Map </locals>

‎package/version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.3
1+
0.1.4

‎pykwasm/pyproject.toml

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

55
[tool.poetry]
66
name = "pykwasm"
7-
version = "0.1.3"
7+
version = "0.1.4"
88
description = ""
99
authors = [
1010
"Runtime Verification, Inc. <contact@runtimeverification.com>",

‎test.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ Passing Control
129129
The test embedder passes control to the execution cell in Wasm.
130130

131131
```k
132-
rule <k> PGM => . </k>
132+
rule <k> PGM => .K </k>
133133
<instrs> .K
134134
=> #initSpectestModule
135135
~> sequenceStmts(text2abstract(PGM))
@@ -165,7 +165,7 @@ We add `token` as a value in order to use as a separator in `<valstack>`.
165165
```k
166166
syntax Val ::= "token"
167167
// ----------------------
168-
rule <instrs> token => . ... </instrs>
168+
rule <instrs> token => .K ... </instrs>
169169
<valstack> S => token : S </valstack>
170170
171171
syntax ValStack ::= takeUntilToken(ValStack) [function, total]
@@ -183,7 +183,7 @@ We add `token` as a value in order to use as a separator in `<valstack>`.
183183
184184
syntax Assertion ::= "#dropUntilToken"
185185
// --------------------------------------------------
186-
rule <instrs> #dropUntilToken => . ... </instrs>
186+
rule <instrs> #dropUntilToken => .K ... </instrs>
187187
<valstack> S => dropUntilToken(S) </valstack>
188188
```
189189

@@ -255,7 +255,7 @@ We will reference modules by name in imports.
255255
rule <instrs> ( register S ID:Identifier ) => ( register S IDX ) ... </instrs>
256256
<moduleIds> ... ID |-> IDX ... </moduleIds>
257257
258-
rule <instrs> ( register S:WasmString IDX:Int ) => . ... </instrs>
258+
rule <instrs> ( register S:WasmString IDX:Int ) => .K ... </instrs>
259259
<moduleRegistry> ... .Map => S |-> IDX ... </moduleRegistry>
260260
```
261261

@@ -363,13 +363,13 @@ Except `assert_return` and `assert_trap`, the remaining rules are directly reduc
363363
...
364364
</instrs>
365365
366-
rule <instrs> (assert_return_canonical_nan _ACT) => . ... </instrs>
367-
rule <instrs> (assert_return_arithmetic_nan _ACT) => . ... </instrs>
366+
rule <instrs> (assert_return_canonical_nan _ACT) => .K ... </instrs>
367+
rule <instrs> (assert_return_arithmetic_nan _ACT) => .K ... </instrs>
368368
rule <instrs> (assert_trap ACT:Action DESC) => ACT ~> #assertTrap DESC ... </instrs>
369-
rule <instrs> (assert_exhaustion _ACT:Action _DESC) => . ... </instrs>
370-
rule <instrs> (assert_malformed _MOD _DESC) => . ... </instrs>
371-
rule <instrs> (assert_invalid _MOD _DESC) => . ... </instrs>
372-
rule <instrs> (assert_unlinkable _MOD _DESC) => . ... </instrs>
369+
rule <instrs> (assert_exhaustion _ACT:Action _DESC) => .K ... </instrs>
370+
rule <instrs> (assert_malformed _MOD _DESC) => .K ... </instrs>
371+
rule <instrs> (assert_invalid _MOD _DESC) => .K ... </instrs>
372+
rule <instrs> (assert_unlinkable _MOD _DESC) => .K ... </instrs>
373373
rule <instrs> (assert_trap MOD:ModuleDecl DESC) => sequenceStmts(text2abstract(MOD .Stmts)) ~> #assertTrap DESC ... </instrs>
374374
```
375375

@@ -390,7 +390,7 @@ And we implement some helper assertions to help testing.
390390
This asserts that a `trap` was just thrown.
391391

392392
```k
393-
rule <instrs> trap ~> #assertTrap _ => . ... </instrs>
393+
rule <instrs> trap ~> #assertTrap _ => .K ... </instrs>
394394
```
395395

396396
### ValStack Assertions
@@ -400,16 +400,16 @@ These functions make assertions about the state of the `<valstack>` cell.
400400
```k
401401
syntax Assertion ::= "#assertStackAux" ValStack ValStack
402402
// ---------------------------------------------------------------
403-
rule <instrs> #assertTopStack VAL _ => . ... </instrs>
403+
rule <instrs> #assertTopStack VAL _ => .K ... </instrs>
404404
<valstack> VAL' : _ </valstack>
405405
requires equalVal(VAL, VAL')
406406
407-
rule <instrs> #assertTopStackExactly A _ => . ... </instrs> <valstack> A : _VALSTACK </valstack>
407+
rule <instrs> #assertTopStackExactly A _ => .K ... </instrs> <valstack> A : _VALSTACK </valstack>
408408
409409
rule <instrs> #assertStack S1 _ => #assertStackAux S1 S2 ... </instrs>
410410
<valstack> S2 </valstack>
411411
412-
rule <instrs> #assertStackAux .ValStack _ => . ... </instrs>
412+
rule <instrs> #assertStackAux .ValStack _ => .K ... </instrs>
413413
rule <instrs> #assertStackAux (V1 : S1) (V2 : S2) => #assertStackAux S1 S2 ... </instrs>
414414
requires equalVal(V1, V2)
415415
@@ -427,10 +427,10 @@ These functions make assertions about the state of the `<valstack>` cell.
427427
The operator `#assertLocal`/`#assertGlobal` operators perform a check for a local/global variable's value.
428428

429429
```k
430-
rule <instrs> #assertLocal INDEX VALUE _ => . ... </instrs>
430+
rule <instrs> #assertLocal INDEX VALUE _ => .K ... </instrs>
431431
<locals> ... INDEX |-> VALUE ... </locals>
432432
433-
rule <instrs> #assertGlobal TFIDX VALUE _ => . ... </instrs>
433+
rule <instrs> #assertGlobal TFIDX VALUE _ => .K ... </instrs>
434434
<curModIdx> CUR </curModIdx>
435435
<moduleInst>
436436
<modIdx> CUR </modIdx>
@@ -454,15 +454,15 @@ The operator `#assertLocal`/`#assertGlobal` operators perform a check for a loca
454454
`#assertNextTypeIdx` checks whether the number of types are allocated correctly.
455455

456456
```k
457-
rule <instrs> #assertType IDX FTYPE => . ... </instrs>
457+
rule <instrs> #assertType IDX FTYPE => .K ... </instrs>
458458
<curModIdx> CUR </curModIdx>
459459
<moduleInst>
460460
<modIdx> CUR </modIdx>
461461
<types> ... IDX |-> FTYPE ... </types>
462462
...
463463
</moduleInst>
464464
465-
rule <instrs> #assertNextTypeIdx IDX => . ... </instrs>
465+
rule <instrs> #assertNextTypeIdx IDX => .K ... </instrs>
466466
<curModIdx> CUR </curModIdx>
467467
<moduleInst>
468468
<modIdx> CUR </modIdx>
@@ -487,7 +487,7 @@ This simply checks that the given function exists in the `<funcs>` cell and has
487487
</moduleInst>
488488
requires isListIndex(IDX, FUNCADDRS)
489489
490-
rule <instrs> #assertFunctionHelper ADDR FTYPE LTYPE => . ... </instrs>
490+
rule <instrs> #assertFunctionHelper ADDR FTYPE LTYPE => .K ... </instrs>
491491
<funcs>
492492
<funcDef>
493493
<fAddr> ADDR </fAddr>
@@ -504,7 +504,7 @@ This simply checks that the given function exists in the `<funcs>` cell and has
504504
This asserts related operation about tables.
505505

506506
```k
507-
rule <instrs> #assertTable TFIDX SIZE MAX _MSG => . ... </instrs>
507+
rule <instrs> #assertTable TFIDX SIZE MAX _MSG => .K ... </instrs>
508508
<curModIdx> CUR </curModIdx>
509509
<moduleInst>
510510
<modIdx> CUR </modIdx>
@@ -523,7 +523,7 @@ This asserts related operation about tables.
523523
</tabs>
524524
requires size(DATA) ==Int SIZE
525525
526-
rule <instrs> #assertTableElem (KEY , VAL:Int) _MSG => . ... </instrs>
526+
rule <instrs> #assertTableElem (KEY , VAL:Int) _MSG => .K ... </instrs>
527527
<curModIdx> CUR </curModIdx>
528528
<moduleInst>
529529
<modIdx> CUR </modIdx>
@@ -562,7 +562,7 @@ This asserts related operation about tables.
562562
This checks that the last allocated memory has the given size and max value.
563563

564564
```k
565-
rule <instrs> #assertMemory TFIDX SIZE MAX _MSG => . ... </instrs>
565+
rule <instrs> #assertMemory TFIDX SIZE MAX _MSG => .K ... </instrs>
566566
<curModIdx> CUR </curModIdx>
567567
<moduleInst>
568568
<modIdx> CUR </modIdx>
@@ -583,7 +583,7 @@ This checks that the last allocated memory has the given size and max value.
583583
rule <instrs> #assertMemoryData (KEY , VAL) MSG => #assertMemoryData CUR (KEY, VAL) MSG ... </instrs>
584584
<curModIdx> CUR </curModIdx>
585585
586-
rule <instrs> #assertMemoryData MODIDX (KEY , VAL) _MSG => . ... </instrs>
586+
rule <instrs> #assertMemoryData MODIDX (KEY , VAL) _MSG => .K ... </instrs>
587587
<moduleInst>
588588
<modIdx> MODIDX </modIdx>
589589
<memAddrs> wrap(0) Int2Int|-> wrap(ADDR) </memAddrs>
@@ -607,7 +607,7 @@ These assertions act on the last module defined.
607607

608608
```k
609609
rule [assertNamedModule]:
610-
<instrs> #assertNamedModule NAME _S => . ... </instrs>
610+
<instrs> #assertNamedModule NAME _S => .K ... </instrs>
611611
<moduleIds> ... NAME |-> IDX ... </moduleIds>
612612
<moduleInstances>
613613
<moduleInst>
@@ -626,11 +626,11 @@ Registry Assertations
626626
We also want to be able to test that the embedder's registration function is working.
627627

628628
```k
629-
rule <instrs> #assertRegistrationUnnamed REGNAME _ => . ... </instrs>
629+
rule <instrs> #assertRegistrationUnnamed REGNAME _ => .K ... </instrs>
630630
<modIdx> IDX </modIdx>
631631
<moduleRegistry> ... REGNAME |-> IDX ... </moduleRegistry>
632632
633-
rule <instrs> #assertRegistrationNamed REGNAME _NAME _ => . ... </instrs>
633+
rule <instrs> #assertRegistrationNamed REGNAME _NAME _ => .K ... </instrs>
634634
<modIdx> IDX </modIdx>
635635
<moduleRegistry> ... REGNAME |-> IDX ... </moduleRegistry>
636636
```

0 commit comments

Comments
 (0)