## A programming tutor for Haskell (2011)

Venue: | In Proceedings of CEFP 2011: Lecture Notes of the Central European School on Functional Programming, LNCS |

Citations: | 3 - 3 self |

### BibTeX

@INPROCEEDINGS{Jeuring11aprogramming,

author = {Johan Jeuring and Alex Gerdes and Bastiaan Heeren and Johan Jeuring and Alex Gerdes and Bastiaan Heeren},

title = {A programming tutor for Haskell},

booktitle = {In Proceedings of CEFP 2011: Lecture Notes of the Central European School on Functional Programming, LNCS},

year = {2011},

publisher = {Springer}

}

### OpenURL

### Abstract

Abstract. In these lectures we will introduce an interactive system that supports writing simple functional programs. Using this system, students learning functional programming: – develop their programs incrementally, – receive feedback about whether or not they are on the right track, – can ask for a hint when they are stuck, – see how a complete program is stepwise constructed, – get suggestions about how to refactor their program. The system itself is implemented as a functional program, and uses fundamental concepts such as rewriting, parsing, strategies, program transformations and higher-order combinators such as the fold. We will introduce these concepts, and show how they are used in the implementation of the interactive functional programming tutor. 1

### Citations

3608 | A theory of communicating sequential processes
- Brookes, Hoare, et al.
- 1984
(Show Context)
Citation Context ...es of lengths n and m equals (n+m)! n!m! . This number grows quickly with longer sentences. An alternative definition of interleaving two sequences, presented by Hoare in his influential book on CSP [=-=Hoare, 1985-=-], is by means of three laws: ɛ ∈ (y <%> z) ⇔ y = z = ɛ x ∈ (y <%> z) ⇔ x ∈ (z <%> y) ax ∈ (y <%> z) ⇔ (∃ y ′ : y = ay ′ ∧ x ∈ (y ′ <%> z)) ∨ (∃ z ′ : z = az ′ ∧ x ∈ (y <%> z ′ )) Interleaving sets. T... |

1469 | An Axiomatic Basis for Computer Programming
- Hoare
- 1969
(Show Context)
Citation Context ...pecify a problem by means of pre- and post-conditions, and then calculate a program from the specification, or provide an implementation and prove that the implementation satisfies the specification [=-=Hoare, 1969-=-, Dijkstra, 1975], – refine a specification by means of refinement rules until an executable program is obtained [Back, 1987, Morgan, 1990], – specify a problem by means of a simple but possibly very ... |

502 |
Programming from Specifications
- Morgan
- 1994
(Show Context)
Citation Context ...and prove that the implementation satisfies the specification [Hoare, 1969, Dijkstra, 1975], – refine a specification by means of refinement rules until an executable program is obtained [Back, 1987, =-=Morgan, 1990-=-], – specify a problem by means of a simple but possibly very inefficient program, and transform it to an efficient program using semantics-preserving transformation rules [Bird, 1987, Meertens, 1986]... |

443 |
Guarded commands, nondeterminacy and formal derivations of programs
- Dijkstra
- 1975
(Show Context)
Citation Context ...lem by means of pre- and post-conditions, and then calculate a program from the specification, or provide an implementation and prove that the implementation satisfies the specification [Hoare, 1969, =-=Dijkstra, 1975-=-], – refine a specification by means of refinement rules until an executable program is obtained [Back, 1987, Morgan, 1990], – specify a problem by means of a simple but possibly very inefficient prog... |

220 | An Introduction to the Theory of Lists
- Bird
- 1987
(Show Context)
Citation Context ...d [Back, 1987, Morgan, 1990], – specify a problem by means of a simple but possibly very inefficient program, and transform it to an efficient program using semantics-preserving transformation rules [=-=Bird, 1987-=-, Meertens, 1986]. If we would use one of the first two approaches in a programming tutor that can give hints to students on how to proceed, we would have to automatically construct correctness proofs... |

167 |
Diagnostic models for procedural bugs in basic mathematical skills
- Brown, Burton
- 1978
(Show Context)
Citation Context ...rocedure describes how basic steps may be combined to solve a particular problem. A procedure is often called a strategy (or meta-level reasoning, meta-level inference [Bundy, 1983], procedural nets [=-=Brown and Burton, 1978-=-], plans, tactics, etc.), and we have chosen to use this term. A strategy for a functional program describes how a student should construct a functional program for a particular problem. Some well-kno... |

149 |
A calculus of refinements for program derivations
- Back
- 1988
(Show Context)
Citation Context ...lementation and prove that the implementation satisfies the specification [Hoare, 1969, Dijkstra, 1975], – refine a specification by means of refinement rules until an executable program is obtained [=-=Back, 1987-=-, Morgan, 1990], – specify a problem by means of a simple but possibly very inefficient program, and transform it to an efficient program using semantics-preserving transformation rules [Bird, 1987, M... |

108 | Introduction to Process Algebra
- Fokkink
- 2000
(Show Context)
Citation Context ...side operand. The algebra of communicating processes field traditionally defines interleave in terms of left-interleave (and “communication interleave”) to obtain a sound and complete axiomatisation [=-=Fokkink, 2000-=-]. ̸ ̸ ɛ <%> x = {x} x <%> ɛ = {x} x <%> y = x %> y ∪ y %> x (x ɛ ∧ y ɛ) ɛ %> y = ∅ ax %> y = {az | z ∈ x <%> y} The set abc %> de (where abc and de are now sentences) only contains the six sentences ... |

106 | Higher-order functions for parsing
- Hutton
- 1992
(Show Context)
Citation Context ...ivations (programs, but also derivations for other exercises). However, top-down recursive parsing using a left-recursive context-free grammar is difficult. A grammar expressed in parser combinators [=-=Hutton, 1992-=-] is not allowed to be left-recursive. Similarly, for a strategy to be used in our domain reasoner, it should not be left-recursive. In particular, trying to determine the next possible symbol(s) of a... |

84 | The behavior of tutoring systems - VanLehn |

78 |
The computer modeling of mathematical reasoning
- Bundy
- 1986
(Show Context)
Citation Context ...n completed. How do we guide a student in making progress to a complete solution? Whatever aspect of intelligence you attempt to model in a computer program, the same needs arise over and over again [=-=Bundy, 1983-=-]: – The need to have knowledge about the domain. – The need to reason with that knowledge. – The need for knowledge about how to direct or guide that reasoning. Our tutor is built for the domain of f... |

72 | The power of feedback - Hattie, Timperley - 2007 |

47 | Functional parsers
- Fokker
- 1995
(Show Context)
Citation Context ...epair (compare determining whether or not a grammar is LR(1) with determining whether or not a grammar is left-recursive). Left-recursion can sometimes be solved by using so-called chain combinators [=-=Fokker, 1995-=-]. Left-recursive strategies are not the only source of non-terminating strategy calculations. The fact that our strategy language has a fixed-point combinator (and hence recursion) implies that we ar... |

30 | Evolution of Novice Programming Environments: The Structure Editors
- MILLER, PANE, et al.
- 1994
(Show Context)
Citation Context ... these strategies can be translated to our strategy language, and can be reused for a programming language like Haskell. Our work resembles the top-down Pascal editors developed in the Genie project [=-=Miller et al., 1994-=-]. These series of editors provide structure editing support, so that student don’t have to remember the particular syntax of a programming language. In our case students do have to write programs usi... |

25 | From problems to programs via plans: the content and structure of knowledge for introductory LISP programming - Soloway - 1985 |

20 | Functional pearl: The zipper
- Huet
- 1997
(Show Context)
Citation Context ...s in an abstract syntax tree by means of one or more minor navigation rules, before it applies its argument strategy. The navigation rules are inspired by the operations on the zipper data structure [=-=Huet, 1997-=-]. These rules, usually called DOWN (go to the left-most child), RIGHT, LEFT, and UP, are used to navigate to a point of focus. Until now we have used holes to denote locations in terms, instead of a ... |

14 | Specifying strategies for exercises - Heeren, Jeuring, et al. - 2008 |

13 | Helmut Schwichtenberg. Normalization by evaluation - Berger, Eberl - 1998 |

12 | Guided programming and automated error analysis in an intelligent Prolog tutor - Hong - 2004 |

10 | Feedback services for exercise assistants
- Gerdes, Heeren, et al.
- 2008
(Show Context)
Citation Context ...d on strategies, is provided to external environments as a web-service. Each time a student clicks a button such as Check or Hint, our programming environment (the front-end) sends a service request [=-=Gerdes et al., 2008-=-] to our functional programming domain reasoner (the back-end). The domain reasoner is stateless: all information the domain reasoner needs is included in the service request. For example, a request t... |

10 | Programming environments for novices
- Guzdial
(Show Context)
Citation Context ...d on the age, interests, major subject, motivation, and background knowledge of a student. Programming environments for novices come in many variants, and for many programming languages or paradigms [=-=Guzdial, 2004-=-]. Programming environments like Scratch and Alice target younger students than we do, and emphasise the importance of constructing software with a strong visual component, with which students can dev... |

10 | Recognizing strategies - Heeren, Jeuring - 2008 |

10 | Arjan van IJzendoorn. Helium, for learning Haskell - Heeren, Leijen - 2003 |

10 | Automation and schema acquisition in learning elementary computer programming: Implications of the design of practice. Computers in Human Behavior 6 - Merrienboer, Paas - 1990 |

9 | Combinator parsing: A short tutorial
- Swierstra
- 2009
(Show Context)
Citation Context ... Current parsing libraries do not offer parser combinators for interleaving parsers, except for a (rather involved) extension implemented by Doaitse Swierstra on top of his parser combinator library [=-=Swierstra, 2009-=-]. 6. A strategy should be serialisable, for instance because we want to communicate with other on-line tools and environments. In earlier attempts to design a recogniser library for strategies, we tr... |

7 | Bergstra and Jan Willem Klop. Algebra of communicatingprocesses withabstraction - Jan - 1985 |

6 | Doaitse Swierstra and Luc Duponcheel. Deterministic, error-correcting combinator parsers - unknown authors - 1996 |

3 | Using strategies for assessment of programming exercises - Gerdes, Jeuring, et al. |

3 | Interleaving strategies - Heeren, Jeuring - 2011 |

1 | A special issue of the Journal of Functional Programming, see also http://www.haskell.org - Press - 2003 |