Kleene代数模理论
Kleene Algebra Modulo Theories
摘要:
带有测试的Kleene代数(KAT)提供了关于规则结构程序的可靠、完整和可判定的等式推理。自从NetKAT证明了KAT的扩展与领域特定的原语和额外的公理如何适用于计算机网络以来,对KAT的兴趣大大增加。不幸的是,通过添加自定义原语将KAT扩展到一个新的领域,证明其方程理论的合理性和完整性,并提出一个有效的实现仍然是专家的任务。深奥的元理论阻碍了KAT的潜力。我们提供了一个快速的路径,以“最小可行模型”的KAT,正式或通过我们的框架,Kleene代数模理论(KMT)的代码。给定原语和状态的概念,我们可以自动推导出相应的KAT的语义,证明其方程理论的声音和完整的跟踪语义(程序表示为状态的痕迹),并推导出一个基于规范化的决策过程的等价性检查。我们的框架是基于推回,概括最弱的前提条件,指定如何谓词和动作交互。我们提供了几个案例研究,显示跟踪理论的变体从文献(位向量,NetKAT)以及新的组合理论(产品,时序逻辑和集)。在无界状态下,我们得到了新的结果,推理单调递增,无界自然数。我们的OCaml实现与理论紧密匹配:用户使用模块系统定义和组合KAT。
英文摘要:
Kleene algebras with tests (KATs) offer sound, complete, and decidable equational reasoning about regularly structured programs. Interest in KATs has increased greatly since NetKAT demonstrated how well extensions of KATs with domain-specific primitives and extra axioms apply to computer networks. Unfortunately, extending a KAT to a new domain by adding custom primitives, proving its equational theory sound and complete, and coming up with an efficient implementation is still an expert's task. Abstruse metatheory is holding back KAT's potential. We offer a fast path to a "minimum viable model" of a KAT, formally or in code through our framework, Kleene algebra modulo theories (KMT). Given primitives and a notion of state, we can automatically derive a corresponding KAT's semantics, prove its equational theory sound and complete with respect to a tracing semantics (programs are denoted as traces of states), and derive a normalization-based decision procedure for equivalence checking. Our framework is based on pushback, a generalization of weakest preconditions that specifies how predicates and actions interact. We offer several case studies, showing tracing variants of theories from the literature (bitvectors, NetKAT) along with novel compositional theories (products, temporal logic, and sets). We derive new results over unbounded state, reasoning about monotonically increasing, unbounded natural numbers. Our OCaml implementation closely matches the theory: users define and compose KATs with the module system.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。