Abstract
Unreachable procedures are procedures that can never be invoked. Their existence may adversely affect the performance of a program. Unfortunately, their detection requires the entire program to be present. Using a long-time code modification system, we analyze large, linked, program modules of C++, C, and Fortran. We find that C++ programs using object-oriented programming style contain a large fraction of unreachable procedure code. In contrast, C and Fortran programs have a low and essentially constant fraction of unreachable code. In this article, we present our analysis of C++, C, and Fortran programs, and we discuss how object-oriented programming style generates unreachable procedures.
- AMERICAN NATIONAL STANDARD INSTITUTE. 1966. ANSI Standard Fortran. ANSI, New York.Google Scholar
- AHO, A. V., SETHI, R., AND ULLMAN, J.D.1988. Compilers, Principles, Techniques and Tools. Addison-Wesley, Reading, Mass. Google Scholar
- BOBROW, D. G., AND STEFIK, M.J. 1983.The LOOPS Manual. Xerox Corporation, Palo Alto, Calif.Google Scholar
- COGGINS, J., AND BOLLELLA, G. 1989. Managing C ++ libraries. SIGPLAN Not. 24, 6 (June). Google Scholar
- ELLIS, M., AND STROUSTRUP, B. 1990. The Annotated C + + Reference Manual. Addison-Wesley, Reading, Mass. Google Scholar
- KERNIGHAN, B. W., AND RITCHIE, D.M. 1988. The C Programming Language. Prentice-Hall Software Series, Englewood Cliffs, N.J. Google Scholar
- MEYER, B. 1992. Eiffel: The Language. Prentice-Hall, Englewood, Cliffs, N.J. Google Scholar
- REES, J., AND CLINGER, W., EDS. 1986. Revised report on algorithmic language scheme. SIG- PLAN Not. 21, 12, 37-39. Google Scholar
- STEEL, G.L. 1984 Common Ltsp: The Language. Digital Press. Google Scholar
- SRIVASTAVA, A. 1985. SCOOPS: Scheme object-oriented programming system. Rep. CSL-23, Texas Instruments, Dallas, Tex.Google Scholar
- SRIVASTAVA, A., AND WALL, D.W. 1993. A practical system for intermodule code optimization at link-time. J. Program. Lang. 1 (Mar.), 1-18. Also available as WRL Research Report 92/6, December 1992.Google Scholar
- STROUSTRUP, B. 1991. The C + + Programmtng Language. Addison-Wesley, Reading, Mass. Google Scholar
- TEXAS INSTRUMENTS. 1985. TI Scheme Language Reference Manual. Texas Instruments, Austin, Tex.Google Scholar
- WEINREB, D., MOON, D., AND STALLMAN, R. 1983. L~sp Machine Manual. MIT, Cambridge, Mass. Google Scholar
Index Terms
Unreachable procedures in object-oriented programming
Recommendations
What Is Object-Oriented Programming?
The meaning of the term 'object oriented' is examined in the context of the general-purpose programming language C++. This choice is made partly to introduce C++ and partly because C++ is one of the few languages that supports data abstraction, object-...
An object-oriented program development environment for the first programming course
Over the last ten years there has been a major shift in programming language design from procedural languages to object-oriented languages. Most universities have adopted an object-oriented language for their first programming course. However, far less ...






Comments