Evaluating Haskell expressions in a tutoring environment

نویسندگان

  • Tim Olmer
  • Bastiaan Heeren
  • Johan Jeuring
چکیده

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. In fact, many programming concepts that are considered to be important by the functional programming paradigm, such as recursion, higher-order functions, pattern-matching, and lazy evaluation, can be explained by showing a step-wise computation. We think that students can get a better understanding of these concepts if they are trained to perform these evaluation steps on their own. We also think that tool support is lacking for experimenting with the evaluation of Haskell expressions. In this paper we present a prototype implementation of a step-wise evaluator for Haskell expressions that supports multiple evaluation strategies, and which is specifically targeted at education. Besides performing these evaluation steps, the tool can also diagnose steps that are submitted by students and provide feedback.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Parallelizing MCP-Haskell for Evaluating Haskell# Parallel Programming Environment

In this paper, we present the parallelization of a sequential functional implementation of a Monte Carlo Transport Problem, called MCPHaskell[Hammes et al., 1995], using Haskell#. This experiment gave us important feedback for evaluating Haskell# features, helping us to answer some questions, like how expressive is Haskell# for representing known parallel computational patterns, how easy it is ...

متن کامل

Efficient Evaluation for Untyped and Compositional Representations of Expressions

This report gives a simple implementation of A. Baars and S.D. Swierstra’s “Typing Dynamic Typing” [5] using modern (GHC) Haskell features, and shows that the technique is especially beneficial in a compositional setting, where parts of the expression are defined separately. Evaluating expressions that are represented as algebraic data types typically requires using tagged unions to represent v...

متن کامل

Evaluating Haskell in Haskell

There are several Haskell interpreters, such as Hugs and GHCi, but none (as far I’m aware) are implemented in Haskell. For performance reasons, C appears to be the implementation language of choice. This article presents a simple Haskell interpreter – called the Haskell Haskell interpreter, or hhi for short – that is written in Haskell and that performs quite competitively with Hugs and GHCi. T...

متن کامل

Mutation Testing of Functional Programming Languages

Mutation testing has been widely studied in imperative programming languages. The rising popularity of functional languages and the adoption of functional idioms in traditional languages (e.g. lambda expressions) requires a new set of studies for evaluating the effectiveness of mutation testing in a functional context. In this paper, we report our ongoing effort in applying mutation testing in ...

متن کامل

Pattern-driven Reduction in Haskell

Haskell is a functional programming language with nominally non-strict semantics, implying that evaluation of a Haskell expression proceeds by demand-driven reduction. However, Haskell also provides pattern matching on arguments of functions, in let expressions and in the match clauses of case expressions. Pattern-matching requires data-driven reduction to the extent necessary to evaluate a pat...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2014