skip to main content
10.1145/3650212.3652118acmconferencesArticle/Chapter ViewAbstractPublication PagesisstaConference Proceedingsconference-collections
research-article
Open access

Interprocedural Path Complexity Analysis

Published: 11 September 2024 Publication History

Abstract

Software testing techniques like symbolic execution face significant challenges with path explosion. Asymptotic Path Complexity (APC) quantifies this path explosion complexity, but existing APC methods do not work for interprocedural functions in general. Our new algorithm, APC-IP, efficiently computes APC for a wider range of functions, including interprocedural ones, improving over previous methods in both speed and scope. We implement APC-IP atop the existing software Metrinome, and test it against a benchmark of C functions, comparing it to existing and baseline approaches as well as comparing it to the path explosion of the symbolic execution engine Klee. The results show that APC-IP not only aligns with previous APC values but also excels in performance, scalability, and handling complex source code. It also provides a complexity prediction of the number of paths explored by Klee, extending the APC metric's applicability and surpassing previous implementations.

References

[1]
Saswat Anand, Patrice Godefroid, and Nikolai Tillmann. 2008. Demand-Driven Compositional Symbolic Execution. In Tools and Algorithms for the Construction and Analysis of Systems, C. R. Ramakrishnan and Jakob Rehof (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg. 367–381. isbn:978-3-540-78800-3
[2]
Lucas Bang, Abdulbaki Aydin, and Tevfik Bultan. 2015. Automatically computing path complexity of programs. In Proceedings of the 2015 10th Joint Meeting on Foundations of Software Engineering, ESEC/FSE 2015, Bergamo, Italy, August 30 - September 4, 2015, Elisabetta Di Nitto, Mark Harman, and Patrick Heymans (Eds.). ACM, 61–72. https://doi.org/10.1145/2786805.2786863
[3]
Gabriel Bessler, Josh Cordova, Shaheen Cullen-Baratloo, Sofiane Dissem, Emily Lu, Sofia Devin, Ibrahim Abughararh, and Lucas Bang. 2021. Metrinome: Path Complexity Predicts Symbolic Execution Path Explosion. In 43rd IEEE/ACM International Conference on Software Engineering: Companion Proceedings, ICSE Companion 2021, Madrid, Spain, May 25-28, 2021. IEEE.
[4]
Dirk Beyer and Ashgan Fararooy. 2010. A Simple and Effective Measure for Complex Low-Level Dependencies. 2010 IEEE 18th International Conference on Program Comprehension, 80–83.
[5]
Peter Boonstoppel, Cristian Cadar, and Dawson Engler. 2008. RWset: Attacking Path Explosion in Constraint-Based Test Generation. In Tools and Algorithms for the Construction and Analysis of Systems, C. R. Ramakrishnan and Jakob Rehof (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg. 351–366. isbn:978-3-540-78800-3
[6]
Cristian Cadar, Daniel Dunbar, and Dawson Engler. 2008. KLEE: Unassisted and Automatic Generation of High-Coverage Tests for Complex Systems Programs. In Proceedings of the 8th USENIX Conference on Operating Systems Design and Implementation (OSDI’08). USENIX Association, USA. 209–224.
[7]
G. Ann Campbell. 2018. Cognitive Complexity: An Overview and Evaluation. In Proceedings of the 2018 International Conference on Technical Debt (TechDebt ’18). Association for Computing Machinery, New York, NY, USA. 57–58. isbn:9781450357135 https://doi.org/10.1145/3194164.3194186
[8]
N. Chomsky and M.P. Schützenberger. 1959. The Algebraic Theory of Context-Free Languages. In Computer Programming and Formal Systems, P. Braffort and D. Hirschberg (Eds.) (Studies in Logic and the Foundations of Mathematics, Vol. 26). Elsevier, 118–161.
[9]
Nasir Eisty, George Thiruvathukal, and Jeffrey Carver. 2018. A Survey of Software Metric Use in Research Software Development. 212–222. https://doi.org/10.1109/eScience.2018.00036
[10]
P. Flajolet and R. Sedgewick. 2009. Analytic Combinatorics. Cambridge University Press. isbn:9781139477161
[11]
Robert L. Graham, Donald E. Knuth, and Oren Patashnik. 1994. Concrete Mathematics: A Foundation for Computer Science (2nd ed.). Addison-Wesley Publishing Company, USA. isbn:0201558025
[12]
Hermann Gruber, Jonathan Lee, and Jeffrey O. Shallit. 2012. Enumerating regular expressions and their languages. CoRR, abs/1204.4982 (2012).
[13]
Maurice H. Halstead. 1977. Elements of Software Science (Operating and Programming Systems Series). Elsevier Science Inc., USA. isbn:0444002057
[14]
Saparya Krishnamoorthy, Michael S. Hsiao, and Loganathan Lingappan. 2010. Tackling the Path Explosion Problem in Symbolic Execution-Driven Test Generation for Programs. In 2010 19th IEEE Asian Test Symposium. 59–64. https://doi.org/10.1109/ATS.2010.19
[15]
H. Levy and F. Lessman. 1992. Finite Difference Equations. Dover Publications. isbn:9780486672601 lccn:lc92020438
[16]
Thomas J. McCabe. 1976. A Complexity Measure. IEEE Trans. Software Eng., 2, 4 (1976), 308–320.
[17]
Brian A. Nejmeh. 1988. NPATH: A Measure of Execution Path Complexity and Its Applications. Commun. ACM, 31, 2 (1988), Feb., 188–200. issn:0001-0782
[18]
Alberto S. Nuñez-Varela, Héctor G. Pérez-Gonzalez, Francisco E. Martínez-Perez, and Carlos Soubervielle-Montalvo. 2017. Source code metrics: A systematic mapping study. Journal of Systems and Software, 128 (2017), 164–197. issn:0164-1212 https://doi.org/10.1016/j.jss.2017.03.044
[19]
Eli Pregerson, Shaheen Cullen-Baratloo, David Chen, Duy Lam, Max Szostak, and Lucas Bang. 2023. Formalizing Path Explosion for Recursive Functions via Asymptotic Path Complexity. In 2023 IEEE/ACM 11th International Conference on Formal Methods in Software Engineering (FormaliSE), Melbourne, Australia, May 14-15, 2023. IEEE.
[20]
R.S. Pressman and B.R. Maxim. 2019. Software Engineering: A Practitioner’s Approach. McGraw-Hill Education. isbn:9781259872976 lccn:2019017652
[21]
R. Sedgewick and P. Flajolet. 2013. An Introduction to the Analysis of Algorithms: Introdu Analysi Algori_p2. Pearson Education. isbn:9780133373486
[22]
Michael Sipser. 2013. Introduction to the Theory of Computation (third ed.). Course Technology, Boston, MA. isbn:113318779X
[23]
Harry M. Sneed. 1995. Understanding Software through Numbers: A Metric Based Approach to Program Comprehension. Journal of Software Maintenance, 7, 6 (1995), nov, 405–419. issn:1040-550X https://doi.org/10.1002/smr.4360070604
[24]
Richard P. Stanley. 2011. Enumerative Combinatorics: Volume 1 (2nd ed.). Cambridge University Press, USA. isbn:1107602629
[25]
Dinuka R. Wijendra and K. P. Hewagamage. 2022. Cognitive Complexity Reduction through Control Flow Graph Generation. In 2022 IEEE 7th International conference for Convergence in Technology (I2CT). 1–7. https://doi.org/10.1109/I2CT54291.2022.9824923
[26]
Herbert S. Wilf. 2006. Generatingfunctionology. A. K. Peters, Ltd., USA. isbn:1568812795

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ISSTA 2024: Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis
September 2024
1928 pages
ISBN:9798400706127
DOI:10.1145/3650212
This work is licensed under a Creative Commons Attribution International 4.0 License.

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 11 September 2024

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Code Complexity
  2. Path Explosion
  3. Testing Complexity

Qualifiers

  • Research-article

Funding Sources

  • NSF (National Science Foundation)

Conference

ISSTA '24
Sponsor:

Acceptance Rates

Overall Acceptance Rate 58 of 213 submissions, 27%

Upcoming Conference

ISSTA '25

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 187
    Total Downloads
  • Downloads (Last 12 months)187
  • Downloads (Last 6 weeks)35
Reflects downloads up to 01 Mar 2025

Other Metrics

Citations

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media