Abstract
We present a novel language-agnostic approach to test case generation from a logic program representation generated by an existing framework. This is nontrivial for two reasons: since in such representation basic statements are usually composed into complex formulas, the trace enumerator cannot distill statements that are yet to be covered, and since the formulas obtained this way are more complex, the satisfiability checks are costlier and their number has to be kept low. Our approach performs an accelerated trace enumeration exploiting the program structure on the go. Our new implementation on top of the Horntinuum test case generator calls an SMT solver incrementally to achieve a significant performance increase. Furthermore, it has found many new test cases in public benchmarks that state-of-the-art did not find.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
This feature is disabled in our implementation to allow us to focus solely on enumeration of traces.
References
Alshmrany, K.M., Aldughaim, M., Bhayat, A., Cordeiro, L.C.: FuSeBMC v4: smart seed generation for hybrid fuzzing. In: FASE 2022. LNCS, vol. 13241, pp. 336–340. Springer, Cham (2022). https://doi.org/10.1007/978-3-030-99429-7_19
Anand, S., Godefroid, P., Tillmann, N.: Demand-driven compositional symbolic execution. In: Ramakrishnan, C.R., Rehof, J. (eds.) TACAS 2008. LNCS, vol. 4963, pp. 367–381. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-78800-3_28
Ball, T., Podelski, A., Rajamani, S.K.: Boolean and cartesian abstraction for model checking C programs. In: Margaria, T., Yi, W. (eds.) TACAS 2001. LNCS, vol. 2031, pp. 268–283. Springer, Heidelberg (2001). https://doi.org/10.1007/3-540-45319-9_19
Beyer, D.: Software testing: 5th comparative evaluation: test-comp 2023. In: Lambers, L., Uchitel, S. (eds.) FASE 2023. LNCS, vol. 13991, pp. 309–323. Springer, Cham (2023). https://doi.org/10.1007/978-3-031-30826-0_17
Beyer, D., Cimatti, A., Griggio, A., Keremoglu, M.E., Sebastiani, R.: Software model checking via large-block encoding. In: FMCAD, pp. 25–32. IEEE (2009)
Beyer, D., Keremoglu, M.E.: CPAchecker: a tool for configurable software verification. In: Gopalakrishnan, G., Qadeer, S. (eds.) CAV 2011. LNCS, vol. 6806, pp. 184–190. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-22110-1_16
Biere, A., Cimatti, A., Clarke, E., Zhu, Y.: Symbolic model checking without BDDs. In: Cleaveland, W.R. (ed.) TACAS 1999. LNCS, vol. 1579, pp. 193–207. Springer, Heidelberg (1999). https://doi.org/10.1007/3-540-49059-0_14
Bjørner, N., Gurfinkel, A., McMillan, K., Rybalchenko, A.: Horn clause solvers for program verification. In: Beklemishev, L.D., Blass, A., Dershowitz, N., Finkbeiner, B., Schulte, W. (eds.) Fields of Logic and Computation II. LNCS, vol. 9300, pp. 24–51. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-23534-9_2
Blicha, M., Fedyukovich, G., Hyvärinen, A.E.J., Sharygina, N.: Transition power abstractions for deep counterexample detection. In: TACAS 2022. LNCS, vol. 13243, pp. 524–542. Springer, Cham (2022). https://doi.org/10.1007/978-3-030-99524-9_29
Bryant, R.E., Lahiri, S.K., Seshia, S.A.: Modeling and verifying systems using a logic of counter arithmetic with lambda expressions and uninterpreted functions. In: Brinksma, E., Larsen, K.G. (eds.) CAV 2002. LNCS, vol. 2404, pp. 78–92. Springer, Heidelberg (2002). https://doi.org/10.1007/3-540-45657-0_7
Burch, J.R., Clarke, E.M., McMillan, K.L., Dill, D.L., Hwang, L.J.: Symbolic model checking: \(10^{20}\) states and beyond. In: LICS, pp. 428–439. IEEE (1990)
Cadar, C., Dunbar, D., Engler, D.R.: KLEE: unassisted and automatic generation of high-coverage tests for complex systems programs. In: Draves, R., van Renesse, R. (eds.) OSDI, pp. 209–224. USENIX Association (2008)
Chakarov, A., Fedchin, A., Rakamarić, Z., Rungta, N.: Better Counterexamples for Dafny. In: TACAS 2022, Part I. LNCS, vol. 13243, pp. 404–411. Springer, Cham (2022). https://doi.org/10.1007/978-3-030-99524-9_23
Chechik, M., Gurfinkel, A.: A framework for counterexample generation and exploration. In: Cerioli, M. (ed.) FASE 2005. LNCS, vol. 3442, pp. 220–236. Springer, Heidelberg (2005). https://doi.org/10.1007/978-3-540-31984-9_17
Csallner, C., Smaragdakis, Y.: Check ‘n’ crash: combining static checking and testing. In: Roman, G., Griswold, W.G., Nuseibeh, B. (eds.) ICSE, pp. 422–431. ACM (2005)
Fedyukovich, G., Kaufman, S., Bodík, R.: Sampling invariants from frequency distributions. In: FMCAD, pp. 100–107. IEEE (2017)
Godefroid, P., Kiezun, A., Levin, M.Y.: Grammar-based whitebox fuzzing. In: Gupta, R., Amarasinghe, S.P. (eds.) PLDI, pp. 206–215. ACM (2008)
Gulwani, S., Srivastava, S., Venkatesan, R.: Program analysis as constraint solving. In: PLDI, pp. 281–292. ACM (2008)
Gurfinkel, A., Kahsai, T., Komuravelli, A., Navas, J.A.: The SeaHorn verification framework. In: Kroening, D., Păsăreanu, C.S. (eds.) CAV 2015. LNCS, vol. 9206, pp. 343–361. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-21690-4_20
Heizmann, M., et al.: Ultimate automizer with an on-demand construction of Floyd-Hoare automata. In: Legay, A., Margaria, T. (eds.) TACAS 2017, Part II. LNCS, vol. 10206, pp. 394–398. Springer, Heidelberg (2017). https://doi.org/10.1007/978-3-662-54580-5_30
Hojjat, H., Rümmer, P.: The ELDARICA horn solver. In: FMCAD, pp. 158–164. IEEE (2018)
Kahsai, T., Rümmer, P., Schäf, M.: JayHorn: a Java model checker. In: Beyer, D., Huisman, M., Kordon, F., Steffen, B. (eds.) TACAS 2019, Part I. LNCS, vol. 11429, pp. 214–218. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-17502-3_16
King, J.C.: Symbolic execution and program testing. Commun. ACM 19(7), 385–394 (1976)
Le, H.M.: LLVM-based hybrid fuzzing with LibKluzzer (competition contribution). In: FASE 2020. LNCS, vol. 12076, pp. 535–539. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-45234-6_29
Mathis, B., Gopinath, R., Mera, M., Kampmann, A., Höschele, M., Zeller, A.: Parser-directed fuzzing. In: McKinley, K.S., Fisher, K. (eds.) PLDI, pp. 548–560. ACM (2019)
Matsushita, Y., Tsukada, T., Kobayashi, N.: RustHorn: CHC-based verification for rust programs. In: ESOP 2020. LNCS, vol. 12075, pp. 484–514. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-44914-8_18
McMillan, K.L., Rybalchenko, A.: Solving constrained Horn clauses using interpolation. In: Technical report, MSR-TR-2013-6 (2013)
Metta, R., Medicherla, R.K., Karmarkar, H.: VeriFuzz: good seeds for fuzzing (competition contribution). In: FASE 2022. LNCS, vol. 13241, pp. 341–346. Springer, Cham (2022). https://doi.org/10.1007/978-3-030-99429-7_20
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
Rothenberg, B.-C., Grumberg, O.: Sound and complete mutation-based program repair. In: Fitzgerald, J., Heitmeyer, C., Gnesi, S., Philippou, A. (eds.) FM 2016. LNCS, vol. 9995, pp. 593–611. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-48989-6_36
Sen, K., Marinov, D., Agha, G.: CUTE: a concolic unit testing engine for C. In: Wermelinger, M., Gall, H.C. (eds.) FSE, pp. 263–272. ACM (2005)
Vikram, V., Padhye, R., Sen, K.: Growing a test corpus with bonsai fuzzing. In: ICSE, pp. 723–735. IEEE (2021)
Visser, W., Pasareanu, C.S., Khurshid, S.: Test input generation with java pathfinder. In: Avrunin, G.S., Rothermel, G. (eds.) ISSTA, pp. 97–107. ACM (2004)
Wüstholz, V., Christakis, M.: Targeted greybox fuzzing with static lookahead analysis. In: Rothermel, G., Bae, D. (eds.) ICSE, pp. 789–800. ACM (2020)
Zlatkin, I., Fedyukovich, G.: Maximizing branch coverage with constrained horn clauses. In: Fisman, D., Rosu, G. (eds.) TACAS, Part II. LNCS, vol. 13244, pp. 254–272. Springer, Cham (2022). https://doi.org/10.1007/978-3-030-99527-0_14
Acknowledgments
The work is supported by the National Science Foundation grant 2106949 and by a gift from the Ethereum Foundation.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2025 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Zlatkin, I., Fedyukovich, G. (2025). Leveraging Program Structure for Test Case Generation. In: Akshay, S., Niemetz, A., Sankaranarayanan, S. (eds) Automated Technology for Verification and Analysis. ATVA 2024. Lecture Notes in Computer Science, vol 15055. Springer, Cham. https://doi.org/10.1007/978-3-031-78750-8_7
Download citation
DOI: https://doi.org/10.1007/978-3-031-78750-8_7
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-78749-2
Online ISBN: 978-3-031-78750-8
eBook Packages: Computer ScienceComputer Science (R0)