Skip to main content

Programming from Galois Connections

  • Conference paper

Part of the Lecture Notes in Computer Science book series (LNTCS,volume 6663)

Abstract

Problem statements often resort to superlatives such as in eg. “. . . the smallest such number”, “. . . the best approximation”, “. . . the longest such list” which lead to specifications made of two parts: one defining a broad class of solutions (the easy part) and the other requesting the optimal such solution (the hard part).

This paper introduces a binary relational combinator which mirrors this linguistic structure and exploits its potential for calculating programs by optimization. This applies in particular to specifications written in the form of Galois connections, in which one of the adjoints delivers the optimal solution being sought.

The framework encompasses re-factoring of results previously developed by Bird and de Moor for greedy and dynamic programming, in a way which makes them less technically involved and therefore easier to understand and play with.

Keywords

  • Hard Part
  • Topological Order
  • Monotonicity Condition
  • Inductive Relation
  • Galois Connection

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

This is a preview of subscription content, access via your institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • DOI: 10.1007/978-3-642-21070-9_22
  • Chapter length: 20 pages
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
eBook
USD   74.99
Price excludes VAT (USA)
  • ISBN: 978-3-642-21070-9
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
Softcover Book
USD   99.00
Price excludes VAT (USA)

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Aarts, C., Backhouse, R., Hoogendijk, P., Voermans, E., van der Woude, J.: A relational theory of datatypes (December 1992), http://www.cs.nott.ac.uk/~rcb

  2. Backhouse, R.: Chapter 4 Galois connections and fixed point calculus. In: Blackhouse, R., Crole, R.L., Gibbons, J. (eds.) Algebraic and Coalgebraic Methods in the Mathematics of Program Construction. LNCS, vol. 2297, pp. 89–148. Springer, Heidelberg (2002)

    CrossRef  Google Scholar 

  3. Backhouse, R.: Program Construction: Calculating Implementations from Specifications. John Wiley & Sons, Inc., New York (2003)

    Google Scholar 

  4. Bird, R., de Moor, O.: Algebra of Programming. Series in Computer Science. Prentice-Hall International, Englewood Cliffs (1997) C.A.R. Hoare, series editor

    MATH  Google Scholar 

  5. Dijkstra, E.: A Discipline of Programming. Prentice-Hall, Englewood Cliffs (1976)

    MATH  Google Scholar 

  6. Doornbos, H., Backhouse, R., van der Woude, J.: A calculational approach to mathematical induction. Theor. Comp. Science 179(1-2), 103–135 (1997)

    MathSciNet  CrossRef  MATH  Google Scholar 

  7. Ferreira, M., Oliveira, J.: Variations on an Alloy-centric tool-chain in verifying a journaled file system model. Technical Report DI-CCTC-10-07, Univ. of Minho (January 2010)

    Google Scholar 

  8. Freyd, P., Scedrov, A.: Categories, Allegories, Mathematical Library, vol. 39. North-Holland, Amsterdam (1990)

    MATH  Google Scholar 

  9. Jackson, D.: Software Abstractions: Logic, Language, and Analysis, 9th edn. The MIT Press, Cambridge (2006) ISBN 0-262-10114-9

    Google Scholar 

  10. Jones, C.: Software Development — A Rigorous Approach. Prentice-Hall International, Englewood Cliffs (1980)

    MATH  Google Scholar 

  11. Knuth, D.: The Art of Computer Programming, 2nd edn. Addison/Wesley, Amsterdam (1997)

    MATH  Google Scholar 

  12. Kramer, J.: Is abstraction the key to computing? Commun. ACM 50(4), 37–42 (2007)

    CrossRef  Google Scholar 

  13. Melton, A., Schmidt, D.A., Strecker, G.E.: Galois connections and computer science applications. In: Poigné, A., Pitt, D.H., Rydeheard, D.E., Abramsky, S. (eds.) Category Theory and Computer Programming. LNCS, vol. 240, pp. 299–312. Springer, Heidelberg (1986)

    CrossRef  Google Scholar 

  14. Mu, S.C., Oliveira, J.: Programming from Galois Connections — Principles and Applications. Tech. Report TR-IIS-10-009, Academia Sinica (December 2010)

    Google Scholar 

  15. Oliveira, J.: Extended static checking by calculation using the pointfree transform. In: Bove, A., Barbosa, L.S., Pardo, A., Pinto, J.S. (eds.) Language Engineering and Rigorous Software Development. LNCS, vol. 5520, pp. 195–251. Springer, Heidelberg (2009)

    CrossRef  Google Scholar 

  16. Oliveira, J.: A Look at Program “Galculation”. Presentation at the IFIP WG 2.1 #65 Meeting (January 2010)

    Google Scholar 

  17. Oliveira, J.N., Rodrigues, C.J.: Pointfree factorization of operation refinement. In: Misra, J., Nipkow, T., Karakostas, G. (eds.) FM 2006. LNCS, vol. 4085, pp. 236–251. Springer, Heidelberg (2006)

    CrossRef  Google Scholar 

  18. Silva, P., Oliveira, J.: ‘Galculator’: functional prototype of a Galois-connection based proof assistant. In: PPDP 2008, pp. 44–55. ACM, New York (2008)

    Google Scholar 

  19. Tarski, A., Givant, S.: A Formalization of Set Theory without Variables, vol. 41. A. M. Society, AMS Colloquium Publications (1987)

    Google Scholar 

  20. Ullman, J.: Principles of Database Systems. Computer Science Press, Rockville (1981)

    MATH  Google Scholar 

  21. Wirth, N.: Algorithms + Data Structures = Programs. Prentice-Hall, Englewood Cliffs (1976)

    MATH  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

Mu, SC., Oliveira, J.N. (2011). Programming from Galois Connections. In: de Swart, H. (eds) Relational and Algebraic Methods in Computer Science. RAMICS 2011. Lecture Notes in Computer Science, vol 6663. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-21070-9_22

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-21070-9_22

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-21069-3

  • Online ISBN: 978-3-642-21070-9

  • eBook Packages: Computer ScienceComputer Science (R0)