Skip to main content

Module derive

Module derive 

Source
Expand description

The specification’s own checker (plan/served.md P13 step 5): every example’s expected figures derived from its rule’s symbolic form, by an engine-free reference model with exact decimals.

The runner asks an engine whether it agrees with an example. This module asks whether the example agrees with the specification: it replays the example’s events on the smallest ledger the rules of bookspec/spec/*.md describe (entries, reversals, a close, a bill, an invoice) and computes each expectation it can from the symbolic forms (sum of signed values, normal balances, the accounting equation, net income). An expectation whose figure disagrees with the derivation, or an event whose refusal the rules do not justify, fails the specification’s build, before any engine is consulted.

What the model does not cover (depreciation, schedules, members, 1099s, formats, the cash-flow sections) is not derived here: an expectation is Derived::Skipped with the reason, never silently passed, and the example is still checked by the engines.

Structs§

Derivation
The derivation of one example: one result per event that was refused and per expectation.

Enums§

Derived
What the derivation found of one expectation or event.

Functions§

derive
Derive what the specification says about ex.