Skip to main content

Semigroupoid Interfaces for Relation-Algebraic Programming in Haskell

  • Conference paper
Relations and Kleene Algebra in Computer Science (RelMiCS 2006)

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

Included in the following conference series:

Abstract

We present a Haskell interface for manipulating finite binary relations as data in a point-free relation-algebraic programming style that integrates naturally with the current Haskell collection types. This approach enables seamless integration of relation-algebraic formulations to provide elegant solutions of problems that, with different data organisation, are awkward to tackle.

Perhaps surprisingly, the mathematical foundations for dealing with finite relations in such a context are not well-established, so we provide an appropriate generalisation of relational categories to semigroupoids to serve as specification for our interface.

After having established an appropriate interface for relation-algebraic programming, we also need an efficient implementation; we find this in BDD-based kernel library KURE of recent versions of the Kiel RelView system. We show how this combination enables high-level declarative and efficient relational programming in Haskell.

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. Berghammer, R., Hoffmann, T., Leoniuk, B., Milanese, U.: Prototyping and Programming with Relations. ENTCS 44(3), 3.1–3.24 (2003)

    Google Scholar 

  2. Berghammer, R., Milanese, U.: Relational Approach to Boolean Logic Problems. In: MacCaull, W., Winter, M., Düntsch, I. (eds.) RelMiCS 2005. LNCS, vol. 3929, pp. 48–59. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  3. Brink, C., Kahl, W., Schmidt, G. (eds.): Relational Methods in Computer Science. Advances in Computing Science. Springer, Wien, New York (1997)

    MATH  Google Scholar 

  4. Bryant, R.E.: Graph-Based Algorithms for Boolean Function Manipulation. IEEE Transactions on Computers C-35(8), 677–691 (1986)

    Article  Google Scholar 

  5. Coquand, C.: Agda (2000), http://www.cs.chalmers.se/~catarina/agda/

  6. Desharnais, J., Möller, B., Struth, G.: Kleene Algebra with Domain. ACM Transactions on Computational Logic (2006)

    Google Scholar 

  7. Dougherty, D., Gutiérrez, C.: Normal Forms and Reduction for Theories of Binary Relations. In: Bachmair, L. (ed.) RTA 2000. LNCS, vol. 1833, pp. 95–109. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

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

    Google Scholar 

  9. Gansner, E.R., Koutsofios, E., North, S.C., Vo, K.-P.: A Technique for Drawing Directed Graphs. IEEE-TSE 19 214–230 (1993)

    Google Scholar 

  10. Haeberer, A., et al.: Fork Algebras. In: [3], Chapt. 4, pp. 54–69

    Google Scholar 

  11. Kahl, W., Schmidt, G.: Exploring (Finite) Relation Algebras Using Tools Written in Haskell. Technical Report 2000-02, Fakultät für Informatik, Universität der Bundeswehr München (2000), http://ist.unibw-muenchen.de/relmics/tools/RATH/

  12. Kahl, W.: A Relation-Algebraic Approach to Graph Structure Transformation, Habil. Thesis, Fakultät für Informatik, Univ. der Bundeswehr München, Techn. Bericht 2002-03 (2001)

    Google Scholar 

  13. Kahl, W.: Refactoring Heterogeneous Relation Algebras around Ordered Categories and Converse. J. Relational Methods in Comp. Sci. 1, 277–313 (2004)

    Google Scholar 

  14. Kahl, W.: HsDep: Dependency Graph Generator for Haskell Available at (2004), http://www.cas.mcmaster.ca/~kahl/Haskell/

  15. Kozen, D.: A Completeness Theorem for Kleene Algebras and the Algebra of Regular Events. Inform. and Comput. 110(2), 366–390 (1991)

    Article  MathSciNet  Google Scholar 

  16. Kozen, D.: Kleene Algebra with Tests. ACM Transactions on Programming Languages and Systems, 427–443 (1997)

    Google Scholar 

  17. Kozen, D.: Typed Kleene Algebra. Technical Report 98-1669, Computer Science Department, Cornell University (1998)

    Google Scholar 

  18. Leoniuk, B.: ROBDD-basierte Implementierung von Relationen und relationalen Operationen mit Anwendungen. PhD thesis, Institut für Informatik und Praktische Mathematik, Christian-Albrechts-Universität Kiel (2001)

    Google Scholar 

  19. Mac Lane, S.: Categories for the Working Mathematician. Springer, Heidelberg (1971)

    MATH  Google Scholar 

  20. Milanese, U.: KURE: Kiel University Relation Package, Release 1.0. (2004), http://www.informatik.uni-kiel.de/~progsys/relview/kure

  21. Möller, B.: Typed Kleene algebras. Technical Report 1999-8, Institut für Informatik, Universität Augsburg (1999)

    Google Scholar 

  22. Nilsson, M.: GBDD — A package for representing relations with BDDs (2004), Available from http://www.regularmodelchecking.com/

  23. Peyton Jones, S., et al.: The Revised Haskell 98 Report. Cambridge University Press, Cambridge (2003), Also on http://haskell.org/

    Google Scholar 

  24. Schmidt, G., Hattensperger, C., Winter, M.: Heterogeneous Relation Algebra. In [3], Chapt. 3, pp. 39–53

    Google Scholar 

  25. Schröder, L.: Isomorphisms and splitting of idempotents in semicategories. Cahiers de Topologie et Géométrie Différentielle catégoriques 41, 143–153 (2000)

    MATH  Google Scholar 

  26. Tilson, B.: Categories as algebra: an essential ingredient in the theory of monoids. Journal of Pure and Applied Algebra 48, 83–198 (1987)

    Article  MathSciNet  MATH  Google Scholar 

  27. Weil, P.: Profinite methods in semigroup theory. Intl. J. Algebra Comput. 12, 137–178 (2002)

    Article  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2006 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Kahl, W. (2006). Semigroupoid Interfaces for Relation-Algebraic Programming in Haskell. In: Schmidt, R.A. (eds) Relations and Kleene Algebra in Computer Science. RelMiCS 2006. Lecture Notes in Computer Science, vol 4136. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11828563_16

Download citation

  • DOI: https://doi.org/10.1007/11828563_16

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-37873-0

  • Online ISBN: 978-3-540-37874-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics