vix.ing · top · new · best · stats · spec

A Calculus of Inheritance

2026/02/18 by Bo Yang · 2 voices
Computer Science · #cs.PL #cs.SE

paper · pdf

arxiv published 2026/02/18 · arxiv updated 2026/07/04

Abstract

Just as the λ-calculus uses three primitives (abstraction, application, variable) as the foundation of functional programming, inheritance-calculus uses three primitives (mixin, definition, reference) as the foundation of declarative programming. By unifying modules, classes, objects, methods, fields, and locals under a single mixin abstraction, the calculus models inheritance simply as set union. Consequently, composition is inherently commutative, idempotent, and associative, structurally eliminating the multiple-inheritance linearization problem. Its semantics is first-order, denotational, and evaluated by tabling, even for cyclic inheritance hierarchies. Inheritance-calculus is distilled from MIXINv2, a practical implementation in which the same code acts as different function colors; ordinary arithmetic yields the relational semantics of logic programming; \mathttthis resolves to multiple targets; and programs are immune to nonextensibility in the sense of the Expression Problem. This makes inheritance-calculus strictly more expressive than the λ-calculus in both common sense and Felleisen's sense.

Citations

Discussions