Fixed-Point Scaffolding in the Clef Programming Language

📅 2026-06-01
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the challenge of preserving and verifying structural correctness—such as dimensional consistency, stratification, escape properties, and numeric representations—during compilation of ML-family languages. To this end, it introduces an internal scaffolding mechanism based on fixed-point combinators, integrating closed negative types and fractional types to encode program semantic structure into MLIR intermediate representations at the middle end of compilation. Leveraging categorical constructions, the approach enables accompanying verification without requiring developers to explicitly engage with category theory, thereby ensuring structural integrity throughout the entire compilation pipeline. By exploiting MLIR’s dialect system, attribute infrastructure, and static single-assignment form, proof artifacts remain amenable to continuous toolchain validation as code is progressively lowered, achieving, for the first time, end-to-end verifiable preservation of structural properties.
📝 Abstract
For fans of Gabriel's "Worse is Better" it may be ironic that C++, by way of MLIR, serves as the scaffold for compiling an ML-family language whose correctness properties are structural. A crucial intersection in our Composer compiler initiates its lowering with a fixed-point combinator that preserves the dimensional, grade, escape, and numeric-representation structure from the Program Semantic Graph. And the MLIR that's witnessed from the PSG is no passive host. Its use of static single assignment, attribute system and dialects carry that structure materially. We show that our compiler middle end uses categorical construction for lowering code with companion verification to that strata: a functor from the compilation poset to a target category, subject to the compositionality equation. The grounding of our approach comes from three sources, each on its own algebraic object: Ohori's machine-code proof theory grounds the compilation axis, parametricity grounds the content at the base, and adjoint mode logic grounds the traversal between our verification tiers. To extend the thesis we introduce compact-closed negative and fractional types, and show the type machinery can be carried with preserved structure and realized through tooling MLIR provides. More broadly, the same fixed-point primitive that preserves types through compilation also supplies proof terms that can continue to be exercised in MLIR to verify its integrity as lowering proceeds through the pipeline. We argue that this foundation is a unique additional point anticipated by our framework that includes dimensional types, Tarau's groupoid, and cellular sheaves. Throughout, the formalism is instrumented as an internal scaffold: the abstractions support the compiler's mechanics, where a developer is never required to reach for category theory in order to rely on the guarantees the compiler provides.
Problem

Research questions and friction points this paper is trying to address.

structural correctness
compilation
type preservation
program semantics
verification
Innovation

Methods, ideas, or system contributions that make the work stand out.

fixed-point combinator
MLIR dialects
categorical compilation
dimensional types
proof-carrying code
🔎 Similar Papers
No similar papers found.
H
Houston Haynes
SpeakEZ Technologies, Asheville, NC