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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Berghammer, R., Hoffmann, T., Leoniuk, B., Milanese, U.: Prototyping and Programming with Relations. ENTCS 44(3), 3.1–3.24 (2003)
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)
Brink, C., Kahl, W., Schmidt, G. (eds.): Relational Methods in Computer Science. Advances in Computing Science. Springer, Wien, New York (1997)
Bryant, R.E.: Graph-Based Algorithms for Boolean Function Manipulation. IEEE Transactions on Computers C-35(8), 677–691 (1986)
Coquand, C.: Agda (2000), http://www.cs.chalmers.se/~catarina/agda/
Desharnais, J., Möller, B., Struth, G.: Kleene Algebra with Domain. ACM Transactions on Computational Logic (2006)
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)
Freyd, P.J., Scedrov, A.: Categories, Allegories, North-Holland Mathematical Library, vol. 39. North-Holland, Amsterdam (1990)
Gansner, E.R., Koutsofios, E., North, S.C., Vo, K.-P.: A Technique for Drawing Directed Graphs. IEEE-TSE 19 214–230 (1993)
Haeberer, A., et al.: Fork Algebras. In: [3], Chapt. 4, pp. 54–69
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/
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)
Kahl, W.: Refactoring Heterogeneous Relation Algebras around Ordered Categories and Converse. J. Relational Methods in Comp. Sci. 1, 277–313 (2004)
Kahl, W.: HsDep: Dependency Graph Generator for Haskell Available at (2004), http://www.cas.mcmaster.ca/~kahl/Haskell/
Kozen, D.: A Completeness Theorem for Kleene Algebras and the Algebra of Regular Events. Inform. and Comput. 110(2), 366–390 (1991)
Kozen, D.: Kleene Algebra with Tests. ACM Transactions on Programming Languages and Systems, 427–443 (1997)
Kozen, D.: Typed Kleene Algebra. Technical Report 98-1669, Computer Science Department, Cornell University (1998)
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)
Mac Lane, S.: Categories for the Working Mathematician. Springer, Heidelberg (1971)
Milanese, U.: KURE: Kiel University Relation Package, Release 1.0. (2004), http://www.informatik.uni-kiel.de/~progsys/relview/kure
Möller, B.: Typed Kleene algebras. Technical Report 1999-8, Institut für Informatik, Universität Augsburg (1999)
Nilsson, M.: GBDD — A package for representing relations with BDDs (2004), Available from http://www.regularmodelchecking.com/
Peyton Jones, S., et al.: The Revised Haskell 98 Report. Cambridge University Press, Cambridge (2003), Also on http://haskell.org/
Schmidt, G., Hattensperger, C., Winter, M.: Heterogeneous Relation Algebra. In [3], Chapt. 3, pp. 39–53
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)
Tilson, B.: Categories as algebra: an essential ingredient in the theory of monoids. Journal of Pure and Applied Algebra 48, 83–198 (1987)
Weil, P.: Profinite methods in semigroup theory. Intl. J. Algebra Comput. 12, 137–178 (2002)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)