Digest #94 2020-02-22


[130] 2020-02-21 15:32:19 ruv wrote:

requestClarification - The parts of execution semantics and the calling definition


The specification says: a) Append the initiation semantics given below to the current definition. b) The execution semantics of name will be determined by the words compiled into the body of the definition.

Question I

Is the initiation semantics part of the execution semantics?

It seems yes, but slightly vague.

Since 1) These initiation semantics are not a word compiled into the body. And 2) "the current definition" and "the execution semantics of the current definition" is not the same.

Re 2: COMPILE, appends execution semantics not just "to the current definition", but "to the execution semantics of the current definition". Perhaps it should be said somewhere that "appending semantics to the current definition" means appending these semantics to the execution semantics of the current definition. Or just use the same wording as in the specification for COMPILE,.

Question II

What definition is a calling definition?

The initiation semantics is to save information about the calling definition. But it seems the standard nowhere says how to call a definition, or what definition is the calling definition.

EXECUTE performs execution semantics. COMPILE, appends execution semantics. EXIT (and the code appended by Semicolon ;) returns control to the calling definition. But nobody calls the definition.

It looks like this issue reason is a gap between two different models (abstractions). We should find some bridge between this models, or use only one model.

NB: My interest is purely formal, it relates to the only wording of the specifications. From the implementation point of view, it's clear what definition is a calling definition. But the question is how to formulate it in the language of the Standard.