Abstract
In this paper we set forth the thesis that a language type checker can be an effective tool in teaching language design principles of functional languages. We have used \(TypeSoundnessCertifier \), a tool for type checking languages and certifying their soundness, in the context of a graduate course in programming languages. In this paper we offer details on how the course took place, and we report on some data gathered during evaluations. Although the work reported in this paper is not statistically significant, we share our experience to show the type of studies that we are conducting, and to inspire similar and larger studies towards gathering evidence for, or against, our thesis.
Keywords
- Language design
- Teaching
- Functional languages
This is a preview of subscription content, access via your institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsNotes
- 1.
A constraint of our system is that it works with closed terms as values, therefore a variable x cannot be declared as a value.
- 2.
This is not a novelty. The Ott language, for example, achieved the same effect previously.
- 3.
- 4.
- 5.
Since a solution for the ordinary filter operation is comparable to that of \(\mathtt {map}\), and \(\mathtt {map}\) has been given as exercise (see Sect. 2.2), we preferred to make the exam more difficult with \(\mathtt {filterOpt}\).
References
Abella Development Team. http://abella-prover.org
Altenkirch, T., Reus, B.: Monadic presentations of lambda terms using generalized inductive types. In: Flum, J., Rodriguez-Artalejo, M. (eds.) CSL 1999. LNCS, vol. 1683, pp. 453–468. Springer, Heidelberg (1999). https://doi.org/10.1007/3-540-48168-0_32. http://dl.acm.org/citation.cfm?id=647849.737066
Augustsson, L., Carlsson, M.: An exercise in dependent types: a well-typed interpreter. In: Workshop on Dependent Types in Programming, Gothenburg (1999)
Baelde, D., Chaudhuri, K., Gacek, A., Miller, D., Nadathur, G., Tiu, A., Wang, Y.: Abella: a system for reasoning about relational specifications. J. Formaliz. Reason. 7(2), 1–89 (2014). https://doi.org/10.6092/issn.1972-5787/4650
Cheney, J.: Toward a general theory of names: binding and scope. In: Proceedings of the 3rd ACM SIGPLAN Workshop on Mechanized Reasoning About Languages with Variable Binding, MERLIN 2005, pp. 33–40. ACM, New York (2005). http://doi.acm.org/10.1145/1088454.1088459
Cimini, M.: TypeSoundnessCertifier (2015). https://github.com/mcimini/TypeSoundnessCertifier
Cimini, M., Miller, D., Siek, J.G.: Well-typed languages are sound. CoRR abs/1611.05105 (2016). http://arxiv.org/abs/1611.05105
D’Antoni, L., Weavery, M., Weinert, A., Alur, R.: Automata tutor and what we learned from building an online teaching tool. Bull. EATCS 117 (2015). http://eatcs.org/beatcs/index.php/beatcs/article/view/365
Felleisen, M., Findler, R.B., Flatt, M.: Semantics Engineering with PLT Redex. The MIT Press, London (2009)
Harper, R.: Practical Foundations for Programming Languages. Cambridge University Press, New York (2012)
Pierce, B.C.: Types and Programming Languages. MIT Press, Cambridge (2002)
Pierce, B.C., et al.: Software Foundations. Electronic textbook (2014). www.cis.upenn.edu/~bcpierce/sf
Poulsen, C.B., Rouvoet, A., Tolmach, A., Krebbers, R., Visser, E.: Intrinsically-typed definitional interpreters for imperative languages 2(POPL), 16:1–16:34 (2018). https://doi.org/10.1145/3158104
Reynolds, J.C.: The meaning of types - from intrinsic to extrinsic semantics (2000)
Sewell, P., et al.: Ott: effective tool support for the working semanticist. In: Proceedings of the 12th ACM SIGPLAN International Conference on Functional Programming, ICFP 2007, Freiburg, Germany, 1–3 October 2007, pp. 1–12 (2007). https://doi.org/10.1145/1291151.1291155
Siek, J.G., Taha, W.: Gradual typing for functional languages. In: Scheme and Functional Programming Workshop, pp. 81–92, September 2006
Tobin-Hochstadt, S., Felleisen, M.: Interlanguage migration: from scripts to programs. In: Companion to the 21st ACM SIGPLAN Symposium on Object-Oriented Programming Systems, Languages, and Applications, OOPSLA 2006, pp. 964–974. ACM, New York (2006). https://doi.org/10.1145/1176617.1176755, http://doi.acm.org/10.1145/1176617.1176755
Acknowledgements
We thank Dale Miller and Jeremy Siek for their comments on Sect. 1.1. We are thankful to our anonymous reviewers for their suggestions, which improved this paper. Also, we thank the students who participated to the study being reported.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2020 Springer Nature Switzerland AG
About this paper
Cite this paper
Cimini, M. (2020). Early Experience in Teaching the Basics of Functional Language Design with a Language Type Checker. In: Bowman, W., Garcia, R. (eds) Trends in Functional Programming. TFP 2019. Lecture Notes in Computer Science(), vol 12053. Springer, Cham. https://doi.org/10.1007/978-3-030-47147-7_2
Download citation
DOI: https://doi.org/10.1007/978-3-030-47147-7_2
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-47146-0
Online ISBN: 978-3-030-47147-7
eBook Packages: Computer ScienceComputer Science (R0)