Advertisement

A Modular Way to Reason About Iteration

  • Jean-Christophe Filliâtre
  • Mário PereiraEmail author
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9690)

Abstract

In this paper we present an approach to specify programs performing iterations. The idea is to specify iteration in terms of the finite sequence of the elements enumerated so far, and only those. In particular, we are able to deal with non-deterministic and possibly infinite iteration. We show how to cope with the issue of an iteration no longer being consistent with mutable data.

We validate our proposal using the deductive verification tool Why3 and two iteration paradigms, namely cursors and higher-order iterators. For each paradigm, we verify several implementations of iterators and client code. This is done in a modular way, i.e., the client code only relies on the specification of the iteration.

Keywords

Hash Table Proof Obligation Proof Assistant Infinite Iteration Automatic Proof 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Notes

Acknowledgments

We thank Clément Fumex, Chantal Keller, Claude Marché, Andrei Paskevich, Vitor Pereira, François Pottier, and Simão Melo de Sousa for their comments on earlier versions of this paper.

References

  1. 1.
    Bobot, F., Filliâtre, J.C., Marché, C., Paskevich, A.: Let’s verify this with Why3. Int. J. Softw. Tools Technol. Transf. (STTT) 17(6), 709–727 (2015)CrossRefGoogle Scholar
  2. 2.
    Boyer, R.S., Moore, J.S.: Mjrty: A fast majority vote algorithm. In: Automated Reasoning: Essays in Honor of Woody Bledsoe, pp. 105–118 (1991)Google Scholar
  3. 3.
    Charguéraud, A.: Characteristic formulae for the verification of imperative programs. In: Proceeding of the 16th ACM SIGPLAN International Conference on Functional Programming (ICFP), pp. 418–430. ACM, Tokyo, Japan, September 2011Google Scholar
  4. 4.
    Clochard, M., Filliâtre, J.-C., Marché, C., Paskevich, A.: Formalizing semantics with an automatic program verifier. In: Giannakopoulou, D., Kroening, D. (eds.) VSTTE 2014. LNCS, vol. 8471, pp. 37–51. Springer, Heidelberg (2014)Google Scholar
  5. 5.
    Coplien, J.O.: Advanced C++ Programming Styles and Idioms. Addison-Wesley, Reading (1992)Google Scholar
  6. 6.
    Filliâtre, J.C.: Backtracking iterators. In: ACM SIGPLAN Workshop on ML, Portland, Oregon, September 2006Google Scholar
  7. 7.
    Filliâtre, J.-C.: One logic to use them all. In: Bonacina, M.P. (ed.) CADE 2013. LNCS, vol. 7898, pp. 1–20. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  8. 8.
    Filliâtre, J.-C., Gondelman, L., Paskevich, A.: The spirit of ghost code. In: Biere, A., Bloem, R. (eds.) CAV 2014. LNCS, vol. 8559, pp. 1–16. Springer, Heidelberg (2014)Google Scholar
  9. 9.
    Filliâtre, J.-C., Paskevich, A.: Why3 — where programs meet provers. In: Felleisen, M., Gardner, P. (eds.) ESOP 2013. LNCS, vol. 7792, pp. 125–128. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  10. 10.
    Kulczycki, G.: A language for building verified software components. In: Favaro, J., Morisio, M. (eds.) ICSR 2013. LNCS, vol. 7925, pp. 308–314. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  11. 11.
    Nanevski, A., Morrisett, G., Shinnar, A., Govereau, P., Birkedal, L.: Ynot: reasoning with the awkward squad. In: Proceedings of ICFP 2008 (2008)Google Scholar
  12. 12.
    Polikarpova, N., Tschannen, J., Furia, C.A.: A fully verified container library. In: Bjørner, N., de Boer, F. (eds.) FM 2015. LNCS, vol. 9109, pp. 414–434. Springer, Heidelberg (2015)CrossRefGoogle Scholar
  13. 13.
    Rondon, P.M., Kawaguchi, M., Jhala, R.: Liquid types. In: Gupta, R., Amarasinghe, S.P. (eds.) PLDI 2008, Tucson, AZ, USA, 7–13 June 2008, pp. 159–169. ACM (2008)Google Scholar
  14. 14.
    Swamy, N., Hriţcu, C., Keller, C., Rastogi, A., Delignat-Lavaud, A., Forest, S., Bhargavan, K., Fournet, C., Strub, P.Y., Kohlweiss, M., Zinzindohoue, J.K., Zanella-Béguelin, S.: Dependent types and multi-monadic effects in F*. In: 43rd ACM Symposium on Principles of Programming Languages (POPL), pp. 256–270. ACM, January 2016Google Scholar
  15. 15.
    Vazou, N., Rondon, P.M., Jhala, R.: Abstract refinement types. In: Felleisen, M., Gardner, P. (eds.) ESOP 2013. LNCS, vol. 7792, pp. 209–228. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  16. 16.
    Weide, B.W.: SAVCBS 2006 challenge: specification of iterators. In: Proceedings of the 2006 Conference on Specification and Verification of Component-Based Systems, SAVCBS 2006, NY, USA, pp. 75–77. ACM, New York (2006)Google Scholar

Copyright information

© Springer International Publishing Switzerland 2016

Authors and Affiliations

  1. 1.Laboratoire de Recherche en InformatiqueUniversity of Paris-Sud, CNRSOrsayFrance
  2. 2.INRIA Saclay – Île-de-FranceOrsayFrance

Personalised recommendations