Alpha. Vary is under active development and not ready for production use. Syntax, APIs, performance, and behaviour may change between releases.

CLI reference

Run vary vast to generate random programs and test the compiler. Flags control program count, language features, seed, coverage reporting, and CI modes.

Basic usage

vary vast

With no flags, this runs 100 programs using the core profile and a clock-based seed.

Options

Core options

FlagShortDefaultDescription
--profile-pcoreGeneration profile (core, control, complete, etc.)
--count-n100Number of programs to generate and test
--seed-sclockBase random seed (deterministic when set)
--verbose-voffPrint per-seed results
--timeout 5000Per-program JVM execution timeout in milliseconds
--stop-on-first-mismatch offStop after the first mismatch
--size noneProgram size tier: small, medium, or large

Mode and CI options

FlagDefaultDescription
--modeexploreCI mode: explore, fast, deep, continuous, or rc-blocking
--rotate-seedoffCombine seed with SHA-256(date + commit) for daily variation
--commit-hashauto-detectGit commit hash for seed rotation
--metrics-file.vast-logs/vast-metrics.jsonlPath for JSONL metrics output
--regression-dirnoneDirectory for regression artifacts (deep mode)
--duration60Time budget in seconds (continuous mode only)

Reduction and corpus options

FlagDefaultDescription
--reduceoffShrink mismatches to minimal reproducers
--max-shrink1000Max oracle calls during reduction
--max-reduce-time30000Max reduction time in milliseconds
--corpus-dirnoneDirectory for reproducer corpus
--replay-corpusoffReplay saved corpus before exploration

Testing mode options

FlagDefaultDescription
--metamorphicoffRun metamorphic testing with semantics-preserving transforms
--mutateoffRun mutation expansion testing
--mutants-per-seed5Max mutants to test per seed
--round-tripoffRun parser round-trip validation
--opt-checkoffEnable 4-path optimizer differential validation
--stressoffEnable stress testing with boundary values and edge cases
--calibrateoffRun path calibration before testing

Specialized generator options

These flags enable specialized program generators that target specific compiler subsystems. They require --mode explore (not deep) because deep mode silently ignores specialized flags.

FlagDefaultDescription
--statefuloffGenerate stateful programs with persistent mutable state
--state-steps100Number of state transition steps per program
--state-structs1Number of state struct fields to generate
--aliasingoffGenerate heap aliasing verification programs
--concurrencyoffGenerate concurrency semantics test programs
--threads4Number of simulated concurrent threads
--exception-propagationoffGenerate exception propagation verification programs
--symbolicoffSymbolic input guidance for deeper state coverage
--ir-checkoffVerify IR translation equivalence (AST to IR to JVM)
--verify-all-passesoffVerify all optimizer passes independently
--verify-passnoneVerify a specific optimizer pass
--large-programsoffGenerate large programs (500-10000 AST nodes)
--large-program-count10Number of large programs to generate

Acceptance and closeout options

FlagDefaultDescription
--check-acceptanceoffCheck acceptance-set coverage against the corpus
--write-acceptance-corpusoffWrite acceptance-set reproducers to the corpus directory
--closeout-reportoffGenerate the VAST closeout report with evidence tiers, trigger quality table, and verdict
--show-lanesoffPrint the nightly lane registry and exit
--verify-configoffVerify CI mode configuration invariants (profile lists, seeds, counts, lane registry)

Lane and metrics options

FlagDefaultDescription
--lanenoneLane name for nightly metrics tagging (e.g., vast-deep-differential)
--write-summaryoffWrite a nightly summary JSON to the verification-history ledger
--run-classnightlyRun class for summary: nightly, rc, or release
--prune-historyoffRemove nightly summaries beyond retention limit
--check-historyoffCheck ledger for staleness

Corpus management options

FlagDefaultDescription
--validate-corpusoffValidate corpus entries against schema
--corpus-indexoffGenerate INDEX.md listing all corpus entries
--history-summaryoffGenerate SUMMARY.md from verification history

Coverage and reporting options

FlagDefaultDescription
--show-coverageoffPrint feature coverage table
--semantic-coverageoffPrint semantic coverage table (27 properties)
--interaction-coverageoffPrint feature interaction coverage
--confidenceoffPrint confidence report (LOW/MODERATE/HIGH/VERY_HIGH)
--path-healthoffPrint path agreement matrix and reliability

Profiles

core

Straight-line programs only. No loops, no helper functions.

Constructs: integer and boolean literals, variables (let/mut), arithmetic (+, -, *, //, %), comparisons (==, !=, <, >, <=, >=), boolean logic (and, or, not), unary negation, if/else statements, if-expressions, return.

Fast execution. Use this for high-volume CI runs.

vary vast --profile core --count 1000 --seed 1

control

Adds helper functions and bounded while loops to everything in core.

Slower due to JVM compilation of larger programs. Use this for deeper coverage.

vary vast --profile control --count 100 --seed 1

Feature profiles

ProfileAdds
textString literals, concatenation, comparison
enumsEnum declarations, variant construction, match
recordsData declarations, field access, construction
collectionsList literals, indexing, len(), for..in
optionalT?, None, null narrowing
floatFloat literals, arithmetic, int() conversion
patternsPattern matching with destructuring
errorstry/except, raise
genericsGeneric functions and data types

Composite profiles

ProfileIncludes
typesCore + all feature profiles (without patterns/errors/generics)
completeEverything: all features enabled

CI modes

ModeProgramsProfilesUse case
exploreConfigurable1Manual investigation, single profile. Required for specialized flags.
fast~1004Quick smoke test, under 2 minutes
deep~9,00012Nightly CI, broad coverage
continuousTime-bounded12 (adaptive)Long-running exploration, overnight fuzzing
rc-blocking~1003Release candidate gate with fixed seed
vary vast --mode fast                    # Quick smoke test
vary vast --mode deep --verbose          # Nightly
vary vast --mode continuous --duration 300  # 5-minute exploration

See CI integration for how these are used in practice.

Examples

CI smoke test

vary vast --profile core --count 200 --seed 12345

Deterministic and fast. Runs the same programs every time. Exit 0 on success, exit 1 on any mismatch.

Optimizer validation

vary vast --profile types --count 100 --seed 42 --opt-check

Runs four paths (AST, IR, JVM-optimized, JVM-unoptimized) to catch optimizer bugs.

Stress testing

vary vast --profile core --count 100 --seed 42 --stress

Generates programs with boundary values (Long.MAX_VALUE, 0, -1), overflow chains, identity operations, and float precision stress patterns.

Continuous exploration

vary vast --mode continuous --duration 600 --stress

Runs for 10 minutes, adaptively selecting profiles based on coverage gaps. Produces a report with per-profile summary, confidence score, and gap analysis.

Full coverage report

vary vast --profile complete --count 50 --seed 42 \
  --show-coverage --semantic-coverage --interaction-coverage --confidence

Replay a specific seed

vary vast --seed 842193 --count 1

Generates and tests exactly one program. The same seed always produces the same program and the same result.

Stop on first mismatch

vary vast --count 10000 --seed 1 --stop-on-first-mismatch

Stops as soon as a mismatch is found and prints the full mismatch report with replay command.

Exit codes

CodeMeaning
0All programs agreed (or were invalid)
1At least one mismatch, path failure, or equivalence failure

Output format

The summary line always appears:

VAST: 100/100 passed (0.3s)

If mismatches occur, each one is printed before the summary with the seed, verdict, path outcomes, generated source, and replay command.