skip to main content
10.1145/3297280.3297495acmconferencesArticle/Chapter ViewAbstractPublication PagessacConference Proceedingsconference-collections
research-article
Best Paper

Logic against ghosts: comparison of two proof approaches for a list module

Published:08 April 2019Publication History

ABSTRACT

Modern verification projects continue to offer new challenges for formal verification. One of them is the linked list module of Contiki, a popular open-source operating system for the Internet of Things. It has a rich API and uses a particular list representation that make it different from the classical linked list implementations. Being widely used in the OS, the list module is critical for reliability and security. A recent work verified the list module using ghost arrays.

This article reports on a new verification effort for this module. Realized in the Frama-C/Wp tool, the new approach relies on logic lists. A logic list provides a convenient high-level view of the linked list. The specifications of all functions are now proved faster and almost all automatically, only a small number of auxiliary lemmas and a couple of assertions being proved interactively in Coq. The proposed specifications are validated by proving a few client functions manipulating lists. During the verification, a more efficient implementation for one function was found and verified. We compare the new approach with the previous effort based on ghost arrays, and discuss the benefits and drawbacks of both techniques.

References

  1. Andrew W. Appel. 2011. Verified Software Toolchain. In Programming Languages and Systems (ESOP) (March 26-April 3) (LNCS), Gilles Barthe (Ed.), Vol. 6602. Springer, 1--17. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Andrew W. Appel. 2015. Verification of a Cryptographic Primitive: SHA-256. ACM Trans. Program. Lang. Syst. 37, 2, Article 7 (April 2015), 7:1--7:31 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Andrew W. Appel, Robert Dockins, Aquinas Hobor, Lennart Beringer, Josiah Dodds, Gordon Stewart, Sandrine Blazy, and Xavier Leroy. 2014. Program Logics for Certified Compilers. Cambridge University Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Patrick Baudin, Pascal Cuoq, Jean-Christophe Filliâtre, Claude Marché, Benjamin Monate, Yannick Moy, and Virgile Prevosto. 2018. ACSL: ANSI/ISO C Specification Language. http://frama-c.com/acsl.htmlGoogle ScholarGoogle Scholar
  5. Y. Bertot and P. Castéran. 2004. Interactive Theorem Proving and Program Development. Springer. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Allan Blanchard, Nikolai Kosmatov, and Frédéric Loulergue. 2018. Ghosts for Lists: A Critical Module of Contiki Verified in Frama-C. In Proc. of the 10th NASA Formal Methods Symposium (NFM 2018) (LNCS), Vol. 10811. Springer, 37--53.Google ScholarGoogle ScholarCross RefCross Ref
  7. Jochen Burghardt and Jens Gerlach. 2018. ACSL by Example. https://github.com/fraunhoferfokus/acsl-by-exampleGoogle ScholarGoogle Scholar
  8. Ádám Darvas and Peter Müller. 2010. Proving Consistency and Completeness of Model Classes Using Theory Interpretation. In Proc. of the 13th International Conference on Fundamental Approaches to Software Engineering (FASE 2010) (LNCS), Vol. 6013. Springer, 218--232. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Claire Dross and Yannick Moy. 2017. Auto-Active Proof of Red-Black Trees in SPARK. In NASA Formal Methods - 9th International Symposium, NFM 2017, Moffett Field, CA, USA, May 16--18, 2017, Proceedings. 68--83.Google ScholarGoogle Scholar
  10. Adam Dunkels, Bjorn Gronvall, and Thiemo Voigt. 2004. Contiki - A Lightweight and Flexible Operating System for Tiny Networked Sensors. In LCN 2014. IEEE. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Jean-Christophe Filliâtre and Andrei Paskevich. {n. d.}. Why3 - Where Programs Meet Provers. In ESOP 2013.Google ScholarGoogle Scholar
  12. Christoph Gladisch and Shmuel Tyszberowicz. 2015. Specifying linked data structures in JML for combining formal verification and testing. Science of Computer Programming 107--108 (2015), 19 -- 40. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Paolo Herms, Claude Marché, and Benjamin Monate. 2012. A Certified Multiprover Verification Condition Generator. In Verified Software: Theories, Tools, Experiments (VSTTE) (January 28--29) (LNCS), Vol. 7152. Springer, 2--17. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Bart Jacobs, Jan Smans, Pieter Philippaerts, Frédéric Vogels, Willem Penninckx, and Franck Piessens. 2011. VeriFast: A Powerful, Sound, Predictable, Fast Verifier for C and Java. In Nasa Formal Methods (NFM) (LNCS). Springer-Verlag, Berlin Heidelberg, 41--55. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Florent Kirchner, Nikolai Kosmatov, Virgile Prevosto, Julien Signoles, and Boris Yakobowski. 2015. Frama-C: A software analysis perspective. Formal Asp. Comput. 27, 3 (2015), 573--609. http://frama-c.com Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Nikolai Kosmatov and Julien Signoles. 2013. A Lesson on Runtime Assertion Checking with Frama-C. In Runtime Verification (RV) (September 24--27) (LNCS), Vol. 8174. Springer, 386--399.Google ScholarGoogle Scholar
  17. K. Rustan M. Leino and Michał Moskal. 2010. Usable Auto-Active Verification. http://fm.csl.sri.com/UV10/Google ScholarGoogle Scholar
  18. Frédéric Loulergue, Allan Blanchard, and Nikolai Kosmatov. 2018. Ghosts for Lists: from Axiomatic to Executable Specifications. In Proc. of the 12th International Conference on Tests and Proofs (TAP 2018) (LNCS), Vol. 10889. Springer, 177--184.Google ScholarGoogle ScholarCross RefCross Ref
  19. Frédéric Mangano, Simon Duquennoy, and Nikolai Kosmatov. 2016. A Memory Allocation Module of Contiki Formally Verified with Frama-C. A Case Study. In CRiSIS 2016 (LNCS), Vol. 10158. Springer.Google ScholarGoogle Scholar
  20. William Mansky, Andrew W. Appel, and Aleksey Nogin. 2017. A Verified Messaging System. Proc. ACM Program. Lang. 1, OOPSLA, Article 87 (Oct. 2017), 28 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Alexandre Peyrard, Nikolai Kosmatov, Simon Duquennoy, and Shahid Raza. 2018. Towards Formal Verification of Contiki OS: Analysis of the AES-CCM<sup>*</sup> Modules with Frama-C. In RED-IoT 2018, co-located with EWSN 2018. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Pieter Philippaerts, Jan Tobias Mühlberg, Willem Penninckx, Jan Smans, Bart Jacobs, and Frank Piessens. 2014. Software verification with VeriFast: Industrial case studies. Science of Computer Programming 82 (2014), 77--97. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Nadia Polikarpova, Carlo A. Furia, and Bertrand Meyer. 2010. Specifying Reusable Components. In Proc. of the 3rd International Conference on Verified Software: Theories, Tools, Experiments (VSTTE 2010) (LNCS), Vol. 6217. Springer, 127--141. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. John C. Reynolds. 2002. Separation Logic: A Logic for Shared Mutable Data Structures. In Proceedings of the 17th Annual IEEE Symposium on Logic in Computer Science (LICS). IEEE Computer Society, 55--74. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. The Coq Development Team. {n. d.}. The Coq Proof Assistant. http://coq.inria.fr,.Google ScholarGoogle Scholar
  26. Frédéric Vogels, Bart Jacobs, and Frank Piessens. 2015. Featherweight Veri-Fast. Logical Methods in Computer Science 11, 3 (2015).Google ScholarGoogle Scholar
  27. Katherine Q. Ye, Matthew Green, Naphat Sanguansin, Lennart Beringer, Adam Petcher, and Andrew W. Appel. 2017. Verified Correctness and Security of mbedTLS HMAC-DRBG. In ACM SIGSAC Conference on Computer and Communications Security (CCS). ACM, New York, NY, USA, 2007--2020. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Logic against ghosts: comparison of two proof approaches for a list module

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in
          • Published in

            cover image ACM Conferences
            SAC '19: Proceedings of the 34th ACM/SIGAPP Symposium on Applied Computing
            April 2019
            2682 pages
            ISBN:9781450359337
            DOI:10.1145/3297280

            Copyright © 2019 ACM

            Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 8 April 2019

            Permissions

            Request permissions about this article.

            Request Permissions

            Check for updates

            Qualifiers

            • research-article

            Acceptance Rates

            Overall Acceptance Rate1,650of6,669submissions,25%

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader