Annotationtypeno test imports ittype Annotation = "kind" | "subject" | "change" | "plan" | "verify";What a requirement asks of a dialect.
What a dialect can express of a requirement, annotation by annotation, and the matrix of every requirement against every dialect. An annotation is expressed (the dialect carries it out), carried (the dialect passes it on as data for something else to read) or unexpressed, with the reason: so that what a tool cannot do is a named finding and never a surprise.
import { matrixTotals } from "./express.ts";
// matrixTotals(matrixOf(requirements, dialects)) counts the cells by stateAnnotationtypeno test imports ittype Annotation = "kind" | "subject" | "change" | "plan" | "verify";What a requirement asks of a dialect.
Expressiontypeno test imports ittype Expression =
| { readonly annotation: Annotation; readonly state: "expressed" | "carried" }
| { readonly annotation: Annotation; readonly state: "unexpressed"; readonly reason: string };What a dialect does with one annotation.
Celltypeno test imports ittype Cell = { readonly dialect: DialectId; readonly expressions: readonly Expression[] };The annotations of one requirement for one dialect.
Rowtypeno test imports ittype Row = { readonly requirement: RequirementId; readonly cells: readonly Cell[] };One requirement against every dialect.
Matrixtypeno test imports ittype Matrix = { readonly dialects: readonly DialectId[]; readonly rows: readonly Row[] };Every requirement against every dialect.
Totalstypeno test imports ittype Totals = { readonly expressed: number; readonly carried: number; readonly unexpressed: number };The cells counted by state.
expressibilityfunctionfunction expressibility(requirement: Requirement, dialect: Dialect, catalogue?: readonly KindSpec[]): readonly Expression[]What a dialect expresses of a requirement.
matrixOffunctionfunction matrixOf(requirements: readonly Requirement[], dialects: readonly Dialect[], catalogue?: readonly KindSpec[]): MatrixEvery requirement against every dialect.
matrixTotalsfunctionfunction matrixTotals(matrix: Matrix): TotalsThe annotations of a matrix counted by state.
unexpressedOffunctionfunction unexpressedOf(matrix: Matrix): readonly { readonly requirement: RequirementId; readonly dialect: DialectId; readonly annotation: Annotation; readonly reason: string; }[]Every annotation that no dialect expresses or carries is a finding: the requirement, the dialect and the reason.