Publication2 Dec 2026 · Yan Liu and Alex Potanin
CoreFi is on arXiv, and its Lean 4 proofs are open source
The core calculus behind Fiducia now has a paper you can read and a mechanisation you can build.
Two things became public this week. The paper CoreFi: A Core Calculus for Embedded Systems with Bounded Shared-Memory Channels is on arXiv as arXiv:2611.40661. And fidus, the Lean 4 formalisation that the paper's theorems are checked in, is open source under the Apache License 2.0.
What the paper is about
Embedded systems are built from components that compute on private state and talk over bounded buffers in shared memory. A component has to keep running rather than wait on a slower one, so a sender drops a message when the buffer is full, and a receiver blocks when it is empty. Process calculi usually model such channels as queues that block the sender, and C code mixes computation and communication so closely that the message-passing protocol is hard to recover for verification.
CoreFi is a core calculus, derived from CSP, that addresses both:
- Channels as embedded practice has them. A full buffer drops, an empty one blocks.
- Computation events. CSP's abstract events are extended with calls to foreign functions, so a component's program is an orchestration of its communication and computation events.
- Composition by the kernel's scheduling rule. Components are composed by one rule that says when a component runs its body next, not by a parallel operator. The paper instantiates it on the verified microkernel seL4 and its Microkit framework.
- Deadlock freedom and determinism. Both are proved for every well-formed system: one whose communication dependencies are acyclic and whose guarded choices partition the state space.
- A smaller model of global behaviour. Computation events change only local state, so they can be absorbed into big steps. A refinement relation guarantees that trace properties proved on the abstracted state space hold of the complete one.
fidus: the proofs, in Lean 4
Fīdūcia is Latin for trust, and fīdus for trustworthy. The fidus repository is where the trust is earned by proof. It has no sorry, and its main theorems depend only on Lean's standard axioms. It mechanises:
- The calculus. Syntax, the local and global labelled transition systems, and well-formedness, with preservation, deadlock freedom and determinism proved over the global semantics on Microkit.
- Microkit. Entry points, the scheduler, protected procedure calls and notifications, including that no wake-up is lost.
- The control-flow graph. Each entry point's body is flattened to a graph that is bisimilar to its local semantics.
- The runtime ring buffer. The buffer fic's runtime uses for an async channel is specified as a bounded FIFO queue and proved linearizable, with fic's index arithmetic translated from its Rust source by Aeneas.
The translation to UPPAAL's timed automata is not mechanised yet. The repository stands alone and will keep developing beyond the paper. To build it, install elan and run:
git clone https://github.com/fiducia-lang/fidus cd fidus lake exe cache get # mathlib's prebuilt files lake build CoreFi
Cite
@misc{liu2026corefi,
title = {CoreFi: A Core Calculus for Embedded Systems
with Bounded Shared-Memory Channels},
author = {Liu, Yan and Potanin, Alex},
year = {2026},
eprint = {2611.40661},
archivePrefix = {arXiv},
primaryClass = {cs.PL}
}
Questions and issues are welcome on GitHub. All our papers are listed under Publications.