Previous: parse-asm, Up: Auxiliary Programs [Contents][Index]

`asm-disasm`

The purpose of this program is debugging assembling a node, assigning values to its controlled probability variables, and disassembling the node.

The program `asm-disasm`

supports a single optional argument specifying the name of a file with an assembler program text.
If this argument not supplied, `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

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 the definitions of probability variables, you can assign values to those variables by passing a number of `-P STR=FLOAT` options, where

`var1`

and 0.15 to the variable `var2`

, you use the following list of -P var1=0.05 -P var2=0.15

The program `asm-disasm`

supports the following command-line options:

`-D, --determ-mat-action`Restrict the action emission matrix to define only deterministic action choices. In this case, probabilities specified in the assembler program correspond to the state transition matrix only, and there is no need to mark unnamed states by

`stt`

instructions.`--dont-reg-vars`Do not register all probability variables defined in the assembler program as controlled probability variables.

`--dump-action[=``FILE`]Dump the action emission matrix to a file. If

`FILE`not specified, the program uses`mat_action`for it. See Dumping the Action Emission Matrix for the output format of that matrix.`--dump-goto[=``FILE`]Dump the state transition matrix to a file. If

`FILE`not specified, the program uses`mat_goto`for it. See Dumping the State Transition Matrix for the output format of that matrix.`--dump-var-choice`On passing the option

`--dump-var-out[=`, dump output probabilities arrays corresponding to`FILE`]`choice`

instruction blocks.`--dump-var-out[=``FILE`]Dump all output probability variables. On passing the option

`--dump-var-choice`, also dump output probabilities arrays corresponding to`choice`

instruction blocks. If`FILE`not specified, the program uses`var_out`for it.`-I, --instruction=``STR`[/`INT`]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.`-L, --large=``PE`|,`PO`|`PE`,`PO`Use a large actor for the environment state identification engine with size

`PE`of the pool of probabilities lists in normal form and/or use a large actor for the instruction emitting engine with size`PO`of the pool of probabilities lists in normal form. The sizes should be sufficient to support storing in the pools all probabilities lists defined by the assembler program. You can use large actors with map storage only (see the option`-S`).`--no-nop`Do not define the

`nop`

instruction class.`--prob-action-min=``FLOAT`On passing the option

`--template`, the option`--prob-action-min=`specifies the minimum probability of`FLOAT``jprob`

and`case`

instructions for the action emission matrix to retain in the disassembled program. If the option`--template`not passed, the option`--prob-action-min=`specifies the minimum probability of user or mixed-type instruction invocation—the disassembled program will not contain instructions with lesser invocation probabilities.`FLOAT``--prob-goto-min=``FLOAT`On passing the option

`--template`, the option`--prob-goto-min=`specifies the minimum probability of`FLOAT``jprob`

and`case`

instructions for the state transition matrix to retain in the disassembled program. If the option`--template`not passed, the option`--prob-goto-min=`specifies the minimum probability of state transition—the disassembled program will not reflect state transitions with lesser probabilities.`FLOAT``--prob-prec-mat=``INT`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 this negative number. Zero is equivalent to default value -15.

`--prob-prec-var=``INT`The number of digits after the decimal point to print for the 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 this negative number. Zero is equivalent to default value -15.

`-P, --variable=``STR`=`FLOAT`Assign value

`FLOAT`to a controlled probability variable`STR`defined in the assembler program.`-S, --storage=flat|map`A statistics storage type:

- ‘
`flat`’ Use preallocated storage with presumably large size but quick access to data elements.

- ‘
`map`’ Use dynamically allocated storage with presumably small size but slower access to data elements. The implementation of functionality of STL

`map`

template provides backing storage. This is the default mode.

- ‘
`--template`Generate the disassembled program using the input assembler program as an assembler program template.

`--use-stt`Include

`stt`

instructions in the disassembled program.`-W`Show warnings generated while assembling the program.

Previous: parse-asm, Up: Auxiliary Programs [Contents][Index]