arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 1705.06312cs.LO
收藏

匹配逻辑

Matching Logic

Grigore Rosu

摘要:

本文提出了匹配逻辑,一个一阶逻辑(FOL)的变种,通过模式和模式匹配来指定和推理结构。它的句子,模式,是由变量,符号,连接词和量词构成的,但功能和谓词符号之间没有区别。在模型中,模式计算到幂集域(与之匹配的一组值),而FOL中的函数和谓词映射到常规域。匹配逻辑统一地概括了几个对程序分析很重要的逻辑框架,例如:命题逻辑、代数规范、具有等式的FOL、模态逻辑和分离逻辑。模式可以在任何程序配置中的任何级别指定分离要求,而不仅仅是在堆或存储中,而不需要任何特殊的逻辑结构:模式匹配的本质是,如果两个结构作为模式的一部分进行匹配,那么它们只能在空间上分离。与FOL一样,匹配逻辑也可以被转化为具有相等性的纯谓词逻辑,同时承认它自己的健全和完整的证明系统。匹配逻辑的一个实际方面是,具有等式的FOL推理仍然是合理的,因此现成的证明器和SMT求解器可以用于匹配逻辑推理。匹配逻辑特别适合于对具有操作语义的程序设计语言中的程序进行推理,但不限于此。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑