@bjornpagen/bumbledb 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/COOKBOOK.md +1450 -0
  2. package/README.md +69 -30
  3. package/dist/closed.d.ts +157 -38
  4. package/dist/closed.d.ts.map +1 -1
  5. package/dist/closed.js +232 -47
  6. package/dist/closed.js.map +1 -1
  7. package/dist/count.d.ts +64 -17
  8. package/dist/count.d.ts.map +1 -1
  9. package/dist/count.js +37 -14
  10. package/dist/count.js.map +1 -1
  11. package/dist/db.d.ts +27 -8
  12. package/dist/db.d.ts.map +1 -1
  13. package/dist/db.js +33 -10
  14. package/dist/db.js.map +1 -1
  15. package/dist/exhume.d.ts +12 -11
  16. package/dist/exhume.d.ts.map +1 -1
  17. package/dist/exhume.js +7 -6
  18. package/dist/exhume.js.map +1 -1
  19. package/dist/face.d.ts +135 -30
  20. package/dist/face.d.ts.map +1 -1
  21. package/dist/face.js +44 -19
  22. package/dist/face.js.map +1 -1
  23. package/dist/fields.d.ts +130 -130
  24. package/dist/fields.d.ts.map +1 -1
  25. package/dist/fields.js +60 -94
  26. package/dist/fields.js.map +1 -1
  27. package/dist/index.d.ts +29 -24
  28. package/dist/index.d.ts.map +1 -1
  29. package/dist/index.js +19 -14
  30. package/dist/index.js.map +1 -1
  31. package/dist/law.d.ts +224 -0
  32. package/dist/law.d.ts.map +1 -0
  33. package/dist/law.js +224 -0
  34. package/dist/law.js.map +1 -0
  35. package/dist/lower.d.ts +17 -7
  36. package/dist/lower.d.ts.map +1 -1
  37. package/dist/lower.js +66 -24
  38. package/dist/lower.js.map +1 -1
  39. package/dist/marshal.d.ts +36 -21
  40. package/dist/marshal.d.ts.map +1 -1
  41. package/dist/marshal.js +41 -25
  42. package/dist/marshal.js.map +1 -1
  43. package/dist/native.d.ts +6 -2
  44. package/dist/native.d.ts.map +1 -1
  45. package/dist/native.js +2 -2
  46. package/dist/native.js.map +1 -1
  47. package/dist/query/atom.d.ts +370 -174
  48. package/dist/query/atom.d.ts.map +1 -1
  49. package/dist/query/atom.js +75 -172
  50. package/dist/query/atom.js.map +1 -1
  51. package/dist/query/lower.d.ts +312 -109
  52. package/dist/query/lower.d.ts.map +1 -1
  53. package/dist/query/lower.js +906 -387
  54. package/dist/query/lower.js.map +1 -1
  55. package/dist/query/predicate.d.ts +70 -88
  56. package/dist/query/predicate.d.ts.map +1 -1
  57. package/dist/query/predicate.js +118 -72
  58. package/dist/query/predicate.js.map +1 -1
  59. package/dist/query/run.d.ts +19 -16
  60. package/dist/query/run.d.ts.map +1 -1
  61. package/dist/query/run.js +31 -24
  62. package/dist/query/run.js.map +1 -1
  63. package/dist/query/scope.d.ts +178 -127
  64. package/dist/query/scope.d.ts.map +1 -1
  65. package/dist/query/scope.js +111 -108
  66. package/dist/query/scope.js.map +1 -1
  67. package/dist/query/select.d.ts +102 -80
  68. package/dist/query/select.d.ts.map +1 -1
  69. package/dist/query/select.js +39 -34
  70. package/dist/query/select.js.map +1 -1
  71. package/dist/relation.d.ts +48 -38
  72. package/dist/relation.d.ts.map +1 -1
  73. package/dist/relation.js +24 -19
  74. package/dist/relation.js.map +1 -1
  75. package/dist/schema.d.ts +41 -3
  76. package/dist/schema.d.ts.map +1 -1
  77. package/dist/schema.js +34 -9
  78. package/dist/schema.js.map +1 -1
  79. package/dist/spec.d.ts +7 -5
  80. package/dist/spec.d.ts.map +1 -1
  81. package/dist/spec.js.map +1 -1
  82. package/dist/statements.d.ts +91 -36
  83. package/dist/statements.d.ts.map +1 -1
  84. package/dist/statements.js +42 -12
  85. package/dist/statements.js.map +1 -1
  86. package/package.json +4 -3
  87. package/src/closed.ts +448 -95
  88. package/src/count.ts +112 -18
  89. package/src/db.ts +45 -17
  90. package/src/exhume.ts +12 -11
  91. package/src/face.ts +211 -41
  92. package/src/fields.ts +199 -234
  93. package/src/index.ts +78 -61
  94. package/src/law.ts +519 -0
  95. package/src/lower.ts +82 -27
  96. package/src/marshal.ts +48 -30
  97. package/src/native.ts +8 -4
  98. package/src/query/atom.ts +525 -374
  99. package/src/query/lower.ts +1469 -538
  100. package/src/query/predicate.ts +208 -161
  101. package/src/query/run.ts +35 -25
  102. package/src/query/scope.ts +264 -218
  103. package/src/query/select.ts +168 -93
  104. package/src/relation.ts +47 -47
  105. package/src/schema.ts +69 -18
  106. package/src/spec.ts +7 -5
  107. package/src/statements.ts +124 -41
  108. package/dist/brand.d.ts +0 -59
  109. package/dist/brand.d.ts.map +0 -1
  110. package/dist/brand.js +0 -47
  111. package/dist/brand.js.map +0 -1
  112. package/src/brand.ts +0 -82
@@ -1,145 +1,348 @@
1
1
  /**
2
- * `query()` and the IR lowering (PRD-08). A query is built inside a scope
3
- * callback (variable identity is lexical and typed) and is an INERT value:
4
- * `Query<Rels, Row, Params>` with `Row` inferred from `select` and
5
- * `Params` from every parameter the returned rules (and the predicates
6
- * they reach) use. Lowering is a pure function of the query value down to
7
- * the bridge's `ProgramIr` (`bumbledb/crates/bumbledb/src/ir.rs`, the
8
- * bijection target): relations and predicates by declaration ordinal (the
9
- * declaration-order-is-ids law the engine's manifest pins), variables by
10
- * dense per-rule first-occurrence ids (rule-scoped, exactly as the IR
11
- * scopes them), params by scope declaration order. Lowering is STABLE
12
- * the same query value lowers to deeply-equal IR every time, and two
13
- * identically-written queries lower identically (prepared-query caching
14
- * upstream keys on this). Construction validates negation safety (typed,
15
- * naming the variable earlier and warmer than the engine's refusal);
16
- * everything else (strata, types, aggregates rosters, rule caps) is the
17
- * ENGINE's judge, surfacing its typed errors at prepare. No invented
18
- * limits: rule counts and predicate counts are never pre-checked here.
2
+ * `query()` and the IR lowering, STRUCTURAL edition. A query is built
3
+ * kysely-shaped — `query(S).rule(r => r.match(Rel, { f: r.var("x") })
4
+ * .where(r.eq(r.var("x"), r.param("p"))).select("x"))` and is an INERT
5
+ * value: `Query<Rels, Row, Params>` with `Row` inferred from each rule's
6
+ * `.select` and `Params` inferred to be EXACTLY the params the rules use
7
+ * (params are typed BY USE; a param value no rule uses never registers, so
8
+ * every query executes under its own inferred type). Vars are string
9
+ * names, domain-typed by the field they first bind and joined by reuse —
10
+ * the rule builder's environment carries name field descriptor through
11
+ * the chain, checked structurally at every reuse (`JoinOk`), so the old
12
+ * brand-equal join is now the domain-equal compile error. Lowering is a
13
+ * pure function of the query value down to the bridge's `ProgramIr`
14
+ * (`bumbledb/crates/bumbledb/src/ir.rs`, the bijection target): relations
15
+ * by declaration ordinal (the declaration-order-is-ids law the engine's
16
+ * manifest pins), variables by dense per-rule first-occurrence ids
17
+ * (rule-scoped, exactly as the IR scopes them), params by first-use order
18
+ * across the program walk. Lowering is STABLE the same query value
19
+ * lowers to deeply-equal IR every time, and two identically-written
20
+ * queries lower identically. Construction validates negation safety and
21
+ * name-boundness (typed, naming the variable — earlier and warmer than
22
+ * the engine's refusal); everything else (strata, types, aggregate
23
+ * rosters, rule caps) is the ENGINE's judge, surfacing its typed errors
24
+ * at prepare. No invented limits: rule and predicate counts are never
25
+ * pre-checked here.
19
26
  */
20
- import { phantom } from "#brand.ts";
21
- import { type FieldData } from "#fields.ts";
27
+ import type { AnyField } from "#fields.ts";
28
+ import type { ClassRecordOf, SchemaClasses } from "#law.ts";
22
29
  import type { ProgramIr, TaggedValue } from "#native.ts";
23
- import type { AnyBodyItem } from "#query/atom.ts";
24
- import type { ColumnValues, Predicate, PredicateColumnsInput, PredicateParams, PredicateRuleInput, PredicateSelf } from "#query/predicate.ts";
25
- import type { AnyVar, ItemParams, MaskParam, Param, ParamSet, ParamsRecord, ParamsShape, QueryRegistry, Var } from "#query/scope.ts";
26
- import type { AggregateData, RowOf, SelectShape } from "#query/select.ts";
27
- import type { FieldRef } from "#relation.ts";
28
- import type { Schema, SchemaRelations } from "#schema.ts";
30
+ import type { AnyCond, BindEnv, BindParamsShape, CheckBindings, CheckCond, CmpKind, CondParamsShape, MatchFields, MatchOwner, MatchShape, RecData, RuleData, SelectColumn } from "#query/atom.ts";
31
+ import { allen, and, covers, eq, ge, gt, le, lt, ne, not, or, pointIn } from "#query/atom.ts";
32
+ import type { ClassedField, EnvShape, Flatten, InferredOf, JoinOk, ParamEntry, ParamsRecord, Var } from "#query/scope.ts";
33
+ import { inferred, makeDuration, makeMaskParam, makeParam, makeSetParam, makeVar, makeVars } from "#query/scope.ts";
34
+ import type { CheckNameSelect, CheckSelect, RowOfNameSelect, RowOfSelect, SelectEntry } from "#query/select.ts";
35
+ import { argMax, argMin, count, countDistinct, max, min, pack, sum } from "#query/select.ts";
36
+ import type { FieldsShape } from "#relation.ts";
37
+ import type { AnySchema, Schema, SchemaRelations } from "#schema.ts";
29
38
  /**
30
- * The scope value the `query()` build callback receives: variable and
31
- * parameter declaration plus predicate declaration (engine recursion).
39
+ * The matchable members of a schema's record ordinary relations AND
40
+ * closed vocabularies query atoms: a closed atom is an ordinary EDB
41
+ * atom over the sealed extension; the ENGINE decides whether it folds to a
42
+ * plan-constant member set or joins the L1-resident virtual image — the
43
+ * SDK lowers pass-through and never knows which).
32
44
  */
33
- interface Scope<Rels extends SchemaRelations> {
34
- /**
35
- * Declares one query variable, typed by the field it is declared from
36
- * usable in ANY atom position whose field carries the same brand
37
- * (the nominal join discipline). Two calls are two variables.
38
- */
39
- var<V>(field: FieldRef<keyof Rels & string, string, V>): Var<V>;
40
- /**
41
- * Declares one scalar parameter under a mandatory name literal — the
42
- * key of the typed params object `execute` takes.
43
- */
44
- param<const Name extends string, V>(name: Name, field: FieldRef<keyof Rels & string, string, V>): Param<Name, V>;
45
- /**
46
- * Declares one set parameter (the IR's `ParamSet`): bound at execution
47
- * to a readonly array; a binding position matches on set membership.
48
- */
49
- paramSet<const Name extends string, V>(name: Name, field: FieldRef<keyof Rels & string, string, V>): ParamSet<Name, V>;
50
- /**
51
- * Declares one Allen-mask parameter (`MaskTerm::Param`): the temporal
52
- * relation as a bind-time 13-bit mask argument.
53
- */
54
- allenParam<const Name extends string>(name: Name): MaskParam<Name>;
45
+ type QueryRelation<Rels extends SchemaRelations> = Extract<Rels[keyof Rels], MatchOwner>;
46
+ /** The environment after one bindings record: the incoming env plus every var the record binds (as classed slots). */
47
+ type EnvOfMatch<Env extends EnvShape, F extends FieldsShape, CR, B> = Flatten<Env & BindEnv<F, CR, B>> extends infer E extends EnvShape ? E : never;
48
+ /** Reads an inferred-params carrier off a rec reference or rule value. */
49
+ type ParamsOf<T> = InferredOf<T> extends {
50
+ readonly params: infer P extends ParamsRecord;
51
+ } ? P : Record<never, never>;
52
+ /** Reads an inferred-row carrier off a rule value or query. */
53
+ type RowOf<T> = InferredOf<T> extends {
54
+ readonly row: infer R;
55
+ } ? R : never;
56
+ /**
57
+ * A recursive predicate's HEAD signature as classed slots (descriptor +
58
+ * law-computed class), position for position carried on the rec
59
+ * reference so an `idb` join can be judged against it; `undefined` on
60
+ * values that carry no head (a plain query rule, or an unthreaded rec
61
+ * handle before its first rule).
62
+ */
63
+ type HeadShape = readonly ClassedField[] | undefined;
64
+ /**
65
+ * One finished rule as a plain value: the runtime data plus the inferred
66
+ * row/params carrier (and, for a RECURSIVE rule, the head's positional
67
+ * field descriptors — the signature `idb` joins pair against).
68
+ * `.rule(...)` consumes it; hosts never build one by hand.
69
+ */
70
+ interface RuleValue<Row, P extends ParamsRecord, Head extends HeadShape = undefined> {
71
+ readonly rule: RuleData;
72
+ readonly [inferred]?: {
73
+ readonly row: Row;
74
+ readonly params: P;
75
+ readonly head: Head;
76
+ };
77
+ }
78
+ /** Any finished rule value. */
79
+ type AnyRuleValue = RuleValue<unknown, ParamsRecord, HeadShape>;
80
+ /** The positional head-field tuple of a recursive rule's names-only select. */
81
+ type HeadFieldsOf<Env extends EnvShape, S extends readonly string[]> = {
82
+ readonly [I in keyof S]: Env[S[I] & keyof Env];
83
+ };
84
+ /** Reads an inferred-head carrier off a rule value or rec reference. */
85
+ type HeadOf<T> = InferredOf<T> extends {
86
+ readonly head: infer H extends readonly ClassedField[];
87
+ } ? H : undefined;
88
+ /**
89
+ * A recursive predicate REFERENCE — the shape `idb()` targets carry: the
90
+ * name (type-level identity: a recursive rule's own `idb` accepts only its
91
+ * own name — the self-recursion cut), the runtime data (value identity),
92
+ * the params its attached rules have used so far, and the head signature
93
+ * its FIRST rule sealed (thread the value `.rule(...)` returns into an
94
+ * `idb` and the program's `Params` type stays exact AND the idb join is
95
+ * arity- and domain-checked against the head).
96
+ */
97
+ interface RecRef<Name extends string, P extends ParamsRecord, Head extends HeadShape = HeadShape> {
98
+ readonly name: Name;
99
+ readonly data: RecData;
100
+ readonly [inferred]?: {
101
+ readonly params: P;
102
+ readonly head: Head;
103
+ };
104
+ }
105
+ /** One `idb` position's judgment: the var must be bound by a relation atom, class-equal to the head slot when the head is carried. */
106
+ type IdbVarOk<Env extends EnvShape, T, F> = T extends Var<infer N extends string> ? N extends keyof Env ? F extends ClassedField ? JoinOk<Env[N], F> : true : false : false;
107
+ /**
108
+ * The validated `idb` variable tuple: every var must already be bound by a
109
+ * relation atom of the rule; and when the target carries its head
110
+ * signature (the threaded rec handle), the tuple must match the head's
111
+ * arity and every position must be class-equal to its head slot — the
112
+ * same wall `JoinOk` holds for EDB atoms. An unthreaded handle carries no
113
+ * head; its joins stay boundness-checked here and arity/class-judged at
114
+ * prepare (the engine's law stands behind both tiers).
115
+ */
116
+ type CheckIdbVars<Env extends EnvShape, V, Head extends HeadShape = undefined> = Head extends readonly ClassedField[] ? V extends readonly unknown[] ? V["length"] extends Head["length"] ? {
117
+ readonly [I in keyof V]: IdbVarOk<Env, V[I], Head[I & keyof Head]> extends true ? V[I] : never;
118
+ } : {
119
+ readonly [I in keyof V]: never;
120
+ } : never : {
121
+ readonly [I in keyof V]: IdbVarOk<Env, V[I], undefined> extends true ? V[I] : never;
122
+ };
123
+ /**
124
+ * The term/predicate/aggregate constructor vocabulary every rule builder
125
+ * carries — pure value builders, environment-free: the chain's `.where`,
126
+ * `.match`, and `.select` seams judge their output against the rule
127
+ * environment.
128
+ */
129
+ interface TermOps {
130
+ /** Declares/names one variable: typed by the field it first binds; reuse joins. */
131
+ readonly var: typeof makeVar;
132
+ /** Mints several variables at once — `const { service, w } = r.vars("service", "w")`: each name typed exactly; duplicates refuse. */
133
+ readonly vars: typeof makeVars;
134
+ /** Names one scalar parameter: typed by its use; the key of the execute params object. */
135
+ readonly param: typeof makeParam;
136
+ /** Names one ∈-set parameter (the IR's `ParamSet`): bound to a readonly array at execution. */
137
+ readonly inSet: typeof makeSetParam;
138
+ /** Names one Allen-mask parameter (`MaskTerm::Param`): a bind-time 13-bit mask number. */
139
+ readonly maskParam: typeof makeMaskParam;
140
+ /** The measure of an interval-typed variable: `|[s, e)| = e − s`, u64. */
141
+ readonly duration: typeof makeDuration;
142
+ readonly eq: typeof eq;
143
+ readonly ne: typeof ne;
144
+ readonly lt: typeof lt;
145
+ readonly le: typeof le;
146
+ readonly gt: typeof gt;
147
+ readonly ge: typeof ge;
148
+ readonly pointIn: typeof pointIn;
149
+ readonly covers: typeof covers;
150
+ readonly allen: typeof allen;
151
+ readonly and: typeof and;
152
+ readonly or: typeof or;
153
+ readonly not: typeof not;
154
+ readonly count: typeof count;
155
+ readonly countDistinct: typeof countDistinct;
156
+ readonly sum: typeof sum;
157
+ readonly min: typeof min;
158
+ readonly max: typeof max;
159
+ readonly argMax: typeof argMax;
160
+ readonly argMin: typeof argMin;
161
+ readonly pack: typeof pack;
162
+ }
163
+ /** The rule builder a `query(S).rule(...)` callback receives: the ops plus the first atom (`Classes` — the schema type's class map, the join judge's authority). */
164
+ interface QueryRuleScope<Rels extends SchemaRelations, Classes extends SchemaClasses = SchemaClasses> extends TermOps {
165
+ /** The first EDB atom of the rule: fields bind vars, params, ∈-sets, or bare literals; absence is the wildcard (same-named vars within the record join class-equal). */
166
+ match<R extends QueryRelation<Rels>, const B extends MatchShape<MatchFields<R>>>(relation: R, bindings: B & CheckBindings<Record<never, never>, MatchFields<R>, ClassRecordOf<Classes, R["name"]>, B>): QueryRuleChain<Rels, EnvOfMatch<Record<never, never>, MatchFields<R>, ClassRecordOf<Classes, R["name"]>, B>, BindParamsShape<MatchFields<R>, B>, Classes>;
167
+ }
168
+ /** The chain of a plain query rule: more atoms, residual predicates, then the head. */
169
+ interface QueryRuleChain<Rels extends SchemaRelations, Env extends EnvShape, P extends ParamsRecord, Classes extends SchemaClasses = SchemaClasses> {
170
+ /** One more positive EDB atom — var reuse joins, class-equal by the environment check. */
171
+ match<R extends QueryRelation<Rels>, const B extends MatchShape<MatchFields<R>>>(relation: R, bindings: B & CheckBindings<Env, MatchFields<R>, ClassRecordOf<Classes, R["name"]>, B>): QueryRuleChain<Rels, EnvOfMatch<Env, MatchFields<R>, ClassRecordOf<Classes, R["name"]>, B>, Flatten<P & BindParamsShape<MatchFields<R>, B>>, Classes>;
172
+ /** One residual predicate: a comparison, an `and`/`or` tree, or a negated atom (`r.not`). */
173
+ where<const C extends AnyCond>(cond: CheckCond<Env, Classes, C> & C): QueryRuleChain<Rels, Env, Flatten<P & CondParamsShape<Env, C>>, Classes>;
174
+ /** The head projection: var names, the measure, and aggregates; written order = answer column order. */
175
+ select<const S extends readonly SelectEntry[]>(...entries: CheckSelect<Env, S> & S): RuleValue<RowOfSelect<Env, S>, P>;
176
+ }
177
+ /** The rule builder an OUTPUT rule of a `program()` receives: a query rule plus finished-stratum `idb` atoms. */
178
+ interface OutputRuleScope<Rels extends SchemaRelations, Classes extends SchemaClasses = SchemaClasses> extends TermOps {
179
+ match<R extends QueryRelation<Rels>, const B extends MatchShape<MatchFields<R>>>(relation: R, bindings: B & CheckBindings<Record<never, never>, MatchFields<R>, ClassRecordOf<Classes, R["name"]>, B>): OutputRuleChain<Rels, EnvOfMatch<Record<never, never>, MatchFields<R>, ClassRecordOf<Classes, R["name"]>, B>, BindParamsShape<MatchFields<R>, B>, Classes>;
180
+ }
181
+ /** The chain of an output rule: atoms, predicates, `idb` joins over the program's recs, then the head. */
182
+ interface OutputRuleChain<Rels extends SchemaRelations, Env extends EnvShape, P extends ParamsRecord, Classes extends SchemaClasses = SchemaClasses> {
183
+ match<R extends QueryRelation<Rels>, const B extends MatchShape<MatchFields<R>>>(relation: R, bindings: B & CheckBindings<Env, MatchFields<R>, ClassRecordOf<Classes, R["name"]>, B>): OutputRuleChain<Rels, EnvOfMatch<Env, MatchFields<R>, ClassRecordOf<Classes, R["name"]>, B>, Flatten<P & BindParamsShape<MatchFields<R>, B>>, Classes>;
184
+ where<const C extends AnyCond>(cond: CheckCond<Env, Classes, C> & C): OutputRuleChain<Rels, Env, Flatten<P & CondParamsShape<Env, C>>, Classes>;
55
185
  /**
56
- * Declares one IDB predicate with a named, field-typed head; its rules
57
- * are given in the declaration through a callback receiving the
58
- * predicate's own reference (self-recursion is `self.match({...})`).
59
- * `.match` on the returned value uses it as a body atom elsewhere.
186
+ * One `idb` atom over a FINISHED stratum (any rec of this program): a
187
+ * positional join against the rec's head. An idb atom is a join
188
+ * position every variable must already be bound by a relation atom of
189
+ * the rule (the theory's own domain relation; the rec's answers are
190
+ * theory values, so the join is identity). Threading the rec value the
191
+ * last `.rule(...)` returned carries its rules' params into `Params`
192
+ * AND its head signature, so the join is arity- and class-checked
193
+ * against the head at compile time.
60
194
  */
61
- predicate<const Cols extends PredicateColumnsInput, const Rules extends readonly PredicateRuleInput<ColumnValues<Cols>>[]>(name: string, columns: Cols, rules: (self: PredicateSelf<ColumnValues<Cols>>) => Rules): Predicate<ColumnValues<Cols>, PredicateParams<Rules>>;
195
+ idb<Target extends RecRef<string, ParamsRecord>, const V extends readonly Var<string>[]>(target: Target, ...vars: CheckIdbVars<Env, V, HeadOf<Target>> & V): OutputRuleChain<Rels, Env, Flatten<P & ParamsOf<Target>>, Classes>;
196
+ select<const S extends readonly SelectEntry[]>(...entries: CheckSelect<Env, S> & S): RuleValue<RowOfSelect<Env, S>, P>;
197
+ }
198
+ /** The rule builder a RECURSIVE rule (`rec.rule(...)`) receives. */
199
+ interface RecRuleScope<Rels extends SchemaRelations, Self extends string, Classes extends SchemaClasses = SchemaClasses> extends TermOps {
200
+ match<R extends QueryRelation<Rels>, const B extends MatchShape<MatchFields<R>>>(relation: R, bindings: B & CheckBindings<Record<never, never>, MatchFields<R>, ClassRecordOf<Classes, R["name"]>, B>): RecRuleChain<Rels, Self, EnvOfMatch<Record<never, never>, MatchFields<R>, ClassRecordOf<Classes, R["name"]>, B>, BindParamsShape<MatchFields<R>, B>, Classes>;
62
201
  }
63
202
  /**
64
- * What the build callback returns: `rules` is an array of conjunctions
65
- * (multiple rules = set union answers are SETS, no order/limit exists;
66
- * the host sorts); `select` is the head record non-aggregate entries are
67
- * the implicit group key.
203
+ * The chain of a recursive rule. Its `idb` accepts ONLY the rec itself —
204
+ * the self-recursion cut as a type-level boundary (mutual recursion is
205
+ * unwritable; a finished lower stratum is folded by the OUTPUT rules)
206
+ * and its `select` takes bound variable NAMES only: aggregates and the
207
+ * measure are unrepresentable in a recursive head (the strata judge's
208
+ * `AggregationThroughCycle`/`MeasureInRecursiveHead`, made unwritable).
68
209
  */
69
- interface QueryBuild {
70
- readonly rules: readonly (readonly AnyBodyItem[])[];
71
- readonly select: SelectShape;
72
- }
73
- /** One classified select column as runtime data. */
74
- type SelectEntryData = {
75
- readonly kind: "var";
76
- readonly over: AnyVar;
77
- } | {
78
- readonly kind: "measure";
79
- readonly over: AnyVar;
80
- } | {
81
- readonly kind: "aggregate";
82
- readonly aggregate: AggregateData;
83
- };
84
- /** One answer column: its name (the row object key) and its entry. */
85
- interface SelectColumn {
86
- readonly name: string;
87
- readonly entry: SelectEntryData;
210
+ interface RecRuleChain<Rels extends SchemaRelations, Self extends string, Env extends EnvShape, P extends ParamsRecord, Classes extends SchemaClasses = SchemaClasses> {
211
+ match<R extends QueryRelation<Rels>, const B extends MatchShape<MatchFields<R>>>(relation: R, bindings: B & CheckBindings<Env, MatchFields<R>, ClassRecordOf<Classes, R["name"]>, B>): RecRuleChain<Rels, Self, EnvOfMatch<Env, MatchFields<R>, ClassRecordOf<Classes, R["name"]>, B>, Flatten<P & BindParamsShape<MatchFields<R>, B>>, Classes>;
212
+ where<const C extends AnyCond>(cond: CheckCond<Env, Classes, C> & C): RecRuleChain<Rels, Self, Env, Flatten<P & CondParamsShape<Env, C>>, Classes>;
213
+ /** The self-recursive atom: `idb(self, ...boundVars)` — only this rec's own reference is accepted (threaded, its head arity- and class-checks the join). */
214
+ idb<Target extends RecRef<Self, ParamsRecord>, const V extends readonly Var<string>[]>(target: Target, ...vars: CheckIdbVars<Env, V, HeadOf<Target>> & V): RecRuleChain<Rels, Self, Env, P, Classes>;
215
+ /** The recursive head: bound variable names only (the creation quarantine, restated for fixpoint topology); the value carries the head's classed slots for `idb` pairing. */
216
+ select<const S extends readonly string[]>(...names: CheckNameSelect<Env, S> & S): RuleValue<RowOfNameSelect<Env, S>, P, HeadFieldsOf<Env, S>>;
88
217
  }
89
- /** A query's runtime description — everything lowering and execution read. */
218
+ /** A query's runtime description — everything lowering, the wire marshal, and answer decode read. */
90
219
  interface QueryData {
91
- readonly registry: QueryRegistry;
92
- readonly rules: readonly (readonly AnyBodyItem[])[];
220
+ /** The program's recursive predicates in declaration order (empty for a plain query); `PredId` = index. */
221
+ readonly recs: readonly RecData[];
222
+ /** The output rules in written order (multiple rules = set union). */
223
+ readonly rules: readonly RuleData[];
224
+ /** The head columns (every rule derives the same head; written order = answer column order). */
93
225
  readonly select: readonly SelectColumn[];
226
+ /** The registered params in first-use order across the program walk (= dense `ParamId`s). */
227
+ readonly params: readonly ParamEntry[];
94
228
  }
95
229
  /**
96
230
  * An inert query value. `Row` is the inferred answer-row object type;
97
- * `Params` the inferred execute-params object type. Prepare with
98
- * `db.prepare(q)`; nothing here touches an engine.
231
+ * `Params` the inferred execute-params object type exactly the params
232
+ * the rules use. Prepare with `db.prepare(q)`; nothing here touches an
233
+ * engine.
99
234
  */
100
- interface Query<Rels extends SchemaRelations, Row, Params extends ParamsRecord> {
101
- readonly schema: Schema<Rels>;
235
+ interface Query<Rels extends SchemaRelations, Row, Params extends ParamsRecord, Classes extends SchemaClasses = SchemaClasses> {
236
+ readonly schema: Schema<Rels, Classes>;
102
237
  readonly data: QueryData;
103
- readonly [phantom]?: {
238
+ /** One more rule — the query's answers are the SET UNION of its rules' answers; every rule derives the same head. */
239
+ rule<RV extends AnyRuleValue>(build: (r: QueryRuleScope<Rels, Classes>) => RV): Query<Rels, Row | RowOf<RV>, Flatten<Params & ParamsOf<RV>>, Classes>;
240
+ readonly [inferred]?: {
104
241
  readonly row: Row;
105
242
  readonly params: Params;
106
243
  };
107
244
  }
108
- /** Any query value, whatever its schema and inferred types. */
109
- type AnyQuery = Query<SchemaRelations, unknown, ParamsRecord>;
245
+ /**
246
+ * Any query value as lowering and the runtime consume it: the theory it
247
+ * was built against and its runtime description — every `Query` (typed or
248
+ * program-built) carries exactly this.
249
+ */
250
+ interface AnyQuery {
251
+ readonly schema: AnySchema;
252
+ readonly data: QueryData;
253
+ }
110
254
  /** Extracts a query value's inferred answer-row type. */
111
- type QueryRow<Q extends AnyQuery> = Exclude<Q[typeof phantom], undefined>["row"];
255
+ type QueryRow<Q extends AnyQuery> = RowOf<Q>;
112
256
  /** Extracts a query value's inferred execute-params type. */
113
- type QueryParams<Q extends AnyQuery> = Exclude<Q[typeof phantom], undefined>["params"];
114
- /** The params object type a build result implies (union over every rule item). */
115
- type BuildParams<R extends QueryBuild> = ParamsShape<ItemParams<R["rules"][number][number]>>;
257
+ type QueryParams<Q extends AnyQuery> = ParamsOf<Q>;
258
+ /** The entry value of `query(S)`: the first `.rule` mints the query. */
259
+ interface QueryStart<Rels extends SchemaRelations, Classes extends SchemaClasses = SchemaClasses> {
260
+ rule<RV extends AnyRuleValue>(build: (r: QueryRuleScope<Rels, Classes>) => RV): Query<Rels, RowOf<RV>, ParamsOf<RV>, Classes>;
261
+ }
116
262
  /**
117
- * Builds a query as a typed value: runs `build` inside a fresh scope,
118
- * classifies the select record (written order = answer column order),
119
- * validates negation safety across every rule (the predicates' rules
120
- * included), and freezes. Rule counts, strata legality, and every deeper
121
- * roster stay the engine's judge at prepare.
263
+ * The one runtime chain every context shares non-generic on purpose: the
264
+ * typed chain interfaces (`QueryRuleChain`/`OutputRuleChain`/`RecRuleChain`)
265
+ * apply at the scope factories' boundaries, and the runtime beneath them is
266
+ * one plain value walk. Context gates the two context-bound verbs: `idb`
267
+ * (a program construct self-only inside a rec, any rec of the program in
268
+ * the output, refused in a plain query) and the recursive `select`
269
+ * (bound variable names only — the creation quarantine).
122
270
  */
123
- declare function query<Rels extends SchemaRelations, const R extends QueryBuild>(theory: Schema<Rels>, build: ($: Scope<Rels>) => R): Query<Rels, RowOf<R["select"]>, BuildParams<R>>;
271
+ interface RawChain {
272
+ match(relation: MatchOwner, bindings: Readonly<Record<string, unknown>>): RawChain;
273
+ where(cond: AnyCond): RawChain;
274
+ idb(target: RecRef<string, ParamsRecord>, ...vars: readonly Var<string>[]): RawChain;
275
+ select(...entries: readonly SelectEntry[]): RuleValue<never, never>;
276
+ }
277
+ /** The runtime rule-builder shape beneath every typed scope. */
278
+ interface RawScope extends TermOps {
279
+ match(relation: MatchOwner, bindings: Readonly<Record<string, unknown>>): RawChain;
280
+ }
281
+ /** Which rule family a chain builds — gates `idb` and the recursive select — plus the schema's runtime class map (the join judge's authority). */
282
+ type ChainContext = {
283
+ readonly classes: SchemaClasses;
284
+ } & ({
285
+ readonly kind: "query";
286
+ } | {
287
+ readonly kind: "rec";
288
+ readonly self: RecData;
289
+ } | {
290
+ readonly kind: "output";
291
+ readonly program: ProgramState;
292
+ });
293
+ /** Builds one runtime rule-builder over a context. */
294
+ declare function makeRawScope(context: ChainContext): RawScope;
295
+ /** Builds one output-rule builder over a program's recs. */
296
+ declare function makeOutputRuleScope<Rels extends SchemaRelations, Classes extends SchemaClasses>(program: ProgramState): OutputRuleScope<Rels, Classes>;
297
+ /** One program's build-time registry: its recs in declaration order (sealed when the output is declared) and the theory's class map. */
298
+ interface ProgramState {
299
+ readonly recs: RecData[];
300
+ readonly classes: SchemaClasses;
301
+ sealed: boolean;
302
+ }
303
+ /** Assembles one typed query value (rules already completed). */
304
+ declare function makeQuery<Rels extends SchemaRelations, Row, P extends ParamsRecord, Classes extends SchemaClasses>(theory: Schema<Rels, Classes>, recs: readonly RecData[], rules: readonly RuleData[]): Query<Rels, Row, P, Classes>;
305
+ /**
306
+ * Opens a query over a schema: `query(S).rule(r => ...)`. Each `.rule`
307
+ * adds one conjunctive rule; multiple rules are the set union (answers are
308
+ * SETS — no order or limit exists anywhere; hosts sort). The schema's
309
+ * law-computed class map rides into every rule builder — the join walls
310
+ * compare class names off it, at the type level and at construction alike.
311
+ */
312
+ declare function query<Rels extends SchemaRelations, Classes extends SchemaClasses>(theory: Schema<Rels, Classes>): QueryStart<Rels, Classes>;
124
313
  /**
125
314
  * Tags one host literal at a FIELD position (atom bindings): the field's
126
- * structural type directs the tag, never a guess. At an interval field a
315
+ * structural kind directs the tag, never a guess. At an interval field a
127
316
  * bigint literal tags as the ELEMENT type — the IR's membership typing
128
317
  * rule (point membership), an interval-shaped literal as the interval
129
- * (value equality). A closed-reference literal is its branded id, tagged
130
- * u64 after a roster re-verification (queries cross ids, never handle
131
- * names).
318
+ * (value equality). A closed-reference literal is its bare handle id,
319
+ * tagged u64 after a roster verification.
320
+ */
321
+ declare function taggedLiteral(context: string, field: AnyField, value: unknown): TaggedValue;
322
+ /**
323
+ * Tags one host literal at a COMPARISON or PARAM position, where the
324
+ * SIBLING anchors the type: a measure sibling is u64, an interval-field
325
+ * sibling contributes its element domain (so both a point literal in
326
+ * `covers` and a `span` literal in `allen` tag correctly), a scalar
327
+ * sibling its own type. At `pointIn` the operand order is interval-left,
328
+ * point-right (`ir::CmpOp::PointIn`), so an interval-shaped literal
329
+ * beside a scalar element-typed sibling is the LEGAL lhs of
330
+ * `covers(span(...), t)` and tags as the interval of the sibling's
331
+ * element domain; under every other operator an interval shape against a
332
+ * scalar sibling stays refused (the engine's IllegalComparison — the
333
+ * bug-hunt fix, preserved op-aware).
132
334
  */
133
- declare function taggedLiteral(context: string, field: FieldData, value: unknown): TaggedValue;
335
+ declare function taggedCmpLiteral(context: string, sibling: AnyField | "measure", value: unknown, op: CmpKind | "binding"): TaggedValue;
134
336
  /**
135
337
  * Lowers a query value to the bridge's `ProgramIr` — pure and stable: the
136
- * declared predicates in declaration order (`PredId` = index), the output
137
- * predicate (built from `rules` + `select`) appended last. Relations lower
138
- * by declaration ordinal, the law the engine's own manifest pins;
139
- * `db.prepare` re-verifies the alignment against the live manifest before
140
- * sending.
338
+ * recs in declaration order (`PredId` = index), the output predicate
339
+ * (rules + head) appended last. Relations lower by declaration ordinal,
340
+ * the law the engine's own manifest pins; `db.prepare` re-verifies the
341
+ * alignment against the live manifest before sending. Every registered
342
+ * param must carry a field anchor by now — an unanchorable param (its
343
+ * every use beside a literal) is refused here, naming it.
141
344
  */
142
345
  declare function lowerQuery(q: AnyQuery): ProgramIr;
143
- export type { AnyQuery, BuildParams, Query, QueryBuild, QueryData, QueryParams, QueryRow, Scope, SelectColumn, SelectEntryData };
144
- export { lowerQuery, query, taggedLiteral };
346
+ export type { AnyQuery, AnyRuleValue, HeadFieldsOf, HeadOf, HeadShape, OutputRuleChain, OutputRuleScope, ParamsOf, ProgramState, Query, QueryData, QueryParams, QueryRelation, QueryRow, QueryRuleChain, QueryRuleScope, QueryStart, RawChain, RawScope, RecRef, RecRuleChain, RecRuleScope, RowOf, RuleValue, TermOps };
347
+ export { lowerQuery, makeOutputRuleScope, makeQuery, makeRawScope, query, taggedCmpLiteral, taggedLiteral };
145
348
  //# sourceMappingURL=lower.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lower.d.ts","sourceRoot":"","sources":["../../src/query/lower.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,YAAY,CAAA;AACtE,OAAO,KAAK,EAQX,SAAS,EAET,WAAW,EAEX,MAAM,YAAY,CAAA;AAEnB,OAAO,KA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