Generic Programming for Domain Reasoners

Johan Jeuring, José Pedro Magalhães, and Bastiaan Heeren

An exercise assistant is a tool that supports students learning procedural skills, such as solving systems of linear equations, or rewriting a logic expression to disjunctive normal form. The domain reasoner is the component of an exercise assistant that deals with tasks that depend on the semantics of a particular domain. An exercise assistant typically has multiple domain reasoners, and the behavior of each of these is, to a large extent, determined by the domain.
Generic programming techniques claim to reduce code duplication, to make it easier to change the structure of data, and to provide implementations of many useful functions on most datatypes. There are many libraries for generic programming, all with different datatype support, expressiveness, and ease of use. While a lot of effort has been put into developing new libraries in the past few years, there are few examples of real-life applications of generic programming. In this paper we describe our experience with applying generic programming techniques to our domain reasoners implemented in Haskell. We assess and compare the resulting generic domain reasoners with each other and with the initial, non-generic version, using the software quality factors of the ISO 9126 international standard.

In Proceedings of the Tenth Symposium on Trends in Functional Programming, TFP 2009, pages 113-128, 2009.
Download paper (© 2009, Intellect)

Links