Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@nomeata
Copy link

@nomeata nomeata commented Jun 9, 2023

this is a pass that takes care of the problem with MUT?, which is a non-functional expression (denotes multiple values), and thus cannot be compiled like this to functional backends (proof backends).

Here is its effect:

 relation Global_ok: `%|-%:%`(context, global, globaltype)
   ;; 3-typing.watsup:414.1-418.40
-  rule _ {C : context, expr : expr, gt : globaltype, t : valtype}:
+  rule _ {C : context, expr : expr, gt : globaltype, t : valtype, w0 : ()?}:
     `%|-%:%`(C, GLOBAL(gt, expr), gt)
     -- Globaltype_ok: `|-%:OK`(gt)
-    -- if (gt = `MUT%?%`(()?{}, t))
+    -- if (gt = `MUT%?%`(w0, t))
     -- Expr_ok_const: `%|-%:%CONST`(C, expr, t)

this is a pass that takes care of the problem with `MUT?`, which is a
non-functional expression (denotes multiple values), and thus cannot be
compiled like this to functional backends (proof backends).

Here is its effect:
```diff
 relation Global_ok: `%|-%:%`(context, global, globaltype)
   ;; 3-typing.watsup:414.1-418.40
-  rule _ {C : context, expr : expr, gt : globaltype, t : valtype}:
+  rule _ {C : context, expr : expr, gt : globaltype, t : valtype, w0 : ()?}:
     `%|-%:%`(C, GLOBAL(gt, expr), gt)
     -- Globaltype_ok: `|-%:OK`(gt)
-    -- if (gt = `MUT%?%`(()?{}, t))
+    -- if (gt = `MUT%?%`(w0, t))
     -- Expr_ok_const: `%|-%:%CONST`(C, expr, t)
```
Copy link
Collaborator

@rossberg rossberg left a comment

Choose a reason for hiding this comment

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

Cool, this is what I hoped for, thanks. Rubberstamped

@nomeata nomeata merged commit 01f80d2 into main Jun 12, 2023
@nomeata nomeata deleted the wild branch June 12, 2023 14:22
@nomeata nomeata mentioned this pull request Jun 12, 2023
Alan-Liang pushed a commit to altk-contrib/spectec that referenced this pull request Sep 1, 2024
Alan-Liang pushed a commit to altk-contrib/spectec that referenced this pull request Sep 1, 2024
Merge with WebAssembly/spec and WebAssembly/gc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants