Skip to main content

Simple and Efficient Computation of Minimal Weak Control Closure

  • Conference paper
  • First Online:
Static Analysis (SAS 2020)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 12389))

Included in the following conference series:

Abstract

Control dependency is a fundamental concept in many program analyses, transformation, parallelization, and compiler optimization techniques. An overwhelming number of definitions of control dependency relations are found in the literature that capture various kinds of program control flow structures. Weak and strong control closure (WCC and SCC) relations capture nontermination insensitive and sensitive control dependencies and subsume all previously defined control dependency relations. In this paper, we have shown that static dependency-based program slicing requires the repeated computation of WCC and SCC. The state-of-the-art WCC algorithm provided by Danicic et al. has the cubic worst-case complexity in terms of the size of the control flow graph and is a major obstacle to be used in static program slicing. We have provided a simple yet efficient method to compute the minimal WCC which has the quadratic worst-case complexity and proved the correctness of our algorithms. We implemented ours and the state-of-the-art algorithms in the Clang/LLVM compiler framework and run experiments on a number of SPEC CPU 2017 benchmarks. Our method performs a maximum of 23.8 times and on average 10.6 times faster than the state-of-the-art method. The performance curves of our WCC algorithm for practical applications are closer to the NlogN curve in the microsecond scale. Evidently, we improve the practical performance of WCC computation by an order of magnitude.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 59.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 79.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Amtoft, T.: Correctness of practical slicing for modern program structures. Department of Computing and Information Sciences, Kansas State University, Technical report (2007)

    Google Scholar 

  2. Bilardi, G., Pingali, K.: A framework for generalized control dependence. SIGPLAN Not. 31(5), 291–300 (1996). https://doi.org/10.1145/249069.231435

    Article  Google Scholar 

  3. Bucek, J., Lange, K.D., Kistowski, J.V.: Spec cpu2017: next-generation compute benchmark. In: Companion of the 2018 ACM/SPEC International Conference on Performance Engineering, pp. 41–42. ICPE 2018, ACM, New York (2018). https://doi.org/10.1145/3185768.3185771

  4. Danicic, S., Barraclough, R., Harman, M., Howroyd, J.D., Kiss, Á., Laurence, M.: A unifying theory of control dependence and its application to arbitrary program structures. Theor. Comput. Sci. 412(49), 6809–6842 (2011)

    Article  MathSciNet  Google Scholar 

  5. Denning, D.E., Denning, P.J.: Certification of programs for secure information flow. Commun. ACM 20(7), 504–513 (1977). https://doi.org/10.1145/359636.359712

    Article  MATH  Google Scholar 

  6. Ferrante, J., Ottenstein, K.J., Warren, J.D.: The program dependence graph and its use in optimization. ACM Trans. Program. Lang. Syst. 9(3), 319–349 (1987). https://doi.org/10.1145/24039.24041

    Article  MATH  Google Scholar 

  7. Khanfar, H., Lisper, B., Masud, A.N.: Static backward program slicing for safety-critical systems. In: de la Puente, J.A., Vardanega, T. (eds.) Ada-Europe 2015. LNCS, vol. 9111, pp. 50–65. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-19584-1_4

    Chapter  Google Scholar 

  8. Khanfar, H., Lisper, B., Mubeen, S.: Demand-driven static backward slicing for unstructured programs. Technical report (May 2019). http://www.es.mdh.se/publications/5511-

  9. Lattner, C., Adve, V.: The LLVM Compiler Framework and Infrastructure Tutorial. In: LCPC’04 Mini Workshop on Compiler Research Infrastructures. West Lafayette, Indiana (September 2004)

    Google Scholar 

  10. Léchenet, J.-C., Kosmatov, N., Le Gall, P.: Fast computation of arbitrary control dependencies. In: Russo, A., Schürr, A. (eds.) FASE 2018. LNCS, vol. 10802, pp. 207–224. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-89363-1_12

    Chapter  Google Scholar 

  11. Lisper, B., Masud, A.N., Khanfar, H.: Static backward demand-driven slicing. In: Asai, K., Sagonas, K. (eds.) Proceedings of the 2015 Workshop on Partial Evaluation and Program Manipulation, PEPM, Mumbai, India, 15–17 January 2015. pp. 115–126. ACM (2015). https://doi.org/10.1145/2678015.2682538

  12. Masud, A.N., Ciccozzi, F.: Towards constructing the SSA form using reaching definitions over dominance frontiers. In: 19th International Working Conference on Source Code Analysis and Manipulation, SCAM 2019, Cleveland, OH, USA, September 30 - October 1, 2019. pp. 23–33. IEEE (2019). https://doi.org/10.1109/SCAM.2019.00012

  13. Masud, A.N., Ciccozzi, F.: More precise construction of static single assignment programs using reaching definitions. J. Syst. Softw. 166, 110590 (2020). https://doi.org/10.1016/j.jss.2020.110590

    Article  Google Scholar 

  14. Ottenstein, K.J., Ottenstein, L.M.: The program dependence graph in a software development environment. SIGSOFT Softw. Eng. Notes 9(3), 177–184 (1984). https://doi.org/10.1145/390010.808263

    Article  Google Scholar 

  15. Pingali, K., Bilardi, G.: Optimal control dependence computation and the roman chariots problem. ACM Trans. Program. Lang. Syst. 19(3), 462–491 (1997)

    Article  Google Scholar 

  16. Podgurski, A., Clarke, L.A.: A formal model of program dependences and its implications for software testing, debugging, and maintenance. IEEE Trans. Softw. Eng. 16(9), 965–979 (1990)

    Article  Google Scholar 

  17. Prosser, R.T.: 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, pp. 133–138. IRE-AIEE-ACM ’59 (Eastern), ACM, New York (1959)

    Google Scholar 

  18. Ranganath, V.P., Amtoft, T., Banerjee, A., Dwyer, M.B., Hatcliff, J.: A new foundation for control-dependence and slicing for modern program structures. In: Sagiv, M. (ed.) ESOP 2005. LNCS, vol. 3444, pp. 77–93. Springer, Heidelberg (2005). https://doi.org/10.1007/978-3-540-31987-0_7

    Chapter  MATH  Google Scholar 

  19. Ranganath, V.P., Amtoft, T., Banerjee, A., Hatcliff, J., Dwyer, M.B.: A new foundation for control dependence and slicing for modern program structures. ACM Trans. Program. Lang. Syst. 29(5), 27-es (2007)

    Article  Google Scholar 

  20. Weiser, M.: Program slicing. In: Proceedings 5th International Conference on Software Engineering, pp. 439–449. ICSE 1981, IEEE Press, Piscataway, NJ, USA (1981). http://dl.acm.org/citation.cfm?id=800078.802557

Download references

Acknowledgment

This research is supported by the Knowledge Foundation through the HERO project.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Abu Naser Masud .

Editor information

Editors and Affiliations

A Appendix

A Appendix

See Fig. 5.

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Masud, A.N. (2020). Simple and Efficient Computation of Minimal Weak Control Closure. In: Pichardie, D., Sighireanu, M. (eds) Static Analysis. SAS 2020. Lecture Notes in Computer Science(), vol 12389. Springer, Cham. https://doi.org/10.1007/978-3-030-65474-0_10

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-65474-0_10

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-65473-3

  • Online ISBN: 978-3-030-65474-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics