Compositional Computational Reflection

  • Gregory Malecha
  • Adam Chlipala
  • Thomas Braibant
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8558)


Current work on computational reflection is single-minded; each reflective procedure is written with a specific application or scope in mind. Composition of these reflective procedures is done by a proof- generating tactic language such as Ltac. This composition, however, comes at the cost of both larger proof terms and redundant preprocessing. In this work, we propose a methodology for writing composable reflective procedures that solve many small tasks in a single invocation. The key technical insights are techniques for reasoning semantically about extensible syntax in intensional type theory. Our techniques make it possible to compose sound procedures and write generic procedures parametrized by lemmas mimicking Coq’s support for hint databases.


Computational reflection automation Coq verification 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Berdine, J., Calcagno, C., O’Hearn, P.W.: Smallfoot: Modular automatic assertion checking with separation logic. In: de Boer, F.S., Bonsangue, M.M., Graf, S., de Roever, W.-P. (eds.) FMCO 2005. LNCS, vol. 4111, pp. 115–137. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  2. 2.
    Boutin, S.: Using reflection to build efficient and certified decision procedures. In: Ito, T., Abadi, M. (eds.) TACS 1997. LNCS, vol. 1281, pp. 515–529. Springer, Heidelberg (1997)CrossRefGoogle Scholar
  3. 3.
    Braibant, T., Pous, D.: Tactics for reasoning modulo AC in Coq. In: Jouannaud, J.-P., Shao, Z. (eds.) CPP 2011. LNCS, vol. 7086, pp. 167–182. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  4. 4.
    Chlipala, A.: The Bedrock structured programming system: Combining generative metaprogramming and Hoare logic in an extensible program verifier. In: Proc. ICFP, pp. 391–402. ACM (2013)Google Scholar
  5. 5.
    Claret, G., del Carmen González Huesca, L., Régis-Gianas, Y., Ziliani, B.: Lightweight proof by reflection using a posteriori simulation of effectful computation. In: Blazy, S., Paulin-Mohring, C., Pichardie, D. (eds.) ITP 2013. LNCS, vol. 7998, pp. 67–83. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  6. 6.
    Coq Development Team. The Coq proof assistant reference manual, version 8.4 (2012)Google Scholar
  7. 7.
    Delahaye, D.: A tactic language for the system Coq. In: Parigot, M., Voronkov, A. (eds.) LPAR 2000. LNCS (LNAI), vol. 1955, pp. 85–95. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  8. 8.
    Delaware, B., d.S. Oliveira, B.C., Schrijvers, T.: Meta-theory a la carte. SIGPLAN Not. 48(1), 207–218 (2013)Google Scholar
  9. 9.
    Garillot, F., Werner, B.: Simple types in type theory: Deep and shallow encodings. In: Schneider, K., Brandt, J. (eds.) TPHOLs 2007. LNCS, vol. 4732, pp. 368–382. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  10. 10.
    Gonthier, G., Mahboubi, A., Tassi, E.: A Small Scale Reflection Extension for the Coq System. Rapport de recherche RR-6455, INRIA (2008)Google Scholar
  11. 11.
    Grégoire, B., Leroy, X.: A compiled implementation of strong reduction. In: Proc. ICFP (2002)Google Scholar
  12. 12.
    Harper, R., Pollack, R.: Type checking with universes. Theoretical Computer Science 89(1), 107–136 (1991)CrossRefzbMATHMathSciNetGoogle Scholar
  13. 13.
    Hickey, J.J.: Formal objects in type theory using very dependent types. In: Foundations of Object Oriented Languages 3 (1996)Google Scholar
  14. 14.
    Lescuyer, S.: Formalisation et développement d’une tactique réflexive pour la démonstration automatique en Coq. Thèse de doctorat, Université Paris-Sud (January 2011)Google Scholar
  15. 15.
    Marti, N., Affeldt, R.: A certified verifier for a fragment of separation logic. Computer Software 25(3), 135–147 (2008)Google Scholar
  16. 16.
    Reynolds, J.C.: Separation logic: A logic for shared mutable data structures. In: Proc. LICS, pp. 55–74. IEEE Computer Society (2002)Google Scholar
  17. 17.
    Stewart, G., Beringer, L., Appel, A.W.: Verified heap theorem prover by paramodulation. In: Proc. ICFP (2012)Google Scholar
  18. 18.
    Ziliani, B., Dreyer, D., Krishnaswami, N., Nanevski, A., Vafeiadis, V.: Mtac: A monad for typed tactic programming in Coq. In: Proc. ICFP (2013)Google Scholar

Copyright information

© Springer International Publishing Switzerland 2014

Authors and Affiliations

  • Gregory Malecha
    • 1
  • Adam Chlipala
    • 2
  • Thomas Braibant
    • 3
  1. 1.Harvard University SEASCambridgeUSA
  2. 2.MIT CSAILCambridgeUSA
  3. 3.INRIARocquencourtFrance

Personalised recommendations