Skip to content

docs: document bind/implementation/match terminology and their layers - #144

Merged
zzylol merged 1 commit into
mainfrom
docs/terminology-bind-implementation-match
Jul 21, 2026
Merged

zzylol merged 1 commit into
mainfrom
docs/terminology-bind-implementation-match

Conversation

@zzylol

@zzylol zzylol commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Summary

design.md's §3 layer-spine table never actually defined "bind" vs "implementation" vs "match", and one passing mention (in §5.1 and the §6.0 crate map) still called asap-plan's L3→L4 pass "the bind pass" -- exactly the collision crates/plan/src/lib.rs's own crate doc explicitly renamed to "implementation" to avoid becoming a fourth/fifth sense of an already-overloaded word.

Adds a terminology table right after the layer-spine table (§3) -- before any per-crate detail section depends on the vocabulary -- covering:

  • Bind docs: clean up L3 QueryExpr; add schema flow + L4 SketchExpr + system I/O #1 (L2) -- name resolution, asap_l2::binder::Binder
  • Implementation (L3→L4, one node) -- boundary::implementation_for
  • implement_tree (L3→L4, whole tree) -- bind::implement_tree (module named bind for historical reasons; content is "implementation")
  • Match (a different question from Implementation: "does an available one satisfy a required one") -- boundary::Matcher, ships with no default impl by design; ASAPQuery-backend's Capability::is_satisfied_by is the reference downstream instance
  • Bind docs: QuerySpec definition + batched-queries DAG-reuse example #2 (L4→L5) -- deployment-specific placement, e.g. control_plane::sketch_algebra::rules::bind_*

Points back to crates/plan/src/lib.rs's own module doc as the authoritative, code-adjacent source rather than duplicating it wholesale -- that's what should stay in sync with the real implementation; this table is a map, not a second source of truth. Also fixes the two stale "bind pass" mentions elsewhere in the doc.

Note for reviewer

While grounding this I noticed design.md's core::optimizer / core::plan code-sketch sections (§ "Layer 4 framework" / "shared traits bridging layers") describe an OptimizerRule/RuleEngine/BindKllOnQuantile-shaped API that doesn't match what's actually shipped in crates/plan today (boundary::implementation_for, bind::implement_tree, cost_model::CostModel) -- looks like aspirational pre-implementation content that was never reconciled with what got built. Left untouched here (separate, larger scope than this PR), but flagging it.

🤖 Generated with Claude Code

design.md's own §3 layer-spine table didn't define these, and one
passing mention (§5.1, §6.0) still called asap-plan's L3->L4 pass
"the bind pass" -- the exact fourth-colliding-sense asap-plan's own
crate doc (crates/plan/src/lib.rs) explicitly renamed to
"implementation" to avoid. Adds a terminology table right after the
layer-spine table (before any per-crate detail depends on the
vocabulary) covering the four real senses: L2 name resolution (Bind
#1), the L3->L4 per-node physical choice (Implementation), the
L3->L4 whole-tree walk (implement_tree), the "does an available
Implementation satisfy a required one" question (Match /
boundary::Matcher, no default impl -- ASAPQuery-backend's
Capability::is_satisfied_by is the reference downstream instance),
and the deployment-specific L4->L5 placement decision (Bind #2, e.g.
control_plane::sketch_algebra::rules::bind_*). Points to
crates/plan/src/lib.rs's own module doc as the authoritative,
code-adjacent source rather than duplicating it wholesale, to avoid
this table drifting from the real implementation the way the passing
"bind pass" mentions had.

Also fixes the two stale "bind pass" mentions to say implement_tree
and point back to this section.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@zzylol
zzylol merged commit dd9db98 into main Jul 21, 2026
1 check passed
@zzylol
zzylol deleted the docs/terminology-bind-implementation-match branch July 21, 2026 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant