IF Commons GitHub

physical/dialect/express

Written to: 2 requirements: 2 proved, 0 partly, 0 failing, 0 with no test recorded. 0004-archon-dialects FR-003, 0004-archon-dialects FR-004

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 state

Source: commons/archon/src/physical/dialect/express.ts

4 of 10 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

Annotationtypeno test imports it
type Annotation = "kind" | "subject" | "change" | "plan" | "verify";

What a requirement asks of a dialect.

Expressiontypeno test imports it
type 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 it
type Cell = { readonly dialect: DialectId; readonly expressions: readonly Expression[] };

The annotations of one requirement for one dialect.

Rowtypeno test imports it
type Row = { readonly requirement: RequirementId; readonly cells: readonly Cell[] };

One requirement against every dialect.

Matrixtypeno test imports it
type Matrix = { readonly dialects: readonly DialectId[]; readonly rows: readonly Row[] };

Every requirement against every dialect.

Totalstypeno test imports it
type Totals = { readonly expressed: number; readonly carried: number; readonly unexpressed: number };

The cells counted by state.

expressibilityfunction
function expressibility(requirement: Requirement, dialect: Dialect, catalogue?: readonly KindSpec[]): readonly Expression[]

What a dialect expresses of a requirement.

Imported by 5 tests of the run (5 passed, 0 failed): the library's results

matrixOffunction
function matrixOf(requirements: readonly Requirement[], dialects: readonly Dialect[], catalogue?: readonly KindSpec[]): Matrix

Every requirement against every dialect.

Imported by 5 tests of the run (5 passed, 0 failed): the library's results

matrixTotalsfunction
function matrixTotals(matrix: Matrix): Totals

The annotations of a matrix counted by state.

Imported by 5 tests of the run (5 passed, 0 failed): the library's results

unexpressedOffunction
function 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.

Imported by 5 tests of the run (5 passed, 0 failed): the library's results

Titles, headings, exports, tables, columns and requirements. Esc closes.