Open sabine opened 5 years ago
Hi @sabine,
First of, I would like to emphasise that this project/repository is not the official development place for the wasm exception handling. The official repository is here: https://github.com/WebAssembly/exception-handling. Although, I believe this project is ahead of the official repository in terms of implementation progress.
I see that, in this repository, there are multiple branches that have some code and that there seems to be a static and a dynamic semantics for exceptions. What is the current state of affairs?
The primary aim of this repository is to explore design considerations for implementations of effect handlers in wasm. As our starting point, we use the exception handling proposal for wasm -- as exception handling hadn't been implemented by the time we began looking into effect handlers for wasm, we decided to implement the reference interpreter for exception handling. The branch exception-handlers
contains the source code for this implementation (it has been composed by the branches exn-{syntax,static-semantics,dynamic-semantics}
).
The reason I do this is to understand and find an intermediate representation for compiling OCaml to WASM (ideally one where, with low effort, we can have an interpreter in order to run tests).
It is my understanding that many of the various wasm reference interpreters eventually should converge (once ratified). This reference interpreter is based on the reference-types and multi-value proposals. I would probably advice you to figure out which proposals/features you need and then merge them into one interpreter that you can use for your experiments.
Although, I believe this project is ahead of the official repository in terms of implementation progress.
Looking at the official repository, I think you are right. There has been some activity recently, but it is still behind, thus this project currently seems more useful.
As our starting point, we use the exception handling proposal for wasm -- as exception handling hadn't been implemented by the time we began looking into effect handlers for wasm, we decided to implement the reference interpreter for exception handling.
Ah, that's interesting. Thanks for pointing out the relevant branches. :)
The approach in this repository looks particularly interesting, because it aims to provide a more abstract formalism in which exceptions can be implemented. Sometimes, looking at things from an abstract (but not too abstract) perspective is helpful to find simple solutions.
Looking at the official repository, I think you are right. There has been some activity recently, but it is still behind, thus this project currently seems more useful.
I have offered to upstream the code in the exception-handlers branch to the official repository. I expect they will decide whether to use this code during the February 2020 wasm meeting.
Hello,
I'm looking at the interpreters of several WASM extensions (the ones that we think we could use in order to compile OCaml to WASM efficiently) to understand the current state of their implementations.
The purpose of this, from my side, is to understand how to combine the interpreters of different extensions into one WASM interpreter for a specific set of extensions. The reason I do this is to understand and find an intermediate representation for compiling OCaml to WASM (ideally one where, with low effort, we can have an interpreter in order to run tests). I believe there is something here for me to learn which could help in specifying an exception semantics for the intermediate representation of an OCaml WASM backend.
I see that, in this repository, there are multiple branches that have some code and that there seems to be a static and a dynamic semantics for exceptions. What is the current state of affairs? Anything I should read or look at (apart from the papers in the bibliography)?