Abstract
Lexing and parsing will reject many texts as not being correct programs. However, many languages have well-formedness requirements that can not be handled exclusively by the techniques seen so far. These requirements can, for example, be static type correctness or a requirement that pattern-matching or case-statements are exhaustive.
The most touching epitaph I ever encountered was on the tombstone of the printer of Edinburgh. It said simply: He kept down the cost and set the type right.
Gregory Nunn (1955–)
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
Unlike in Chap. 4, where the error function stops execution.
References
Aho, A.V., Lam, M.S., Sethi, R., Ullman, J.D.: Compilers; Principles, Techniques and Tools. Addison-Wesley, Menlo Park (2007)
Milner, R.: A theory of type polymorphism in programming. J. Comput. Syst. Sci. 17(3), 348–375 (1978)
Pierce, B.C.: Types and Programming Languages. MIT Press, Cambridge (2002)
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
Copyright information
© 2017 Springer International Publishing AG
About this chapter
Cite this chapter
Mogensen, T. (2017). Type Checking. In: Introduction to Compiler Design. Undergraduate Topics in Computer Science. Springer, Cham. https://doi.org/10.1007/978-3-319-66966-3_5
Download citation
DOI: https://doi.org/10.1007/978-3-319-66966-3_5
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-66965-6
Online ISBN: 978-3-319-66966-3
eBook Packages: Computer ScienceComputer Science (R0)