Skip to main content

Constructing List Homomorphisms from Proofs

  • Conference paper
Programming Languages and Systems (APLAS 2011)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 7078))

Included in the following conference series:

Abstract

The well-known third list homomorphism theorem states that if a function h is both an instance of foldr and foldl, it is a list homomorphism. Plenty of previous works devoted to constructing list homomorphisms, however, overlook the fact that proving h is both a foldr and a foldl is often the hardest part which, once done, already provides a useful hint about what the resulting list homomorphism could be. In this paper we propose a new approach: to construct a possible candidate of the associative operator and, at the same time, to transform a proof that h is both a foldr and a foldl to a proof that h is a list homomorphism. The effort constructing the proof is thus not wasted, and the resulting program is guaranteed to be correct.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Bird, R.S.: An introduction to the theory of lists. In: Broy, M. (ed.) Logic of Programming and Calculi of Discrete Design. NATO ASI Series F, vol. 36, pp. 3–42. Springer, Heidelberg (1987)

    Google Scholar 

  2. Bird, R.S.: Introduction to Functional Programming using Haskell. Prentice-Hall (1998)

    Google Scholar 

  3. Bird, R.S., de Moor, O.: Algebra of Programming. International Series in Computer Science. Prentice-Hall (1997)

    Google Scholar 

  4. Cole, M.: Parallel programming, list homomorphisms and the maximum segment sum problems. Tech. Rep. CSR-25-93, Department of Computer Science, University of Edinburgh (1993)

    Google Scholar 

  5. Dijkstra, E.W.: The next fifty years. Tech. Rep. EWD1243, Eindhoven University of Technology (2004)

    Google Scholar 

  6. Geser, A., Gorlatch, S.: Parallelizing functional programs by generalization. Journal of Functional Programming 9(6), 649–673 (1999)

    Article  MathSciNet  MATH  Google Scholar 

  7. Gibbons, J.: The third homomorphism theorem. Journal of Functional Programming 6(4), 657–665 (1996)

    Article  MathSciNet  MATH  Google Scholar 

  8. Hu, Z., Iwasaki, H., Takeichi, M.: Construction of List Homomorphisms Via Tupling and Fusion. In: Penczek, W., Szałas, A. (eds.) MFCS 1996. LNCS, vol. 1113, pp. 407–418. Springer, Heidelberg (1996)

    Chapter  Google Scholar 

  9. Morihata, A., Matsuzaki, K., Hu, Z., Takeichi, M.: The third homomorphism theorem on trees: downward & upward lead to divide-and-conquer. In: Shao, Z., Pierce, B.C. (eds.) Symposium on Principles of Programming Languages, pp. 177–185. ACM Press, Savannah (2009)

    Google Scholar 

  10. Morita, K., Morihata, A., Matsuzaki, K., Hu, Z., Takeichi, M.: Automatic inversion generates divide-and-conquer parallel programs. In: Ferrante, J., McKinley, K.S. (eds.) Programming Language Design and Implementation, pp. 146–155. ACM Press (2007)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2011 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Chi, YY., Mu, SC. (2011). Constructing List Homomorphisms from Proofs. In: Yang, H. (eds) Programming Languages and Systems. APLAS 2011. Lecture Notes in Computer Science, vol 7078. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-25318-8_9

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-25318-8_9

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-25317-1

  • Online ISBN: 978-3-642-25318-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics