Exact finite-state machine identification from scenarios and temporal properties

Abstract

Finite-state models, such as finite-state machines (FSMs), aid software engineering in many ways. They are often used in formal verification and also can serve as visual software models. The latter application is associated with the problems of software synthesis and automatic derivation of software models from specification. Smaller synthesized models are more general and are easier to comprehend, yet the problem of minimum FSM identification has received little attention in previous research. This paper presents four exact methods to tackle the problem of minimum FSM identification from a set of test scenarios and a temporal specification represented in linear temporal logic. The methods are implemented as an open-source tool. Three of them are based on translations of the FSM identification problem to SAT or QSAT problem instances. Accounting for temporal properties is done via counterexample prohibition. Counterexamples are either obtained from previously identified FSMs, or based on bounded model checking. The fourth method uses backtracking. The proposed methods are evaluated on several case studies and on a larger number of randomly generated instances of increasing complexity. The results show that the Iterative SAT-based method is the leader among the proposed methods. The methods are also compared with existing inexact approaches, i.e., the ones which do not necessarily identify the minimum FSM, and these comparisons show encouraging results.

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

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9

Notes

  1. 1.

    https://github.com/ulyantsev/EFSM-tools/.

  2. 2.

    https://code.google.com/p/gabp/.

  3. 3.

    http://fmv.jku.at/limboole/.

  4. 4.

    http://baldur.iti.kit.edu/sat-competition-2016/.

  5. 5.

    http://www.msoos.org/cryptominisat4/.

  6. 6.

    http://fmv.jku.at/lingeling/.

  7. 7.

    http://spinroot.com/.

References

  1. 1.

    Alur, R., Martin, M., Raghothaman, M., Stergiou, C., Tripakis, S., Udupa, A.: Synthesizing finite-state protocols from scenarios and requirements. In: Hardware and Software: Verification and Testing, pp. 75–91. Springer (2014)

  2. 2.

    Amla, N., Du, X., Kuehlmann, A., Kurshan, R.P., McMillan, K.L.: An analysis of SAT-based model checking techniques in an industrial environment. In: Correct Hardware Design and Verification Methods, pp. 254–268. Springer (2005)

  3. 3.

    Beschastnikh, I., Brun, Y., Schneider, S., Sloan, M., Ernst, M.D.: Leveraging existing instrumentation to automatically infer invariant-constrained models. In: Proceedings of the 19th ACM SIGSOFT Symposium and the 13th European Conference on Foundations of Software Engineering, pp. 267–277. ACM (2011)

  4. 4.

    Biere, A., Cimatti, A., Clarke, E.M., Strichman, O., Zhu, Y.: Bounded model checking. Adv. Comput. 58, 117–148 (2003)

    Article  Google Scholar 

  5. 5.

    Bodik, R., Jobstmann, B.: Algorithmic program synthesis: introduction. Int. J. Software Tools Technol. Trans. 15(5–6), 397–411 (2013)

    Article  Google Scholar 

  6. 6.

    Broy, M., Jonsson, B., Katoen, J.P., Leucker, M., Pretschner, A. (eds.): Model-based testing of reactive systems: advanced lectures. Lecture Notes in Computer Science, vol. 3472. Springer (2005)

  7. 7.

    Cheng, C.H., Huang, C.H., Ruess, H., Stattelmann, S.: G4LTL-ST: Automatic generation of PLC programs. In: Computer Aided Verification, pp. 541–549. Springer (2014)

  8. 8.

    Chivilikhin, D., Ulyantsev, V.: MuACOsm: a new mutation-based ant colony optimization algorithm for learning finite-state machines. In: Proceedings of the 15th Annual Conference on Genetic and Evolutionary Computation (GECCO), pp. 511–518. ACM (2013)

  9. 9.

    Chivilikhin, D., Ulyantsev, V., Shalyto, A.: Combining exact and metaheuristic techniques for learning extended finite-state machines from test scenarios and temporal properties. In: Proceedings of the 13th International Conference on Machine Learning and Applications (ICMLA), pp. 350–355. IEEE (2014)

  10. 10.

    Chongstitvatana, P., Aporntewan, C.: Improving correctness of finite-state machine synthesis from multiple partial input/output sequences. In: Proceedings of the 1st NASA/DoD Workshop on Evolvable Hardware, pp. 262–266. IEEE (1999)

  11. 11.

    Chow, T.S.: Testing software design modeled by finite-state machines. IEEE Trans. Software Eng. 4(3), 178–187 (1978)

    Article  MATH  Google Scholar 

  12. 12.

    Clarke, E.M., Grumberg, O., Peled, D.: Model checking. MIT press, USA (1999)

    Google Scholar 

  13. 13.

    Dorigo, M., Stützle, T.: Ant colony optimization. MIT Press, USA (2004)

    Google Scholar 

  14. 14.

    Duret-Lutz, A.: Manipulating LTL formulas using Spot 1.0. In: Automated technology for verification and analysis, pp. 442–445. Springer (2013)

  15. 15.

    Eén, N., Sörensson, N.: Temporal induction by incremental SAT solving. Electr. Notes Theor. Comp. Sci. 89(4), 543–560 (2003)

    Article  MATH  Google Scholar 

  16. 16.

    Ehlers, R.: Unbeast: Symbolic bounded synthesis. In: Abdulla, P., Leino, K. (eds.) Tools and Algorithms for the Construction and Analysis of Systems. Lecture Notes in Computer Science, vol. 6605, pp. 272–275. Springer, Berlin Heidelberg (2011)

  17. 17.

    Ehlers, R.: Symbolic bounded synthesis. Formal Methods Syst. Design 40(2), 232–262 (2012)

    Article  MATH  Google Scholar 

  18. 18.

    Filiot, E., Jin, N., Raskin, J.F.: An antichain algorithm for LTL realizability. In: Computer Aided Verification, pp. 263–277. Springer (2009)

  19. 19.

    Finkbeiner, B., Jacobs, S.: Lazy synthesis. In: International Workshop on Verification, Model Checking, and Abstract Interpretation, pp. 219–234. Springer (2012)

  20. 20.

    Finkbeiner, B., Schewe, S.: Bounded synthesis. Int. J. Software Tools Technol. Trans. 15(5–6), 519–539 (2013)

    Article  MATH  Google Scholar 

  21. 21.

    Gold, E.M.: Complexity of automaton identification from given data. Inform. Contr. 37(3), 302–320 (1978)

    MathSciNet  Article  MATH  Google Scholar 

  22. 22.

    Heule, M.J., Verwer, S.: Exact DFA identification using SAT solvers. In: Grammatical Inference: Theoretical Results and Applications, pp. 66–79. Springer (2010)

  23. 23.

    Heule, M.J., Verwer, S.: Software model synthesis using satisfiability solvers. Empir. Software Eng. 18(4), 825–856 (2013)

    Article  Google Scholar 

  24. 24.

    Hölldobler, S., Nguyen, V.H.: On SAT-encodings of the at-most-one constraint. In: Proceedings of the 12th International Workshop on Constraint Modelling and Reformulation, Uppsala, Sweden, pp. 16–20 (2013)

  25. 25.

    Jackson, P.B., Sheridan, D.: A compact linear translation for bounded model checking. Electr. Notes Theor. Comp. Sci. 174(3), 17–30 (2007)

    Article  MATH  Google Scholar 

  26. 26.

    Jobstmann, B., Bloem, R.: Optimizations for LTL synthesis. In: Formal Methods in Computer Aided Design (FMCAD), pp. 117–124. IEEE (2006)

  27. 27.

    Lang, K.J., Pearlmutter, B.A., Price, R.A.: Results of the Abbadingo One DFA learning competition and a new evidence-driven state merging algorithm. In: Grammatical Inference, pp. 1–12. Springer (1998)

  28. 28.

    Lo, D., Mariani, L., Pezzè, M.: Automatic steering of behavioral model inference. In: 7th Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering (ESEC-FSE), pp. 345–354. ACM (2009)

  29. 29.

    Lonsing, F., Bacchus, F., Biere, A., Egly, U., Seidl, M.: Enhancing search-based QBF solving by dynamic blocked clause elimination. In: Proceedings of the 20th International Conference on Logic for Programming, Artificial Intelligence and Reasoning (LPAR), Lecture Notes in Computer Science (to appear). Springer (2015)

  30. 30.

    Mitchell, M.: An introduction to genetic algorithms. MIT press, USA (1998)

    Google Scholar 

  31. 31.

    Ohmann, T., Herzberg, M., Fiss, S., Halbert, A., Palyart, M., Beschastnikh, I., Brun, Y.: Behavioral resource-aware model inference. In: Proceedings of the 29th ACM/IEEE International Conference on Automated Software Engineering (ASE), pp. 19–30. ACM (2014)

  32. 32.

    Pnueli, A.: The temporal logic of programs. In: 18th Annual Symposium on Foundations of Computer Science, 1977, pp. 46–57. IEEE (1977)

  33. 33.

    Rosner, R.: Modular synthesis of reactive systems. Ph.D. thesis, Weizmann Institute of Science (1992)

  34. 34.

    Tsarev, F., Egorov, K.: Finite state machine induction using genetic algorithm based on testing and model checking. In: 13th Annual Conference Companion on Genetic and Evolutionary Computation (GECCO), pp. 759–762. ACM (2011)

  35. 35.

    Ulyantsev, V., Tsarev, F.: Extended finite-state machine induction using SAT-solver. In: Proceedings of the 14th IFAC Symposium “Information Control Problems in Manufacturing (INCOM)”, pp. 512–517. IFAC (2012)

  36. 36.

    Ulyantsev, V., Zakirzyanov, I., Shalyto, A.: BFS-based symmetry breaking predicates for DFA identification. In: Language and Automata Theory and Applications, pp. 611–622. Springer (2015)

  37. 37.

    Vyatkin, V.: IEC 61499 function blocks for embedded and distributed control systems design, Second ed. Instrumentation Society of America (2012)

  38. 38.

    Walkinshaw, N., Bogdanov, K.: Inferring finite-state models with temporal constraints. In: Proceedings of the 23rd IEEE/ACM International Conference on Automated Software Engineering (ASE), pp. 248–257. IEEE Computer Society (2008)

  39. 39.

    Walkinshaw, N., Taylor, R., Derrick, J.: Inferring extended finite state machine models from software executions. Empir. Software Eng. 21(3), 811–853 (2016)

    Article  Google Scholar 

Download references

Author information

Affiliations

Authors

Corresponding author

Correspondence to Igor Buzhinsky.

Additional information

This work was financially supported by the Government of Russian Federation, Grant 074-U01, and also partially supported by the Russian Foundation for Basic Research (RFBR), research project No. 14-07-31337 mol_a. We also thank Maxim Buzdalov, Daniil Chivilikhin and the anonymous reviewers for their useful comments.

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Ulyantsev, V., Buzhinsky, I. & Shalyto, A. Exact finite-state machine identification from scenarios and temporal properties. Int J Softw Tools Technol Transfer 20, 35–55 (2018). https://doi.org/10.1007/s10009-016-0442-1

Download citation

Keywords

  • Finite-state machine identification
  • Linear temporal logic
  • Model checking
  • SAT
  • QSAT