Validating the Meta-Theory of Programming Languages (Short Paper)

  • Guglielmo FachiniEmail author
  • Alberto Momigliano
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10469)


We report on work in progress in building an environment for the validation of the meta-theory of programming languages artifacts, for example the correctness of compiler translations; the basic idea is to couple property-based testing with binders-aware functional programming as the meta-language for specification and testing. Treating binding signatures and related notions, such as new names generation, \(\alpha \)-equivalence and capture-avoiding substitution correctly and effectively is crucial in the verification and validation of programming language (meta)theory. We use Haskell as our meta-language, since it offers various libraries for both random and exhaustive generation of tests, as well as for binders. We validate our approach on benchmarks of mutations presented in the literature and some examples of code “in the wild”. In the former case, not only did we very quickly (re)discover all the planted bugs, but we achieved that with very little configuration effort with comparison to the competition. In the second case we located several simple bugs that had survived for years in publicly available (academic) code. We believe that our approach adds to the increasing evidence of the usefulness of property-based testing for semantic engineering of programming languages, in alternative or prior to full verification.


  1. 1.
    Amin, N., Tate, R.: Java and Scala’s type systems are unsound: the existential crisis of null pointers. In: OOPSLA 2016, pp. 838–848 (2016)CrossRefGoogle Scholar
  2. 2.
    Charguéraud, A.: The locally nameless representation. J. Autom. Reason. 49(3), 363–408 (2012)MathSciNetCrossRefGoogle Scholar
  3. 3.
    Cheney, J., Momigliano, A.: \(\alpha \)Check: a mechanized metatheory model checker. Theory Pract. Log. Program. 17(3), 311–352 (2017)MathSciNetCrossRefGoogle Scholar
  4. 4.
    Cheney, J., Momigliano, A., Pessina, M.: Advances in property-based testing for \(\alpha \)Prolog. In: Aichernig, B.K.K., Furia, C.A.A. (eds.) TAP 2016. LNCS, vol. 9762, pp. 37–56. Springer, Cham (2016). doi: 10.1007/978-3-319-41135-4_3CrossRefGoogle Scholar
  5. 5.
    Claessen, K., Duregård, J., Pałka, M.H.: Generating constrained random data with uniform distribution. In: Codish, M., Sumii, E. (eds.) FLOPS 2014. LNCS, vol. 8475, pp. 18–34. Springer, Cham (2014). doi: 10.1007/978-3-319-07151-0_2CrossRefGoogle Scholar
  6. 6.
    Claessen, K., Hughes, J.: QuickCheck: a lightweight tool for random testing of Haskell programs. In: ICFP 2000, pp. 268–279. ACM (2000)CrossRefGoogle Scholar
  7. 7.
    Duregård, J., Jansson, P., Wang, M.: Feat: functional enumeration of algebraic types. In: Voigtländer, J. (ed.) Haskell Workshop, pp. 61–72. ACM (2012)Google Scholar
  8. 8.
    Felleisen, M., Findler, R.B., Flatt, M.: Semantics Engineering with PLT Redex. MIT Press, Cambridge (2009)zbMATHGoogle Scholar
  9. 9.
    Runciman, C., Naylor, M., Lindblad, F.: Smallcheck and lazy SmallCheck: automatic exhaustive testing for small values. In: Haskell Workshop, pp. 37–48 (2008)CrossRefGoogle Scholar
  10. 10.
    Sewell, P., Nardelli, F.Z., Owens, S., Peskine, G., Ridge, T., Sarkar, S., Strnisa, R.: Ott: effective tool support for the working semanticist. J. Funct. Program. 20(1), 71–122 (2010)CrossRefGoogle Scholar
  11. 11.
    Visser, E., et al.: A language designer’s workbench: a one-stop-shop for implementation and verification of language designs. In: Onward! 2014, SPLASH 2014, pp. 95–111 (2014)Google Scholar
  12. 12.
    Weirich, S., Yorgey, B.A., Sheard, T.: Binders unbound. In: Chakravarty, M.M.T., Hu, Z., Danvy, O. (eds.) ICFP 2011, pp. 333–345. ACM (2011)Google Scholar

Copyright information

© Springer International Publishing AG 2017

Authors and Affiliations

  1. 1.INRIA ProseccoParisFrance
  2. 2.Dipartimento di InformaticaUniversità degli Studi di MilanoMilanItaly

Personalised recommendations