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

Editorial: some abstract operations are incorrectly labeled as "Runtime Semantics:" #244

Closed
domenic opened this Issue Dec 10, 2015 · 9 comments

Comments

Projects
None yet
3 participants
@domenic
Member

domenic commented Dec 10, 2015

This might be me not understanding a convention in use. But there are a lot of sections which are labeled "Runtime Semantics:" which don't correspond to a grammar element, and in fact are abstract operations, not grammar semantics.

Examples: GetSuperConstructor; MakeSuperPropertyReference; AllocateTypedArray; EvaluateDirectCall.

I think a search for Runtime Semantics: ([^(]+)\( will find most of these.

@bterlson

This comment has been minimized.

Show comment
Hide comment
@bterlson

bterlson Dec 10, 2015

Member

Abstract operations are most likely runtime semantics, but may not necessarily be. An abstract operation that doesn't depend on any runtime state would be static semantics.

That said, since Runtime Semantics is the default half the time anyway, I plan to remove every "Runtime Semantics: " qualifier and add some verbage around how abstract operations are static semantics if prefixed with "Static Semantics: ", and otherwise are runtime semantics. I'll leave this issue open to track that work :)

Member

bterlson commented Dec 10, 2015

Abstract operations are most likely runtime semantics, but may not necessarily be. An abstract operation that doesn't depend on any runtime state would be static semantics.

That said, since Runtime Semantics is the default half the time anyway, I plan to remove every "Runtime Semantics: " qualifier and add some verbage around how abstract operations are static semantics if prefixed with "Static Semantics: ", and otherwise are runtime semantics. I'll leave this issue open to track that work :)

@domenic

This comment has been minimized.

Show comment
Hide comment
@domenic

domenic Dec 10, 2015

Member

Hmm OK. I thought there was some division between "semantics" which were tied to grammar productions, and "abstract operations" which took argument lists and were called.

For example, "semantics" can appear multiple times ("Runtime Semantics: Evaluation" appears several times for example) whereas abstract operations are only defined once.

Member

domenic commented Dec 10, 2015

Hmm OK. I thought there was some division between "semantics" which were tied to grammar productions, and "abstract operations" which took argument lists and were called.

For example, "semantics" can appear multiple times ("Runtime Semantics: Evaluation" appears several times for example) whereas abstract operations are only defined once.

@bterlson

This comment has been minimized.

Show comment
Hide comment
@bterlson

bterlson Dec 10, 2015

Member

I also thought that, but @allenwb clarified for me.

For the Evaluation case, you can consider the abstract operation as a method on the production rather than a particular name (aoid) in the global spec namespace.

Member

bterlson commented Dec 10, 2015

I also thought that, but @allenwb clarified for me.

For the Evaluation case, you can consider the abstract operation as a method on the production rather than a particular name (aoid) in the global spec namespace.

@domenic

This comment has been minimized.

Show comment
Hide comment
@domenic

domenic Dec 10, 2015

Member

Hmm OK. So should things like "Evaluation" or "Early Errors" get parenthesis ("Early Errors()") if they are abstract operations?

Member

domenic commented Dec 10, 2015

Hmm OK. So should things like "Evaluation" or "Early Errors" get parenthesis ("Early Errors()") if they are abstract operations?

@bterlson

This comment has been minimized.

Show comment
Hide comment
@bterlson

bterlson Dec 10, 2015

Member

Yes, and further, parameters should be moved into the signature with the prose descriptions removed (unless they clarify the expected type of those parameters).

Member

bterlson commented Dec 10, 2015

Yes, and further, parameters should be moved into the signature with the prose descriptions removed (unless they clarify the expected type of those parameters).

@zenparsing

This comment has been minimized.

Show comment
Hide comment
@zenparsing

zenparsing Dec 10, 2015

Contributor

That reminds me, I think we could improve the language surrounding these closures/anonymous built-in functions...

Contributor

zenparsing commented Dec 10, 2015

That reminds me, I think we could improve the language surrounding these closures/anonymous built-in functions...

@bterlson

This comment has been minimized.

Show comment
Hide comment
@bterlson

bterlson Dec 10, 2015

Member

@zenparsing tell me more!

Member

bterlson commented Dec 10, 2015

@zenparsing tell me more!

@zenparsing

This comment has been minimized.

Show comment
Hide comment
@zenparsing

zenparsing Dec 11, 2015

Contributor

Oh, I didn't have a specific solution in mind, but the specification of closures (like Promise Resolve Functions) is pretty awkward. I ran into a lot of this when spec'ing Observable. For one, the argument lists of these functions are always buried in prose.

Contributor

zenparsing commented Dec 11, 2015

Oh, I didn't have a specific solution in mind, but the specification of closures (like Promise Resolve Functions) is pretty awkward. I ran into a lot of this when spec'ing Observable. For one, the argument lists of these functions are always buried in prose.

@bterlson

This comment has been minimized.

Show comment
Hide comment
@bterlson

bterlson Dec 16, 2015

Member

I think I can close this. If someone wants another issue to track removal of Runtime Semantics: across the entire spec, have at it. This title confuses me now though :)

Member

bterlson commented Dec 16, 2015

I think I can close this. If someone wants another issue to track removal of Runtime Semantics: across the entire spec, have at it. This title confuses me now though :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment