Difference between revisions of "Nodal execution"
(include Image:Communications example.png) |
(fix links) |
||
Line 1: | Line 1: | ||
− | + | In the [[nodal model]] most of the [[w:control flow|control 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 [[w:runtime|runtime]] environment, but would usually be a function which can have its reference in a nodes "code" [[association]]. Some logic or algorthmics has to be O(1) and so is required within a function rather than as reducable structure. | |
− | + | ||
− | In the [[nodal model]] most of the [[w:control flow|control 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 [[w:runtime|runtime]] environment, but would usually be a function which can have its reference in a nodes [[ | + | == Function execution == |
+ | When [[nodal reduction]] executes a function, the variables ''this'' and ''parent'' are [[node reference]]s made available in the functions scope so that it works in a similar way to a [[w:Method (computer science)|method]] in [[w:object-oriented programming|object-oriented programming]]. | ||
− | |||
− | |||
− | |||
[[Image:Communications example.png]] | [[Image:Communications example.png]] | ||
− | |||
− | = Function definitions = | + | == Function definitions == |
− | An acronym used within the [[nodal model]] is DOFU which stands for Define On First Use. In the nodal model some [[node]]s 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. | + | An acronym used within the [[nodal model]] is DOFU which stands for Define On First Use. In the nodal model some [[node]]s 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 [[list|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. | 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. | ||
Line 16: | Line 13: | ||
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 by [[nodal reduction]] like normal. For interpreted languages like [[w:PERL|PERL]], the textual definition is built and executed directly at runtime. | 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 by [[nodal reduction]] like normal. For interpreted languages like [[w:PERL|PERL]], the textual definition is built and executed directly at runtime. | ||
− | = Language independence = | + | == Language independence == |
− | At runtime nodal reduction requires a concept to have a function reference in its | + | At runtime nodal reduction requires a concept to have a function reference in its "code" association for it to be executable, and as described above, if there is no reference to execute, a nodally reducable process executes to build, compile, dynamically load the function and store its reference in the "code" association. The definition-building process depends on the attributes of the execution environment such as programming language and operating system, but the node in which the resulting executable reference is stored is a node which is the universal concept that the functions code is modelled from. |
Functions composed of purely nodal/list-space, logic, program-control or purely algorithmic code can be described nodally so that their definitions can be built automatically for a wide range of languages on demand without any human assistance. This can be done using simple nested textual templates, only exotic functionality like device or memory access require specific language bindings to be written manually. | Functions composed of purely nodal/list-space, logic, program-control or purely algorithmic code can be described nodally so that their definitions can be built automatically for a wide range of languages on demand without any human assistance. This can be done using simple nested textual templates, only exotic functionality like device or memory access require specific language bindings to be written manually. | ||
− | = See also = | + | == See also == |
*[[Dynamic loader|Dynamic loading]] | *[[Dynamic loader|Dynamic loading]] | ||
*[[Wikipedia:Execution]] | *[[Wikipedia:Execution]] | ||
*[[Wikipedia:Runtime]] | *[[Wikipedia:Runtime]] | ||
+ | [[Category:Nodal Concepts]] |
Revision as of 08:44, 22 July 2011
In the nodal model most of the control 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 "code" association. Some logic or algorthmics has to be O(1) and so is required within a function rather than as reducable structure.
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 by nodal reduction like normal. For interpreted languages like PERL, the textual definition is built and executed directly at runtime.
Language independence
At runtime nodal reduction requires a concept to have a function reference in its "code" association for it to be executable, and as described above, if there is no reference to execute, a nodally reducable process executes to build, compile, dynamically load the function and store its reference in the "code" association. The definition-building process depends on the attributes of the execution environment such as programming language and operating system, but the node in which the resulting executable reference is stored is a node which is the universal concept that the functions code is modelled from.
Functions composed of purely nodal/list-space, logic, program-control or purely algorithmic code can be described nodally so that their definitions can be built automatically for a wide range of languages on demand without any human assistance. This can be done using simple nested textual templates, only exotic functionality like device or memory access require specific language bindings to be written manually.