12 Development tools

Located in the dev/ directory of the source code repository.

12.1 Test data generation

go run ./dev/gendata/ <directory>

Outputs bytecodes and templates for test data scenarios used in ‘engine‘ unit tests.

12.2 Interactive runner

go run ./dev/interactive [-d <data_directory>] [--root <root_symbol>] [--session-id <session_id>] [--persist]

Creates a new interactive session using engine.DefaultEngine, starting execution at symbol root_symbol

data_directory points to a directory where templates and bytecode is to be found (in the same format as generated by dev/gendata).

If data_directory is not set, current directory will be used.

if root_symbol is not set, the symbol root will be used.

if session_id is set, mutable data will be stored and retrieved keyed by the given identifer (if implemented).

If persist is set, the execution state will be persisted across sessions.

12.3 Assembler

go run ./dev/asm <assembly_file>

Will output bytecode on STDOUT generated from a valid assembly file.

12.4 Disassembler

go run ./dev/disasm/ <binary_file>

Will list all the instructions on STDOUT from a valid binary file.

12.5 Interactive case examples

Found in examples/.

Be sure to make examples before running them.

Can be run with:

go run ./examples/<case> [...]

except helloworld which is run as

go run ./dev/interactive -d ./examples/helloworld [...]

The available options are the same as for the dev/interactive tool.

Contents of the case directory:

*.vis

assembly code.

*.bin

bytecode for each node symbol (only available after make).

*.txt.orig

default contents of a single data entry.

*.txt

current contents of a single data entry (only available after make).