CLI Tools
The saple binary has nine subcommands:
| Subcommand | Purpose |
|---|---|
parse | Parse an SPL specification and print a declaration summary |
analyze | Analyze an SPL model or a front-end input: properties and patterns |
translate | Translate an x86-64 listing or an AArch64 trace into SPL |
compose | Compose patterns into chain patterns and close the set under composition |
harness | Run the verification harness against a fixture corpus |
trace | Postmortem tools for .sable-trace/ run directories |
model, match, test | Placeholders: they print a status line and do no analysis yet |
- The front ends are now
--arch x86-64(Intel x86-64 Model, bit-vector semantics) and--arch aarch64(AArch64 Model). The former names--arch x86-64-bvand--arch trace-aarch64still work as aliases and printnote: --arch <old> is now --arch <new>. - Files with the
.asmextension now go to the x86-64 front end. - An unknown
--archgiven tosaple translateno longer falls back silently: it printswarning: no translator named `<name>`; using `<translator>` from the input's extension or content (available: …).
Global flags#
These go before or after the subcommand.
| Flag | Default | Description |
|---|---|---|
--format <FORMAT> | table | table, json or dot |
--verbose, -v | off | Verbose output |
--version, --help | Version, help (also per subcommand) |
saple parse#
Parses a file and prints one line per declaration; Parsed successfully: N declarations goes to standard error. A parse error prints Parse error: line:col: … and exits 1. saple parse does not expand include lines.
saple parse examples/dining_philosophers.spl
saple parse examples/dining_philosophers.spl --ast # the whole AST, one line
saple --format json parse examples/dining_philosophers.spl # the summary as JSONtype PhilState: 3 members
type ForkState: 2 members
transition getHungry(id)
…
agent Philosopher: 4 behaviour equations
agent Fork: 1 behaviour equations
schema DiningTable: 1 attributes
system DiningPhilosophers: 2 agents
Parsed successfully: 13 declarationsWith --format json the summary is an array of { kind, name, details }; with --ast as well, an object { summary, ast }.
saple analyze#
The main command. The input is an SPL model (.spl), an x86-64 listing (with --arch x86-64) or an AArch64 trace-v1 recording. It checks the system's properties and matches every pattern of the model and the loaded libraries.
saple analyze examples/dining_philosophers.spl
saple analyze listing.txt --arch x86-64 --pattern-set=v0.6 --format=json
saple analyze chain.spl --pattern-file patterns/aarch64-trace-v0.1.splInput and patterns#
| Flag | Default | Description |
|---|---|---|
--arch <ARCH> | from the input | Front end for a non-SPL input: x86-64 or aarch64. A trace-v1 recording is recognised from its content |
--input NAME=VALUE | Bind a concrete value to a model variable (e.g. --input packetCount=50000000); takes one or more values | |
--pattern-set <SET> | v0.5 | v0.5 auto-loads patterns/generated/; v0.6 auto-loads patterns/generated-v6/ and patterns/x86-cwe-v0.6.spl (paths relative to the working directory) |
--pattern-file <PATH> | Apply the patterns of this file in this run (repeatable) | |
--no-auto-load | off | Do not auto-load the generated rules and the v0.6 library |
--show-coverage | off | Print the semantic coverage manifest before the analysis |
Front-end models#
| Flag | Default | Description |
|---|---|---|
--path-budget <N> | 256 | x86-64 models: paths checked per pattern before the rest is reported UNKNOWN (never dropped) |
--report-refuted | off | AArch64 trace models: also report REFUTED candidates |
--trace-timeout-ms <MS> | 10000 | AArch64 trace models: solver time per query; 0 makes every query UNKNOWN (not unlimited) |
Engine#
| Flag | Default | Description |
|---|---|---|
--trace | off | Show the detailed execution trace (state changes, preconditions, property checks) |
--extract-rules | off | Extract reusable rules from findings into patterns/generated/ |
--export <PATH> | Export the rule database as JSON | |
--threads <N> | 0 (auto) | Number of threads |
--memory-budget-mb <N> | 512 | Memory budget for caches (MB) |
--max-memo-entries <N> | 10000 | Entries of the path memo |
--no-cache | off | Disable caching (SPL parse cache, …) |
--solver-pool-size <N> | 0 (auto) | Solver pool size |
--parallel-depth-threshold <N> | 10 | Depth threshold for parallel path exploration |
--stl-laws <LIST> | all | Comma-separated STL-Calculus laws to apply: sec, epac, arcc, eige, ecga, gsa, rusi; epac also governs the exploration-time path reduction |
--stl-budget <N> | 200 | Solver-query budget of the STL normalisation phase |
--pure-substrate | off | Disable every STL law, the normalisation phase and the path reduction (findings are identical) |
Run capture#
| Flag | Default | Description |
|---|---|---|
--trace-out <DIR|auto> | Capture a structured trace to a run directory; auto uses .sable-trace/<id>/. The exit status is then always 0 | |
--trace-detail <LEVEL> | medium | coarse, medium or fine |
--no-pretty-trace | off | Suppress the pretty-printed trace even with --verbose/--trace |
--run-id <ID> | generated | Override the run id |
saple translate#
Translates a front-end input into SPL. Without -o the SPL goes to standard output (as JSON with --format json).
saple translate listing.txt --arch x86-64 -o listing.spl
saple translate run.json --arch aarch64 -o run.spl # also writes run.trace.json
saple translate run.json --arch aarch64 --check| Flag | Description |
|---|---|
--arch <ARCH> | Required. auto picks the front end from the input's extension or content; otherwise x86-64 (Intel x86-64 Model) or aarch64 (AArch64 Model) |
-o, --output <PATH> | Write the SPL to a file (for aarch64, the sidecar <name>.trace.json beside it) |
--symbolic-input <IN> | aarch64: an input the model leaves free: X0..X30, SP, NZCV or mem:0x<addr>:<len> (repeatable; added to the trace's metadata.symbolic_inputs) |
--check | aarch64: replay the trace, print the summary, mismatches and pc-continuity breaks, and exit non-zero on any mismatch or break; writes nothing unless -o is given |
--trust-flags, --no-trust-flags | No effect on a trace-v1 recording |
saple compose#
Closes a set of patterns under composition (a pattern followed by another into one chain pattern) and writes the composites as an ordinary pattern file plus an optional JSON sidecar with provenance and statistics. Apply the result with saple analyze … --pattern-file.
saple compose --rules patterns/aarch64-trace-v0.1.spl --out composed.spl --json composed.json| Flag | Default | Description |
|---|---|---|
--rules <PATH> | required | Pattern files (or models) whose pattern declarations seed the closure; repeatable |
--out <PATH> | required | Output pattern file |
--json <PATH> | JSON sidecar with provenance and statistics | |
--max-sig-len <N> | 6 | Longest composite signature, in steps |
--budget <N> | 2000 | Solver-query budget for the whole closure |
--min-strength <S> | reachable | Weakest composition strength kept: reachable or implied |
--schema <PATH> | Model whose schema supplies attribute widths for bare literals |
saple harness#
Runs the verification harness against a fixture corpus (default tests/corpus) and exits with its status.
| Flag | Default | Description |
|---|---|---|
[CORPUS] | tests/corpus | Corpus root |
--filter <S>… | Run fixtures whose path contains any of the substrings | |
--unit-only, --integration-only | off | Restrict the fixture kind |
--parallel <N> | 0 (auto) | Parallel workers |
--verbose-failures | off | Print the full annotated replay of each failed fixture |
--keep-traces | off | Keep the captured trace in each fixture's directory |
saple trace#
Postmortem tools for the run directories that saple analyze --trace-out writes under .sable-trace/:
saple trace replay <RUN_ID> # pretty-print the events of a run
saple trace inspect <RUN_ID> # print the manifest and summary
saple trace prune --older-than <DAYS> --keep-last <N>
saple trace compress <RUN_ID> # gzip events.jsonl in placesaple model, saple match, saple test#
These subcommands parse their arguments (model --mode forward|backward --max-steps 100, match --pattern <PATH>, test --coverage transition|state|path) and print a status line, infrastructure ready, end-to-end pipeline pending. They do no analysis today; use saple analyze.