Skip to content

Commit e49f2bd

Browse files
Relax k dependency and rename conflicting variables for Skribe compatibility (#731)
* use caret requirement * ID => IDENT * poetry lock * MOD => MDL * SUB => SUBSTR * downgrade k * Set Version: 0.1.131 * pykwasm/: sync poetry files 7.1.268 * flake.{nix,lock}: update Nix derivations --------- Co-authored-by: devops <[email protected]>
1 parent a5cfd4f commit e49f2bd

File tree

9 files changed

+295
-339
lines changed

9 files changed

+295
-339
lines changed

.github/workflows/update-version.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
- name: 'Update pyk release tag'
4343
run: |
4444
K_VERSION=$(cat deps/k_release)
45-
sed -i 's!kframework = "[v0-9\.]*"!kframework = "'${K_VERSION}'"!' pykwasm/pyproject.toml
45+
sed -i 's!kframework = "^[v0-9\.]*"!kframework = "'^${K_VERSION}'"!' pykwasm/pyproject.toml
4646
poetry -C pykwasm update
4747
git add pykwasm/ && git commit -m "pykwasm/: sync poetry files ${K_VERSION}" || true
4848
- name: 'Update Nix flake inputs'

package/version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.130
1+
0.1.131

pykwasm/poetry.lock

Lines changed: 173 additions & 217 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pykwasm/pyproject.toml

Lines changed: 2 additions & 2 deletions
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.130"
7+
version = "0.1.131"
88
description = ""
99
authors = [
1010
"Runtime Verification, Inc. <[email protected]>",
@@ -23,7 +23,7 @@ wasm-semantics = "pykwasm.kdist.plugin"
2323
python = "^3.10"
2424
cytoolz = "^0.12.1"
2525
numpy = "^1.24.2"
26-
kframework = "7.1.268"
26+
kframework = "^7.1.268"
2727
py-wasm = { git = "https://github.com/runtimeverification/py-wasm.git", tag="0.2.1" }
2828

2929
[tool.poetry.group.dev.dependencies]

pykwasm/src/pykwasm/kdist/wasm-semantics/data.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -277,11 +277,11 @@ This rule handles adding an `OptionalId` as a map key, but only when it is a pro
277277
syntax Map ::= #saveId (Map, OptionalId, Int) [function, total]
278278
syntax Bool ::= #canSaveId (Map, OptionalId) [function, total]
279279
// -------------------------------------------------------
280-
rule #saveId (MAP, ID:OptionalId, _) => MAP requires notBool isIdentifier(ID)
281-
rule #saveId (MAP, ID:Identifier, IDX) => MAP [ID <- IDX]
280+
rule #saveId (MAP, IDENT:OptionalId, _) => MAP requires notBool isIdentifier(IDENT)
281+
rule #saveId (MAP, IDENT:Identifier, IDX) => MAP [IDENT <- IDX]
282282
283-
rule #canSaveId (_, ID:OptionalId) => true requires notBool isIdentifier(ID)
284-
rule #canSaveId (MAP, ID:Identifier) => notBool ID in_keys(MAP)
283+
rule #canSaveId (_, IDENT:OptionalId) => true requires notBool isIdentifier(IDENT)
284+
rule #canSaveId (MAP, IDENT:Identifier) => notBool IDENT in_keys(MAP)
285285
```
286286

287287
`Int` is the basic form of index, and indices always need to resolve to integers.

pykwasm/src/pykwasm/kdist/wasm-semantics/data/sparse-bytes.k

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ module SPARSE-BYTES
8080
andBool size(SBI) <=Int S
8181

8282
rule substrSparseBytes(SBChunk(SBI) REST, S, E)
83-
=> #let SUB = substrSBItem(SBI, S, E)
84-
#in SUB substrSparseBytes(REST, 0, E -Int size(SBI))
83+
=> #let SUBSTR = substrSBItem(SBI, S, E)
84+
#in SUBSTR substrSparseBytes(REST, 0, E -Int size(SBI))
8585
requires 0 <=Int S andBool S <=Int E
8686
andBool size(SBI) >Int S
8787

pykwasm/src/pykwasm/kdist/wasm-semantics/test.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ We allow 2 kinds of actions:
211211
rule <instrs> ( invoke ENAME:WasmString .Instrs ) => invoke CUR ENAME ... </instrs>
212212
<curModIdx> CUR </curModIdx>
213213
214-
rule <instrs> ( invoke ID:Identifier ENAME:WasmString .Instrs ) => invoke MODIDX ENAME ... </instrs>
215-
<moduleIds> ... ID |-> MODIDX ... </moduleIds>
214+
rule <instrs> ( invoke IDENT:Identifier ENAME:WasmString .Instrs ) => invoke MODIDX ENAME ... </instrs>
215+
<moduleIds> ... IDENT |-> MODIDX ... </moduleIds>
216216
217217
rule <instrs> invoke MODIDX:Int ENAME:WasmString => ( invoke FUNCADDRS {{ IDX }} orDefault -1 ):Instr ... </instrs>
218218
<moduleInst>
@@ -226,8 +226,8 @@ We allow 2 kinds of actions:
226226
rule <instrs> ( get NAME:WasmString ) => get CUR NAME ... </instrs>
227227
<curModIdx> CUR </curModIdx>
228228
229-
rule <instrs> ( get MOD:Identifier NAME:WasmString ) => get MODIDX NAME ... </instrs>
230-
<moduleIds> ... MOD |-> MODIDX ... </moduleIds>
229+
rule <instrs> ( get MDL:Identifier NAME:WasmString ) => get MODIDX NAME ... </instrs>
230+
<moduleIds> ... MDL |-> MODIDX ... </moduleIds>
231231
232232
rule <instrs> get MODIDX:Int NAME:WasmString => VAL ... </instrs>
233233
<moduleInst>
@@ -254,8 +254,8 @@ We will reference modules by name in imports.
254254
<nextModuleIdx> NEXT </nextModuleIdx>
255255
requires NEXT >Int 0
256256
257-
rule <instrs> ( register S ID:Identifier ) => ( register S IDX ) ... </instrs>
258-
<moduleIds> ... ID |-> IDX ... </moduleIds>
257+
rule <instrs> ( register S IDENT:Identifier ) => ( register S IDX ) ... </instrs>
258+
<moduleIds> ... IDENT |-> IDX ... </moduleIds>
259259
260260
rule <instrs> ( register S:WasmString IDX:Int ) => .K ... </instrs>
261261
<moduleRegistry> ... .Map => S |-> IDX ... </moduleRegistry>
@@ -372,7 +372,7 @@ Except `assert_return` and `assert_trap`, the remaining rules are directly reduc
372372
rule <instrs> (assert_malformed _MOD _DESC) => .K ... </instrs>
373373
rule <instrs> (assert_invalid _MOD _DESC) => .K ... </instrs>
374374
rule <instrs> (assert_unlinkable _MOD _DESC) => .K ... </instrs>
375-
rule <instrs> (assert_trap MOD:ModuleDecl DESC) => sequenceStmts(text2abstract(MOD .Stmts)) ~> #assertTrap DESC ... </instrs>
375+
rule <instrs> (assert_trap MDL:ModuleDecl DESC) => sequenceStmts(text2abstract(MDL .Stmts)) ~> #assertTrap DESC ... </instrs>
376376
```
377377

378378
And we implement some helper assertions to help testing.

0 commit comments

Comments
 (0)