4.3 Executing a Multinode Model

Executing a multinode model is executing its nodes in a model instance scope. The function qsmm_node_call_default starts executing a node. An executed node can call other nodes or finish its own execution causing that function to return control. Executed nodes use a call stack similar to a function call stack. Stack frames can contain application-specific information usable in event handler functions.

The execution of a node consists of a series of assembler instruction invocations changing the current state of the node and performing custom operations as a side effect. The event handler function of an instruction meta-class processes the invocation of assembler instructions belonging to instruction classes derived from the instruction meta-class. An invoked instruction returns an outcome used by the environment state identification engine to select the next node state.

As a side effect of an instruction invocation, the event handler function of an instruction meta-class can increment continuous time, change spur tracked by the environment state identification engine or instruction emitting engine, or modify look-ahead signals taking part in selecting the next node state. If the multinode model operates correctly, state models of executed nodes adapt to achieve higher spur increment velocity.

To evaluate whether a model provides adaptive behavior, a developer can compare the efficiency of the model in adaptive mode of operation with the efficiency in random mode of operation.