Polytypic downwards accumulations

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


A downwards accumulation is a higher-order operation that distributes information downwards through a data structure, from the root towards the leaves. The concept was originally introduced in an ad hoc way for just a couple of kinds of tree. We generalize the concept to an arbitrary polynomial datatype; our generalization proceeds via the notion of a path in such a datatype.


Binary Tree External Node Function Path Label Type Label Variant 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Roland Backhouse, Henk Doornbos, and Paul Hoogendijk. A class of commuting relators. In STOP 1992 Summerschool on Constructive Algorithmics. STOP project, 1992.Google Scholar
  2. 2.
    Richard Bird, Oege de Moor, and Paul Hoogendijk. Generic functional programming with types and relations. Journal of Functional Programming, 6(1):1–28, 1996.MathSciNetMATHGoogle Scholar
  3. 3.
    Richard S. Bird. The promotion and accumulation strategies in transformational programming. ACM Transactions on Programming Languages and Systems, 6(4):487–504, October 1984. See also [4].MATHCrossRefMathSciNetGoogle Scholar
  4. 4.
    Richard S. Bird. Addendum to “The promotion and accumulation strategies in transformational programming”. ACM Transactions on Programming Languages and Systems, 7(3):490–492, July 1985.Google Scholar
  5. 5.
    Richard S. Bird. An introduction to the theory of lists. In M. Broy, editor, Logic of Programming and Calculi of Discrete Design, pages 3–42. Springer-Verlag, 1987. Also available as Technical Monograph PRG-56, from the Programming Research Group, Oxford University.Google Scholar
  6. 6.
    E. A. Boiten. Improving recursive functions by inverting the order of evaluation. Science of Computer Programming, 18:139–179, January 1992. Also in [7].MATHCrossRefMathSciNetGoogle Scholar
  7. 7.
    Eerke Boiten. Views of Formal Program Development. PhD thesis, Department of Informatics, University of Nijmegen, 1992.Google Scholar
  8. 8.
    Jeremy Gibbons. Algebras for Tree Algorithms. D. Phil. thesis, Programming Research Group, Oxford University, 1991. Available as Technical Monograph PRG-94.Google Scholar
  9. 9.
    Jeremy Gibbons. Upwards and downwards accumulations on trees. In R. S. Bird, C. C. Morgan, and J. C. P. Woodcock, editors, LNCS 669: Mathematics of Program Construction, pages 122–138. Springer-Verlag, 1993. A revised version appears in the Proceedings of the Massey Functional Programming Workshop, 1992.Google Scholar
  10. 10.
    Jeremy Gibbons. Computing downwards accumulations on trees quickly. Theoretical Computer Science, 169(1):67–80, 1996. Earlier version appeared in Proceedings of the 16th Australian Computer Science Conference, Brisbane, 1993.MATHCrossRefMathSciNetGoogle Scholar
  11. 11.
    Jeremy Gibbons. Deriving tidy drawings of trees. Journal of Functional Programming, 6(3):535–562, 1996. Earlier version appears as Technical Report No. 82, Department of Computer Science, University of Auckland.MATHMathSciNetCrossRefGoogle Scholar
  12. 12.
    Jeremy Gibbons. The Third Homomorphism Theorem. Journal of Functional Programming, 6(4):657–665, 1996. Earlier version appeared in C.B. Jay, editor, Computing: The Australian Theory Seminar, Sydney, December 1994, p. 62–69.MATHMathSciNetGoogle Scholar
  13. 13.
    Jeremy Gibbons and Geraint Jones. Against the grain: Linear-time breadth-first tree algorithms. Oxford Brookes University and Oxford University Computing Laboratory, 1998.Google Scholar
  14. 14.
    Paul Hoogendijk. A Generic Theory of Datatypes. PhD thesis, TU Eindhoven, 1997.Google Scholar
  15. 15.
    Johan Jeuring and Patrick Jansson. Polytypic programming. In John Launchbury, Erik Meijer, and Tim Sheard, editors, LNCS 1129: Advanced Functional Programming. Springer-Verlag, 1996.Google Scholar
  16. 16.
    Grant Malcolm. Data structures and program transformation. Science of Computer Programming, 14:255–279, 1990.MATHCrossRefMathSciNetGoogle Scholar
  17. 17.
    Lambert Meertens. Paramorphisms. Formal Aspects of Computing, 4(5):413–424, 1992. Also available as Technical Report CS-R9005, CWI, Amsterdam.Google Scholar
  18. 18.
    David B. Skillicorn. Structured parallel computation in structured documents. Journal of Universal Computer Science, 3(1), 1997.Google Scholar
  19. 19.
    Philip Wadler. Deforestation: Transforming programs to eliminate trees. Theoretical Computer Science, 73:231–248, 1990.MATHCrossRefMathSciNetGoogle Scholar
  20. 20.
    Mitchell Wand. Continuation-based program transformation strategies. Journal of the ACM, 27(1):164–180, January 1980.MATHCrossRefMathSciNetGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1998

Authors and Affiliations

  • Jeremy Gibbons
    • 1
  1. 1.School of Computing and Mathematical SciencesOxford Brookes UniversityOxfordUK

Personalised recommendations