Difference between revisions of "Nodal execution"
m |
(link to Dynamic loader) |
||
Line 10: | Line 10: | ||
The definitions are built from a nodal representation which is simply a nested structure of textual patterns like any other interface or storage object. The nodal structures are the definitions are language independent and exhibit specific textual patterns and rules which are related to the execution environment. | The definitions are built from a nodal representation which is simply a nested structure of textual patterns like any other interface or storage object. The nodal structures are the definitions are language independent and exhibit specific textual patterns and rules which are related to the execution environment. | ||
− | For compiled environments like [[w:C (programming language)|C]] | + | For compiled environments like [[w:C (programming language)|C]] definitions need to be compiled into a relocatable binary which can then be [[Dynamic loader|dynamically loaded]] at runtime and executed by reference like normal. For interpreted languages like [[w:PERL|PERL]], the textual definition is built and executed directly at runtime. |
= See also = | = See also = | ||
*[[Wikipedia:Execution]] | *[[Wikipedia:Execution]] | ||
*[[Wikipedia:Runtime]] | *[[Wikipedia:Runtime]] |
Revision as of 05:52, 26 November 2006
In the nodal model the program-flow aspect of execution is handled by the nodal reduction algorithm, but the bottom level of functionality which can't be reduced must be in the form of statements of the execution language. The form of these statements is specific to the runtime environment, but would usually be a function which can have its reference in a nodes nodeCODE association.
Function execution
When nodal reduction executes a function, the variables this and parent are node references made available in the functions scope so that it works in a similar way to a method in object-oriented programming.
Function definitions
An acronym used within the nodal model is DOFU which stands for Define On First Use. In the nodal model some nodes represent locally executable functions. When nodes such as these recceive a quantum of executional attention but there is not function reference to call, the quantum is sent into the node which results in the definition building process for that function being put into the currently executing loop. After the definition has been built, the original node will still be in the loop for execution, but will now exhibit a function reference which will be able to execute when the next quantum arrives.
The definitions are built from a nodal representation which is simply a nested structure of textual patterns like any other interface or storage object. The nodal structures are the definitions are language independent and exhibit specific textual patterns and rules which are related to the execution environment.
For compiled environments like C definitions need to be compiled into a relocatable binary which can then be dynamically loaded at runtime and executed by reference like normal. For interpreted languages like PERL, the textual definition is built and executed directly at runtime.