Skip to main content

Type Checking

  • Chapter
  • First Online:
Introduction to Compiler Design

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

  • 4067 Accesses

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–)

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and 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

Notes

  1. 1.

    Unlike in Chap. 4, where the error function stops execution.

References

  1. Aho, A.V., Lam, M.S., Sethi, R., Ullman, J.D.: Compilers; Principles, Techniques and Tools. Addison-Wesley, Menlo Park (2007)

    MATH  Google Scholar 

  2. Milner, R.: A theory of type polymorphism in programming. J. Comput. Syst. Sci. 17(3), 348–375 (1978)

    Article  MATH  MathSciNet  Google Scholar 

  3. Pierce, B.C.: Types and Programming Languages. MIT Press, Cambridge (2002)

    MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Torben Ægidius Mogensen .

Rights and permissions

Reprints and permissions

Copyright information

© 2017 Springer International Publishing AG

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics