Abstract
Lambda Calculus forms the foundational basis for all functional programming languages. In addition, since most other modern programming languages are slowly incorporating functional features such as higher-order functions, lambda expressions, and combinatory logic operators, one can argue that a basic understanding of Lambda Calculus is necessary for modern computer scientists. Typically, Lambda Calculus is introduced in the undergraduate Computer Science curriculum in the Programming Languages Concepts, Programming Paradigms, or Functional Programming courses. In this paper, we present a command-line tool and an interactive Web visualization tool that provide a platform for the student to learn to formulate and evaluate lambda expressions. In the command-line tool, the user can compute free-variables in lambda expressions, perform alpha-reductions and substitutions, and simplify lambda expressions using beta-reductions. This interface is convenient for evaluating lambda expressions to its most reduced form by going through a series of beta-reductions. In the visualization tool, the user inputs a lambda expression and interactively evaluates the expressions, one beta-reduction at a time. The lambda expression is shown in the form of an expression tree, with ready to execute function application nodes shown in green. The student can click on any of these green nodes to perform a beta reduction and the resulting tree is shown. The student can also go back to any of the previous trees to try other beta reductions. The tool was validated in an offering of the Programming Language Concepts class and results from the study are presented in the paper.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Church, A.: A set of postulates for the foundation of logic. Ann. Math. 33(2), 346–366 (1932). http://www.jstor.org/stable/1968337
Church, A., Rosser, J.B.: Some properties of conversion. Trans. Am. Math. Soc. 39(3), 472–482 (1936). https://doi.org/10.2307/1989762
Sainati, D., Sampson, A.: LambdaLab: an interactive \(\lambda \)-calculus reducer for learning. https://2018.splashcon.org/track/splash-2018-SPLASH-E?. Accessed 10 Oct 2023
igraph: Python-igraph, a Python interface to igraph for manipulating graph data (2023). https://python.igraph.org/en/stable/. Accessed 18 Aug 2023
Buchli, L.: Lambda calculus calculator (2023). https://lambdacalc.io/. Accessed 10 Oct 2023
NetworkX: Network Analysis in Python (2023). https://networkx.org/. Accessed 18 Aug 2023
Plotly: Dash: low-code framework for rapidly building data apps in Python (2023). https://dash.plotly.com/. Accessed 18 Aug 2023
PLY: Python Lex-Yacc (2023). https://www.dabeaz.com/ply/. Accessed 18 Aug 2023
Project Ultimatum: Lambda Viewer (2023). https://projectultimatum.org/cgi-bin/lambda. Accessed 10 Oct 2023
Reingold, E., Tilford, J.: Tidier drawings of trees. IEEE Trans. Softw. Eng. SE-7(2), 223–228 (1981). https://doi.org/10.1109/TSE.1981.234519
Ruiz, D., Villaret, M.: TILC: the interactive lambda-calculus tracer. Electron. Notes Theor. Comput. Sci. 248, 173–183 (2009). https://doi.org/10.1016/j.entcs.2009.07.067. https://www.sciencedirect.com/science/article/pii/S1571066109002904. Proceedings of the Eighth Spanish Conference on Programming and Computer Languages (PROLE 2008)
Turing, A.M.: On computable numbers, with an application to the Entscheidungsproblem. Proc. Lond. Math. Soc. Second Ser. 42, 230–265 (1936)
Wikipedia: Lambda Calculus (2023). https://en.wikipedia.org/wiki/Lambda_calculus. Accessed 18 Aug 2023
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2025 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Abeysinghe, B., Patterson, M., Sunderraman, R. (2025). An Interactive Lambda Calculus Interpreter and Visualization Tool. In: Karkare, A., Prasad, P., Raman, A. (eds) Computing Education Research. COMPUTE 2024. Communications in Computer and Information Science, vol 2400. Springer, Cham. https://doi.org/10.1007/978-3-031-84391-4_9
Download citation
DOI: https://doi.org/10.1007/978-3-031-84391-4_9
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-84390-7
Online ISBN: 978-3-031-84391-4
eBook Packages: Computer ScienceComputer Science (R0)