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

On the computation of interprocedural weak control closure

Published: 18 March 2022 Publication History

Abstract

Many program analysis techniques depend on capturing the control dependencies of the program. Most existing control dependence algorithms either compute intraprocedural control dependencies only, or they compute control dependence relations that are not precise in general including nonterminating systems. Weak control closure (WCC) subsumes all known nontermination insensitive control dependence relations, including those that are appropriate for nonterminating systems. In this paper, we provide the first formal development of an algorithm to compute the WCC for interprocedural programs capturing the weak form of interprocedural control dependencies. The method is widely applicable due to the generality of WCC. Theorems on the theoretical results of soundness, precision, and the worst-case complexity of our method are also included. We have compared our algorithm with a WCC computation algorithm based on a state-of-the-art interprocedural control dependence computation algorithm. The latter algorithm loses soundness, and we improve the precision by 15.21% on all our experimental benchmarks. This empirical evidence suggests that our algorithm is more effective for any client application of WCC requiring interprocedural program analysis.

References

[1]
Torben Amtoft. 2008. Slicing for modern program structures: a theory for eliminating irrelevant loops. Inf. Process. Lett., 106, 2 (2008), 45–51. https://doi.org/10.1016/j.ipl.2007.10.002
[2]
Gianfranco Bilardi and Keshav Pingali. 1996. A Framework for Generalized Control Dependence. SIGPLAN Not., 31, 5 (1996), May, 291–300. issn:0362-1340 https://doi.org/10.1145/249069.231435
[3]
James Bucek, Klaus-Dieter Lange, and Jóakim v. Kistowski. 2018. SPEC CPU2017: Next-Generation Compute Benchmark. In Companion of the 2018 ACM/SPEC International Conference on Performance Engineering (ICPE ’18). ACM, New York, NY, USA. 41–42. isbn:978-1-4503-5629-9 https://doi.org/10.1145/3185768.3185771
[4]
S. Danicic, R. Barraclough, M. Harman, J. D. Howroyd, Á. Kiss, and M. Laurence. 2011. A unifying theory of control dependence and its application to arbitrary program structures. Theoretical Computer Science, 412, 49 (2011), 6809– 6842. https://doi.org/10.1016/j.tcs.2011.08.033
[5]
Dorothy E. Denning and Peter J. Denning. 1977. Certification of Programs for Secure Information Flow. Commun. ACM, 20, 7 (1977), July, 504–513. issn:0001-0782 https://doi.org/10.1145/359636.359712
[6]
Jeanne Ferrante, Karl J. Ottenstein, and Joe D. Warren. 1987. The Program Dependence Graph and Its Use in Optimization. ACM Trans. Program. Lang. Syst., 9, 3 (1987), July, 319–349. issn:0164-0925 https://doi.org/10.1145/24039.24041
[7]
Husni Khanfar, Björn Lisper, and Abu Naser Masud. 2015. Static Backward Program Slicing for Safety-Critical Systems. In Reliable Software Technologies – Ada-Europe 2015, Juan Antonio de la Puente and Tullio Vardanega (Eds.). Springer International Publishing, Cham. 50–65. https://doi.org/10.1007/978-3-319-19584-1_4
[8]
J. Krinke. 2001. Identifying similar code with program dependence graphs. In Proceedings Eighth Working Conference on Reverse Engineering. 301–309. https://doi.org/10.1109/WCRE.2001.957835
[9]
Chris Lattner and Vikram Adve. 2004. The LLVM Compiler Framework and Infrastructure Tutorial. In LCPC’04 Mini Workshop on Compiler Research Infrastructures. West Lafayette, Indiana. https://doi.org/10.1007/11532378_2
[10]
Jean-Christophe Léchenet, Nikolai Kosmatov, and Pascale Le Gall. 2018. Fast Computation of Arbitrary Control Dependencies. In Fundamental Approaches to Software Engineering, Alessandra Russo and Andy Schürr (Eds.). Springer International Publishing, Cham. 207–224. isbn:978-3-319-89363-1 https://doi.org/10.1007/978-3-319-89363-1_12
[11]
Björn Lisper, Abu Naser Masud, and Husni Khanfar. 2015. Static Backward Demand-Driven Slicing. In Proceedings of the 2015 Workshop on Partial Evaluation and Program Manipulation (PEPM ’15). ACM, New York, NY, USA. 115–126. https://doi.org/10.1145/2678015.2682538
[12]
J. P. Loyall and S. A. Mathisen. 1993. Using dependence analysis to support the software maintenance process. In 1993 Conference on Software Maintenance. 282–291. https://doi.org/10.1109/ICSM.1993.366934
[13]
Abu Naser Masud. 2020. Simple and Efficient Computation of Minimal Weak Control Closure. In Static Analysis, David Pichardie and Mihaela Sighireanu (Eds.). Springer International Publishing, Cham. 200–222. https://doi.org/10.1007/978-3-030-65474-0_10
[14]
Abu Naser Masud. 2022. Efficient computation of minimal weak and strong control closure. Journal of Systems and Software, 184 (2022), 111140. issn:0164-1212 https://doi.org/10.1016/j.jss.2021.111140
[15]
Abu Naser Masud and Björn Lisper. 2021. Semantic Correctness of Dependence-Based Slicing for Interprocedural, Possibly Nonterminating Programs. ACM Trans. Program. Lang. Syst., 42, 4 (2021), Article 19, Jan., 56 pages. issn:0164-0925 https://doi.org/10.1145/3434489
[16]
A. Podgurski and L. A. Clarke. 1990. A Formal Model of Program Dependences and Its Implications for Software Testing, Debugging, and Maintenance. IEEE Trans. Softw. Eng., 16, 9 (1990), Sept., 965–979. issn:0098-5589 https://doi.org/10.1109/32.58784
[17]
Reese T. Prosser. 1959. Applications of Boolean Matrices to the Analysis of Flow Diagrams. In Papers Presented at the December 1-3, 1959, Eastern Joint IRE-AIEE-ACM Computer Conference (IRE-AIEE-ACM ’59 (Eastern)). ACM, New York, NY, USA. 133–138. https://doi.org/10.1145/1460299.1460314
[18]
Venkatesh Prasad Ranganath, Torben Amtoft, Anindya Banerjee, John Hatcliff, and Matthew B. Dwyer. 2005. A New Foundation for Control Dependence and Slicing for Modern Program Structures. In European Symposium on Programming (LNCS, Vol. 3444). Springer-Verlag, 77–93. https://doi.org/10.1007/978-3-540-31987-0_7
[19]
Venkatesh Prasad Ranganath, Torben Amtoft, Anindya Banerjee, John Hatcliff, and Matthew B. Dwyer. 2007. A New Foundation for Control Dependence and Slicing for Modern Program Structures. ACM Trans. Program. Lang. Syst., 29, 5 (2007), Article 27, Aug., issn:0164-0925 https://doi.org/10.1145/1275497.1275502
[20]
Saurabh Sinha, Mary Jean Harrold, and Gregg Rothermel. 2001. Interprocedural Control Dependence. ACM Trans. Softw. Eng. Methodol., 10, 2 (2001), April, 209–254. issn:1049-331X https://doi.org/10.1145/367008.367022
[21]
Mark Weiser. 1981. Program Slicing. In Proc. 5th International Conference on Software Engineering (ICSE ’81). IEEE Press, Piscataway, NJ, USA. 439–449. isbn:0-89791-146-6 http://dl.acm.org/citation.cfm?id=800078.802557

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
CC 2022: Proceedings of the 31st ACM SIGPLAN International Conference on Compiler Construction
March 2022
253 pages
ISBN:9781450391832
DOI:10.1145/3497776
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 18 March 2022

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Control dependency
  2. debugging
  3. nontermination insensitive
  4. program slicing
  5. weak control closure

Qualifiers

  • Research-article

Funding Sources

  • Knowledge Foundation Sweden

Conference

CC '22
Sponsor:

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)98
  • Downloads (Last 6 weeks)18
Reflects downloads up to 07 Mar 2025

Other Metrics

Citations

Cited By

View all

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