在辅导环境中评估Haskell表达式
Evaluating Haskell expressions in a tutoring environment
摘要:
许多Haskell的入门教科书从一开始就使用计算,让读者深入了解表达式的求值和函数式程序的行为。许多在函数式编程范式中很重要的编程概念,如递归、高阶函数、模式匹配和惰性求值,可以通过展示逐步计算来部分解释。如果学生自己执行这些评估步骤,她会更好地理解这些概念。目前缺乏对Haskell表达式求值的实验工具支持。在本文中,我们提出了一个原型实现的逐步评估Haskell表达式,支持多种评估策略,专门针对教育。除了执行评估步骤,该工具还诊断学生提交的步骤,并提供反馈。教师可以在不了解工具内部实现的情况下添加或更改函数定义。我们讨论了一些关于该工具的小调查的初步结果。
英文摘要:
A number of introductory textbooks for Haskell use calculations right from the start to give the reader insight into the evaluation of expressions and the behavior of functional programs. Many programming concepts that are important in the functional programming paradigm, such as recursion, higher-order functions, pattern-matching, and lazy evaluation, can be partially explained by showing a stepwise computation. A student gets a better understanding of these concepts if she performs these evaluation steps herself. Tool support for experimenting with the evaluation of Haskell expressions is currently lacking. In this paper we present a prototype implementation of a stepwise evaluator for Haskell expressions that supports multiple evaluation strategies, specifically targeted at education. Besides performing evaluation steps the tool also diagnoses steps that are submitted by a student, and provides feedback. Instructors can add or change function definitions without knowledge of the tool's internal implementation. We discuss some preliminary results of a small survey about the tool.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。