Semigroupoid interfaces for relation-algebraic programming in haskell

  • Authors:
  • Wolfram Kahl

  • Affiliations:
  • McMaster University, Hamilton, Ontario, Canada

  • Venue:
  • RelMiCS'06/AKA'06 Proceedings of the 9th international conference on Relational Methods in Computer Science, and 4th international conference on Applications of Kleene Algebra
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

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.