Skip to content

Commit

Permalink
Use WasmString for function names
Browse files Browse the repository at this point in the history
  • Loading branch information
virgil-serbanuta committed Dec 16, 2024
1 parent d91a531 commit 4106356
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pykwasm/src/pykwasm/kdist/wasm-semantics/ulm-wasm.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ infer that this must be the top configuration, so it will wrap it in
A special configuration cell is added in the local case to support VM initialization.

```local
<entry> $ENTRY:String </entry>
<entry> $ENTRY:WasmString </entry>
```


Expand Down Expand Up @@ -179,16 +179,16 @@ Obtaining the Entrypoint
In the standalone semantics, the Wasm VM obtains an entrypoint from the configuration.

```local
syntax String ::= #getEntryPoint() [function, total]
syntax WasmString ::= #getEntryPoint() [function, total]
rule #getEntryPoint() => FUNCNAME
[[ <entry> FUNCNAME </entry> ]]
```

In the remote semantics, the Wasm VM has a fixed entrypoint.

```remote
syntax String ::= #getEntryPoint() [function, total]
rule #getEntryPoint() => "ulmDispatchCaller"
syntax WasmString ::= #getEntryPoint() [function, total]
rule #getEntryPoint() => #token("\"ulmDispatchCaller\"", "WasmStringToken")
```

Passing Control
Expand All @@ -205,8 +205,8 @@ Note that entrypoint resolution must occur _after_ the Wasm module has been load
This is ensured by requiring that the `<instrs>` cell is empty during resolution.

```k
syntax Initializer ::= #resolveCurModuleFuncExport(String)
| #resolveModuleFuncExport(Int, String)
syntax Initializer ::= #resolveCurModuleFuncExport(WasmString)
| #resolveModuleFuncExport(Int, WasmString)
| #resolveFunc(Int, ListInt)
// ----------------------------------------------
rule <k> #resolveCurModuleFuncExport(FUNCNAME) => #resolveModuleFuncExport(MODIDX, FUNCNAME) </k>
Expand Down

0 comments on commit 4106356

Please sign in to comment.