Skip to main content

Exact Searching for the Smallest Deterministic Automaton

  • Conference paper
  • First Online:
Computational Science – ICCS 2021 (ICCS 2021)

Abstract

We propose an approach to minimum-state deterministic finite automaton (DFA) inductive synthesis that is based on using satisfiability modulo theories (SMT) solvers. To that end, we explain how DFAs and their response to input samples can be encoded as logic formulas with integer variables, equations, and uninterpreted functions. An SMT solver is then tasked with finding an assignment for such a formula, from which we can extract the automaton of a required size. We provide an implementation of this approach, which we use to conduct experiments on a series of benchmarks. The results showed that our method outperforms in terms of CPU time other SAT and SMT approaches and other exact algorithms on prepared benchmarks.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    https://github.com/wieczorekw/wieczorekw.github.io/tree/master/SMT4DFA.

  2. 2.

    https://github.com/Z3Prover/z3.

  3. 3.

    The independent set problem and the well-known clique problem are complementary: a clique in G is an independent set in the complement graph of G and vice versa.

  4. 4.

    https://github.com/wieczorekw/wieczorekw.github.io/tree/master/SMT4DFA.

  5. 5.

    We have obtained Linux executable file from the authors.

  6. 6.

    https://github.com/lazarow/exbar.

  7. 7.

    https://github.com/ctlab/DFA-Inductor.

  8. 8.

    https://gitlab.science.ru.nl/rick/z3gi/tree/lata.

  9. 9.

    Refer to Chap. 6 of [11] for the formal definition of this concept.

  10. 10.

    https://github.com/lazarow/exbar/tree/master/samples.

References

  1. Angluin, D.: An application of the theory of computational complexity to the study of inductive inference. Ph.D. thesis, University of California (1976)

    Google Scholar 

  2. Barrett, C., Fontaine, P., Tinelli, C.: The SMT-LIB standard: version 2.6. Technical report, Department of Computer Science, The University of Iowa (2017)

    Google Scholar 

  3. Coste, F., Nicolas, J.: Regular inference as a graph coloring problem. In: Workshop on Grammar Inference, Automata Induction, and Language Acquisition, ICML 1997 (1997)

    Google Scholar 

  4. Crawford, J.M., Ginsberg, M.L., Luks, E.M., Roy, A.: Symmetry-breaking predicates for search problems. In: Proceedings of the Fifth International Conference on Principles of Knowledge Representation and Reasoning, pp. 148–159. Morgan Kaufmann Publishers Inc. (1996)

    Google Scholar 

  5. Downey, P.J., Sethi, R., Tarjan, R.E.: Variations on the common subexpression problem. J. ACM 27(4), 758–771 (1980)

    Article  MathSciNet  Google Scholar 

  6. Dutertre, B., de Moura, L.: A fast linear-arithmetic solver for DPLL(T). In: Ball, T., Jones, R.B. (eds.) CAV 2006. LNCS, vol. 4144, pp. 81–94. Springer, Heidelberg (2006). https://doi.org/10.1007/11817963_11

    Chapter  Google Scholar 

  7. Gold, E.M.: Complexity of automaton identification from given data. Inf. Control 37, 302–320 (1978)

    Article  MathSciNet  Google Scholar 

  8. Gold, E.M.: Language identification in the limit. Inf. Control 10, 447–474 (1967)

    Article  MathSciNet  Google Scholar 

  9. Halldórsson, M.M., Radhakrishnan, J.: Greed is good: approximating independent sets in sparse and bounded-degree graphs. Algorithmica 18(1), 145–163 (1997)

    Article  MathSciNet  Google Scholar 

  10. Heule, M.J.H., Verwer, S.: Exact DFA identification using SAT solvers. In: Sempere, J.M., García, P. (eds.) ICGI 2010. LNCS (LNAI), vol. 6339, pp. 66–79. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-15488-1_7

    Chapter  Google Scholar 

  11. de la Higuera, C.: Grammatical Inference: Learning Automata and Grammars. Cambridge University Press, New York (2010)

    Book  Google Scholar 

  12. Hopcroft, J.E., Motwani, R., Ullman, J.D.: Introduction to Automata Theory, Languages, and Computation, 2nd edn. Addison-Wesley, Boston (2001)

    MATH  Google Scholar 

  13. Imada, K., Nakamura, K.: Learning context free grammars by using SAT solvers. In: Proceedings of the ICMLA 2009, pp. 267–272. IEEE Computer Society (2009)

    Google Scholar 

  14. Kroening, D., Strichman, O.: Decision Procedures - An Algorithmic Point of View. TTCSTTCS, 2nd edn. Springer, Heidelberg (2016). https://doi.org/10.1007/978-3-662-50497-0

    Book  MATH  Google Scholar 

  15. Lang, K.J.: Faster algorithms for finding minimal consistent DFAs. Technical report, NEC Research Institute (1999)

    Google Scholar 

  16. de Moura, L., Bjørner, N.: Z3: an efficient SMT solver. In: Ramakrishnan, C.R., Rehof, J. (eds.) TACAS 2008. LNCS, vol. 4963, pp. 337–340. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-78800-3_24

    Chapter  Google Scholar 

  17. Pena, J.M., Oliveira, A.L.: A new algorithm for exact reduction of incompletely specified finite state machines. IEEE Trans. CAD Integr. Circuits Syst. 18(11), 1619–1632 (1999). https://doi.org/10.1109/43.806807

    Article  Google Scholar 

  18. Prechelt, L.: An empirical comparison of C, C++, Java, Perl, Python, Rexx and Tcl. IEEE Comput 33(10), 23–29 (2000)

    Google Scholar 

  19. Sakakibara, Y.: Learning context-free grammars using tabular representations. Pattern Recogn. 38(9), 1372–1383 (2005)

    Article  Google Scholar 

  20. Salkind, N.J.: Encyclopedia of Research Design. SAGE Publications Inc, Thousand Oaks (2010)

    Book  Google Scholar 

  21. Smetsers, R., Fiterău-Broştean, P., Vaandrager, F.: Model learning as a satisfiability modulo theories problem. In: Klein, S.T., Martín-Vide, C., Shapira, D. (eds.) LATA 2018. LNCS, vol. 10792, pp. 182–194. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-77313-1_14

    Chapter  Google Scholar 

  22. Tarjan, R.E.: Efficiency of a good but not linear set union algorithm. J. ACM 22(2), 215–225 (1975)

    Article  MathSciNet  Google Scholar 

  23. Trakhtenbrot, B.A., Barzdin, Y.M.: Finite Automata: Behavior and Synthesis. North-Holland Publishing Company, Amsterdam (1973)

    MATH  Google Scholar 

  24. Walsh, T.: SAT v CSP. In: Dechter, R. (ed.) CP 2000. LNCS, vol. 1894, pp. 441–456. Springer, Heidelberg (2000). https://doi.org/10.1007/3-540-45349-0_32

    Chapter  Google Scholar 

  25. Wieczorek, W.: Grammatical Inference. SCI, vol. 673. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-46801-3

    Book  MATH  Google Scholar 

  26. Zakirzyanov, I., Shalyto, A., Ulyantsev, V.: Finding all minimum-size DFA consistent with given examples: SAT-based approach. In: Cerone, A., Roveri, M. (eds.) SEFM 2017. LNCS, vol. 10729, pp. 117–131. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-74781-1_9

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Łukasz Strąk .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Wieczorek, W., Strąk, Ł., Nowakowski, A., Unold, O. (2021). Exact Searching for the Smallest Deterministic Automaton. In: Paszynski, M., Kranzlmüller, D., Krzhizhanovskaya, V.V., Dongarra, J.J., Sloot, P.M. (eds) Computational Science – ICCS 2021. ICCS 2021. Lecture Notes in Computer Science(), vol 12744. Springer, Cham. https://doi.org/10.1007/978-3-030-77967-2_5

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-77967-2_5

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-77966-5

  • Online ISBN: 978-3-030-77967-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics