Skip to main content

Functional Pearl: Back to basics: Deriving representation changers functionally

  • Graham Hutton and Erik Meijer (a1)

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.

Hide All
Davio, M., Deschamps, J.-P. and Thayse, A. (1983) Digital Systems, with Algorithm Implementation. Wiley.
Hutton, G. (1992) Between Functions and Relations in Calculating Programs. PhD thesis, University of Glasgow. (Available as Research Report FP-93-5.)
Jones, G. and Sheeran, M. (1990) Circuit design in Ruby. In Staunstrup, , editor, Formal Methods for VLSI Design. Elsevier.
Jones, G. and Sheeran, M. (1991) Relations and refinement in circuit design. In Morgan, , editor, Proc. BCS FACS Workshop on Refinement: Workshops in Computing. Springer-Verlag.
Jones, G. and Sheeran, M. (1992) Designing arithmetic circuits by refinement in Ruby. In Proc. 2nd Int. Conf. on Mathematics of Program Construction: Lecture Notes in Computer Science. Springer-Verlag.
Ross, K. A. and Wright, C. R. B. (1992) Discrete Mathematics. Prentice-Hall.
Runciman, C. and Jagger, N. (1990) Relative specification and transformational re-use of functional programs. lLisp and Symbolic Computation, 3: 2137.
Sheeran, M. (1986) Describing and reasoning about circuits using relations. In Tucker, et al. , editors, Proc. Workshop in Theoretical Aspects of VLSI. Leeds, UK.
Recommend this journal

Email your librarian or administrator to recommend adding this journal to your organisation's collection.

Journal of Functional Programming
  • ISSN: 0956-7968
  • EISSN: 1469-7653
  • URL: /core/journals/journal-of-functional-programming
Please enter your name
Please enter a valid email address
Who would you like to send this to? *


Full text views

Total number of HTML views: 0
Total number of PDF views: 7 *
Loading metrics...

Abstract views

Total abstract views: 87 *
Loading metrics...

* Views captured on Cambridge Core between September 2016 - 17th July 2018. This data will be updated every 24 hours.

Functional Pearl: Back to basics: Deriving representation changers functionally

  • Graham Hutton and Erik Meijer (a1)
Submit a response


No Discussions have been published for this article.


Reply to: Submit a response

Your details

Conflicting interests

Do you have any conflicting interests? *