5.1.3.2 State Beginning and Instruction Selection

If the state transition matrix does not have the restriction to define only deterministic state transitions, and the action emission matrix does not have the restriction to define only deterministic action emissions, you should use stt instructions in an assembler program to mark beginnings of its states. See stt Instruction, for how to place user and mixed-type instructions after an stt instruction.

If the state transition matrix has the restriction to define only deterministic state transitions, and a state has a single allowed user or mixed-type instruction or a single allowed sequence of user or mixed-type instructions to execute, the state begins just with the user or mixed-type instruction or the sequence of user or mixed-type instructions:

        ; State beginning

        user or mixed-type instruction 1
        user or mixed-type instruction 2
        ...
        user or mixed-type instruction N

A state always has a single allowed user or mixed-type instruction or a single allowed sequence of user or mixed-type instructions to execute if the action emission matrix has the restriction to define only deterministic action emissions.

If the state transition matrix has the restriction to define only deterministic state transitions, but the action emission matrix does not have the restriction to define only deterministic action emissions, a state can begin with a block of jprob instructions or a choice instruction block performing probabilistic selection of an individual user or mixed-type instruction or a sequence of user or mixed-type instructions to execute:

        ; State beginning

        jprob   prob1, L1
        jprob   prob2, L2
        ...
        jprob   probN, LN
        user or mixed-type instruction 0/1
        user or mixed-type instruction 0/2
        ...
        user or mixed-type instruction 0/M0
        ...
L1:     user or mixed-type instruction 1/1
        user or mixed-type instruction 1/2
        ...
        user or mixed-type instruction 1/M1
        ...
L2:     user or mixed-type instruction 2/1
        user or mixed-type instruction 2/2
        ...
        user or mixed-type instruction 2/M2
        ...
LN:     user or mixed-type instruction N/1
        user or mixed-type instruction N/2
        ...
        user or mixed-type instruction N/MN
        ...

or

        ; State beginning

        choice
        case    prob1, L1
        case    prob2, L2
        ...
        case    probN, LN
        end     choice

        user or mixed-type instruction 0/1
        user or mixed-type instruction 0/2
        ...
        user or mixed-type instruction 0/M0
        ...
L1:     user or mixed-type instruction 1/1
        user or mixed-type instruction 1/2
        ...
        user or mixed-type instruction 1/M1
        ...
L2:     user or mixed-type instruction 2/1
        user or mixed-type instruction 2/2
        ...
        user or mixed-type instruction 2/M2
        ...
LN:     user or mixed-type instruction N/1
        user or mixed-type instruction N/2
        ...
        user or mixed-type instruction N/MN
        ...

The action emission matrix contains the probabilities of emitting individual user or mixed-type instructions or sequences of user or mixed-type instructions allowed in an assembler program state. The individual instructions must belong to different instruction classes, that is, have different combinations of an instruction name and instruction parameters. The instruction sequences must be different too.