skip to main content
research-article
Open Access

Guarded Kleene algebra with tests: verification of uninterpreted programs in nearly linear time

Published:20 December 2019Publication History
Skip Abstract Section

Abstract

Guarded Kleene Algebra with Tests (GKAT) is a variation on Kleene Algebra with Tests (KAT) that arises by restricting the union (+) and iteration (*) operations from KAT to predicate-guarded versions. We develop the (co)algebraic theory of GKAT and show how it can be efficiently used to reason about imperative programs. In contrast to KAT, whose equational theory is PSPACE-complete, we show that the equational theory of GKAT is (almost) linear time. We also provide a full Kleene theorem and prove completeness for an analogue of Salomaa’s axiomatization of Kleene Algebra.

References

  1. Carolyn Jane Anderson, Nate Foster, Arjun Guha, Jean-Baptiste Jeannin, Dexter Kozen, Cole Schlesinger, and David Walker. 2014. NetKAT: Semantic Foundations for Networks. In Proc. Principles of Programming Languages (POPL). ACM, New York, NY, USA, 113–126. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Allegra Angus and Dexter Kozen. 2001. Kleene Algebra with Tests and Program Schematology. Technical Report TR2001-1844. Computer Science Department, Cornell University.Google ScholarGoogle Scholar
  3. Edward A. Ashcroft and Zohar Manna. 1972. The translation of GOTO programs into WHILE programs. In Proc. Information Processing (IFIP), Vol. 1. North-Holland, Amsterdam, The Netherlands, 250–255.Google ScholarGoogle Scholar
  4. Roland Backhouse. 1975. Closure algorithms and the star-height problem of regular languages. Ph.D. Dissertation. University of London. http://ethos.bl.uk/OrderDetails.do?uin=uk.bl.ethos.448525Google ScholarGoogle Scholar
  5. Adam Barth and Dexter Kozen. 2002. Equational Verification of Cache Blocking in LU Decomposition using Kleene Algebra with Tests. Technical Report TR2002-1865. Computer Science Department, Cornell University.Google ScholarGoogle Scholar
  6. Garrett Birkhoff and Thomas C. Bartee. 1970. Modern applied algebra. McGraw-Hill, New York, NY, USA.Google ScholarGoogle Scholar
  7. Corrado Böhm and Guiseppe Jacopini. 1966. Flow Diagrams, Turing Machines and Languages with only Two Formation Rules. Commun. ACM (May 1966), 366–371. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Filippo Bonchi and Damien Pous. 2013. Checking NFA equivalence with bisimulations up to congruence. In Proc. Principles of Programming Languages (POPL). ACM, New York, NY, USA, 457–468. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Ernie Cohen. 1994a. Lazy Caching in Kleene Algebra.Google ScholarGoogle Scholar
  10. Ernie Cohen. 1994b. Using Kleene algebra to reason about concurrency control. Technical Report. Telcordia, Morristown, NJ.Google ScholarGoogle Scholar
  11. Ernie Cohen, Dexter Kozen, and Frederick Smith. 1996. The complexity of Kleene algebra with tests. Technical Report TR96-1598. Computer Science Department, Cornell University.Google ScholarGoogle Scholar
  12. John Horton Conway. 1971. Regular Algebra and Finite Machines. Chapman and Hall, London, United Kingdom.Google ScholarGoogle Scholar
  13. Ana M. Erosa and Laurie J. Hendren. 1994. Taming Control Flow: A Structured Approach to Eliminating Goto Statements. In Proc. Computer Languages (ICCL). IEEE Computer Society, Los Alamitos, CA, USA, 229–240. Google ScholarGoogle ScholarCross RefCross Ref
  14. Michael J. Fischer and Richard E. Ladner. 1979. Propositional dynamic logic of regular programs. J. Comput. System Sci. 18, 2 (1979), 194–211. Google ScholarGoogle ScholarCross RefCross Ref
  15. Nate Foster, Dexter Kozen, Konstantinos Mamouras, Mark Reitblatt, and Alexandra Silva. 2016. Probabilistic NetKAT. In Proc. European Symposium on Programming (ESOP). ACM, New York, NY, USA, 282–309. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Nate Foster, Dexter Kozen, Matthew Milano, Alexandra Silva, and Laure Thompson. 2015. A Coalgebraic Decision Procedure for NetKAT. In Proc. Principles of Programming Languages (POPL). ACM, New York, NY, USA, 343–355. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Stephen J. Garland and David C. Luckham. 1973. Program schemes, recursion schemes, and formal languages. J. Comput. System Sci. 7, 2 (1973), 119 – 160. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Michele Giry. 1982. A categorical approach to probability theory. In Categorical aspects of topology and analysis. Springer, Berlin, Heidelberg, 68–85. Google ScholarGoogle Scholar
  19. Laurie J. Hendren, C. Donawa, Maryam Emami, Guang R. Gao, Justiani, and B. Sridharan. 1992. Designing the McCAT Compiler Based on a Family of Structured Intermediate Representations. In Proc. Languages and Compilers for Parallel Computing (LCPC). Springer, Berlin, Heidelberg, 406–420. Google ScholarGoogle ScholarCross RefCross Ref
  20. John E. Hopcroft and Richard M. Karp. 1971. A linear algorithm for testing equivalence of finite automata. Technical Report TR 71-114. Cornell University.Google ScholarGoogle Scholar
  21. I. Ianov. 1960. The Logical Schemes of Algorithms. Problems of Cybernetics (1960), 82–140.Google ScholarGoogle Scholar
  22. Donald M. Kaplan. 1969. Regular Expressions and the Equivalence of Programs. J. Comput. System Sci. 3 (1969), 361–386. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Stephen C. Kleene. 1956. Representation of Events in Nerve Nets and Finite Automata. Automata Studies (1956), 3–41.Google ScholarGoogle Scholar
  24. S. Rao Kosaraju. 1973. Analysis of structured programs. In Proc. Theory of Computing (STOC). ACM, New York, NY, USA, 240–252. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Dexter Kozen. 1996. Kleene algebra with tests and commutativity conditions. In Proc. Tools and Algorithms for the Construction and Analysis of Systems (TACAS) (Lecture Notes in Computer Science), Vol. 1055. Springer-Verlag, Passau, Germany, 14–33. Google ScholarGoogle ScholarCross RefCross Ref
  26. Dexter Kozen. 1997. Kleene algebra with tests. ACM Transactions on Programming Languages and Systems (TOPLAS) 19, 3 (May 1997), 427–443. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Dexter Kozen. 2003. Automata on Guarded Strings and Applications. Matématica Contemporânea 24 (2003), 117–139.Google ScholarGoogle Scholar
  28. Dexter Kozen. 2008. Nonlocal Flow of Control and Kleene Algebra with Tests. In Proc. Logic in Computer Science (LICS). IEEE, New York, NY, USA, 105–117. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Dexter Kozen and Maria-Cristina Patron. 2000. Certification of compiler optimizations using Kleene algebra with tests. In Proc. Computational Logic (CL) (Lecture Notes in Artificial Intelligence), Vol. 1861. Springer-Verlag, London, United Kingdom, 568–582. Google ScholarGoogle ScholarCross RefCross Ref
  30. Dexter Kozen and Frederick Smith. 1996. Kleene algebra with tests: Completeness and decidability. In Proc. Computer Science Logic (CSL) (Lecture Notes in Computer Science), Vol. 1258. Springer-Verlag, Utrecht, The Netherlands, 244–259. Google ScholarGoogle ScholarCross RefCross Ref
  31. Dexter Kozen and Wei-Lung (Dustin) Tseng. 2008. The Böhm-Jacopini Theorem is False, Propositionally. In Proc. Mathematics of Program Construction (MPC) (Lecture Notes in Computer Science), Vol. 5133. Springer, Berlin, Heidelberg, 177–192. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. David C. Luckham, David M. R. Park, and Michael S. Paterson. 1970. On formalised computer programs. J. Comput. System Sci. 4, 3 (1970), 220–249. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Michael W. Mislove. 2006. On Combining Probability and Nondeterminism. Electronic Notes in Theoretical Computer Science 162 (2006), 261 – 265. Google ScholarGoogle ScholarCross RefCross Ref
  34. Paul H. Morris, Ronald A. Gray, and Robert E. Filman. 1997. GOTO Removal Based on Regular Expressions. Journal of Software Maintenance: Research and Practice 9, 1 (1997), 47–66. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Greg Nelson and Derek C. Oppen. 1979. Simplification by Cooperating Decision Procedures. ACM Transactions on Programming Languages and Systems (TOPLAS) 1, 2 (1979), 245–257. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. G. Oulsnam. 1982. Unraveling unstructured programs. Comput. J. 25, 3 (1982), 379–387. Google ScholarGoogle ScholarCross RefCross Ref
  37. Michael S. Paterson and Carl E. Hewitt. 1970. Comparative schematology. In Record of Project MAC Conference on Concurrent Systems and Parallel Computation. ACM, New York, NY, USA, 119–127.Google ScholarGoogle Scholar
  38. W. Wesley Peterson, Tadao Kasami, and Nobuki Tokura. 1973. On the Capabilities of while, repeat, and exit Statements. Commun. ACM 16, 8 (1973), 503–512. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. Damien Pous. 2015. Symbolic Algorithms for Language Equivalence and Kleene Algebra with Tests. In Proc. Principles of Programming Languages (POPL). ACM, New York, NY, USA, 357–368. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. Lyle Ramshaw. 1988. Eliminating goto’s while preserving program structure. J. ACM 35, 4 (1988), 893–920. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. Joseph D. Rutledge. 1964. On Ianov’s Program Schemata. J. ACM 11, 1 (Jan. 1964), 1–9. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. Jan J. M. M. Rutten. 2000. Universal coalgebra: a theory of systems. Theoretical Computer Science 249, 1 (2000), 3–80. Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. Arto Salomaa. 1966. Two complete axiom systems for the algebra of regular events. J. ACM 13, 1 (January 1966), 158–169.Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. John C. Shepherdson and Howard E. Sturgis. 1963. Computability of Recursive Functions. J. ACM 10, 2 (1963), 217–255. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. Alexandra Silva. 2010. Kleene Coalgebra. Ph.D. Dissertation. Radboud University.Google ScholarGoogle Scholar
  46. Steffen Smolka, Nate Foster, Justin Hsu, Tobias Kappé, Dexter Kozen, and Alexandra Silva. 2019a. Guarded Kleene Algebra with Tests: Verification of Uninterpreted Programs in Nearly Linear Time (Extended Version). arXiv: 1907.05920Google ScholarGoogle Scholar
  47. Steffen Smolka, Praveen Kumar, David M. Kahn, Nate Foster, Justin Hsu, Dexter Kozen, and Alexandra Silva. 2019b. Scalable verification of probabilistic networks. In Proc. Programming Language Design and Implementation (PLDI). ACM, New York, NY, USA, 190–203. Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. Robert Endre Tarjan. 1975. Efficiency of a Good But Not Linear Set Union Algorithm. J. ACM 22, 2 (1975), 215–225. Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. Ken Thompson. 1968. Regular Expression Search Algorithm. Commun. ACM 11, 6 (1968), 419–422. Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. Daniele Varacca and Glynn Winskel. 2006. Distributing probability over non-determinism. Mathematical Structures in Computer Science 16, 1 (2006), 87–113. Google ScholarGoogle ScholarDigital LibraryDigital Library
  51. M. Williams and H. Ossher. 1978. Conversion of unstructured flow diagrams into structured form. Comput. J. 21, 2 (1978), 161–167. Google ScholarGoogle ScholarCross RefCross Ref

Index Terms

  1. Guarded Kleene algebra with tests: verification of uninterpreted programs in nearly linear time

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!