计算机科学 > 程序设计语言
[提交于 2026年11月30日]
标题:From Sequential to Dataflow: Formally-verified Compilation for Concurrent and Distributed Architectures
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:On serverless cloud platforms, an application consists of many functions that communicate through the network, which makes it hard to debug, monitor and verify. A growing line of work therefore lets developers write a sequential, imperative program and compiles it into a distributed application. The correctness of these compilers, however, rests on informal arguments, and a mechanized guarantee is hard to obtain: the compiled program runs concurrently but must keep the order of the updates to each state, it must not deadlock, and it may be run by many different executors. We implement a compiler from a sequential, imperative language with state, loops and tail recursion to a dataflow language, and verify it in Rocq. The compiler translates a program directly into a graph of nodes connected by channels: each state becomes a chain of channels that orders its updates, and each tail recursion becomes a loop in the graph that feeds the result of one round back as the argument of the next. To verify the compiler, we give both languages a semantics with interaction trees, derive weakest precondition calculi from these semantics, and show that every weakest precondition proved for the sequential program holds for its compiled graph. Our result is stated against a contract of graph execution, which fixes the order of calls and iterations, leaves every other firing free, and requires that the graph never gets stuck. It therefore holds for every executor that meets the contract. We show that a scheduler meets it under every schedule, and so does an executor without a scheduler, in which nodes fire in parallel as soon as their inputs hold data.
提交历史
来自:Carmine Abate[v1] 2026年11月30日 星期一 10:38:01 UTC (269 KB)