Skip to main content

The WHILE-Language

  • Chapter
  • First Online:
Limits of Computation

Part of the book series: Undergraduate Topics in Computer Science ((UTICS))

  • 2744 Accesses

Abstract

Turing machines are historically important but tedious to program and thus not an ideal language for studying computability and complexity issues. We thus prefer to program in a high-level language, on which the notions of computable and decidable can then be based. This chapter presents the imperative untyped language WHILE that provides basic imperative control operators and binary trees as built in datatype. It is explained how various datatypes like natural numbers and lists can be encoded in WHILE.

What language do we use to write our “effective procedures”?

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

Access this chapter

eBook
USD 16.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 59.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

Notes

  1. 1.

    The language C similarly treats 0 as \(\mathrm {false}\) and any non-zero value as \(\mathrm {true}\).

  2. 2.

    For beginners it turned out to be quite confusing to have the choice between encodings as lists or trees.

  3. 3.

    Unlike tally marks though we don’t group in fives.

  4. 4.

    Technically this initialisation is not needed because we will see soon that variables are automatically initialised with nil but the explicit assignment makes the program more readable.

References

  1. Hopcroft, J.E., Motwani, R., Ullman, J.D.: Introduction to Automata Theory, Languages and Computation, 3rd edn. Addison-Wesley (2007)

    Google Scholar 

  2. Jones, N.D.: Computability and Complexity: From a Programming Perspective. MIT Press, Cambridge (1997). (Also available online at http://www.diku.dk/neil/Comp2book.html.)

  3. Karp, A.: A Programming Language Oriented Approach to Computability. Bachelor Thesis. University of Bern. Available via DIALOG, https://github.com/zombiecalypse/Bachelor-Thesis/wiki. Cited on 7 Sept 2015 (2013)

  4. McCarthy, J.: Recursive functions of symbolic expressions and their computation by machine. Part I. Commun. ACM 3(4), 184–195 (1960)

    Article  MATH  Google Scholar 

  5. Official Haskell Website. Available via DIALOG. https://www.haskell.org (2015). Accessed 9 June 2015

  6. Standard Ecma 404: The JSON Data Interchange Format. Available via DIALOG http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf. Cited on 9 June 2015

  7. Steele Jr, G.L.: Debunking the "expensive procedure call" myth or, procedure call implementations considered harmful or, LAMBDA: the Ultimate GOTO. In: Ketchel, J.S., et al. (eds.) Proceedings of the 1977 annual conference ACM’77, pp. 153–162. ACM, Seattle, Washington (1977)

    Google Scholar 

  8. W3C: Extensible Markup Language (XML). Available via DIALOG http://www.w3.org/XML/. Cited on 9 June 2015

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Bernhard Reus .

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Springer International Publishing Switzerland

About this chapter

Cite this chapter

Reus, B. (2016). The WHILE-Language. In: Limits of Computation. Undergraduate Topics in Computer Science. Springer, Cham. https://doi.org/10.1007/978-3-319-27889-6_3

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-27889-6_3

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-27887-2

  • Online ISBN: 978-3-319-27889-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics