Math.Comput.Sci. (2010) 3:349–370
DOI 10.1007/s11786-010-0027-4 Mathematics in Computer Science
Specifying Rewrite Strategies for Interactive Exercises
Bastiaan Heeren · Johan Jeuring · Alex Gerdes
Received: 26 January 2009 / Revised: 30 July 2009 / Accepted: 10 December 2009 / Published online: 10 March 2010
© The Author(s) 2010. This article is published with open access at Springerlink.com
Abstract Strategies specify how a wide range of exercises can be solved incrementally, such as bringing a logic
proposition to disjunctive normal form, reducing a matrix, or calculating with fractions. In this paper we introduce
a language for specifying strategies for solving exercises. This language makes it easier to automatically calcu-
late feedback, for example when a user makes an erroneous step in a calculation. We can automatically generate
worked-out examples, track the progress of a student by inspecting submitted intermediate answers, and report
back suggestions in case the student deviates from the strategy. Thus it becomes less labor-intensive and less ad-
hoc to specify new exercise domains and exercises within that domain. A strategy describes valid sequences of
rewrite rules, which turns tracking intermediate steps into a parsing problem. This is a promising view at interactive
exercises because it allows us to take advantage of many years of experience in parsing sentences of context-free
languages, and transfer this knowledge and technology to the domain of stepwise solving exercises. In this paper
we work out the similarities between parsing and solving exercises incrementally, we discuss generating feedback
on strategies, and the implementation of a strategy recognizer.
Keywords Strategy language · Interactive exercises · Feedback · Recognizer · Context-free grammar
1 Introduction
Tools like Aplusix [12], Active-Math [21], MathPert [4], the Freudenthal Digital Mathematics Environment (DWO)
[5, 18], and our own tool for rewriting logic expressions [32] support solving mathematical exercises incrementally.
Ideally a tool gives detailed feedback on several levels. For example, when a student rewrites p → (r ↔ p) into
¬ p ∨ (r ↔ p, our tool will tell the student that there is a missing parenthesis. If the same expression is rewritten
into ¬ p ∧ (r ↔ p), it will tell the student that an error has been made when applying the definition of implication:
B. Heeren · J. Jeuring · A. Gerdes
School of Computer Science, Open Universiteit Nederland, P. O. Box 2960, 6401 DL Heerlen, The Netherlands
e-mail: bhr@ou.nl
A. Gerdes
e-mail: age@ou.nl
J. Jeuring (B)
Department of Information and Computing Sciences, Universiteit Utrecht, P. O. Box 80.089, 3508 TB Utrecht, The Netherlands
e-mail: johanj@cs.uu.nl; jje@ou.nl