Semantic Completeness for Correct Maintenance: A Strict Hierarchy of Typing and Inheritance
Correct maintenance keeps required answers, excludes invalid states, and minimizes separately supplied answers and lifetime semantic edits (changes to required answers) across mechanisms. Banning semantic completeness makes correct maintenance formally impossible. We give exact minima for what code or tooling must supply when a language cannot directly derive identity, contract membership, or implementation connections. Same-looking meanings that need different answers require stable keys; graph coloring gives the fewest key values. Contract membership does not supply code. One contract parent suffices exactly when membership groups fit a tree; multiple parents derive any finite membership map. For distinct, independently changing implementations, one chain of providers per class leaves a minimum number of required implementation-class connections outside inheritance: the ancestry gap. It is zero exactly when their groups fit a tree. No correct repair inheriting only required implementations can beat this bound, even with reparenting, infinite helpers, arbitrary delegation, or generators. Multiple parents derive every finite required relation with no connections outside. Fitting a tree now does not make future updates optimal. We construct a history in which every snapshot fits a tree, yet each one-parent update forces a parent-edge change, forwarding, or pair removal before or after it. Batching changes how these obligations are met, not their minimum. Of 20 preselected, pinned Python source-class maps, 18 have positive gaps. After excluding order-sensitive lookups, a SQLAlchemy component has gap 520 with no lookup conflict. Lean 4 checks the proofs and certificate bounds; independent replay checks repairs. Source extraction remains external.
Authors
- Tristan Simas (ORCID: https://orcid.org/0000-0002-6526-3149)
Institutions
- McGill University (CA)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-10-05
- DOI
- https://doi.org/10.5281/zenodo.22782875
- Primary Topic
- Software Engineering Research
- Type
- article
- Field-Weighted Citation Impact
- 0.00