-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathhost_interfaces.yaml
More file actions
527 lines (523 loc) · 36.6 KB
/
Copy pathhost_interfaces.yaml
File metadata and controls
527 lines (523 loc) · 36.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
# host_interfaces.yaml — closed-set SSOT for deftype/reify/extend-type host
# supertype markers (ADR-0102, F-013).
#
# FRONTIER (ADR-0136): this file IS the R2 closed set — every row is a
# polymorphism seam clojure.core itself dispatches on (supertype / class
# facet), admitted by rule R2 of the host-frontier procedure (ROADMAP §6.5).
# A name that fails R2 does not belong here: value-semantic java.* classes
# are R3 (compat_tiers.yaml); artifact/reflection/Compiler names are Tier D.
#
# These are the host-interface names cljw recognises in the deftype/reify/
# extend-type impl-spec head position. They are MARKER NAMES that select a
# dispatch family, NOT real host classes (ADR-0059/AD-003 — cljw has no JVM
# Class) and NOT cljw protocol Vars (a defprotocol name resolves through the
# ordinary `.protocol` path and needs no row here).
#
# This file is the reviewable SSOT-of-record. The single in-code read point is
# `src/runtime/host_interface.zig` (a StaticStringMap). `scripts/check_host_interface.sh`
# (gate G4) enforces:
# (i) set-bound — every name recognised in host_interface.zig has a row here.
# (ii) over-claim — every `recognised: true` row is actually in the code table;
# every `status: wired` method names a `wires_to` (no floating wire).
#
# `derives_from` materializes the "is this a language-defined supertype"
# judgement ONCE, in-repo (with ~/Documents/OSS/clojure as evidence), so the gate
# is reproducible and never re-derives from the mutable pinned clone. The closed
# set is enumerated up-front (網羅, F-013); impl is wired incrementally — a row
# with `recognised: false` is the planned closed set, not yet in code.
#
# 網羅 applies to these ROWS (cheap — no impl); eager impl loading is the D-277
# binary/startup concern, deliberately NOT done here.
interfaces:
# --- Object: recognised now (D-275 slice 1) ---
- name: Object
aliases: [java.lang.Object]
derives_from: "java.lang.Object — clj universal supertype; a legal deftype/reify supertype for toString/equals/hashCode overrides (Clojure, stable across versions)."
tier: A
recognised: true
note: >-
The deftype/reify SUPERTYPE-marker facet of Object. Distinct from the
`compat_tiers.yaml host_classes` java.lang.Object row, which is the CLASS
facet (instance?/class via class_name.zig) — the two facets coexist (one
SSOT per concern, ADR-0102). `(extend-type Object …)` as the default-for-
all-types TARGET is D-276 (a separate dispatch tier, not yet wired).
methods:
toString: { status: wired, wires_to: "str/print dispatch consult (runtime/print.zig writeStrValue → dispatchOrNull Object/toString)" }
equals: { status: wired, wires_to: "= consult (runtime/equal.zig typedInstanceEqual → dispatchOrNull Object/equals; same-type only, cross-type is D-280d8)" }
hashCode: { status: wired, wires_to: "hash consult (lang/primitive/core.zig hashFn → dispatchOrNull Object/hashCode; top-level (hash inst), nested-in-collection is a residual)" }
hasheq: { status: wired, wires_to: "hash consult — clj (hash x) prefers hasheq (D-280d5); hashFn consults Object/hasheq before hashCode" }
equiv: { status: wired, wires_to: "= consult — clj collection value-equality (D-280d8); valueEqual consults Object/equiv before equals (same-type)" }
# --- clojure.lang.* deftype/reify supertype family (the closed set; 網羅) ---
# recognised: false → enumerated as the planned closed set, NOT yet in the
# host_interface.zig table. D-275 slices 3+ flip each to recognised: true by
# adding the code-table row + wiring its methods to the modeled protocol named
# in modeled_as (gate (ii) then checks that protocol is real). Most bare
# spellings already resolve as cljw protocol Vars (no row needed); these rows
# are the `clojure.lang.`-QUALIFIED spellings + the unmodeled families.
- name: clojure.lang.IDeref
derives_from: "clojure.lang.IDeref — deftype/reify supertype for deref-able refs (Clojure, stable)."
tier: A
recognised: true
kind: protocol_remap
modeled_as: "IDeref (defprotocol IDeref (-deref [o]), D-307)"
note: "D-307: deref → IDeref/-deref. `deref`/`@` (stm.zig derefFn) consult IDeref/-deref for a typed_instance/reified_instance (the IObj precedent). core.memoize's RetryingDelay implements it."
methods:
deref: { status: wired, wires_to_protocol: IDeref, wires_to_method: "-deref" }
- name: clojure.lang.IPending
derives_from: "clojure.lang.IPending — isRealized marker for deref-able refs (Clojure, stable)."
tier: A
recognised: true
kind: protocol_remap
modeled_as: "IPending (defprotocol IPending (-realized? [o]), D-307)"
note: "D-307: isRealized → IPending/-realized?. `realized?` (stm.zig realizedQFn) consults it for a typed_instance. core.memoize's RetryingDelay implements it alongside IDeref."
methods:
isRealized: { status: wired, wires_to_protocol: IPending, wires_to_method: "-realized?" }
- name: clojure.lang.Counted
aliases: [Counted]
derives_from: "clojure.lang.Counted — O(1) count marker; a base interface clj's IPersistentMap/Vector extend, declarable directly as a deftype supertype (Clojure, stable)."
tier: A
recognised: true
kind: protocol_remap
modeled_as: "count → IPersistentCollection/-count (cljw has no separate Counted protocol; count dispatches via IPersistentCollection)"
note: "D-306: recognised as a DIRECT deftype supertype (core.cache's defcache names it). Qualified spelling only. Load-level: registers count under IPersistentCollection; whether core `count` consults a typed_instance's -count is the functional follow-up shared with the IPersistentMap family."
methods:
count: { status: wired, wires_to_protocol: IPersistentCollection, wires_to_method: "-count" }
- name: clojure.lang.IFn
derives_from: "clojure.lang.IFn — invocable instance (Clojure, stable)."
tier: A
recognised: true
kind: protocol_remap
modeled_as: "IFn (defprotocol IFn (-invoke [f]), D-280d6 — load-level)"
note: "Registers invoke→IFn/-invoke (multi-arity via D-279). Making `(inst args)` call -invoke is a call-path follow-up (tree_walk/vm call switch)."
methods:
invoke: { status: wired, wires_to_protocol: IFn, wires_to_method: "-invoke" }
applyTo: { status: wired, wires_to_protocol: IFn, wires_to_method: "-apply-to" }
- name: clojure.lang.IPersistentVector
derives_from: "clojure.lang.IPersistentVector — persistent vector contract (Clojure, stable); as a deftype SUPERTYPE-WITH-METHODS (the D-400 composite), pulled by instaparse's AutoFlattenSeq (ADR-0134)."
tier: A
recognised: true
kind: protocol_remap
modeled_as: "grouped family remap (assocN/length → Associative/-assoc, IPersistentCollection/-count; + the inherited Associative/Stack/Reversible/Indexed/Seqable/ILookup/Object surface)"
note: "extend-protocol TO clojure.lang.IPersistentVector still distributes over the native vector tag (nativeExtendTags precedes the remap check); this row covers the deftype-supertype position only."
methods:
count: { status: wired, wires_to_protocol: IPersistentCollection, wires_to_method: "-count" }
length: { status: wired, wires_to_protocol: IPersistentVector, wires_to_method: "-length" }
cons: { status: wired, wires_to_protocol: IPersistentCollection, wires_to_method: "-cons" }
empty: { status: wired, wires_to_protocol: IPersistentCollection, wires_to_method: "-empty" }
assoc: { status: wired, wires_to_protocol: Associative, wires_to_method: "-assoc" }
assocN: { status: wired, wires_to_protocol: IPersistentVector, wires_to_method: "-assoc-n" }
containsKey: { status: wired, wires_to_protocol: Associative, wires_to_method: "-contains-key?" }
entryAt: { status: wired, wires_to_protocol: Associative, wires_to_method: "-entry-at" }
valAt: { status: wired, wires_to_protocol: ILookup, wires_to_method: "-lookup" }
seq: { status: wired, wires_to_protocol: Seqable, wires_to_method: "-seq" }
nth: { status: wired, wires_to_protocol: Indexed, wires_to_method: "-nth" }
peek: { status: wired, wires_to_protocol: IPersistentStack, wires_to_method: "-peek" }
pop: { status: wired, wires_to_protocol: IPersistentStack, wires_to_method: "-pop" }
rseq: { status: wired, wires_to_protocol: Reversible, wires_to_method: "-rseq" }
hashCode: { status: wired, wires_to: "Object method-family (hash consult, D-280d1)" }
hasheq: { status: wired, wires_to: "Object method-family (hash consult prefers hasheq, D-280d5)" }
equals: { status: wired, wires_to: "Object method-family (= consult, D-280d1)" }
equiv: { status: wired, wires_to: "Object method-family (= consult, D-280d8)" }
toString: { status: wired, wires_to: "Object method-family (str/print consult, D-275)" }
- name: java.lang.CharSequence
aliases: [CharSequence]
derives_from: "java.lang.CharSequence — readable character sequence (Java, stable); instaparse's Segment declares the bare name."
tier: A
recognised: true
kind: protocol_remap
modeled_as: "CharSequence (defprotocol CharSequence (-cs-length/-char-at/-sub-sequence), registration-level; toString → the Object method-family)"
note: "Bare + qualified spellings; trailing identity remap entries stop the second-pass re-route (the IPersistentSet -disjoin precedent)."
methods:
length: { status: wired, wires_to_protocol: CharSequence, wires_to_method: "-cs-length" }
charAt: { status: wired, wires_to_protocol: CharSequence, wires_to_method: "-char-at" }
subSequence: { status: wired, wires_to_protocol: CharSequence, wires_to_method: "-sub-sequence" }
toString: { status: wired, wires_to: "Object method-family (str/print consult, D-275)" }
- name: java.lang.Comparable
derives_from: "java.lang.Comparable — natural-ordering participant (Java, stable; clj RT.compare casts to it)."
tier: A
recognised: true
kind: protocol_remap
modeled_as: "Comparable (compareTo → Comparable/-compare-to, D-400 family)"
note: "Both the qualified and bare spellings route here (instaparse declares the qualified form). `compare` (math.zig) consults Comparable/-compare-to for a typed_instance before native valueCompare."
methods:
compareTo: { status: wired, wires_to_protocol: Comparable, wires_to_method: "-compare-to" }
- name: clojure.lang.IKVReduce
derives_from: "clojure.lang.IKVReduce — key/value reduce participant (Clojure, stable)."
tier: A
recognised: true
kind: protocol_remap
modeled_as: "IKVReduce (kvreduce → IKVReduce/-kv-reduce, D-400)"
note: "reduce-kv (core.clj) consults IKVReduce/-kv-reduce via rt/__kv-reduce-or before its keys fallback, so a deftype declaring kvreduce drives reduce-kv exactly as on the JVM."
methods:
kvreduce: { status: wired, wires_to_protocol: IKVReduce, wires_to_method: "-kv-reduce" }
- name: clojure.lang.IBlockingDeref
derives_from: "clojure.lang.IBlockingDeref — timed blocking deref (Clojure, stable)."
tier: A
recognised: true
kind: protocol_remap
modeled_as: "IBlockingDeref (deref(ms,timeout-val) → IBlockingDeref/-blocking-deref, D-400)"
note: "The deref primitive's 3-arity (deref x ms timeout-val) dispatches it on deftypes; native future/promise take a timed wait."
methods:
deref: { status: wired, wires_to_protocol: IBlockingDeref, wires_to_method: "-blocking-deref" }
- name: clojure.lang.IObj
derives_from: "clojure.lang.IObj — metadata-carrying instance (Clojure, stable)."
tier: A
recognised: true
kind: protocol_remap
modeled_as: "IObj (defprotocol IObj (-meta [o]) (-with-meta [o m]), D-280d7 — load-level)"
note: "Registers meta→IObj/-meta, withMeta→IObj/-with-meta. meta/with-meta fns consulting these for a typed_instance is a follow-up."
methods:
withMeta: { status: wired, wires_to_protocol: IObj, wires_to_method: "-with-meta" }
meta: { status: wired, wires_to_protocol: IObj, wires_to_method: "-meta" }
- name: clojure.lang.IMeta
derives_from: "clojure.lang.IMeta — the read-only `meta` half of the metadata family; clj's IObj extends IMeta (Clojure, stable)."
tier: A
recognised: true
kind: protocol_remap
modeled_as: "IObj (the `meta` method shares IObj/-meta; cljw has no separate IMeta protocol)"
note: "D-271 / D-280d7: a deftype may declare IMeta SEPARATELY from IObj (instaparse's AutoFlattenSeq: IObj withMeta + IMeta meta). meta→IObj/-meta, mirroring IObj's meta. Load-level (registers; `meta` fn consulting -meta for a typed_instance is the IObj follow-up)."
methods:
meta: { status: wired, wires_to_protocol: IObj, wires_to_method: "-meta" }
- name: clojure.lang.ISeq
aliases: [ISeq]
derives_from: "clojure.lang.ISeq — a custom seq instance (first/next/more/cons); ISeq extends IPersistentCollection + Seqable (Clojure, stable)."
tier: A
recognised: true
kind: protocol_remap
modeled_as: "ISeq (-first/-rest/-next) + IPersistentCollection (-cons/-count/-empty) + Object/equiv + Seqable/-seq — the inherited-interface methods route to their existing cljw protocols"
note: "D-395 (D-271/D-280 family): a custom-seq deftype (instaparse's AutoFlattenSeq) declares first/next/more/cons + inherited count/empty/equiv/seq. Every target exists AND DISPATCHES on a typed_instance (first/next/more via the D-280d sequence.zig else-arms; cons/count/empty via IPersistentCollection; equiv via Object; seq via Seqable) — a REAL win, not load-level-only. `more` = clj's rest."
methods:
first: { status: wired, wires_to_protocol: ISeq, wires_to_method: "-first" }
next: { status: wired, wires_to_protocol: ISeq, wires_to_method: "-next" }
more: { status: wired, wires_to_protocol: ISeq, wires_to_method: "-rest" }
cons: { status: wired, wires_to_protocol: IPersistentCollection, wires_to_method: "-cons" }
count: { status: wired, wires_to_protocol: IPersistentCollection, wires_to_method: "-count" }
empty: { status: wired, wires_to_protocol: IPersistentCollection, wires_to_method: "-empty" }
equiv: { status: wired, wires_to: "Object method-family equiv (D-280d8 — clj collection =; ISeq inherits it from IPersistentCollection)" }
seq: { status: wired, wires_to_protocol: Seqable, wires_to_method: "-seq" }
- name: clojure.lang.Sequential
aliases: [Sequential]
derives_from: "clojure.lang.Sequential — zero-method order marker (Clojure, stable)."
tier: A
recognised: true
kind: marker
modeled_as: "Sequential (cljw's own `(defprotocol Sequential)`, core.clj:1715)"
note: "D-395: zero-method marker; canonical is the cljw `Sequential` protocol (NOT the full clojure.lang name) so a declaring deftype records protocol_impls[Sequential] and `sequential?` (declaresProtocol Sequential) + seq-style print answer true. class_name.zig already normalises clojure.lang.Sequential → Sequential at the class facet (ADR-0068 marker precedent)."
methods: {}
- name: clojure.lang.Indexed
aliases: [Indexed]
derives_from: "clojure.lang.Indexed — O(1) indexed access `(nth coll i)` (Clojure, stable)."
tier: A
recognised: true
kind: protocol_remap
modeled_as: "Indexed (defprotocol Indexed (-nth [c i]), core.clj:1680)"
note: "D-397: nth→Indexed/-nth; the 2-arity (i, not-found) impl shares -nth via D-279 multi-arity. `nthFn`'s else-arm already dispatches Indexed/-nth on a typed_instance (D-089 row 8.6 cycle 2) — a REAL win (nth routes to the deftype's impl). instaparse's AutoFlattenSeq declares it. D-419: clj Indexed extends Counted, so count under an Indexed header flattens to IPersistentCollection/-count (mirrors COUNTED)."
methods:
nth: { status: wired, wires_to_protocol: Indexed, wires_to_method: "-nth" }
count: { status: wired, wires_to_protocol: IPersistentCollection, wires_to_method: "-count" }
- name: clojure.lang.IReduceInit
derives_from: "clojure.lang.IReduceInit — internal-reduce contract `(reduce [coll f init])` (Clojure, stable)."
tier: A
recognised: true
kind: protocol_remap
modeled_as: "IReduce (defprotocol IReduce (-reduce [c f]), core.clj:1677 — arity-overloaded, collapses JVM's IReduce+IReduceInit per D-069)"
note: "D-399: reduce→IReduce/-reduce. `reduce`'s fast-path (higher_order.zig D-069) already dispatches -reduce on a typed_instance, so a custom reducible deftype reduces via its own impl — a REAL win. The 3-arg (self f init) impl shares -reduce via D-279 multi-arity."
methods:
reduce: { status: wired, wires_to_protocol: IReduce, wires_to_method: "-reduce" }
# --- editable / transient collection family (D-286, F-013 definition-derived) ---
# flatland.ordered drives this: OrderedSet declares IEditableCollection (the LOAD
# blocker) + IPersistentSet with clj-named methods (D-286b); the Transient* types
# declare the ITransient* family. All protocol_remap. LOAD-LEVEL: methods register
# + dispatch (D-286b dispatch verified); the native conj!/assoc!/persistent!/disj!
# + `into`/`-editable?` typed_instance consult is an off-critical-path follow-up
# (D-369). Both the bare simple name (deftype `:import`s + declares it bare) and the
# qualified spelling resolve to the same row (the bare alias covers set-bound).
- name: clojure.lang.IEditableCollection
aliases: [IEditableCollection]
derives_from: "clojure.lang.IEditableCollection — asTransient: a persistent coll that can produce a transient (Clojure, stable)."
tier: A
recognised: true
kind: protocol_remap
modeled_as: "IEditableCollection (defprotocol IEditableCollection (-as-transient [c]), D-286 — load-level)"
note: "Registers asTransient→IEditableCollection/-as-transient. `transient`/`into` consulting a typed_instance's -as-transient is the off-critical-path follow-up D-369."
methods:
asTransient: { status: wired, wires_to_protocol: IEditableCollection, wires_to_method: "-as-transient" }
- name: clojure.lang.ITransientCollection
aliases: [ITransientCollection]
derives_from: "clojure.lang.ITransientCollection — conj!/persistent!: the base transient mutation interface (Clojure, stable)."
tier: A
recognised: true
kind: protocol_remap
modeled_as: "ITransientCollection (defprotocol ITransientCollection (-conj! [c x]) (-persistent! [c]), D-286 — load-level)"
note: "conj→ITransientCollection/-conj!, persistent→ITransientCollection/-persistent!. The conj!/persistent! fns consulting a typed_instance is the D-369 follow-up."
methods:
conj: { status: wired, wires_to_protocol: ITransientCollection, wires_to_method: "-conj!" }
persistent: { status: wired, wires_to_protocol: ITransientCollection, wires_to_method: "-persistent!" }
- name: clojure.lang.ITransientAssociative
aliases: [ITransientAssociative]
derives_from: "clojure.lang.ITransientAssociative — assoc! (extends ITransientCollection) (Clojure, stable)."
tier: A
recognised: true
kind: protocol_remap
modeled_as: "ITransientAssociative (defprotocol ITransientAssociative (-assoc! [c k v]), D-286 — load-level)"
note: "assoc→ITransientAssociative/-assoc!; conj/persistent inherit ITransientCollection targets."
methods:
assoc: { status: wired, wires_to_protocol: ITransientAssociative, wires_to_method: "-assoc!" }
conj: { status: wired, wires_to_protocol: ITransientCollection, wires_to_method: "-conj!" }
persistent: { status: wired, wires_to_protocol: ITransientCollection, wires_to_method: "-persistent!" }
- name: clojure.lang.ITransientMap
aliases: [ITransientMap]
derives_from: "clojure.lang.ITransientMap — without! + the grouped count/valAt/assoc/conj/persistent it inherits (Clojure, stable)."
tier: A
recognised: true
kind: protocol_remap
modeled_as: "ITransientMap (defprotocol ITransientMap (-without! [m k]), D-286 — load-level; other methods split to IPersistentCollection/ILookup/ITransientAssociative/ITransientCollection)"
note: "clj groups count/valAt/assoc/conj/without/persistent under ITransientMap; cljw splits them (TransientOrderedMap)."
methods:
count: { status: wired, wires_to_protocol: IPersistentCollection, wires_to_method: "-count" }
valAt: { status: wired, wires_to_protocol: ILookup, wires_to_method: "-lookup" }
assoc: { status: wired, wires_to_protocol: ITransientAssociative, wires_to_method: "-assoc!" }
conj: { status: wired, wires_to_protocol: ITransientCollection, wires_to_method: "-conj!" }
without: { status: wired, wires_to_protocol: ITransientMap, wires_to_method: "-without!" }
persistent: { status: wired, wires_to_protocol: ITransientCollection, wires_to_method: "-persistent!" }
- name: clojure.lang.ITransientSet
aliases: [ITransientSet]
derives_from: "clojure.lang.ITransientSet — disjoin!/contains + the grouped count/get/conj/persistent (Clojure, stable)."
tier: A
recognised: true
kind: protocol_remap
modeled_as: "ITransientSet (defprotocol ITransientSet (-disjoin! [s k]) (-tset-contains? [s k]), D-286 — load-level)"
note: "clj groups count/get/disjoin/conj/contains/persistent under ITransientSet; cljw splits them (TransientOrderedSet)."
methods:
count: { status: wired, wires_to_protocol: IPersistentCollection, wires_to_method: "-count" }
get: { status: wired, wires_to_protocol: ILookup, wires_to_method: "-lookup" }
disjoin: { status: wired, wires_to_protocol: ITransientSet, wires_to_method: "-disjoin!" }
conj: { status: wired, wires_to_protocol: ITransientCollection, wires_to_method: "-conj!" }
contains: { status: wired, wires_to_protocol: ITransientSet, wires_to_method: "-tset-contains?" }
persistent: { status: wired, wires_to_protocol: ITransientCollection, wires_to_method: "-persistent!" }
- name: clojure.lang.ITransientVector
aliases: [ITransientVector]
derives_from: "clojure.lang.ITransientVector — assocN!/pop! + the grouped conj/persistent/count/nth (Clojure, stable)."
tier: A
recognised: true
kind: protocol_remap
modeled_as: "ITransientVector (defprotocol ITransientVector (-assoc-n! [c i v]) (-pop! [c]), D-286 — load-level; definition-derived family completion, no ordered deftype-supertype section but :import-declared)"
methods:
assocN: { status: wired, wires_to_protocol: ITransientVector, wires_to_method: "-assoc-n!" }
pop: { status: wired, wires_to_protocol: ITransientVector, wires_to_method: "-pop!" }
conj: { status: wired, wires_to_protocol: ITransientCollection, wires_to_method: "-conj!" }
persistent: { status: wired, wires_to_protocol: ITransientCollection, wires_to_method: "-persistent!" }
count: { status: wired, wires_to_protocol: IPersistentCollection, wires_to_method: "-count" }
nth: { status: wired, wires_to_protocol: Indexed, wires_to_method: "-nth" }
- name: clojure.lang.IPersistentSet
aliases: [IPersistentSet]
derives_from: "clojure.lang.IPersistentSet — disjoin + the grouped cons/seq/empty/equiv/get/count a set impl declares (Clojure, stable)."
tier: A
recognised: true
kind: protocol_remap
note: "D-286b: IPersistentSet IS a cljw protocol Var, but routing the bare deftype-supertype spelling through protocol_remap translates ordered's clj-named methods (cons→-cons, seq→-seq, …) so they DISPATCH (verified: conj/seq/count on a deftype IPersistentSet). clj groups them under IPersistentSet; cljw splits like IPersistentMap. The `-disjoin` self entry is the identity passthrough."
methods:
disjoin: { status: wired, wires_to_protocol: IPersistentSet, wires_to_method: "-disjoin" }
cons: { status: wired, wires_to_protocol: IPersistentCollection, wires_to_method: "-cons" }
seq: { status: wired, wires_to_protocol: Seqable, wires_to_method: "-seq" }
empty: { status: wired, wires_to_protocol: IPersistentCollection, wires_to_method: "-empty" }
equiv: { status: wired, wires_to: "Object method-family equiv (D-280d8 — clj collection =)" }
get: { status: wired, wires_to_protocol: ILookup, wires_to_method: "-lookup" }
count: { status: wired, wires_to_protocol: IPersistentCollection, wires_to_method: "-count" }
# --- host_inert: no-JVM java interfaces (D-281 / ADR-0103) ---
# Recognised so collection deftypes declaring them for java-interop LOAD; their
# methods are inert (cljw has no java dispatch). `recognised: true`, `kind:
# host_inert`; the gate set-bound matches the bare alias the source uses.
- name: java.util.Map
aliases: [Map]
derives_from: "java.util.Map — java-interop map compat; recognised-but-inert in cljw (no JVM dispatch, ADR-0059/ADR-0103). priority-map declares it (bare `Map`, line 374)."
tier: A
recognised: true
kind: host_inert
note: "Methods (size/get/put/keySet/…) accepted-any-inert under the canonical name; never dispatched (no collision with -count/-lookup by construction). Accepted divergence: cljw does not implement java.util.Map dispatch."
methods: {}
- name: java.lang.Iterable
aliases: [Iterable]
derives_from: "java.lang.Iterable — java-interop iteration compat; recognised-but-inert (no JVM dispatch). priority-map declares it (bare `Iterable`, line 388)."
tier: A
recognised: true
kind: host_inert
note: "iterator accepted-inert; cljw iterates via seq, not java.util.Iterator."
methods: {}
- name: java.util.Set
aliases: [Set]
derives_from: "java.util.Set — java-interop set compat; recognised-but-inert (no JVM dispatch). flatland.ordered declares it (bare `Set`, set.clj:71)."
tier: A
recognised: true
kind: host_inert
note: "D-286a: the java.util collection interface family (Set/List/Collection alongside Map), all inert; cljw collection fns use the clojure.lang.* protocols."
methods: {}
- name: java.util.List
aliases: [List]
derives_from: "java.util.List — java-interop list compat; recognised-but-inert (no JVM dispatch)."
tier: A
recognised: true
kind: host_inert
methods: {}
- name: java.util.Collection
aliases: [Collection]
derives_from: "java.util.Collection — java-interop collection compat; recognised-but-inert (no JVM dispatch)."
tier: A
recognised: true
kind: host_inert
methods: {}
- name: java.io.Closeable
aliases: [Closeable]
derives_from: "java.io.Closeable — java-interop resource-close compat; recognised-but-inert (no JVM dispatch, ADR-0059/ADR-0103). clojure.tools.reader InputStreamReader declares it bare (`Closeable`, reader_types.clj:75) + implements `(close [this] (.close is))`."
tier: A
recognised: true
kind: host_inert
note: "close-with-body is accepted-and-recorded but never dispatched (host_inert skips the unwired-method guard, protocol.zig:229); the `.close`/`.read` on the wrapped InputStream resolve at EVAL, so the deftype loads. cljw has no java.io.InputStream dispatch (a separate eval-time gap if a real InputStreamReader is read)."
methods: {}
# --- Design caveats discovered driving clojure.data.priority-map (2026-06-07) ---
# Implementing the rows below requires TWO mechanisms beyond slice-1 recognition,
# scoped as prerequisites (do NOT rush — wrong dispatch is worse than a name_error):
#
# D-279 (PREREQUISITE): deftype methods need ARITY OVERLOAD. priority-map
# declares `(valAt [this k]) (valAt [this k nf])` — two arities of one method.
# cljw method_table holds one entry per (protocol, method) and dispatch picks
# one → arity_error on the other. Probed 2026-06-07.
#
# D-280: recognition must remap (clj-interface, clj-method) → (cljw-PROTOCOL,
# cljw-method), NOT just translate the method name. cljw dispatch matches on
# (protocol, method) STRICTLY (probed: a method registered under the wrong
# protocol is not found). priority-map declares `count` under IPersistentMap,
# but cljw's `count` dispatches via IPersistentCollection/-count — so the row
# must carry `wires_to_protocol` + `wires_to_method`, not a bare name map.
#
# These rows therefore stay recognised:false until D-279 + the D-280 remapping
# mechanism land. Each `methods:` entry below records the TARGET (cljw protocol +
# method) so the modeling is definition-derived, not rediscovered per library.
# --- clojure.data.priority-map closed set (the campaign driver, lines 265-450) ---
- name: clojure.lang.ILookup
aliases: [ILookup]
derives_from: "clojure.lang.ILookup — get/valAt lookup (Clojure, stable)."
tier: A
recognised: true
kind: protocol_remap
modeled_as: "ILookup (defprotocol ILookup (-lookup [c k]), core.clj:1558)"
note: "D-280b: valAt → ILookup/-lookup via macro rewrite. valAt 3-arity (not-found) collapses onto -lookup via D-279 multi-arity; the not-found arm is dormant until core get routes a 3-arity -lookup."
methods:
valAt: { status: wired, wires_to_protocol: ILookup, wires_to_method: "-lookup" }
- name: clojure.lang.IPersistentMap
aliases: [IPersistentMap]
derives_from: "clojure.lang.IPersistentMap — map ops; in clj it extends IPersistentCollection/Counted/Associative/ILookup, so impls group count/assoc/valAt/etc here (Clojure, stable)."
tier: A
recognised: true
kind: protocol_remap
note: "D-280c multi-target remap: clj groups these under IPersistentMap; cljw splits them across IPersistentCollection (-count/-cons/-empty), Associative (-assoc/-contains-key?), Seqable (-seq), IPersistentMap (-without). The macro regroups by target protocol. Object methods (hashCode/equals) + cljw-unmodeled (equiv/entryAt) that clj also allows here are NOT mapped → explicit feature_not_supported (slice 2 + D-280d), never silent drop."
methods:
count: { status: wired, wires_to_protocol: IPersistentCollection, wires_to_method: "-count" }
cons: { status: wired, wires_to_protocol: IPersistentCollection, wires_to_method: "-cons" }
empty: { status: wired, wires_to_protocol: IPersistentCollection, wires_to_method: "-empty" }
assoc: { status: wired, wires_to_protocol: Associative, wires_to_method: "-assoc" }
containsKey: { status: wired, wires_to_protocol: Associative, wires_to_method: "-contains-key?" }
seq: { status: wired, wires_to_protocol: Seqable, wires_to_method: "-seq" }
without: { status: wired, wires_to_protocol: IPersistentMap, wires_to_method: "-without" }
hashCode: { status: wired, wires_to: "Object method-family hashCode (D-280d1b — clj inherits Object under IPersistentMap; rewrite emits an Object section)" }
equals: { status: wired, wires_to: "Object method-family equals (D-280d1b — same-type; cross-type is D-280d8)" }
equiv: { status: wired, wires_to: "Object method-family equiv (D-280d8 — clj collection =; same-type, cross-type residual)" }
entryAt: { status: wired, wires_to_protocol: Associative, wires_to_method: "-entry-at" }
valAt: { status: wired, wires_to_protocol: ILookup, wires_to_method: "-lookup" }
# D-306: the collection-BASE interfaces clj's IPersistentMap decomposes into
# (IPersistentCollection / Counted / Associative / Seqable), declarable DIRECTLY
# as deftype supertypes — core.cache's `defcache` names them directly rather than
# grouping under IPersistentMap. Same (protocol, method) targets IPersistentMap
# already remaps to; these rows make the qualified spellings resolve. Bare
# Associative/Seqable/IPersistentCollection already resolve as cljw protocol Vars.
- name: clojure.lang.Associative
aliases: [Associative]
derives_from: "clojure.lang.Associative — assoc/containsKey/entryAt; a base interface clj's IPersistentMap extends, declarable directly (Clojure, stable)."
tier: A
recognised: true
kind: protocol_remap
modeled_as: "Associative (defprotocol Associative (-assoc …) (-contains-key? …) (-entry-at …))"
note: "D-306: direct-supertype spelling of the same Associative targets IPersistentMap remaps to. Load-level. D-419: clj Associative extends ILookup, so valAt under an Associative header flattens to ILookup/-lookup."
methods:
assoc: { status: wired, wires_to_protocol: Associative, wires_to_method: "-assoc" }
containsKey: { status: wired, wires_to_protocol: Associative, wires_to_method: "-contains-key?" }
entryAt: { status: wired, wires_to_protocol: Associative, wires_to_method: "-entry-at" }
valAt: { status: wired, wires_to_protocol: ILookup, wires_to_method: "-lookup" }
- name: clojure.lang.Seqable
aliases: [Seqable]
derives_from: "clojure.lang.Seqable — seq; the base of every persistent collection, declarable directly (Clojure, stable)."
tier: A
recognised: true
kind: protocol_remap
modeled_as: "Seqable (defprotocol Seqable (-seq [c]))"
note: "D-306: direct-supertype spelling. Load-level."
methods:
seq: { status: wired, wires_to_protocol: Seqable, wires_to_method: "-seq" }
- name: clojure.lang.IPersistentCollection
aliases: [IPersistentCollection]
derives_from: "clojure.lang.IPersistentCollection — count/cons/empty/equiv; the persistent-collection base clj's IPersistentMap/Vector/Set extend, declarable directly (Clojure, stable)."
tier: A
recognised: true
kind: protocol_remap
modeled_as: "IPersistentCollection (-count/-cons/-empty); equiv → Object method-family (clj collection value-equality)"
note: "D-306: direct-supertype spelling of the count/cons/empty targets IPersistentMap remaps to. equiv targets the Object method-family (same-type =, D-280d8). Load-level."
methods:
count: { status: wired, wires_to_protocol: IPersistentCollection, wires_to_method: "-count" }
cons: { status: wired, wires_to_protocol: IPersistentCollection, wires_to_method: "-cons" }
empty: { status: wired, wires_to_protocol: IPersistentCollection, wires_to_method: "-empty" }
equiv: { status: wired, wires_to: "Object method-family equiv (D-280d8 — clj collection =; same-type, cross-type residual)" }
- name: clojure.lang.IPersistentStack
aliases: [IPersistentStack]
derives_from: "clojure.lang.IPersistentStack — peek/pop (Clojure, stable)."
tier: A
recognised: true
kind: protocol_remap
modeled_as: "IPersistentStack (defprotocol IPersistentStack (-peek [c]) (-pop [c]), D-280d2; core.clj peek/pop consult it)"
methods:
peek: { status: wired, wires_to_protocol: IPersistentStack, wires_to_method: "-peek" }
pop: { status: wired, wires_to_protocol: IPersistentStack, wires_to_method: "-pop" }
- name: clojure.lang.Reversible
aliases: [Reversible]
derives_from: "clojure.lang.Reversible — rseq (Clojure, stable)."
tier: A
recognised: true
kind: protocol_remap
modeled_as: "Reversible (defprotocol Reversible (-rseq [c]), D-280d3)"
methods:
rseq: { status: wired, wires_to_protocol: Reversible, wires_to_method: "-rseq" }
- name: clojure.lang.Sorted
derives_from: "clojure.lang.Sorted — sorted-map nav (Clojure, stable)."
tier: A
recognised: true
kind: protocol_remap
modeled_as: "Sorted (defprotocol Sorted (-sorted-comparator [c]) (-entry-key [c e]) (-sorted-seq [c asc]) (-sorted-seq-from [c k asc]), D-280d4)"
note: "Load-level: registers + dispatches; subseq/rsubseq don't yet consult Sorted (functional follow-up). `-sorted-comparator` (not -comparator — that name is the sort predicate-coercion helper). Sorted's seq is 2-arity (this asc) — distinct from Seqable's; the SORTED remap is per-interface so no collision."
methods:
comparator: { status: wired, wires_to_protocol: Sorted, wires_to_method: "-sorted-comparator" }
entryKey: { status: wired, wires_to_protocol: Sorted, wires_to_method: "-entry-key" }
seq: { status: wired, wires_to_protocol: Sorted, wires_to_method: "-sorted-seq" }
seqFrom: { status: wired, wires_to_protocol: Sorted, wires_to_method: "-sorted-seq-from" }
- name: clojure.lang.IHashEq
aliases: [IHashEq]
derives_from: "clojure.lang.IHashEq — hasheq for = / hash (Clojure, stable)."
tier: A
recognised: true
kind: protocol_remap
modeled_as: "Object method-family hasheq (D-280d5; hashFn consults hasheq → hashCode → valueHash)"
methods:
hasheq: { status: wired, wires_to: "Object method-family hasheq (hashFn consult)" }
- name: clojure.lang.MapEquivalence
aliases: [MapEquivalence]
derives_from: "clojure.lang.MapEquivalence — zero-method marker: 'this map = other maps by value' (Clojure, stable)."
tier: A
recognised: true
kind: marker
note: "Zero-method marker (like Sequential). Recognised D-280a → records implements-marker; no method wiring."
methods: {}
- name: java.io.Serializable
derives_from: "java.io.Serializable — zero-method marker; priority-map notes 'serialization comes for free'. cljw has no JVM serialization, so this is a pure recognise-and-ignore marker."
tier: A
recognised: true
kind: marker
note: "Zero-method marker. Recognised D-280a so the deftype parses; cljw does not implement JVM serialization (AD candidate if a consumer probes it)."
methods: {}