Functional Kleene Closures
We present a derivation of a purely functional version of Kleene’s closure algorithm for Kleene algebras (with tests) that contain a subset where the closure is already known. In particular, our result is applicable to the Kleene algebra of square matrices over a given Kleene algebra. Our approach is based solely on laws imposed on Kleene algebras and Boolean algebras. We implement our results in the functional programming language Haskell for the case of square matrices and discuss a general implementation. In this process we incorporate purely algebraic improvements like the use of commutativity to obtain a concise and optimised functional program. Our overall focus is on a functional program and the computational structures from which it is composed. Finally, we discuss our result particularly in light of alternative approaches.
KeywordsBoolean Algebra Partial Identity Closure Function Closure Operation Algebraic Reasoning
I thank Rudolf Berghammer for encouraging this work, Insa Stucke for comments and the reviewers for their much appreciated feedback.
- 4.Dolan, S.: Fun with semirings: a functional pearl on the abuse of linear algebra. In: Morrisett G., Uustalu T. (eds.) ICFP, pp. 101–110. ACM (2013)Google Scholar
- 9.Marlow, S. The Haskell Report (2010). www.haskell.org/onlinereport/haskell2010
- 10.O’Connor, R. (2011). http://r6.ca/blog/20110808T035622Z.html
- 11.Pettorossi, A.: Techniques for Searching, Parsing, and Matching. Aracne, Roma (2013) Google Scholar