A model node has the following basic parameters:
qsmm_node_create_v2and the macro
QSMM_NODE_CREATEcreate a node with a specified identifier. The function
qsmm_node_create_v2can find an unused identifier for a new node. See Creating Nodes.
qsmm_set_nstate_maxcalled for a node class the node belongs to specifies the default number of node states. That number is also the maximum allowed number of node states. The function
qsmm_set_node_nstatecan set the number of node states to a lesser value.
qsmm_node_create_v2has an argument for the name of an instruction class set. The macro
QSMM_NODE_CREATEuses ‘__FUNCTION__’ as the name of an instruction class set.
qsmm_set_node_ptrassociates a user pointer with a node. See Associating Parameters with a Model.
qsmm_reg_var_proband the macro
QSMM_REG_VAR_PROBregister a controlled probability variable for the instruction class set. Every list element includes the name of a controlled probability variable, its index, and a probability value. The function
qsmm_set_node_var_probsets the probability value for the node. The initial probability value is 0. See Controlled Variables.
qsmm_set_instr_meta_class_weightchange those weights for the node. By default, all weights are equal to 1. See Setting Instruction Classes Weights.
The existence of model nodes is unrelated to the existence of model instance (see Creating the Model Instance). However, when the model instance exists, the node has extended parameters:
qsmm_prob_e. See Dumping the State Transition Matrix.
qsmm_prob_e. See Dumping the Action Emission Matrix.
qsmm_node_profile_cloneor copied from the state transition matrix and action emission matrix of another node in deferred mode by the function
qsmm_set_node_profile_source. The probability profile occupies the number of states less than or equal to the number of node states specified using the functions
By default, the node has an unset probability profile. The unset probability profile is an implicit uniform probability profile occupying all node states. In this uniform probability profile, the probabilities of transitions between all node states are equal, and the probabilities of emitting all instructions in all node states are equal. The implicit uniform probability profile does not exist for a model:
qsmm_desc_sstructure is non-zero), and the number of instruction classes in the instruction class set is not 1. In this case, the node requires specifying a probability profile explicitly;
qsmm_node_reserve), a large actor representing the environment state identification engine (field
qsmm_desc_sstructure is non-zero) or the instruction emitting engine (field
qsmm_desc_sis non-zero), and positive length of look-ahead signal segment (field
qsmm_desc_sis positive). In this case, the function
qsmm_node_call_defaultcannot transfer control to the node, and all model nodes are unusable. This limitation can disappear in future QSMM versions.
qsmm_set_node_profile_sourcesets this mode. In this mode, some operations on the node result in reporting
QSMM_ERR_PROFSRCUrespectively. See Memory Efficient Cloning the Probability Profile.
qsmm_node_asmloads an assembler program into the node, the assembler program specifies those initial values. If the function
qsmm_set_node_profile_sourcespecifies a probability profile for the node, a source node provides those initial values.
qsmm_set_node_var_probneeds committing to the state transition matrix or action emission matrix by the function
qsmm_node_var_realizeaccording to those rules. See Controlled Variables.
qsmm_node_asmloads an assembler program into the node, the assembler program specifies those names. If the function
qsmm_set_node_profile_sourcespecifies a probability profile for the node, a source node provides those names. The function
qsmm_get_node_state_nameretrieves the name of a node state by its index. The function
qsmm_get_node_state_by_nameretrieves the index of a node state by its name.
qsmm_node_disasm. If the function
qsmm_node_asmloads an assembler program with the flag
QSMM_ASM_TEMPLATE, the assembler program becomes the template. If the function
qsmm_set_node_profile_sourcespecifies a probability profile for the node, a source node provides the template.
qsmm_node_asmloads an assembler program into the node, the assembler program defines the output probability variables and arrays. If the function
qsmm_set_node_profile_sourcespecifies a probability profile for the node, a source node defines the output probability variables and arrays. See Output Variables.
qsmm_get_node_var_prob_outcaches the calculated value of an output probability variable. Additionally, that function and the function
qsmm_get_node_array_prob_outcache the probabilities of all choice alternatives that include a choice alternative for a calculated output probability variable or array element. The function
qsmm_node_var_out_forgetcalled explicitly or implicitly in certain cases clears both caches.
qsmm_node_call_defaultcalled the node and the number of times that function transferred control to the node but not yet returned control from it. The functions
qsmm_get_node_recursretrieve those numbers. The initial values are 0. See Calling a Node.
The node parameters tied to the model instance and listed above take the same initial values in case of creating the model instance after creating the node and in case of creating the node after creating the model instance.
qsmm_node_unload (see Unloading the Probability Profile) called for a node causes unsetting all node parameters tied to the model instance except for the parameters retrieved by the functions
The unset parameters take their initial values they have just after creating the model instance.