Proving Correctness of Programs with IO —A Paradigm Comparison

  • Andrew Butterfield
  • Glenn Strong
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2312)


This paper discusses reasoning about IO operations in Haskell, Clean and C and compares the effect on ease of reasoning of the different approaches taken to IO in these languages. An IO system model is built using VDM and is used to prove a basic property of a program written in each of the three languages. We tentatively draw the conclusions that functional languages are easier to reason about and that Monads can make the reasoning process slightly more difficult, but note that much future work is needed.


Sugar Europe Posit 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. A+96.
    Joe Armstrong et al. Concurrent Programming in ERLANG. Prentice Hall Europe, London, 2nd edition edition, 1996.Google Scholar
  2. AW00.
    Peter Achten and Martin Wierich. A Tutorial to the Clean Object I/O Library—Version 1.2. Technical report, Dept. of Functional Programming, University of Nijmegen, The Netherlands, February 2000.Google Scholar
  3. Bd87.
    Richard Bird and Oege de Moor. Algebra of Programming. Series in Computer Science. Prentice Hall International, London, 1987.Google Scholar
  4. Bir98.
    Richard Bird. Introduction to Functional Programming using Haskell. Series in Computer Science. Prentice Hall, second edition edition, 1998.Google Scholar
  5. BJLM91.
    J.-P. Banatre, S.B. Jones, and D. Le Métayer. Prospects for Functional Programming in Software Engineering, volume 1 of ESPRIT Research Reports, Project 302. Springer-Verlag, Berlin, 1991.MATHGoogle Scholar
  6. BS00.
    Erik Barendsen and Sjaak Smetsers. Uniqueness typing for functional languages with graph rewriting semantics. Mathematical Structures in Computer Science, 00:pp1–36, 2000.Google Scholar
  7. BS01.
    Andrew Butterfield and Glenn Strong. Comparing I/O Proofs in Three Programming Paradigms: a Baseline. Technical Report TCD-CS-2001-31, Dublin University, Computer Science Department, Trinity College, Dublin, August 2001.Google Scholar
  8. Gor94.
    Andrew D. Gordon. Functional Programming and Input/ Output. Distinguished Dissertations in Computer Science. Cambridge University Press, 1994.Google Scholar
  9. H+99a.
    Zoltan Horvath et al. Proving the temporal properties of the unique world. In Software Technology, Fenno-Ugric Symposium FUSST’p99 Proceedings, pages pp113–125, Technical Report CS 104/99, Tallin, 1999.Google Scholar
  10. Hen87.
    M.C. Henson. Elements of Functional Languages. Computer Science Texts. Blackwell Scientific Publications, 1987.Google Scholar
  11. HJ98.
    C. A. R. Hoare and He Jifeng. Unifying Theories of Programming. Series in Computer Science. Prentice Hall International, London, 1998.Google Scholar
  12. Hug00.
    Arthur Hughes. Elements of an Operator Calculus. Ph.D. dissertation, University of Dublin, Trinity College, Department of Computer Science, 2000.Google Scholar
  13. Jon90.
    Cli. B. Jones. Systematic Software Development using VDM. Series in Computer Science. Prentice Hall International, London, 2nd edition, 1990.MATHGoogle Scholar
  14. KR88.
    Brian W. Kernighan and Dennis M. Ritchie. The C Programming Language. Software Series. Prentice Hall, 2nd edition, 1988.Google Scholar
  15. Mac90.
    Mýcheál Mac an Airchinnigh. Conceptual Models and Computing. Ph.D. dissertation, University of Dublin, Trinity College, Department of Computer Science, 1990.Google Scholar
  16. Mor94.
    Carroll Morgan. Programming from Specifications. Series in Computer Science. Prentice-Hall International, London, 2nd. edition, 1994.MATHGoogle Scholar
  17. PH+99.
    Simon Peyton Jones, John Hughes, et al. Haskell 98. Technical report,, 1999. URL:
  18. PJ87.
    S.L. Peyton-Jones. The Implementation of Functional Programming Languages. Series in Computer Science. Prentice Hall International, London, 1987.MATHGoogle Scholar
  19. PJ01.
    Simon Peyton-Jones. Tackling the awkward squad. Technical report, Microsoft Research, Cambridge, 2001.Google Scholar
  20. PvE98.
    Rinus Plasmeijer and Marko van Eekelen. Concurrent clean (version 1.3). Technical report, High Level Software Tools B.V. and University of Nijmegen, 1998. URLGoogle Scholar
  21. Sch88.
    David A. Schmidt. Denotational Semantics. William C. Brown, Dubuque, Iowa, 1988.Google Scholar
  22. Wad92.
    Philip Wadler. Monads for functional programming. Lecture Notes for Marktoberdorf Summer School on Program Design Calculi, Springer-Verlag, August 1992.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2002

Authors and Affiliations

  • Andrew Butterfield
    • 1
  • Glenn Strong
    • 1
  1. 1.Trinity CollegeDublin UniversityDublin

Personalised recommendations