Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Wasm-1.0/2.0 spec #48

Merged
merged 3 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions spectec/spec/wasm-1.0/8-reduction.watsup
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,24 @@ rule Step/read:
-- Step_read: z; instr* ~> instr'*


;; Expressions

relation Eval: config ~>* state; val* hint(show "E-expr")
relation Eval_expr: state; expr ~>* state; val* hint(show "E-expr")
relation Steps: config ~>* config hint(show "E")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: move up to other relations.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case, should I also move rules for Steps above rules for Step?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would move the relation decl after the others, so the rules can stay here, I think.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see, I thought you meant moving Steps relation above other Step relations.


rule Eval/done:
z; val* ~>* z; val*
rule Steps/refl:
z; admininstr* ~>* z; admininstr*

rule Eval/step:
z; admininstr* ~>* z''; val*
rule Steps/trans:
z; admininstr* ~>* z''; admininstr''*
-- Step: z; admininstr* ~> z'; admininstr'*
-- Eval: z'; admininstr' ~>* z''; val*
-- Steps: z'; admininstr' ~>* z''; admininstr''*


;; Expressions

relation Eval_expr: state; expr ~>* state; val* hint(show "E-expr")

rule Eval_expr:
z; instr* ~>* z'; val*
-- Eval: z; instr* ~>* z; val*
-- Steps: z; instr* ~>* z'; val*


;;
Expand Down
22 changes: 12 additions & 10 deletions spectec/spec/wasm-2.0/8-reduction.watsup
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,24 @@ rule Step/read:
-- Step_read: z; instr* ~> instr'*


;; Expressions

relation Eval: config ~>* state; val* hint(show "E-expr")
relation Eval_expr: state; expr ~>* state; val* hint(show "E-expr")
relation Steps: config ~>* config hint(show "E")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.


rule Eval/done:
z; val* ~>* z; val*
rule Steps/refl:
z; admininstr* ~>* z; admininstr*

rule Eval/step:
z; admininstr* ~>* z''; val*
rule Steps/trans:
z; admininstr* ~>* z''; admininstr''*
-- Step: z; admininstr* ~> z'; admininstr'*
-- Eval: z'; admininstr' ~>* z''; val*
-- Steps: z'; admininstr' ~>* z''; admininstr''*


;; Expressions

relation Eval_expr: state; expr ~>* state; val* hint(show "E-expr")

rule Eval_expr:
z; instr* ~>* z'; val*
-- Eval: z; instr* ~>* z; val*
-- Steps: z; instr* ~>* z'; val*


;;
Expand Down
22 changes: 12 additions & 10 deletions spectec/spec/wasm-3.0/8-reduction.watsup
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,24 @@ rule Step/read:
-- Step_read: z; instr* ~> instr'*


;; Expressions

relation Eval: config ~>* state; val* hint(show "E-expr")
relation Eval_expr: state; expr ~>* state; val* hint(show "E-expr")
relation Steps: config ~>* config hint(show "E")

rule Eval/done:
z; val* ~>* z; val*
rule Steps/refl:
z; admininstr* ~>* z; admininstr*

rule Eval/step:
z; admininstr* ~>* z''; val*
rule Steps/trans:
z; admininstr* ~>* z''; admininstr''*
-- Step: z; admininstr* ~> z'; admininstr'*
-- Eval: z'; admininstr' ~>* z''; val*
-- Steps: z'; admininstr' ~>* z''; admininstr''*


;; Expressions

relation Eval_expr: state; expr ~>* state; val* hint(show "E-expr")

rule Eval_expr:
z; instr* ~>* z'; val*
-- Eval: z; instr* ~>* z; val*
-- Steps: z; instr* ~>* z'; val*


;;
Expand Down
Loading
Loading