Advertisement

On Strings in Software Model Checking

  • Hossein Hojjat
  • Philipp RümmerEmail author
  • Ali Shamakhi
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 11893)

Abstract

Strings represent one of the most common and most intricate data-types found in software programs, with correct string processing often being a decisive factor for correctness and security properties. This has led to a wide range of recent research results on how to analyse programs operating on strings, using methods like testing, fuzzing, symbolic execution, abstract interpretation, or model checking, and, increasingly, support for strings is also added to constraint solvers and SMT solvers. In this paper, we focus on the verification of software programs with strings using model checking. We give a survey of the existing approaches to handle strings in this context, and propose methods based on algebraic data-types, Craig interpolation, and automata learning.

Notes

Acknowledgements

This research is supported by the Swedish Research Council (VR) under grant 2018-04727, and by the Swedish Foundation for Strategic Research (SSF) under the project WebSec (Ref. RIT17-0011).

References

  1. 1.
    Abdulla, P.A., et al.: Trau: SMT solver for string constraints. In: FMCAD. IEEE (2018)Google Scholar
  2. 2.
    Abdulla, P.A., et al.: String constraints for verification. In: Biere, A., Bloem, R. (eds.) CAV 2014. LNCS, vol. 8559, pp. 150–166. Springer, Cham (2014).  https://doi.org/10.1007/978-3-319-08867-9_10CrossRefGoogle Scholar
  3. 3.
    Abdulla, P.A., et al.: Norn: an SMT solver for string constraints. In: Kroening, D., Păsăreanu, C.S. (eds.) CAV 2015. LNCS, vol. 9206, pp. 462–469. Springer, Cham (2015).  https://doi.org/10.1007/978-3-319-21690-4_29CrossRefGoogle Scholar
  4. 4.
    Ahrendt, W., Beckert, B., Bubel, R., Hähnle, R., Schmitt, P.H., Ulbrich, M. (eds.): Deductive Software Verification—The KeY Book—FromTheory to Practice. Springer, Heidelberg (2016).  https://doi.org/10.1007/978-3-319-49812-6CrossRefGoogle Scholar
  5. 5.
    Alur, R., et al.: Syntax-guided synthesis. In: Dependable Software Systems Engineering. IOS Press (2015)Google Scholar
  6. 6.
    Aydin, A., Bang, L., Bultan, T.: Automata-based model counting for string constraints. In: Kroening, D., Păsăreanu, C.S. (eds.) CAV 2015. LNCS, vol. 9206, pp. 255–272. Springer, Cham (2015).  https://doi.org/10.1007/978-3-319-21690-4_15CrossRefGoogle Scholar
  7. 7.
    Barrett, C., et al.: CVC4. In: Gopalakrishnan, G., Qadeer, S. (eds.) CAV 2011. LNCS, vol. 6806, pp. 171–177. Springer, Heidelberg (2011).  https://doi.org/10.1007/978-3-642-22110-1_14CrossRefGoogle Scholar
  8. 8.
    Beyer, D.: Automatic verification of C and Java programs: SV-COMP 2019. In: Beyer, D., Huisman, M., Kordon, F., Steffen, B. (eds.) TACAS 2019. LNCS, vol. 11429, pp. 133–155. Springer, Cham (2019).  https://doi.org/10.1007/978-3-030-17502-3_9CrossRefGoogle Scholar
  9. 9.
    Bubel, R., Hähnle, R., Geilmann, U.: A formalisation of Java strings for program specification and verification. In: Barthe, G., Pardo, A., Schneider, G. (eds.) SEFM 2011. LNCS, vol. 7041, pp. 90–105. Springer, Heidelberg (2011).  https://doi.org/10.1007/978-3-642-24690-6_8CrossRefGoogle Scholar
  10. 10.
    Bultan, T., Yu, F., Alkhalaf, M., Aydin, A.: String Analysis for Software Verification and Security. Springer, Cham (2017).  https://doi.org/10.1007/978-3-319-68670-7CrossRefGoogle Scholar
  11. 11.
    Chen, T., Hague, M., Lin, A.W., Rümmer, P., Wu, Z.: Decision procedures for path feasibility of string-manipulating programs with complex operations. In: PACMPL, no. POPL (2019)Google Scholar
  12. 12.
    Christensen, A.S., Møller, A., Schwartzbach, M.I.: Precise analysis of string expressions. In: Cousot, R. (ed.) SAS 2003. LNCS, vol. 2694, pp. 1–18. Springer, Heidelberg (2003).  https://doi.org/10.1007/3-540-44898-5_1CrossRefzbMATHGoogle Scholar
  13. 13.
    Clarke, E.M., Henzinger, T.A., Veith, H., Bloem, R. (eds.): Handbook of Model Checking. Springer, Heidelberg (2018).  https://doi.org/10.1007/978-3-319-10575-8CrossRefzbMATHGoogle Scholar
  14. 14.
    Cordeiro, L., Kesseli, P., Kroening, D., Schrammel, P., Trtik, M.: JBMC: a bounded model checking tool for verifying Java bytecode. In: Chockler, H., Weissenbacher, G. (eds.) CAV 2018. LNCS, vol. 10981, pp. 183–190. Springer, Cham (2018).  https://doi.org/10.1007/978-3-319-96145-3_10CrossRefGoogle Scholar
  15. 15.
    De Angelis, E., Fioravanti, F., Pettorossi, A., Proietti, M.: Solving Horn clauses on inductive data types without induction. TPLP 18(3–4), 452–469 (2018)MathSciNetzbMATHGoogle Scholar
  16. 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_24CrossRefGoogle Scholar
  17. 17.
    Dillig, I., Dillig, T., Li, B., McMillan, K.L.: Inductive invariant generation via abductive inference. In: OOPSLA. ACM (2013)Google Scholar
  18. 18.
    Dudka, K., Peringer, P., Vojnar, T.: Byte-precise verification of low-level list manipulation. In: Logozzo, F., Fähndrich, M. (eds.) SAS 2013. LNCS, vol. 7935, pp. 215–237. Springer, Heidelberg (2013).  https://doi.org/10.1007/978-3-642-38856-9_13CrossRefGoogle Scholar
  19. 19.
    Faymonville, P., Finkbeiner, B., Rabe, M.N., Tentrup, L.: Encodings of bounded synthesis. In: Legay, A., Margaria, T. (eds.) TACAS 2017. LNCS, vol. 10205, pp. 354–370. Springer, Heidelberg (2017).  https://doi.org/10.1007/978-3-662-54577-5_20CrossRefGoogle Scholar
  20. 20.
    Ganesh, V., Kieżun, A., Artzi, S., Guo, P.J., Hooimeijer, P., Ernst, M.: HAMPI: a string solver for testing, analysis and vulnerability detection. In: Gopalakrishnan, G., Qadeer, S. (eds.) CAV 2011. LNCS, vol. 6806, pp. 1–19. Springer, Heidelberg (2011).  https://doi.org/10.1007/978-3-642-22110-1_1CrossRefGoogle Scholar
  21. 21.
    Ganesh, V., Minnes, M., Solar-Lezama, A., Rinard, M.: What is decidable about strings? Technical report MIT-CSAIL-TR-2011-006, March 2011Google Scholar
  22. 22.
    Gosling, J., Joy, B., Steele, G.L., Bracha, G., Buckley, A.: The Java Language Specification, Java SE 8 Edition, 1st edn. Addison-Wesley Professional, Boston (2014)Google Scholar
  23. 23.
    Grebenshchikov, S., Lopes, N.P., Popeea, C., Rybalchenko, A.: Synthesizing software verifiers from proof rules. In: PLDI. ACM (2012)Google Scholar
  24. 24.
    Hojjat, H., Rümmer, P.: Deciding and interpolating algebraic data types by reduction. In: SYNASC. IEEE Computer Society (2017)Google Scholar
  25. 25.
    Hojjat, H., Rümmer, P.: The ELDARICA Horn solver. In: FMCAD. IEEE (2018)Google Scholar
  26. 26.
    Holík, L., Janku, P., Lin, A.W., Rümmer, P., Vojnar, T.: String constraints with concatenation and transducers solved efficiently. In: PACMPL, no. POPL (2018)Google Scholar
  27. 27.
    Hooimeijer, P., Livshits, B., Molnar, D., Saxena, P., Veanes, M.: Fast and precise sanitizer analysis with BEK. In: 20th USENIX Security Symposium, San Francisco, CA, USA, 8–12 August 2011, Proceedings. USENIX Association (2011)Google Scholar
  28. 28.
    Kahsai, T., Kersten, R., Rümmer, P., Schäf, M.: Quantified heap invariants for object-oriented programs. In: LPAR, EasyChair (2017)Google Scholar
  29. 29.
    Kahsai, T., Rümmer, P., Sanchez, H., Schäf, M.: JayHorn: a framework for verifying Java programs. In: Chaudhuri, S., Farzan, A. (eds.) CAV 2016. LNCS, vol. 9779, pp. 352–358. Springer, Cham (2016).  https://doi.org/10.1007/978-3-319-41528-4_19CrossRefGoogle Scholar
  30. 30.
    Komuravelli, A., Gurfinkel, A., Chaki, S.: SMT-based model checking for recursive programs. Formal Methods Syst. Des. 48(3), 175–205 (2016)CrossRefGoogle Scholar
  31. 31.
    Leino, K.R.M.: Dafny: an automatic program verifier for functional correctness. In: Clarke, E.M., Voronkov, A. (eds.) LPAR 2010. LNCS (LNAI), vol. 6355, pp. 348–370. Springer, Heidelberg (2010).  https://doi.org/10.1007/978-3-642-17511-4_20CrossRefzbMATHGoogle Scholar
  32. 32.
    Lin, A.W., Rümmer, P.: Liveness of randomised parameterised systems under arbitrary schedulers. In: Chaudhuri, S., Farzan, A. (eds.) CAV 2016. LNCS, vol. 9780, pp. 112–133. Springer, Cham (2016).  https://doi.org/10.1007/978-3-319-41540-6_7CrossRefGoogle Scholar
  33. 33.
    Malík, V., Martiček, Š., Schrammel, P., Srivas, M., Vojnar, T., Wahlang, J.: 2LS: memory safety and non-termination. In: Beyer, D., Huisman, M. (eds.) TACAS 2018. LNCS, vol. 10806, pp. 417–421. Springer, Cham (2018).  https://doi.org/10.1007/978-3-319-89963-3_24CrossRefGoogle Scholar
  34. 34.
    McMillan, K.L.: Interpolation and SAT-based model checking. In: Hunt, W.A., Somenzi, F. (eds.) CAV 2003. LNCS, vol. 2725, pp. 1–13. Springer, Heidelberg (2003).  https://doi.org/10.1007/978-3-540-45069-6_1CrossRefGoogle Scholar
  35. 35.
    Neider, D., Topcu, U.: An automaton learning approach to solving safety games over infinite graphs. In: Chechik, M., Raskin, J.-F. (eds.) TACAS 2016. LNCS, vol. 9636, pp. 204–221. Springer, Heidelberg (2016).  https://doi.org/10.1007/978-3-662-49674-9_12CrossRefGoogle Scholar
  36. 36.
    Noller, Y., Păsăreanu, C.S., Fromherz, A., Le, X.-B.D., Visser, W.: Symbolic pathfinder for SV-COMP. In: Beyer, D., Huisman, M., Kordon, F., Steffen, B. (eds.) TACAS 2019. LNCS, vol. 11429, pp. 239–243. Springer, Cham (2019).  https://doi.org/10.1007/978-3-030-17502-3_21CrossRefGoogle Scholar
  37. 37.
    Saxena, P., Akhawe, D., Hanna, S., Mao, F., McCamant, S., Song, D.: A symbolic execution framework for JavaScript. In: IEEE. IEEE Computer Society (2010)Google Scholar
  38. 38.
    Sharma, R., Aiken, A.: From invariant checking to invariant inference using randomized search. Formal Methods Syst. Des. 48(3), 235–256 (2016)CrossRefGoogle Scholar
  39. 39.
    Veanes, M.: Symbolic string transformations with regular lookahead and rollback. In: Voronkov, A., Virbitskaite, I. (eds.) PSI 2014. LNCS, vol. 8974, pp. 335–350. Springer, Heidelberg (2015).  https://doi.org/10.1007/978-3-662-46823-4_27CrossRefGoogle Scholar
  40. 40.
    Xie, X., Liu, Y., Le, W., Li, X., Chen, H.: S-looper: automatic summarization for multipath string loops. In: ISSTA. ACM (2015)Google Scholar
  41. 41.
    Zheng, Y., Zhang, X., Ganesh, V.: Z3-str: a Z3-based string solver for web application analysis. In: SIGSOFT. ACM (2013)Google Scholar

Copyright information

© Springer Nature Switzerland AG 2019

Authors and Affiliations

  1. 1.University of TehranTehranIran
  2. 2.Uppsala UniversityUppsalaSweden

Personalised recommendations