Advertisement

Solving of Regular Equations Revisited

  • Martin SulzmannEmail author
  • Kenny Zhuo Ming Lu
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 11884)

Abstract

Solving of regular equations via Arden’s Lemma is folklore knowledge. We first give a concise algorithmic specification of all elementary solving steps. We then discuss a computational interpretation of solving in terms of coercions that transform parse trees of regular equations into parse trees of solutions. Thus, we can identify some conditions on the shape of regular equations under which resulting solutions are unambiguous. We apply our result to convert a DFA to an unambiguous regular expression. In addition, we show that operations such as subtraction and shuffling can be expressed via some appropriate set of regular equations. Thus, we obtain direct (algebraic) methods without having to convert to and from finite automaton.

Keywords

Regular equations and expressions Parse trees Ambiguity Subtraction Shuffling 

Notes

Acknowledgments

We thank referees for CIAA’18, ICTAC’18 and ICTAC’19 for their helpful comments on previous versions of this paper.

References

  1. 1.
    Ahn, J.-H., Han, Y.-S.: Implementation of state elimination using heuristics. In: Maneth, S. (ed.) CIAA 2009. LNCS, vol. 5642, pp. 178–187. Springer, Heidelberg (2009).  https://doi.org/10.1007/978-3-642-02979-0_21CrossRefGoogle Scholar
  2. 2.
    Arden, D.N.: Delayed-logic and finite-state machines. In: 2nd Annual Symposium on Switching Circuit Theory and Logical Design, Detroit, Michigan, USA, 17–20 October 1961, pp. 133–151 (1961)Google Scholar
  3. 3.
    Brabrand, C., Thomsen, J.G.: Typed and unambiguous pattern matching on strings using regular expressions. In: Proceedings of PPDP 2010, pp. 243–254. ACM (2010)Google Scholar
  4. 4.
    Brzozowski, J.A.: Derivatives of regular expressions. J. ACM 11(4), 481–494 (1964)MathSciNetCrossRefGoogle Scholar
  5. 5.
    Brzozowski, J.A., McCluskey, E.J.: Signal flow graph techniques for sequential circuit state diagrams. IEEE Trans. Electronic Computers 12(2), 67–76 (1963)CrossRefGoogle Scholar
  6. 6.
    Caron, P., Champarnaud, J.-M., Mignot, L.: A general framework for the derivation of regular expressions. RAIRO Theor. Inf. Appli. 48(3), 281–305 (2014)MathSciNetCrossRefGoogle Scholar
  7. 7.
    Frisch, A., Cardelli, L.: Greedy regular expression matching. In: Díaz, J., Karhumäki, J., Lepistö, A., Sannella, D. (eds.) ICALP 2004. LNCS, vol. 3142, pp. 618–629. Springer, Heidelberg (2004).  https://doi.org/10.1007/978-3-540-27836-8_53CrossRefGoogle Scholar
  8. 8.
    Grabmayer, C.: Using proofs by coinduction to find “traditional” proofs. In: Fiadeiro, J.L., Harman, N., Roggenbach, M., Rutten, J. (eds.) CALCO 2005. LNCS, vol. 3629, pp. 175–193. Springer, Heidelberg (2005).  https://doi.org/10.1007/11548133_12CrossRefGoogle Scholar
  9. 9.
    Gruber, H., Holzer, M.: From finite automata to regular expressions and back - a summary on descriptional complexity. Int. J. Found. Comput. Sci. 26(8), 1009–1040 (2015)MathSciNetCrossRefGoogle Scholar
  10. 10.
    Han, Y.-S.: State elimination heuristics for short regular expressions. Fundam. Inf. 128(4), 445–462 (2013)MathSciNetzbMATHGoogle Scholar
  11. 11.
    Hopcroft, J.E., Motwani, R., Ullman, J.D.: Introduction to Automata Theory, Languages, and Computation, 3rd edn. Addison-Wesley Longman Publishing Co. Inc., Boston (2006)zbMATHGoogle Scholar
  12. 12.
    Lu, K.Z.M., Sulzmann, M.: Solving regular expression equations. http://github.com/luzhuomi/regex-symb
  13. 13.
    Moreira, N., Nabais, D., Reis, R.: State elimination ordering strategies: some experimental results. In: Proceedings of DCFS 2010. EPTCS, vol. 31, pp. 139–148 (2010)CrossRefGoogle Scholar
  14. 14.
    Neumann, C.: Converting deterministic finite automata to regular expressions, March 2005. http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.85.2597
  15. 15.
    Rot, J., Bonsangue, M., Rutten, J.: Coinductive proof techniques for language equivalence. In: Dediu, A.-H., Martín-Vide, C., Truthe, B. (eds.) LATA 2013. LNCS, vol. 7810, pp. 480–492. Springer, Heidelberg (2013).  https://doi.org/10.1007/978-3-642-37064-9_42CrossRefzbMATHGoogle Scholar
  16. 16.
    Sakarovitch, J.: Elements of Automata Theory. Cambridge University Press, Cambridge (2009)CrossRefGoogle Scholar
  17. 17.
    Sakarovitch, J.: Automata and rational expressions (2015). https://arxiv.org/abs/1502.03573
  18. 18.
    Sulzmann, M., Lu, K.Z.M.: POSIX regular expression parsing with derivatives. In: Codish, M., Sumii, E. (eds.) FLOPS 2014. LNCS, vol. 8475, pp. 203–220. Springer, Cham (2014).  https://doi.org/10.1007/978-3-319-07151-0_13CrossRefGoogle Scholar
  19. 19.
    Sulzmann, M., Lu, K.Z.M.: Derivative-based diagnosis of regular expression ambiguity. Int. J. Found. Comput. Sci. 28(5), 543–562 (2017)MathSciNetCrossRefGoogle Scholar
  20. 20.
    Sulzmann, M., Thiemann, P.: Derivatives and partial derivatives for regular shuffle expressions. J. Comput. Syst. Sci. 104, 323–341 (2019)MathSciNetCrossRefGoogle Scholar
  21. 21.
    Thiemann, P.: Derivatives for enhanced regular expressions. In: Han, Y.-S., Salomaa, K. (eds.) CIAA 2016. LNCS, vol. 9705, pp. 285–297. Springer, Cham (2016).  https://doi.org/10.1007/978-3-319-40946-7_24CrossRefGoogle Scholar

Copyright information

© Springer Nature Switzerland AG 2019

Authors and Affiliations

  1. 1.Karlsruhe University of Applied SciencesKarlsruheGermany
  2. 2.Nanyang PolytechnicSingaporeSingapore

Personalised recommendations