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”?
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
The language C similarly treats 0 as \(\mathrm {false}\) and any non-zero value as \(\mathrm {true}\).
- 2.
For beginners it turned out to be quite confusing to have the choice between encodings as lists or trees.
- 3.
Unlike tally marks though we don’t group in fives.
- 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
Hopcroft, J.E., Motwani, R., Ullman, J.D.: Introduction to Automata Theory, Languages and Computation, 3rd edn. Addison-Wesley (2007)
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.)
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)
McCarthy, J.: Recursive functions of symbolic expressions and their computation by machine. Part I. Commun. ACM 3(4), 184–195 (1960)
Official Haskell Website. Available via DIALOG. https://www.haskell.org (2015). Accessed 9 June 2015
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
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)
W3C: Extensible Markup Language (XML). Available via DIALOG http://www.w3.org/XML/. Cited on 9 June 2015
Author information
Authors and Affiliations
Corresponding author
Rights 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)