DEVELOPMENT EDITION · 769442725406
Toolchain Manual
On this page

veradic doc

Generate Markdown reference pages from explicit library specifications and their comments.

veradic [GLOBAL OPTIONS] doc [-o DIR | --output DIR] FILES...

At least one input is required. DIR defaults to doc; it is created when needed. One output file uses the lowercased dotted unit name, such as counters.md or verada.containers.formal.vectors.md. Existing same-named files are overwritten. There is no --project, automatic library selection or semantic-proof gate.

veradic doc -o api docs/manuals/examples/first-proof/vada/after/bounded.vads
veradic doc -o api docs/manuals/examples/first-proof/varc/after/bounded.va

The generator parses through the input frontend, reads source spans/comments and emits visible package declarations with their contracts. Generic package formals, nested visible packages and library subprograms can appear. The output is documentation of declarations, not proof that their implementations satisfy contracts.

Comment and ownership conventions

Place descriptive full-line comments immediately above the declaration, or a trailing comment on its last line. A blank gap separates an unrelated preceding comment. Package-introduction comments appear with the unit. Declaration snippets remain source text, so include useful parameter names and readable contracts. The generator does not invent complexity, lifetime, exception, usage examples or missing semantics; write those in curated companion pages.

Keep generated files in a distinct directory from authored handbook pages. Regeneration can erase manual edits and does not remove old output files for units no longer supplied. Build from an empty disposable directory when checking generation freshness.

What is extracted

The generator handles package specifications, generic packages, library subprograms, generic subprograms (with their formal parts) and generic instances (a page names the instance's generic and actuals, then shows its declaration). Each declaration is shown as its source writes it, so a page for a Vada unit shows Vada, and one for a Varc unit shows Varc. A Vibe module's page shows each function as its def line, its decorators and its contracts, with ... in place of its statements; classes, type aliases and constants as Vibe writes them. A generic instance Vibe or Varc writes in place (tuple[int, int]) has no page of its own. Enumerate the units you expect when you check a generated set, and see the curated Library Reference for the predefined units.

No solver or C compiler is started. Read/syntax errors normally exit 1; successful generation exits 0 and lists wrote PATH on stdout. Human diagnostics use stderr. Listings still accompany JSON diagnostics on stdout. A multi-file invocation can write pages for successfully parsed inputs while reporting errors elsewhere; source files remain unchanged.