paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Matching Logic

匹配逻辑
LMCS vol.Volume 13, Issue 42017匹配度 4/10 · 该论文是程序验证/程序分析的形式化逻辑基础,能统一分离逻辑等,与静态分析和形式化验证相关;但完全不涉及 LLM/Agent、浮点程序分析或贝叶斯程序分析,未落在当前 PL+AI 交叉核心问题上,因此匹配度有限。引用 83 inbox
Grigore Rosu
dblp: 2026-09-10crossref: 2026-09-10arxiv: 2026-09-10

AI 速览

一句话:提出匹配逻辑,一种以模式与模式匹配统一刻画结构和推理的一阶逻辑变体,可泛化多种程序分析逻辑并支持 SMT 求解。

本文提出匹配逻辑(matching logic),一种用模式与模式匹配来规约和推理结构的一阶逻辑变体。其句子即模式,由变量、符号、连接词和量词构造,不区分函数与谓词符号;在模型中模式求值为幂集域,即所有匹配值的集合。它统一泛化了命题逻辑、代数规约、带等词的一阶逻辑、模态逻辑和分离逻辑,并能在任意程序配置的任意层次表达分离要求,无需专门构造。匹配逻辑可翻译为带等词的纯谓词逻辑,并具有可靠且完备的证明系统;由于等词推理保持可靠,现成证明器和 SMT 求解器可直接使用。它特别适合推理具有操作语义的程序语言,但不限于此。

问题
如何设计一种逻辑,既能以模式匹配方式统一描述和推理程序结构(包括堆/栈之外的分离性),又能继承一阶逻辑的可靠完备证明与 SMT 自动推理能力。
方法
提出匹配逻辑,将句子视为模式,允许变量、符号、连接词和量词,不区分函数与谓词;在模型中模式求值为幂集域,并给出到带等词纯谓词逻辑的翻译及可靠完备证明系统。
评估
评估以理论论证为主:展示其可翻译为带等词的谓词逻辑,具有可靠完备证明系统,且等词推理的可靠性使现成证明器和 SMT 求解器可被复用。
原文摘要(Abstract)

This paper presents matching logic, a first-order logic (FOL) variant for specifying and reasoning about structure by means of patterns and pattern matching. Its sentences, the patterns, are constructed using variables, symbols, connectives and quantifiers, but no difference is made between function and predicate symbols. In models, a pattern evaluates into a power-set domain (the set of values that match it), in contrast to FOL where functions and predicates map into a regular domain. Matching logic uniformly generalizes several logical frameworks important for program analysis, such as: propositional logic, algebraic specification, FOL with equality, modal logic, and separation logic. Patterns can specify separation requirements at any level in any program configuration, not only in the heaps or stores, without any special logical constructs for that: the very nature of pattern matching is that if two structures are matched as part of a pattern, then they can only be spatially separated. Like FOL, matching logic can also be translated into pure predicate logic with equality, at the same time admitting its own sound and complete proof system. A practical aspect of matching logic is that FOL reasoning with equality remains sound, so off-the-shelf provers and SMT solvers can be used for matching logic reasoning. Matching logic is particularly well-suited for reasoning about programs in programming languages that have an operational semantics, but it is not limited to this.

链接与引用

DOI 原文 · arXiv · PDF(开放获取) · DBLP

BibTeX
@article{Rosu17,
  title = {Matching Logic},
  author = {Grigore Rosu},
  journal = {Logical Methods in Computer Science},
  volume = {Volume 13, Issue 4},
  year = {2017},
  doi = {10.23638/lmcs-13(4:28)2017}
}