forked from runtimeverification/wasm-semantics
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fa7e39c
commit 18a6791
Showing
29 changed files
with
826 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
/.kwasm-logs/ | ||
/tests/*/*-out | ||
/tmp | ||
|
||
*.sty | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
pykwasm/src/pykwasm/kdist/wasm-semantics/binary-parser-test.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
```k | ||
requires "binary-parser.md" | ||
requires "wasm.md" | ||
module BINARY-PARSER-TEST-SYNTAX | ||
endmodule | ||
module BINARY-PARSER-TEST | ||
imports BINARY-PARSER-TEST-SYNTAX | ||
imports BINARY-PARSER | ||
syntax KItem ::= parseBinary(Bytes) | ||
configuration | ||
<k> parseBinary($PGM) </k> | ||
<wasm/> | ||
rule parseBinary(B:Bytes) => parseModule(B) | ||
rule addDefnToModule | ||
( false => true | ||
, _D:Defn | ||
, #module(... metadata: _ => #meta (... id: , funcIds: .Map , filename: "error: test addDefnToModule branch called." ))) | ||
[owise] | ||
rule parseSection(U:UnparsedSection) | ||
=> parseError("parseSection test default", ListItem(U)) | ||
[owise] | ||
endmodule | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
(module $mymodule | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<generatedTop> | ||
<k> | ||
#module (... types: .EmptyStmts , funcs: .EmptyStmts , tables: .EmptyStmts , mems: .EmptyStmts , globals: .EmptyStmts , elem: .EmptyStmts , data: .EmptyStmts , start: .EmptyStmts , importDefns: .EmptyStmts , exports: .EmptyStmts , metadata: #meta (... id: , funcIds: .Map , filename: .String ) ) ~> .K | ||
</k> | ||
<wasm> | ||
<instrs> | ||
.K | ||
</instrs> | ||
<valstack> | ||
.ValStack | ||
</valstack> | ||
<curFrame> | ||
<locals> | ||
.List | ||
</locals> | ||
<curModIdx> | ||
.Int | ||
</curModIdx> | ||
</curFrame> | ||
<moduleRegistry> | ||
.Map | ||
</moduleRegistry> | ||
<moduleIds> | ||
.Map | ||
</moduleIds> | ||
<moduleInstances> | ||
.ModuleInstCellMap | ||
</moduleInstances> | ||
<nextModuleIdx> | ||
0 | ||
</nextModuleIdx> | ||
<mainStore> | ||
<funcs> | ||
.FuncDefCellMap | ||
</funcs> | ||
<nextFuncAddr> | ||
0 | ||
</nextFuncAddr> | ||
<tabs> | ||
.TabInstCellMap | ||
</tabs> | ||
<nextTabAddr> | ||
0 | ||
</nextTabAddr> | ||
<mems> | ||
.List | ||
</mems> | ||
<globals> | ||
.GlobalInstCellMap | ||
</globals> | ||
<nextGlobAddr> | ||
0 | ||
</nextGlobAddr> | ||
<elems> | ||
.ElemInstCellMap | ||
</elems> | ||
<nextElemAddr> | ||
0 | ||
</nextElemAddr> | ||
</mainStore> | ||
<deterministicMemoryGrowth> | ||
true | ||
</deterministicMemoryGrowth> | ||
</wasm> | ||
</generatedTop> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
tests/binary-parsing/type-param-v128.wast |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
(module $mymodule | ||
(type (;0;) (func)) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<generatedTop> | ||
<k> | ||
#module (... types: #type (... type: [ .ValTypes ] -> [ .ValTypes ] , metadata: ) .EmptyStmts , funcs: .EmptyStmts , tables: .EmptyStmts , mems: .EmptyStmts , globals: .EmptyStmts , elem: .EmptyStmts , data: .EmptyStmts , start: .EmptyStmts , importDefns: .EmptyStmts , exports: .EmptyStmts , metadata: #meta (... id: , funcIds: .Map , filename: .String ) ) ~> .K | ||
</k> | ||
<wasm> | ||
<instrs> | ||
.K | ||
</instrs> | ||
<valstack> | ||
.ValStack | ||
</valstack> | ||
<curFrame> | ||
<locals> | ||
.List | ||
</locals> | ||
<curModIdx> | ||
.Int | ||
</curModIdx> | ||
</curFrame> | ||
<moduleRegistry> | ||
.Map | ||
</moduleRegistry> | ||
<moduleIds> | ||
.Map | ||
</moduleIds> | ||
<moduleInstances> | ||
.ModuleInstCellMap | ||
</moduleInstances> | ||
<nextModuleIdx> | ||
0 | ||
</nextModuleIdx> | ||
<mainStore> | ||
<funcs> | ||
.FuncDefCellMap | ||
</funcs> | ||
<nextFuncAddr> | ||
0 | ||
</nextFuncAddr> | ||
<tabs> | ||
.TabInstCellMap | ||
</tabs> | ||
<nextTabAddr> | ||
0 | ||
</nextTabAddr> | ||
<mems> | ||
.List | ||
</mems> | ||
<globals> | ||
.GlobalInstCellMap | ||
</globals> | ||
<nextGlobAddr> | ||
0 | ||
</nextGlobAddr> | ||
<elems> | ||
.ElemInstCellMap | ||
</elems> | ||
<nextElemAddr> | ||
0 | ||
</nextElemAddr> | ||
</mainStore> | ||
<deterministicMemoryGrowth> | ||
true | ||
</deterministicMemoryGrowth> | ||
</wasm> | ||
</generatedTop> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
(module $mymodule | ||
(type (;0;) (func (param externref))) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<generatedTop> | ||
<k> | ||
#module (... types: #type (... type: [ externref .ValTypes ] -> [ .ValTypes ] , metadata: ) .EmptyStmts , funcs: .EmptyStmts , tables: .EmptyStmts , mems: .EmptyStmts , globals: .EmptyStmts , elem: .EmptyStmts , data: .EmptyStmts , start: .EmptyStmts , importDefns: .EmptyStmts , exports: .EmptyStmts , metadata: #meta (... id: , funcIds: .Map , filename: .String ) ) ~> .K | ||
</k> | ||
<wasm> | ||
<instrs> | ||
.K | ||
</instrs> | ||
<valstack> | ||
.ValStack | ||
</valstack> | ||
<curFrame> | ||
<locals> | ||
.List | ||
</locals> | ||
<curModIdx> | ||
.Int | ||
</curModIdx> | ||
</curFrame> | ||
<moduleRegistry> | ||
.Map | ||
</moduleRegistry> | ||
<moduleIds> | ||
.Map | ||
</moduleIds> | ||
<moduleInstances> | ||
.ModuleInstCellMap | ||
</moduleInstances> | ||
<nextModuleIdx> | ||
0 | ||
</nextModuleIdx> | ||
<mainStore> | ||
<funcs> | ||
.FuncDefCellMap | ||
</funcs> | ||
<nextFuncAddr> | ||
0 | ||
</nextFuncAddr> | ||
<tabs> | ||
.TabInstCellMap | ||
</tabs> | ||
<nextTabAddr> | ||
0 | ||
</nextTabAddr> | ||
<mems> | ||
.List | ||
</mems> | ||
<globals> | ||
.GlobalInstCellMap | ||
</globals> | ||
<nextGlobAddr> | ||
0 | ||
</nextGlobAddr> | ||
<elems> | ||
.ElemInstCellMap | ||
</elems> | ||
<nextElemAddr> | ||
0 | ||
</nextElemAddr> | ||
</mainStore> | ||
<deterministicMemoryGrowth> | ||
true | ||
</deterministicMemoryGrowth> | ||
</wasm> | ||
</generatedTop> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
(module $mymodule | ||
(type (;0;) (func (param f32))) | ||
) |
Oops, something went wrong.