Skip to main content

The Evolution of GOTO Usage and Its Effects on Software Quality

  • Conference paper
Informatik’99

Part of the book series: Informatik aktuell ((INFORMAT))

  • 91 Accesses

Abstract

Although GOTO has long been criticized for being “unstructured” and causing “unreliable” programs, it is still provided even by new languages, and actually used in practice. Why?

This paper presents the results of a study in which we analyzed the frequency and typical applications of GOTO in over 400 MB of C and Ada source code. The frequency analysis showed a large difference in GOTO density. The usage analysis demonstrated that the availability of sufficiently powerful control structures significantly reduces the frequency of GOTO. Relating these results to error rates reported for large software projects indicates that programs written in languages with lower GOTO density are more reliable.

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

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Similar content being viewed by others

References

  1. J. Barnes. Programming in Ada 95. Addison Wesley, 1995.

    Google Scholar 

  2. B.A. Benander, N. Gorla, and A.C. Benander. An empirical study of the use of the goto statement. Journal of Systems and Software, 11 (3): 217 - 223, March 1990.

    Article  Google Scholar 

  3. L. Bougé. The Data Parallel Programming Model: A Semantic Perspective. In The Data Parallel Programming Model, LNCS, pages 4-26. Springer, 1996.

    Google Scholar 

  4. F.J. Bourgeois. Communications of the ACM, 30 (8): 660, August 1987.

    Google Scholar 

  5. 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, 1994.

    Google Scholar 

  6. P.A. Buhr. A Case for Teaching Multi-exit Loops to Beginning Programmers. ACM SIGPLAN Notices, 20 (11): 14 - 22, November 1985.

    Article  Google Scholar 

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

    Article  MathSciNet  Google Scholar 

  8. R. Fairley. Software Engineering Concepts. McGraw-Hill, 1985.

    Google Scholar 

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

    Google Scholar 

  10. D. Flanagan. Java in a Nutshell. O Reilley Si Associates, 1996.

    Google Scholar 

  11. 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 

  12. W. Gellerich, K. Brouwer, and E. Ploedereder. Myths and facts about the efficient implementation of finite automata and lexical analysis. In K. Koskimies, editor, Proceedings of the International Conference on Compiler Construction (CC98), volume 1883 of LNCS, pages 1-15. Springer, 1998.

    Google Scholar 

  13. W. Gellerich, M. Kosiol, and E. Ploedereder. Where does goto go to? In Reliable Software Technologies - Ada-Europe 1996, volume 1088 of LNCS, pages 385-395. Springer, 1996.

    Google Scholar 

  14. Gnu ada translator (gnat) documentation, 1995. (cs.nyu.edu:/pub/gnat).

    Google Scholar 

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

    Google Scholar 

  16. Jensen Si Partners International. TopSpeed Modula-2 Language and Library Reference,1991.

    Google Scholar 

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

    Google Scholar 

  18. King. N.N. TopSpeed Modula-2 Language Tutorial. Jensen & Partners International, 1991.

    Google Scholar 

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

    Article  MATH  Google Scholar 

  20. D.E. Knuth. Structures Programming with goto Statements. Computing Surveys, 6 (4): 262 - 301, December 1974.

    Article  MathSciNet  Google Scholar 

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

    Google Scholar 

  22. M. Metcalf and J. Reid. Fortran 90 explained. Oxford University Press, 1992.

    Google Scholar 

  23. P. Naur. GO TO Statement and Good Algol Style. BIT,3(3):204-205, 1963. (Nachdruck in [24]).

    Google Scholar 

  24. P. Naur. Computing: A Human Activity. ACM Press, 1992.

    Google Scholar 

  25. D.J. Reifer. Quantifying the Debate: Ada vs. C++. Crosstalk, (7), July 1996.

    Google Scholar 

  26. F. Rubin. GOTO Considered Harmful Considered Harmful. Communications of the ACM, 30 (3): 195 - 196, March 1987.

    Article  Google Scholar 

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

    Google Scholar 

  28. W. Van Snyder. Multilevel EXIT and CYCLE arent so bad. ACM SIGPLAN Notices, 22 (5): 20 - 22, May 1987.

    Article  Google Scholar 

  29. B. Stroustrup. The C++ Programming Language. Addison-Wesley, 1993.

    Google Scholar 

  30. S.T. Taft and R.A. Duff. Ada 95 Reference Manual. Springer, 1998. ANSI/ISO /IEC-8652:1995.

    Google Scholar 

  31. W.F. Tichy, P. Lukowicz, Lutz Prechelt, and E.A. Heinz. Experimental Evaluation in Computer Science: A Quantuitative Study. Journal of Systems and Software, 28 (1): 9 - 18, Januar 1995.

    Google Scholar 

  32. N. Wirth. On the composition of well-structured programs. Computing Surveys, 6 (4): 247 - 259, December 1974.

    Article  MATH  Google Scholar 

  33. S.F. Zeigler. Comparing Development Costs of C and Ada, March 1995. http://wuarchive.wustl.edu/languages/ada/ajpo/docs/reports/cada/cadaart.html.

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 1999 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Gellerich, W., Ploedereder, E. (1999). The Evolution of GOTO Usage and Its Effects on Software Quality. In: Beiersdörfer, K., Engels, G., Schäfer, W. (eds) Informatik’99. Informatik aktuell. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-662-01069-3_57

Download citation

  • DOI: https://doi.org/10.1007/978-3-662-01069-3_57

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-66450-5

  • Online ISBN: 978-3-662-01069-3

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics