Metakit / API

@doeixd/metakit/conformance

Conformance (@doeixd/metakit/conformance): every primitive operator, over the values that trip readers up, held to one answer.

checkOpSoundness takes an operator and, for each choice of awkward operands and of Schemas that admit them, compares what evaluation gives with what partial evaluation, Expr.judge and the Tier 3 checker say: the residual must evaluate alike with nothing, one operand or everything known, a True of the judge or the checker must be true, the judge's False false or null, or refused for its witness's reason, and the checker's False false, an interval must hold it, and assuming what is so must not be a contradiction. checkOpLowerings holds the SQL lowerings and the solver to the same answers through runners the caller passes. The operators and their operand kinds are tables over CoreOpId, so a new primitive fails to compile until it is covered here.

Functions

bundleVectorsThe vector of each environment for rule and its bundle (from Artifact.encodeExprBundle or encodeTransitionBundle): the slots read from the environment as…
checkAllFoldPropertiescheckFoldProperties of every fold, against what foldProperties declares of it.
checkAllLoweringscheckOpLowerings of every primitive, one after another.
checkAllOpscheckOpSoundness of every primitive.
checkAllPropertiescheckProperties of every primitive, against what opProperties declares of it.
checkAllWritePropertiescheckWriteProperties of every way of writing, against what writeProperties lists of it.
checkFoldPropertiesCheck each property properties declares of fold against the evaluator. foldProperties[fold.id] is the table's declaration; a test passes another to show…
checkOperationRun generated checks for every claim declared on op against table, returning a report and Temporal.Discharges for the obligations registry. Idempotence,…
checkOpLoweringsHold one operator's SQL lowerings and the solver to evaluation over the awkward operands checkOpSoundness draws, at most samples choices of them for each…
checkOpSoundnessHold one operator to one answer over every awkward operand: null, an absent key, NaN, an infinity, the ends of the safe range, a float, the empty string, an…
checkPropertiesCheck each property properties declares of op against op's evaluator. opProperties[op.id] is the table's declaration; a test passes another to show that a…
checkResidualizeSoundnessProperty-test Tier 2 partial evaluation soundness against Tier 1 evaluation: ∀ env ~ schema: eval(residualize(expr, mask(env)), env) === eval(expr, env)…
checkWritePropertiesCheck each pair properties lists of way against Transition.step. writeProperties[way] is the table's declaration; a test passes another to show that a false…
lawObligationsCollect every law obligation reachable from a Language, Machine, Transition, Expr, or list of Operations, for each OperationImplementations table (and…
residualSettledsettleNode's answer, read off the residual.
residualVerdictjudgeNode's answer, read off the residual.
sameOutcomeTwo outcomes that are one answer: equal values, or refusals for one reason.
slotProblemWhy a host refuses value in slot (docs/bundles.md, "Slots"): a value of another kind, null where the slot is not nullable, an integer past the safe range,…

Interfaces

BundleVectorOne call of a bundle: a value per slot, in slot order, and its answer.
EmittedRecordOne emitted record: its tag, and its fields' values in the bundle's order.
LoweringOptions
LoweringReportcheckedBy counts, for a SQL reader, the statements of the choices it lowered and whose fields a column holds; for the solver, the choices it decided.
OperationReportResult of checking every declared claim of one custom operation.
OpFailure
OpReport
ParityRunnerRuns recorded calls in one SQL statement per dialect for parity checking.
PropertyFailure
PropertyReport
SqlRunnerRuns statements on one database. Each selects one row of one column, v; the runner gives its value as the driver returns it, or the error the database raised.
SqlStatementA statement a SqlRunner runs: a lowered expression selected over one row of sample values, a null among them bound as one (CAST(? AS …)).
WriteReport

Types

BundleOutcomeWhat a reader must answer for one call: an expression's value or the reason it is refused; a step's guard not met (false or null, or refused with the…
OutcomeWhat evaluation gave: a value, null, or the refusal.
ReaderA reader held to evaluation's answer, or evaluation itself where it must agree with itself.
ScalarA value a slot holds or a rule answers.