Article contents
Functional Pearl
Back to basics: Deriving representation changers functionally
Published online by Cambridge University Press: 07 November 2008
Abstract
A representation changer is a function that converts a concrete representation of an abstract value into a different concrete representation of that value. Many useful functions can be recognised as representation changers; examples include compilers and arithmetic functions such as addition and multiplication. Functions that can be specified as the right inverse of other functions are special cases of representation changers. In recent years, a number of authors have used a relational calculus to derive representation changers from their specifications. In this paper, we show that the generality of relations is not essential, and representation changers can be derived within the more basic setting of functional programming. We illustrate our point by deriving a carry-save adder and a base-converter, two functions which have previously been derived relationally.
- Type
- Articles
- Information
- Copyright
- Copyright © Cambridge University Press 1996
References
- 8
- Cited by
Discussions
No Discussions have been published for this article.