Skip to content

"Bottom type" in spec? #1257

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

Closed
kripken opened this issue Oct 13, 2020 · 4 comments
Closed

"Bottom type" in spec? #1257

kripken opened this issue Oct 13, 2020 · 4 comments

Comments

@kripken
Copy link
Member

kripken commented Oct 13, 2020

The term came up in the CG meeting today. Searching the spec for it, it appears in the index, but refers to page 9 where there is no appearance of that term.

From the CG discussion, I understand it is related to the polymorphic stack concept and unreachability. Unreachability doesn't show up on page 9.

A text search for the word "bottom" turns up only the index.

@conrad-watt
Copy link
Contributor

conrad-watt commented Oct 13, 2020

There are two places that are relevant for the current approach.

The Unknown type described here (https://webassembly.github.io/spec/core/appendix/algorithm.html) corresponds to the bottom value type. In the MVP, it's purely a detail of the (implementations') validation algorithm and doesn't appear in the formalism.

With the advent of reference types, the bottom value type needs to be added to the formalism in order to bless current implementations (as described above, these already utilized a bottom/Unknown value type). This is described here (WebAssembly/reference-types#116).

@kripken
Copy link
Member Author

kripken commented Oct 13, 2020

I see, thanks @conrad-watt !

I think I understand this now. I'm unsure if this is worth fixing in the spec text or not - maybe to most people it's just obvious what a "bottom type" is. Like in the PR you linked, it appears in the discussion, but not in the committed text. At least for me - a person without a type theory background - using a term not defined was confusing, and the spec's index just added to that confusion.

@rossberg
Copy link
Member

Ah, thanks, another leftover of WebAssembly/reference-types#87 -- it used to be defined as part of value types. I fixed the index, once CI is done it should point to Section 3.3 (Instruction Validation).

@kripken
Copy link
Member Author

kripken commented Oct 14, 2020

Thanks @rossberg !

Sounds like this can be closed.

@kripken kripken closed this as completed Oct 14, 2020
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

No branches or pull requests

3 participants