CRVJA translates AMOS BASIC programs to browser-executable JavaScript. The language contains more than 700 commands in AMOS Professional, requiring selective implementation. Researchers have long used usage analysis to prioritize language features. Evidence from other runtimes shows that operations unlocking additional projects rank higher than popularity alone, while decorators and context managers prove widespread in Python. Bash scripts dominate on file and path utilities, and Java newer features see uneven adoption.

AMOS command categories

AMOS groups commands by type. Instructions perform operations; functions return values; structures express conditions or loops. The index also reserves variables and commands for animation and dialogue interfaces. Supporting each command requires two tasks: recognizing syntax patterns and reproducing behavior. A grammar describes syntax; ANTLR generates parsing machinery that recognizes documented patterns. The harder task involves implementing semantic actions—JavaScript code that reproduces the original command behavior through browser facilities.

Usage analysis workflow

The amos-code-analysis tool processes collected source files and catalogs command names and categories. The ANTLR lexer and parser organize each file according to the grammar. An analysis listener walks the parse tree and increments matching catalog entries. Counts measure static source occurrences—how many times a command appears in code, not how many times it executes. Reports appear as CSV tables: analysis.csv shows per-file occurrences, while aggregate.csv sums counts by command and category, reporting total occurrences, distinct projects, and distinct files.

Current limitations and next steps

The current analyzer targets the Instruction category with incomplete counting coverage. Reports let comparison across files and projects, but the method misses some recognized commands and does not always distinguish variants or contexts. Incomplete parses must be reported because recovering from unsupported syntax can produce partial counts. To make implementation decisions, reliable measurements from a varied program collection are needed. Next steps include completing the grammar, building a documented AMOS dataset while recording sources and identifying duplicates, and checking counts against hand-counted examples.