Section: New Results
Software specification and verification
Formal reasoning about asymptotic complexity
Participants : Armaël Guéneau, Arthur Charguéraud, François Pottier.
For several years, Arthur Charguéraud and François Pottier have been investigating the use of Separation Logic, extended with Time Credits, as an approach to the formal verification of the time complexity of OCaml programs. An extended version of their work on the UnionFind algorithm has appeared in the Journal of Automated Reasoning . In this work, the complexity bounds that are established involve explicit constants: for instance, the complexity of find is .
Armaël Guéneau, who is supervised by Arthur Charguéraud and François Pottier, is working on relaxing this approach so as to use asymptotic bounds: e.g., the advertised complexity of find should be . The challenge is to give a formal account of the notation and of its properties and to develop techniques that make asymptotic reasoning as convenient in Coq as it seemingly is on paper.
For that purpose, this year, Armaël Guéneau developed two Coq libraries. A first library gives a formal definition of the notation, provides proofs for many commonly used lemmas, as well as a number of tactics that automate the application of these lemmas. A second library implements a simple yet very useful mechanism, allowing the user to delay and collect proof obligations in Coq scripts. Using these libraries, Armaël extended the CFML tool with support for making asymptotic time complexity claims as part of specifications. He developed tactics that perform (guided) inference and resolution of recursive equations for the cost of recursive programs.
Armaël evaluated this framework on several small-scale case studies, namely simple algorithms such as binary search, selection sort, and the Bellman-Ford algorithm. This work has been accepted for publication at the conference ESOP 2018.
Revisiting the CPS transformation and its implementation
Participant : François Pottier.
While preparing an MPRI lecture on the CPS transformation, François Pottier did a machine-checked proof of semantic correctness for Danvy and Filinski's properly tail-recursive, one-pass, call-by-value CPS transformation.
He proposed a new first-order, one-pass, compositional formulation of the transformation. He pointed out that Danvy and Filinski's simulation diagram does not hold in the presence of let and proved a slightly more complex diagram, which involves parallel reduction. He suggested representing variables as de Bruijn indices and showed that, thanks to state-of-the-art libraries such as Autosubst, this does not represent a significant impediment to formalization. Finally, he noted that, given this representation of terms, it is not obvious how to efficiently implement the transformation. To address this issue, he proposed a novel higher-order formulation of the CPS transformation, proved that it is correct, and informally argued that it runs in time .
This work has been submitted for publication in a journal.
Participant : Damien Doligez.
This year, Damien Doligez did maintenance work on Zenon: updating to the latest version of OCaml and fixing a few bugs. He also started work on adding a few minor features, such as inductive proofs for mutually inductive types.
Participants : Damien Doligez, Leslie Lamport [Microsoft Research] , Martin Riener [team VeriDis] , Stephan Merz [team VeriDis] .
Damien Doligez is head of the “Tools for Proofs” team in the Microsoft-Inria Joint Centre. The aim of this project is to extend the TLA+ language with a formal language for hierarchical proofs, formalizing Lamport's ideas , and to build tools for writing TLA+ specifications and mechanically checking the proofs.
Damien is still working on a new version of TLAPS and has started writing a formal description of the semantics of TLA+.