计算机科学 > 程序设计语言
[提交于 2026年11月30日]
标题:CoreFi: A Core Calculus for Embedded Systems with Bounded Shared-Memory Channels
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:Embedded systems are built from components that compute on private state and communicate over bounded buffers in shared memory; since a component must keep running rather than wait on a slower one, a sender drops a message when the buffer is full, and a receiver blocks when it is empty. Process calculi, the established basis for reasoning about communicating systems, model these channels as bounded queues that block a sender when full. The code itself, written in a low-level language such as C, intertwines computation and communication so tightly that the protocol is hard to recover for verification. We present CoreFi, a core calculus for embedded systems with bounded shared-memory channels, derived from Communicating Sequential Processes (CSP), that addresses both. Our channel semantics is faithful to embedded practice, and we extend CSP's abstract events to concrete computation events, calls to foreign functions, so that a component's program in CoreFi becomes an orchestration of its communication and computation events. Components are composed by the scheduling logic of the underlying kernel rather than by a parallel operator; we instantiate it on the verified microkernel seL4 and its MicroKit framework. Deadlock freedom and determinism are two fundamental properties of embedded systems, and we prove both for every well-formed system, that is, one whose communication dependencies are acyclic and whose guarded choices partition the state space. Separating computation from communication also separates local from global state change: computation events can be absorbed into big steps, and a refinement relation guarantees that trace properties proved on the smaller abstracted model hold of the complete one. We provide the formalisation and the proofs in Lean 4, assisted by a coding agent.
提交历史
来自:Yan Liu Dr.[v1] 2026年11月30日 星期一 08:23:56 UTC (89 KB)