CG-03-03.md

September 14, 2020 · View on GitHub

WebAssembly logo

Agenda for the March 3rd video call of WebAssembly's Community Group

  • Where: zoom.us
  • When: March 3rd, 5pm-6pm UTC (March 3rd, 9am-10am Pacific Daylight Time)
  • Location: link on calendar invite

Registration

None required if you've attended before. Send an email to the acting WebAssembly CG chair to sign up if it's your first time. The meeting is open to CG members only.

Logistics

The meeting will be on a zoom.us video conference. Installation is required, see the calendar invite.

Agenda items

  1. Opening, welcome and roll call
    1. Opening of the meeting
    2. Introduction of attendees
  2. Find volunteers for note taking (acting chair to volunteer)
  3. Adoption of the agenda
  4. Proposals and discussions
    1. Review of action items from prior meeting.
    2. Follow-Up on Module Sharing and Encapsulation
    3. Memory w/ 64-bit indexes (Ben Smith)
      1. Poll for phase 0
  5. Closure

Agenda items for future meetings

None

Schedule constraints

None

Meeting Notes

Opening, welcome and roll call

Opening of the meeting

Introduction of attendees

Lars Hansen

Paolo

Zalim

Rick

Alex Crichton

Jakob Kummerow

Olaf Tomalka

Adam Klein

Ben Smith

Yury Delendik

Dan Gohman

Luke Wagner

Thomas Lively

Heejin Ahn

JP Sugarbroad

Keith Miller

Mingqiu Sun

Petr Penzin

Ryan Hunt

Rreverser

Sven Sauleau

TatWai Chong

Yury Delendik

Francis McCabe

Nabeel Alshamma

Arun Purusan

Derek Schuff

Alon Zakai

Emmanuel Ziegler

Heejin Ahn

Deepti Gandluri

Conrad Watt

Vivek Shekhar

Find volunteers for note taking (acting chair to volunteer)

Adoption of the agenda

Keith Miller Seconds

Proposals and discussions

Memory w/ 64-bit indexes

Ben smith polling for Phase 0 for 64-bit Memory

There’s a github issue, linked in the meeting notes - any questions?

TL:Any reason not to go to Phase 1?

Phase 1 sounds simple.

JP: Do you have proposal text?

BS: It’s a github issue, so maybe Phase 0.

TL: Github repo is populated during Phase 1

BS: Anyone opposed to Phase 1? Phase 0 is free.

BS: Unanimous consent to Phase 1.

Follow-Up on Module Sharing and Encapsulation

Roadmaps Slides: (pdf) (pptx)

RT Acknowledges having two proposals is not ideal, giving background.

RT: Any questions about the roadmapping process?

JP: Systems written by humans are often nominal. Systems for machines are often structural -- think of LLVM IR. Is that a consideration here?

RT: It certainly is, interesting thing is there are these double stages - talking about memory layout - the way you describe it is structural, but the way the correctness of the compiler reasons about them is nominal. The low level types assembly level languages, took the structure and defined a process of naming the different elements… examples ... then you can express the invariance at a higher level. It’s a halfway point between nominal and structural

JP: Like a pseudo structure

FM: Where does SML/Ocaml fit in?

RT: Languages may use mostly structural types, or algebraic structures, still the case that when you compile it down, it still compiles to a very structural memory layout, tuple layouts - sort of the same pattern with OCaml specifically because it has structural equality, even layouts between arrays and tuples map to a structure so you can walk through them consistently. We used out structure to walk through the OCaml system as well, with our nominal types and it works.. It’s a better model for how you reason about the compiler

FM: So it's more structural in your analysis?

RT: What do you mean? The reasoning at the low level is almost the same as a nominal system, it's about how memory layouts align for each other. You have names,you say they're related by subtypes. You have an a priori check to see that their layouts match up, then at assembly code you just look at the names. Don't have to look at the structure, which is slow. Then field access you look up name to get field access offsets.

RT: High level, don’t want to sidetrack to explaining the whole system

CW: In the proposal, my understanding is that the structural subtyping relationship would be pre-computed ahead of time, so you don't get quadratic behavior.

RT: There’s a few things that come up, if you have large classes that table gets really bit, the precompiler phase gets really big - you could try to move stuff from the compiler phase.. Could try amortizing these costs. When you have polymorphism, you will have types/casts whose types are determined at runtime, that approach is made effective by canonicalization. At runtime you have to got through the canonicalization process, there’s a lot of heavy machinery to make that work.. We need implementation, a whole thorough test like a big Java implementation to make sure it works, hard to predict

<back to slides - nominally tagged casts>

JP: Are these slides available? [RT: I'll put them up],

JP: The proposal I know of is the GC proposal, the alternative is?

RT: The secondary one is an alternative... here's the link:

https://github.com/soil-initiative/gc/pull/1/

RT: We tried having a discussion about what can we do to improve this? There was a discussion about existential types, we haven’t had a chance to discuss it yet

AK: Andreas was on vacation this time -- there's a plan to put a GC subgroup together. That's a good place to have a focused discussion on structural subtyping working. In a smaller setting, with focus in that area.

RT: Mostly wanted to present, agree that we should not be hashing out what to do right now - having someone new come in and give a big proposal is not ideal, but realized that the reasons why we did this was not documented out. Looking for feedback on the structural approach and how it would work out with all the situations that were outlines

BS: Read through PR, it’s very comprehensive - a lot of it is potentially not something ina first version - wasn’t clear to me which parts are useful to be in a first version and which ones not

RT: We roadmapped much further down the road than what we have planned for now, we tried to find a middle ground of showing a roadmap without going all the way, part of the roadmap is staging the releases - if this is the direction to go then we should have a discussion about figuring out what to target, as well as plan for the next releases. We talked about how dynamic languages have the switch thing, but that’s something we can add later on - it’s useful to know that’s there for..

AZ: In the talk here we mentioned 2 GC proposals. But there's another proposal (Wouter's) that exists too.

RT: I was also talking with Arjin (sp?) that may help have GC better support interop between modules, which Wouter's path is specifically not wanting to do. Arjin's idea is -- if we just wanted to support GC languages better, then what could we do to compile GC objects to linear memory, then have language stack walk and create their own GC themselves. So that's potentially another path.

TL: Thinking about the module interop story, that’s a big discussion we should have - should the GC proposal define interlanguage GC issues? My question is how that would work at the course level? I don’t know of any languages that have the ability to import any arbitrary arrays at the source level

PP: I also have the same question

PP: I agree, outside of C you can't really do that at the source level.

RT: Even for the GC languages w/ a runtime. They may want them to be implemented in c/c++ languages, and still want to be able to reason about GC objects. If we come up with something like that -- like the crypto example. Suppose it was written in C++. But we come up with some way to use C++ code through imports/tooling/etc. So it could take an array -- not a C++ array, but some GC array -- all I care is that it has an indexing operator. Then I can write my code, and it could compile down to that example.

TL: Sounds like the tooling story would be pretty similar to interface types, the source language unmodified isn’t able to do anything, but the tooling will have to figure out how to make these things work together.

RT: There might be other strategies for figuring this out -- this is probably the most obvious way. May be orthogonal to the GC discussion. No matter what proposal you pick, this problem is going to come up.

PP: We don’t even have.. We don’t even know if they’ll support it yet - we can’t really support or talk about interop between C ?& Java because that’s not supported yet.. So unsure how to discuss it. ..

RT: The clarification is -- we were not discussing language interop, we were discussing GC/non-GC interop. C++ code that needs to be able to reason about GC references. It's possible that you could do that in ways that C++ code interop with other languages -- but GC/non-GC interop is the bigger question.

PP: It's the same thing as if you want to call a C function from Java...

Closure