Help us shape the future of Go! Take the 2026 Go Developer Survey

memoinvariant

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package memoinvariant is RFC-184 W4: a generative memo-invariant harness.

TestCorpusPlanReachability (RFC-183) checks the right memo properties but only over the FIXED yamsql corpus — it can find only the shapes someone thought to write a query for. W4 extends the RFC-182 generative row-soundness idea to the MEMO level: over seeded-random (schema, data, query) shapes the corpus does not contain, it asserts the memo invariants directly — reachability, arity (child-count vs. reported quantifiers), and identity/hash agreement (EqualsPlanWithoutChildren-equal nodes must share HashCodeWithoutChildren).

W4 is what LICENSES RFC-184 W2 (plans store children only as quantifiers): W2 is sound only if every compensating rule memoizes-then-ranges the quantifier over the compensated reference. Corpus reachability = 0 is necessary but not sufficient — it proves lockstep for the written queries, not for shapes nobody wrote. So this harness must land and cover the compensation sites (FlatMap, RecursiveDfsJoin, InJoin, UnorderedUnion, PredicatesFilter, Projection) before W2 collapses anything.

This package is a TEST HARNESS ONLY — it contains no engine code. The invariant checkers and the mutation-proofs that prove they fire live in the package's _test.go files.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL