,---------------. | Contributions | `---------------ยด ,------------------------------------------ | 2020-02-21 15:32:19 ruv wrote: | requestClarification - The parts of execution semantics and the calling definition | see: https://forth-standard.org/standard/core/Colon#contribution-130 `------------------------------------------ ### Headnote 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`](/standard/core/EXECUTE) __performs__ execution semantics. [`COMPILE,`](/standard/core/COMPILEComma) __appends__ execution semantics. [`EXIT`](/standard/core/EXIT) (and the code appended by [Semicolon `;`](/standard/core/Semi)) 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.