Skip to main content

Where does GOTO Go to?

  • The Ada 95 Programming Language
  • Conference paper
  • First Online:

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

Abstract

Although GOTO has long been criticized for being “unstructured” and causing “unreliable” programs, it is still in use and even modern languages like Ada95 provide GOTO. Why? This paper presents the results of a study in which we examined 316 MB of Ada source code in order to find the frequency and typical applications of GOTO. It turned out that about 99% of all examined files do not contain any GOTO, but we also found “spaghetti code”, generally justified by efficiency arguments. We analyzed whether GOTO really improved efficiency and examined sources containing GOTO by code inspection in order to determine its typical applications.

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. Ada 95 Reference Manual Intermetrics, Inc., 1995, ANSI/ISO/IEC-8652:1995.

    Google Scholar 

  2. M. M. Brandis. Building an Optimizing Compiler for Oberon: Implications on Programming Language Design. In P. Schulthess, editor, Advances in Modular Languages, pages 123–135. Universitaetsverlag Ulm GmbH (address: Postfach 4204; D-89032 Ulm; Germany), 1994. (Proceedings of the Joint Modular Languages Conference 1994).

    Google Scholar 

  3. M.M. Brandis. Optimizing Compilers for Structured Programming Languages. PhD thesis, ETH Zuerich, 1995. ftp.inf.ethz.ch:/doc/diss/th11024.ps.gz.

    Google Scholar 

  4. R. Cytron, J. Ferrante, B.K. Rosen, M.N. Wegman, and F.K. Zadeck. An Efficient Method of Computing Static Single Assignment Form. In 16nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 25–35. ACM, 1989.

    Google Scholar 

  5. E.W. Dijkstra. Goto Statement Considered Harmful. Communications of the ACM, 11(3):147–148, March 1968.

    Google Scholar 

  6. A.M. Erosa and L.J. Hendren. Taming control flow: A structured approach to eliminating goto statements. In Proceedings of IEEE 1994 International Conference on Computer Languages, May 1994. ftpwally.cs.mcgill.ca/pub/doc/memos/memo76.ps.gz.

    Google Scholar 

  7. R. Cytron et al., Efficiently Computing Single Single Assignment Form and the Control Dependence Graph. ACM Transactions on Programming Languages and Systems, 13(4):451–490, 1991.

    Google Scholar 

  8. J. Ferrante, K.J. Ottenstein, and J.D. Warren. The Program Dependence Graph and its Use in Optimization. ACM Transactions on Programming Languages and Systems, 9(3):319–349, July 1987.

    Google Scholar 

  9. A.E. Fischer and F.S. Grodzinsky. The Anatomy of Programming Languages. Prentice-Hall, 1993.

    Google Scholar 

  10. Free Software Foundation, 59 Temple Place — Suite 330, Boston, MA 02111-1307 USA. Using and Porting GNU CC, 1995. (for GCC Version 2.7.2).

    Google Scholar 

  11. Gnu ada translator (gnat) documentation, 1995. (ftpcs.nyu.edu:/pub/gnat).

    Google Scholar 

  12. G. Goos and J. Hartmanis (eds). The Programming Language Ada Reference Manual. Springer, 1983.

    Google Scholar 

  13. R. Griesemer. A Programming Language for Vector Computers. PhD thesis, ETH Zuerich, 1993. ftp.inf.ethz.ch: /doc/diss/th10277.ps.gz.

    Google Scholar 

  14. P. Havlak. Construction of Thinned Gated Single-Assignment Form. In U. Banerjee, D. Gelernter, A. Nicolau, and D. Padua, editors, Languages and Compilers for Parallel Computing, pages 478–499, 1993.

    Google Scholar 

  15. B.W. Kernighan and D.M. Ritchie. The C programming language. Prentice Hall, 2. edition, 1988.

    Google Scholar 

  16. D.E. Knuth. An Empirical Study of Fortran Programs. Software — Practice and Experience, 1:105–133, 1971.

    Google Scholar 

  17. K.C. Louden. Programming Languages. PWS-KENT Publishing Company, 1993.

    Google Scholar 

  18. Rational Software Corporation, 2800 San Tomas Expressway, Santa Clara, California 95051-0951. Rational Apex Programmer's Reference Manual, December 1993. Revision 2.0 (software release 1.2).

    Google Scholar 

  19. R.W. Sebesta. Concepts of Programming Languages. The Benjamin-Cummings Publishing Company, 2. edition, 1993.

    Google Scholar 

  20. J. Self. Aflex — An Ada Lexical Analyzer Generator. Technical Report UCI-90-18, University of California, Irvine, May 1990.

    Google Scholar 

  21. B. Stroustrup. The C++ Programming Language. Addison-Wesley, 2. edition, 1993.

    Google Scholar 

  22. D. Taback and D. Tolani. Ayacc User's Manual. Technical Report UCI-94-01, University of California, Irvine, March 1994.

    Google Scholar 

  23. M.J. Wolfe. High-Performance Compilers for Parallel Computing. Addison-Wesley, 1995.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Wolfgang Gellerich .

Editor information

Alfred Strohmeier

Rights and permissions

Reprints and permissions

Copyright information

© 1996 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Gellerich, W., Kosiol, M., Ploedereder, E. (1996). Where does GOTO Go to?. In: Strohmeier, A. (eds) Reliable Software Technologies — Ada-Europe '96. Ada-Europe 1996. Lecture Notes in Computer Science, vol 1088. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0013504

Download citation

  • DOI: https://doi.org/10.1007/BFb0013504

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-61317-6

  • Online ISBN: 978-3-540-68457-2

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics