Skip to main content

A C++ data model supporting reachability analysis and dead code detection

  • Regular Sessions
  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1301))

Abstract

A software repository provides a central information source for understanding and reengineering code in a software project. Complex reverse engineering tools can be built by analyzing information stored in the repository without reparsing the original source code. The most critical design aspect of a repository is its data model, which directly affects how effectively the repository supports various analysis tasks. This paper focuses on the design rationales behind a data model for a C++ software repository that supports reachability analysis and dead code detection at the declaration level. These two tasks are frequently needed in large software projects to help remove excess software baggage, select regression tests, and support software reuse studies. The language complexity introduced by class inheritance, friendships, and template instantiations in C++ requires a carefully designed model to catch all necessary dependencies for correct reachability analysis. We examine the major design decisions and their consequences in our model and illustrate how future software repositories can be evaluated for completeness at a selected abstraction level. Examples are given to illustrate how our model also supports variants of reachability analysis: impact analysis, class visibility analysis, and dead code detection. Finally, we discuss the implementation and experience of our analysis tools on a C++ software project.

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

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. R. S. Arnold. Software Reengineering: A Quick History. Commun. ACM, 37(5):13–14, May 1994.

    Google Scholar 

  2. E. Buss, R. D. Mori, W. Gentleman, J. Henshaw, J. Johnson, K. Kontogianis, E. Merlo, H. Müller, J. Mylopoulos, S. Paul, A. Prakash, M. Stanley, S. TIlley, J. Troster, and K. Wong. Investigating Reverse Engineering Technologies for the CAS Program Understanding Project. IBM Systems Journal, 33(3):477–500, 1994.

    Google Scholar 

  3. P. P. Chen. The Entity-Relationship Model — Toward a Unified View of Data. ACM Transactions on Database Systems, 1(1):9–36, Mar. 1976.

    Google Scholar 

  4. Y.-F. Chen. Reverse engineering. In B. Krishnamurthy, editor, Practical Reusable UNIX Software, chapter 6, pages 177–208. John Wiley & Sons, New York, 1995.

    Google Scholar 

  5. Y.-F. Chen, G. S. Fowler, E. Koutsofios, and R. S. Wallach. Ciao: A Graphical Navigator for Software and Document Repositories. In International Conference on Software Maintenance, pages 66–75, 1995.

    Google Scholar 

  6. Y.-F. Chen, B. Krishnamurthy, and K.-P. Vo. An Objective Reuse Metric: Model and Methodology. In Fifth European Software Engineering Conference, 1995.

    Google Scholar 

  7. Y.-F. Chen, M. Nishimoto, and C. V. Ramamoorthy. The C Information Abstraction System. IEEE Transactions on Software Engineering, 16(3):325–334, Mar. 1990.

    Google Scholar 

  8. Y.-F. Chen, D. Rosenblum, and K.-P. Vo. TestTube: A System for Selective Regression Testing. In The 16th Internation Conference on Software Engineering, pages 211–220, 1994.

    Google Scholar 

  9. P. Devanbu. Genoa-a language and front-end independent source code analyzer generator. In Proceedings of the Fourteenth International Conference on Software Engineering, pages 307–317, 1992.

    Google Scholar 

  10. P. Devanbu, D. Rosenblum, and A. Wolf. Generating Testing and Analysis Tools with Aria. ACM Trans. Software Engineering and Methodology, 5(1):42–62, 1996.

    Google Scholar 

  11. Edison Design Group. http://www.edg.com.

    Google Scholar 

  12. G. Fowler. A Case for make. Software — Practice and Experience, 20:35–46, June 1990.

    Google Scholar 

  13. G. Fowler. cql-A Flat File Database Query Language. In USENIX Winter 1994 Conference, pages 11–21, Jan. 1994.

    Google Scholar 

  14. E. R. Gansner, E. Koutsofios, S. C. North, and K.-P. Vo. A Technique for Drawing Directed Graphs. IEEE Transactions on Software Engineering, pages 214–230, Mar. 1993.

    Google Scholar 

  15. J. Grass and Y. F. Chen. The C++ Information Abstractor. In The Second USENIX C++ Conference, Apr. 1990.

    Google Scholar 

  16. A. Koenig. An Example of Dynamic Binding in C++. Journal of Object-Oriented Programming, 1(3), Aug. 1988.

    Google Scholar 

  17. M. Lejter, S. Meyers, and S. P. Reiss. Support for Maintaining Object-Oriented Programs. IEEE Transactions on Software Engineering, 18(12):1045–1052, Dec. 1992.

    Google Scholar 

  18. H. Miiller, M. A. Orgun, S. TIlley, and J. S. Uhl. A Reverse Engineering Approach to Subsystem Structure Identification. Journal of Software Maintenance, 5(4):181–204, 1993.

    Google Scholar 

  19. G. Murphy, D. Notkin, and E.-C. Lan. An Emprical Study of Static Call Graph Extractors. In The 18th International Conference on Software Engineering, pages 90–99, 1996.

    Google Scholar 

  20. R. Murray. A Statically Typed Abstract Representation for C++ Programs. In Proceedings of the USENIX C++ Conference, pages 83–97, Aug. 1992.

    Google Scholar 

  21. J. Q. Ning, A. Engberts, and W. Kozaczynski. Automated Support for Legacy Code Understanding. Commun. ACM, 37(5):50–57, May 1994.

    Google Scholar 

  22. D. Richardson, T. O'Malley, C. Moore, and S. Aha. Developing and Integrating PRODAG in the Arcadia Environment. In Fifth ACM SIGSOFT Symp. Software Development Environments, pages 109–119, Dec. 1992.

    Google Scholar 

  23. D. Rosenblum and A. Wolf. Representing Semantically Analyzed C++ Code with Reprise. In USENIX C++ Conference Proceedings, pages 119–134, Apr. 1991.

    Google Scholar 

  24. D. Sharon and R. Bell. Tools that Bind: Creating Integrated Environments. IEEE Software, 12(2):76–85, Mar. 1995.

    Google Scholar 

  25. I. Thomas. PCTE Interfaces: Supporting Tools in Software-Engineering Environments. IEEE Software, 6(6):15–23, Nov. 1989.

    Google Scholar 

  26. W. F. Tichy. RCS-a system for version control. Software — Practice and Experience, 15(7):637–654, July 1985.

    Google Scholar 

  27. K.-P. Vo and Y.-F. Chen. Incl: A Tool to Analyze Include Files. In Summer 1992 USENIX Conference, pages 199–208, June 1992.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Mehdi Jazayeri Helmut Schauer

Rights and permissions

Reprints and permissions

Copyright information

© 1997 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Chen, YF.R., Gansner, E.R., Koutsofios, E. (1997). A C++ data model supporting reachability analysis and dead code detection. In: Jazayeri, M., Schauer, H. (eds) Software Engineering — ESEC/FSE'97. ESEC SIGSOFT FSE 1997 1997. Lecture Notes in Computer Science, vol 1301. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-63531-9_28

Download citation

  • DOI: https://doi.org/10.1007/3-540-63531-9_28

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-63531-4

  • Online ISBN: 978-3-540-69592-9

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics