asm-disasm ¶The purpose of this program is debugging assembling a node, assigning values to its controlled probability variables, and disassembling the node.
Run the program using the following command line format:
qsmm-example-asm-disasm [OPTIONS] [ASM_FILE]
where ASM_FILE is the name of a file with an assembler program text; on omitting this argument, asm-disasm reads an assembler program text from stdin.
After assembling the node and optional assigning values to its controlled probability variables, asm-disasm disassembles the node and prints a disassembled program text to stdout.
To assemble a program, you need to specify its instruction set by passing a number of -I STR[/INT] options, where each option defines an instruction class.
The parameter STR specifies an instruction class name.
The program asm-disasm interprets characters ‘%’ in an instruction class name as equivalents to spaces.
The parameter INT specifies the number of instruction outcomes.
If not supplied, the default number of outcomes is 1.
For example, to define an instruction set containing the instructions ‘nop1’, ‘user 0’, and ‘user 1’ with one outcome and the instruction ‘test 3’ with three outcomes, you specify the following list of -I options:
-I nop1 -I 'user 0' -I 'user 1' -I 'test 3/3'
If an assembler program contains definitions of probability variables, you can assign values to them by passing a number of -P STR=FLOAT options, where STR is the name of a controlled probability variable, and FLOAT is its value.
For example, to assign 0.05 to the variable var1 and 0.15 to the variable var2, you use the following list of -P options:
-P var1=0.05 -P var2=0.15
The program asm-disasm supports the following command line options:
Restrict the action emission matrix to define only deterministic action emissions. If the assembler program contains probabilities, they correspond to the state transition matrix only.
Restrict the state transition matrix to define only deterministic state transitions. If the assembler program contains probabilities, they correspond to the action emission matrix only.
Dump the action emission matrix to a file. The filename ‘-’ means stdout. See Dumping the Action Emission Matrix, for the output format.
Dump elements of output probabilities arrays corresponding to choice instruction blocks.
The filename ‘-’ means stdout.
Dump the state transition matrix to a file. The filename ‘-’ means stdout. See Dumping the State Transition Matrix, for the output format.
Dump all output probability variables to a file. The filename ‘-’ means stdout.
Add an instruction class STR with INT outcomes to the instruction class set. The program converts all characters ‘%’ in STR to spaces. The default number of outcomes is 1.
The use of large actors:
Use a large actor for the environment state identification engine only.
Use a large actor for the instruction emitting engine only.
Use large actors for both the environment state identification engine and instruction emitting engine.
By default, the program uses small actors for the environment state identification engine and instruction emitting engine.
Do not register probability variables defined in the assembler program as controlled probability variables.
The minimum probability of jprob and case instructions for the action emission matrix to retain in a disassembled program.
The minimum probability of jprob and case instructions for the state transition matrix to retain in a disassembled program.
The number of digits after the decimal point to print for probabilities in the state transition matrix and action emission matrix. A positive number specifies fixed-point notation. A negative number specifies exponential notation with the number of digits after the decimal point equal to the absolute value of the negative number. Zero is equivalent to default value −15.
The number of digits after the decimal point to print for values of output probability variables and elements of output probabilities arrays. A positive number specifies fixed-point notation. A negative number specifies exponential notation with the number of digits after the decimal point equal to the absolute value of the negative number. Zero is equivalent to default value −15.
Generate a disassembled program using the input assembler program as an assembler program template.
Include stt instructions in a disassembled program.
Assign value FLOAT to a controlled probability variable STR defined in the assembler program.
Enable auxiliary probability variables.
Show warnings generated while assembling the program.