International Journal of Parallel Programming

, Volume 45, Issue 2, pp 300–319 | Cite as

Calculating Parallel Programs in Coq Using List Homomorphisms

  • Frédéric Loulergue
  • Wadoud Bousdira
  • Julien Tesson
Article

Abstract

SyDPaCC is a set of libraries for the Coq proof assistant. It allows to write naive functional programs (i.e. with high complexity) that are considered as specifications, and to transform them into more efficient versions. These more efficient versions can then be automatically parallelised before being extracted from Coq into source code for the functional language OCaml together with calls to the Bulk Synchronous Parallel ML library. In this paper we present a new core version of SyDPaCC for the development of parallel programs correct-by-construction using the theory of list homomorphisms and algorithmic skeletons implemented and verified in Coq. The framework is illustrated on the maximum prefix sum problem.

Keywords

Parallel programming Algorithmic skeletons Constructive algorithms Proof assistant 

Notes

Acknowledgments

This work is partly supported by ANR (France) and JST (Japan) (Project PaPDAS ANR-2010-INTB-0205-02 and JST 10102704).

References

  1. 1.
    Aldinucci, M., Danelutto, M.: Skeleton-based parallel programming: functional and parallel semantics in a single shot. Comput. Lang. Syst. Str. 33(3–4), 179–192 (2007)MATHGoogle Scholar
  2. 2.
    Bird, R., de Moor, O.: Algebra of Programming. Prentice Hall, New Jersey (1996)CrossRefMATHGoogle Scholar
  3. 3.
    Bousdira, W., Loulergue, F., Tesson, J.: A verified library of algorithmic skeletons on evenly distributed arrays. In: Algorithms and Architectures for Parallel Processing (ICA3PP). pp. 218–232. No. 7439 in LNCS, Springer, Fukuoka, Japan (2012)Google Scholar
  4. 4.
    Cavarra, A., Riccobene, E., Zavanella, A.: A formal model for the parallel semantics of P3L. In: ACM Symposium on Applied Computing (SAC). pp. 804–812. ACM (2000)Google Scholar
  5. 5.
    Cole, M.: Parallel programming with list homomorphisms. Parallel Process. Lett. 5(2), 191–203 (1995)CrossRefGoogle Scholar
  6. 6.
    Daum, M.: Reasoning on data-parallel programs in Isabelle/Hol. In: C/C++ Verification Workshop (2007)Google Scholar
  7. 7.
    Emoto, K., Loulergue, F., Tesson, J.: A verified generate-test-aggregate Coq library for parallel programs extraction. In: Interactive Theorem Proving (ITP). pp. 258–274. No. 8558 in LNCS, Springer, Wien (2014)Google Scholar
  8. 8.
    Fortin, J., Gava, F.: BSP-Why: a tool for deductive verification of BSP algorithms with subgroup synchronisation. Int. J. Parallel Prog. (2015). doi:10.1007/s10766-015-0360-y
  9. 9.
    Gava, F.: Formal proofs of functional BSP programs. Parallel Process. Lett. 13(3), 365–376 (2003)MathSciNetCrossRefGoogle Scholar
  10. 10.
    Gava, F., Gesbert, L., Loulergue, F.: Type system for a safe execution of parallel programs in BSML. In: 5th ACM SIGPLAN Workshop on High-Level Parallel Programming and Applications, pp. 27–34. ACM (2011)Google Scholar
  11. 11.
    Gibbons, J.: The third homomorphism theorem. J. Funct. Program. 6(4), 657–665 (1996)MathSciNetCrossRefMATHGoogle Scholar
  12. 12.
    Leroy, X.: Formal verification of a realistic compiler. Commun. ACM 52(7), 107–115 (2009)CrossRefGoogle Scholar
  13. 13.
    Loulergue, F., Gava, F., Billiet, D.: Bulk synchronous parallel ML: modular implementation and performance prediction. In: International Conference on Computational Science (ICCS). LNCS, vol. 3515, pp. 1046–1054. Springer, Berlin (2005)Google Scholar
  14. 14.
    Loulergue, F., Robillard, S., Tesson, J., Légaux, J., Hu, Z.: Formal derivation and extraction of a parallel program for the all nearest smaller values problem. In: ACM Symposium on Applied Computing (SAC). pp. 1577–1584. ACM, Gyeongju (2014)Google Scholar
  15. 15.
    Lupinski, N., Falcou, J., Paulin-Mohring, C.: Sémantique d’une langage de squelettes. http://www.lri.fr/~paulin/Skel/article (2012)
  16. 16.
    Malecha, G., Morrisett, G., Wisnesky, R.: Trace-based verification of imperative programs with I/O. J. Symb. Comput. 46(2), 95–118 (2011)MathSciNetCrossRefMATHGoogle Scholar
  17. 17.
    Mu, S.C., Ko, H.S., Jansson, P.: Algebra of programming using dependent types. In: Audebaud, P., Paulin-Mohring, C. (eds.) Mathematics of Program Construction, LNCS, vol. 5133, pp. 268–283. Springer, Berlin (2008)CrossRefGoogle Scholar
  18. 18.
    Mu, S., Ko, H., Jansson, P.: Algebra of programming in Agda: dependent types for relational program derivation. J. Funct. Program. 19(5), 545–579 (2009)MathSciNetCrossRefMATHGoogle Scholar
  19. 19.
    Stewart, A., Clint, M., Gabarró, J.: Barrier synchronisation: axiomatisation and relaxation. Form. Asp. Comput. 16(1), 36–50 (2004)CrossRefMATHGoogle Scholar
  20. 20.
    Swierstra, W.: More dependent types for distributed arrays. High. Order Symb. Comput. 23(4), 489–506 (2010)MathSciNetCrossRefMATHGoogle Scholar
  21. 21.
    Tesson, J., Loulergue, F.: A verified bulk synchronous parallel ML heat diffusion simulation. In: International Conference on Computational Science (ICCS). pp. 36–45. Elsevier, Singapore (2011)Google Scholar
  22. 22.
    The Coq Development Team: The Coq Proof Assistant. http://coq.inria.fr
  23. 23.
    Valiant, L.G.: A bridging model for parallel computation. Commun. ACM 33(8), 103 (1990)CrossRefGoogle Scholar
  24. 24.
    Wildmoser, M., Nipkow, T.: Certifying machine code safety: shallow versus deep embedding. In: Slind, K., Bunker, A., Gopalakrishnan, G. (eds.) Theorem Proving in Higher Order Logics, LNCS, vol. 3223, pp. 133–142. Springer, Berlin (2004)Google Scholar
  25. 25.
    Yokoyama, T., Hu, Z., Takeichi, M.: Yicho: a system for programming program calculations. Technical Report METR 2002–07, Department of Mathematical Engineering, University of Tokyo (Jun 2002)Google Scholar
  26. 26.
    Zhou, J., Chen, Y.: Generating C code from LOGS specifications. In: 2nd International Colloquium on Theoretical Aspects of Computing (ICTAC’05). pp. 195–210. No. 3407 in LNCS, Springer, Berlin (2005)Google Scholar

Copyright information

© Springer Science+Business Media New York 2016

Authors and Affiliations

  • Frédéric Loulergue
    • 1
    • 2
  • Wadoud Bousdira
    • 2
  • Julien Tesson
    • 3
  1. 1.Inria πr², PPS, CNRSUniv. Paris DiderotParisFrance
  2. 2.Univ. OrléansINSA Centre Val de Loire, LIFO EA 4022OrléansFrance
  3. 3.LACL, UPECUniversité Paris EstCréteilFrance

Personalised recommendations