Fission for Program Comprehension

  • Jeremy Gibbons
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4014)


Fusion is a program transformation that combines adjacent computations, flattening structure and improving efficiency at the cost of clarity. Fission is the same transformation, in reverse: creating structure, ex nihilo. We explore the use of fission for program comprehension, that is, for reconstructing the design of a program from its implementation. We illustrate through rational reconstructions of the designs for three different C programs that count the words in a text file.


Reverse Engineering Nest Loop Program Comprehension Functional Programming Program Fusion 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Raymond, E.S. (ed.): The New Hacker’s Dictionary. MIT Press, Cambridge (1991)Google Scholar
  2. 2.
    Eastwood, A.: It’s a hard sell—and hard work too (software re-engineering). Computing Canada 18(22), 35 (1992)Google Scholar
  3. 3.
    Bird, R.S.: The promotion and accumulation strategies in transformational programming. ACM Trans. on Program. Lang. and Syst. 6(4), 487–504 (1984); Addendum in 7(3), 490–492 (1985)Google Scholar
  4. 4.
    Bird, R.S., Wadler, P.L.: An Introduction to Functional Programming. Prentice Hall, Englewood Cliffs (1988)Google Scholar
  5. 5.
    Meertens, L.: Paramorphisms. Formal Aspects of Comput. 4(5), 413–424 (1992)MATHCrossRefGoogle Scholar
  6. 6.
    Meijer, E., Fokkinga, M., Paterson, R.: Functional programming with bananas, lenses, envelopes and barbed wire. In: Hughes, J. (ed.) FPCA 1991. LNCS, vol. 523, pp. 124–144. Springer, Heidelberg (1991)Google Scholar
  7. 7.
    Swierstra, S.D., de Moor, O.: Virtual data structures. In: Möller, B., Schuman, S., Partsch, H. (eds.) Formal Program Development. LNCS, vol. 755, pp. 355–371. Springer, Heidelberg (1993)Google Scholar
  8. 8.
    Wadler, P.: Deforestation: Transforming programs to eliminate trees. Theor. Comput. Sci. 73, 231–248 (1990)MATHCrossRefMathSciNetGoogle Scholar
  9. 9.
    Gibbons, J.: Calculating functional programs. In: Blackhouse, R., Crole, R.L., Gibbons, J. (eds.) Algebraic and Coalgebraic Methods in the Mathematics of Program Construction. LNCS, vol. 2297, pp. 149–203. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  10. 10.
    Kernighan, B.W., Ritchie, D.M.: The C Programming Language. Prentice Hall, Englewood Cliffs (1988)Google Scholar
  11. 11.
    Weiser, M.: Program slicing. IEEE Trans. on Softw. Engin. 10(4), 352–357 (1984)CrossRefGoogle Scholar
  12. 12.
    Villavicencio, G., Oliveira, J.N.: Reverse program calculation supported by code slicing. In: Proc. of 8th Working Conf. on Reverse Engineering, WCRE 2001, pp. 35–48. IEEE, Los Alamitos (2001)CrossRefGoogle Scholar
  13. 13.
    Gibbons, J.: Origami programming. In: Gibbons, J., de Moor, O. (eds.) The Fun of Programming. Cornerstones in Computing, Palgrave, pp. 41–60 (2003)Google Scholar
  14. 14.
    Gibbons, J., Jones, G.: The under-appreciated unfold. In: Proc. of 3rd ACM SIGPLAN Int. Conf. on Functional Programming, ICFP 1988, pp. 273–279. ACM Press, New York (1998)CrossRefGoogle Scholar
  15. 15.
    Nelson, M.L.: A survey of reverse engineering and program comprehension. Techn. Report cs.SE/0503068, (1996)Google Scholar
  16. 16.
    Linger, R.C., Mills, H.D., Witt, B.I.: Structured Programming: Theory and Practice. Addison-Wesley, Reading (1979)MATHGoogle Scholar
  17. 17.
    Dromey, R.G.: How to Solve It by Computer. Prentice Hall, Englewood Cliffs (1982)MATHGoogle Scholar
  18. 18.
    Knuth, D.E.: Literate programming. Computer J. 27(2), 97–111 (1984)MATHCrossRefGoogle Scholar
  19. 19.
    Deimel, L.E., Naveda, J.F.: Reading computer programs: Instructor’s guide and exercises. Techn. Report CMU/SEI-90-EM-3. Software Engineering Inst., Carnegie-Mellon University (1990)Google Scholar
  20. 20.
    Ward, M.P., Bennett, K.H.: Recursion removal/introduction by formal transformation: An aid to program development and program comprehension. Computer J. 42(8), 650–673 (1999)MATHCrossRefGoogle Scholar
  21. 21.
    Oliveira, J.N.: Bagatelle in C arranged for VDM SoLo. J. of Univ. Comput. Sci. 7(8), 754–781 (2001)MATHGoogle Scholar
  22. 22.
    Augusteijn, L.: Sorting morphisms. In: Swierstra, S.D., Oliveira, J.N. (eds.) AFP 1998. LNCS, vol. 1608, pp. 1–27. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  23. 23.
    Gibbons, J.: Patterns in datatype-generic programming. In: Striegnitz, J., Davis, K. (eds.) Multiparadigm Programming 2003: Joint Proc. of 3rd Int. Wksh. on Multiparadigm Programming with Object-Oriented Languages, MPOOL 2003, and 1st Int. Wksh. on Declarative Programming in the Context of Object-Oriented Languages (PD-COOL 2003). NIC Series. John von Neumann Institute for Computing (NIC), vol. 27, pp. 277–289 (2003)Google Scholar
  24. 24.
    Gibbons, J.: Design patterns as higher-order datatype-generic programs (submitted for publication, 2006)Google Scholar
  25. 25.
    Johnson, R.: Documenting frameworks using patterns. In: Proc. of 7th Ann. Conf. on Object-Oriented Programming Systems, Languages and Applications, OOPSLA 1992, pp. 63–76. ACM Press, New York (1992)CrossRefGoogle Scholar
  26. 26.
    Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, Reading (1995)Google Scholar
  27. 27.
    Bobeff, G., Noyé, J.: Molding components using program specialization techniques. In: Bosch, J., Szyperski, C., Weck, W. (eds.) Proc. of 8th Int. Wksh. on Component-Oriented Programming, WCOP 2003 (2003)Google Scholar
  28. 28.
    Gallagher, K.B., Lyle, J.R.: Using program slicing in software maintenance. IEEE Trans. on Softw. Engin. 17(8), 751–761 (1991)CrossRefGoogle Scholar
  29. 29.
    PURe research group: Program understanding and re-engineering: Calculi and applications (1999-2005), Web site:

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Jeremy Gibbons
    • 1
  1. 1.Oxford University Computing LaboratoryOxfordUK

Personalised recommendations