Article contents
Countdown: A case study in origami programming
Published online by Cambridge University Press: 18 August 2005
Abstract
Countdown is the name of a game in which one is given a list of source numbers and a target number, with the aim of building an arithmetic expression out of the source numbers to get as close to the target as possible. Starting with a relational specification we derive a number of functional programs for solving Countdown. These programs are obtained by exploiting the properties of the folds and unfolds of various data types, a style of programming Gibbons has aptly called origami programming. Countdown is attractive as a case study in origami programming both as an illustration of how different algorithms can emerge from a single specification, as well as the space and time trade-offs that have to be taken into account in comparing functional programs.
- Type
- Article
- Information
- Copyright
- 2005 Cambridge University Press
- 2
- Cited by
Discussions
No Discussions have been published for this article.