← All papers
First page of ALIEN: an Automatic Lean Verification Framework for UFO Ontological Models

ALIEN: an Automatic Lean Verification Framework for UFO Ontological Models

Stefano M. Nicoletti

cs.LO Oct 17, 2026 · v1 cs.PL cs.SE
Builds a Lean DSL and verified checker that certifies finite UFO ontology models against a Lean-encoded axiomatization, with Lean-proved cost bounds.
Foundational ontologies provide concepts and constraints for describing a domain with respect to its real-world semantics. The Unified Foundational Ontology (UFO) is one such ontology, and - through the years - has informed modelling languages, domain ontologies and attracted interest at NASA's Jet Propulsion Laboratory and ISO. Yet checking a concrete UFO model can require reasoning across possible situations and following dependencies between entities, making even small models difficult to assess by inspection. To address this, we present ALIEN, a domain-specific language and automatic verification framework for finite UFO models based on Lean. With ALIEN, modellers declare entities, worlds, and facts, and the tool checks them against the encoded UFO axioms. Successful checks produce reusable Lean certificates, while failures yield counterexamples and explanations in the model's own vocabulary. The implementation combines a verified checker with checked reuse of earlier certificates. We also prove polynomial bounds on its algorithmic work for a stated unit-cost model, by attaching counts to executable definitions and composing their bounds. These bounds are complemented by experimental evaluation of ALIEN - with a benchmark suite timing certification, diagnosis, and generated workloads - and regression tests. ALIEN thus provides a way to make UFO's formal commitments actionable: modellers develop and extend models with reusable proofs of conformance, benefitting from diagnostics to guide revision.

Checking whether a concrete model satisfies the Unified Foundational Ontology (UFO) means reasoning across possible worlds and dependencies between entities. Even small models are hard to assess by inspection.

ALIEN is a Lean DSL in which modellers declare worlds, entities and facts. These are compiled into finite relation tables and checked against 113 registered checks covering a Lean encoding of the UFO axioms (UFOAxioms4) in S5 modal logic. Proved soundness results turn successful Boolean checks into a Lean certificate, and certificates can be reused when a model is extended. On failure, the tool asks Lean to prove the axiom's negation and searches for explanatory counterexamples. Polynomial unit-cost bounds are proved by attaching operation counts to the executable definitions.

Figure 2: The declaration in FailedStudentEnrollment.lean L \boldsymbol{\exists} \boldsymbol{\forall} N and excerpts of its confirmed counterexample to (a10). The assignment identifies the entity and world for both missing classification alternatives and the supporting Individual fact. Repeated world prefixes and the suggestion text are omitted.

All 25 certifying declarations certify, 18 of them in under one second and the slowest at 127.4 s. All 6 counterexample cases are confirmed, and 4 of 5 source scenarios from the UFO reference paper are encoded. Certificate reuse showed no observed speedup over fresh checking, and the proved bounds are polynomial (e.g., 8367n^8 for the axiom checks).

Test groupCoverageResult
Source scenarios5 scenarios4 adapted; concept evolution unsupported
Certification25 declarationsAll certify; 0.515–127.4 s; 18 below 1 s
Counterexamples6 declarationsAll confirmed; 0.100–0.566 s
Certificate reuse3 pairsNo observed speedup over fresh checking
Formula agreement20,800 checksDiagnostics and checkers agree
Evaluation summary