Abstract I/O Specification


Willem Penninckx, Amin Timany, and Bart Jacobs: Abstract I/O Specification. In CoRR abs/1901.10541 (2019), January 2019.
Technical Report
Keywords: input/output, modular program verification, module specifications, separation logic
Abstract.

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.

The bibtex source for this publication:
@article{DBLP:journals/corr/abs-1901-10541,
  author    = {Willem Penninckx and
               Amin Timany and
               Bart Jacobs},
  title     = {Abstract {I/O} Specification},
  journal   = {CoRR},
  volume    = {abs/1901.10541},
  year      = {2019},
  url       = {http://arxiv.org/abs/1901.10541},
  archivePrefix = {arXiv},
  eprint    = {1901.10541},
  timestamp = {Sun, 03 Feb 2019 14:23:05 +0100},
  biburl    = {https://dblp.org/rec/bib/journals/corr/abs-1901-10541},
  bibsource = {dblp computer science bibliography, https://dblp.org}
}