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
bundleVectors | The vector of each environment for rule and its bundle (from Artifact.encodeExprBundle or encodeTransitionBundle): the slots read from the environment as… |
checkAllFoldProperties | checkFoldProperties of every fold, against what foldProperties declares of it. |
checkAllLowerings | checkOpLowerings of every primitive, one after another. |
checkAllOps | checkOpSoundness of every primitive. |
checkAllProperties | checkProperties of every primitive, against what opProperties declares of it. |
checkAllWriteProperties | checkWriteProperties of every way of writing, against what writeProperties lists of it. |
checkFoldProperties | Check each property properties declares of fold against the evaluator. foldProperties[fold.id] is the table's declaration; a test passes another to show… |
checkOperation | Run generated checks for every claim declared on op against table, returning a report and Temporal.Discharges for the obligations registry. Idempotence,… |
checkOpLowerings | Hold one operator's SQL lowerings and the solver to evaluation over the awkward operands checkOpSoundness draws, at most samples choices of them for each… |
checkOpSoundness | Hold 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… |
checkProperties | Check 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… |
checkResidualizeSoundness | Property-test Tier 2 partial evaluation soundness against Tier 1 evaluation: ∀ env ~ schema: eval(residualize(expr, mask(env)), env) === eval(expr, env)… |
checkWriteProperties | Check 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… |
lawObligations | Collect every law obligation reachable from a Language, Machine, Transition, Expr, or list of Operations, for each OperationImplementations table (and… |
residualSettled | settleNode's answer, read off the residual. |
residualVerdict | judgeNode's answer, read off the residual. |
sameOutcome | Two outcomes that are one answer: equal values, or refusals for one reason. |
slotProblem | Why 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
BundleVector | One call of a bundle: a value per slot, in slot order, and its answer. |
EmittedRecord | One emitted record: its tag, and its fields' values in the bundle's order. |
LoweringOptions | |
LoweringReport | checkedBy 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. |
OperationReport | Result of checking every declared claim of one custom operation. |
OpFailure | |
OpReport | |
ParityRunner | Runs recorded calls in one SQL statement per dialect for parity checking. |
PropertyFailure | |
PropertyReport | |
SqlRunner | Runs 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. |
SqlStatement | A 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
BundleOutcome | What 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… |
Outcome | What evaluation gave: a value, null, or the refusal. |
Reader | A reader held to evaluation's answer, or evaluation itself where it must agree with itself. |
Scalar | A value a slot holds or a rule answers. |