arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 1901.10541cs.LOcs.PL
收藏

抽象I/O规范

Abstract I/O Specification

Willem Penninckx, Amin Timany, Bart Jacobs

摘要:

我们最近提出了一种基于将Petri网嵌入到分离逻辑中的程序交互(I/O)行为的规范和模块化形式化验证方法。虽然这种方法在程序可用的I/O API方面是可伸缩的和模块化的,使得能够将低级I/O动作组成高级I/O动作,并且使得能够实现方便的验证体验,但是它不支持涉及存储器操纵的高级I/O动作以及低级I/O动作。(例如缓冲I/O),或者实际上是纯粹通过内存操作实现的“虚拟I/O”动作。此外,它不允许将I/O规范重写为等效规范。在本文中,我们提出了一种改进的方法,确实有这些属性。其基本思想是将Petri网的库所集固定为分离逻辑断言集,从而充分利用分离逻辑的能力,以Petri网的形式抽象描述任意操作的规范,将操作组合成I/O规范,并对I/O规范进行等价推理。我们的改进解决了这个问题的理由选择的Petri网比其他形式主义,如一般的状态转换系统,因为它“提炼他们离开”到更重要的结构分离的连接和抽象的嵌套三元组。为了方便地处理输入操作,我们建议使用预言变量来消除它们的非确定性。我们通过一些示例程序来说明这种方法,其中包括一个使用I/O规范指定和验证的子例程作为通过共享内存进行通信的线程运行的程序。本文的理论和实例已经在Coq证明助手中使用Iris程序验证库进行了机器验证。

英文摘要:

We recently proposed an approach for the specification and modular formal verification of the interactive (I/O) behavior of programs, based on an embedding of Petri nets into separation logic. While this approach is scalable and modular in terms of the I/O APIs available to a program, enables composing low-level I/O actions into high-level ones, and enables a convenient verification experience, it does not support high-level I/O actions that involve memory manipulation as well as low-level I/O (such as buffered I/O), or that are in fact "virtual I/O" actions that are implemented purely through memory manipulation. Furthermore, it does not allow rewriting an I/O specification into an equivalent one. In this paper, we propose a refined approach that does have these properties. The essential insight is to fix the set of places of the Petri net to be the set of separation logic assertions, thus making available the full power of separation logic for abstractly stating an arbitrary operation's specification in Petri net form, for composing operations into an I/O specification, and for equivalence reasoning on I/O specifications. Our refinement resolves the issue of the justification of the choice of Petri nets over other formalisms such as general state transition systems, in that it "refines them away" into the more essential constructs of separating conjunction and abstract nested triples. To enable a convenient treatment of input operations, we propose the use of prophecy variables to eliminate their non-determinism. We illustrate the approach through a number of example programs, including one where subroutines specified and verified using I/O specifications run as threads communicating through shared memory. The theory and examples of the paper have been machine-checked using the Iris library for program verification in the Coq proof assistant.

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

↑