Julia Subtyping - a Rational Reconstruction
summary
Provides a precise formal definition of Julia’s subtype relation plus a reference implementation that logs and replays actual runtime subtype queries, validating behavior against real Julia code. Instrumentation runs 6,014,476 queries and finds 122 mismatches—120 are implementation bugs that get fixed, 2 remain under discussion. The spec encodes existential/forall handling, the two-stack search for normalization, the diagonal constraint for repeated type variables, and surfaces the exact design tradeoffs that explain surprising departures from semantic subtyping.
AI-written summary · about
