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, access via your institution.
Buy single article
Instant access to the full article PDF.
Tax calculation will be finalised during checkout.
Subscribe to journal
Immediate online access to all issues from 2019. Subscription will auto renew annually.
Tax calculation will be finalised during checkout.
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)
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)
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)
Biere, A., Cimatti, A., Clarke, E.M., Strichman, O., Zhu, Y.: Bounded model checking. Adv. Comput. 58, 117–148 (2003)
Bodik, R., Jobstmann, B.: Algorithmic program synthesis: introduction. Int. J. Software Tools Technol. Trans. 15(5–6), 397–411 (2013)
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)
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)
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)
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)
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)
Chow, T.S.: Testing software design modeled by finite-state machines. IEEE Trans. Software Eng. 4(3), 178–187 (1978)
Clarke, E.M., Grumberg, O., Peled, D.: Model checking. MIT press, USA (1999)
Dorigo, M., Stützle, T.: Ant colony optimization. MIT Press, USA (2004)
Duret-Lutz, A.: Manipulating LTL formulas using Spot 1.0. In: Automated technology for verification and analysis, pp. 442–445. Springer (2013)
Eén, N., Sörensson, N.: Temporal induction by incremental SAT solving. Electr. Notes Theor. Comp. Sci. 89(4), 543–560 (2003)
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)
Ehlers, R.: Symbolic bounded synthesis. Formal Methods Syst. Design 40(2), 232–262 (2012)
Filiot, E., Jin, N., Raskin, J.F.: An antichain algorithm for LTL realizability. In: Computer Aided Verification, pp. 263–277. Springer (2009)
Finkbeiner, B., Jacobs, S.: Lazy synthesis. In: International Workshop on Verification, Model Checking, and Abstract Interpretation, pp. 219–234. Springer (2012)
Finkbeiner, B., Schewe, S.: Bounded synthesis. Int. J. Software Tools Technol. Trans. 15(5–6), 519–539 (2013)
Gold, E.M.: Complexity of automaton identification from given data. Inform. Contr. 37(3), 302–320 (1978)
Heule, M.J., Verwer, S.: Exact DFA identification using SAT solvers. In: Grammatical Inference: Theoretical Results and Applications, pp. 66–79. Springer (2010)
Heule, M.J., Verwer, S.: Software model synthesis using satisfiability solvers. Empir. Software Eng. 18(4), 825–856 (2013)
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)
Jackson, P.B., Sheridan, D.: A compact linear translation for bounded model checking. Electr. Notes Theor. Comp. Sci. 174(3), 17–30 (2007)
Jobstmann, B., Bloem, R.: Optimizations for LTL synthesis. In: Formal Methods in Computer Aided Design (FMCAD), pp. 117–124. IEEE (2006)
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)
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)
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)
Mitchell, M.: An introduction to genetic algorithms. MIT press, USA (1998)
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)
Pnueli, A.: The temporal logic of programs. In: 18th Annual Symposium on Foundations of Computer Science, 1977, pp. 46–57. IEEE (1977)
Rosner, R.: Modular synthesis of reactive systems. Ph.D. thesis, Weizmann Institute of Science (1992)
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)
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)
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)
Vyatkin, V.: IEC 61499 function blocks for embedded and distributed control systems design, Second ed. Instrumentation Society of America (2012)
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)
Walkinshaw, N., Taylor, R., Derrick, J.: Inferring extended finite state machine models from software executions. Empir. Software Eng. 21(3), 811–853 (2016)
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.
About this article
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
- Finite-state machine identification
- Linear temporal logic
- Model checking