Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upEditorial: some abstract operations are incorrectly labeled as "Runtime Semantics:" #244
Comments
domenic
added
the
editorial change
label
Dec 10, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
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 :)
|
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 :) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
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.
|
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. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
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.
|
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. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
domenic
Dec 10, 2015
Member
Hmm OK. So should things like "Evaluation" or "Early Errors" get parenthesis ("Early Errors()") if they are abstract operations?
|
Hmm OK. So should things like "Evaluation" or "Early Errors" get parenthesis ("Early Errors()") if they are abstract operations? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
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).
|
Yes, and further, parameters should be moved into the signature with the prose descriptions removed (unless they clarify the expected type of those parameters). |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
zenparsing
Dec 10, 2015
Contributor
That reminds me, I think we could improve the language surrounding these closures/anonymous built-in functions...
|
That reminds me, I think we could improve the language surrounding these closures/anonymous built-in functions... |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
@zenparsing tell me more! |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
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.
|
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. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
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 :)
|
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 :) |
domenic commentedDec 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.