Fueling innovative software
July 15-18, 2019
Portland, OR

Implement your own type system

Michael Ernst (University of Washington)
5:05pm5:45pm Thursday, July 18, 2019
Live Coding ONLY
Location: Portland 252
Secondary topics:  Open Source
Average rating: ****.
(4.50, 4 ratings)

Who is this presentation for?

  • Software developers and architects and QA and compliance teams

Level

Intermediate

Description

Don’t let programming language designers have all the fun: you can design your own type system that’s better than the current one. Many developers view type theory as abstruse and confusing. It’s not.

Michael Ernst walks you through the four simple components of a type system: the types, subtyping relationships, how to give a type to each expression in your program, and what operations are illegal. Once you specify these four things, you’ve designed a type system. Starting from nothing, in 40 minutes Michael creates a fully fledged type checker that detects real errors in real programs. For concreteness, he implements the type checker for the Java language, and it handles all Java constructs, such as generics, subtyping, and lambdas. This type system will be better than the built-in Java type system: it will detect errors that the Java compiler permits and that would otherwise go undetected until runtime.

Although Mike uses Java, the ideas translate to other languages. Even if you don’t want to implement your own type system, you’ll come away with a better understanding of type systems and of compile-time verification in general. If you’re a Java developer, you’ll also be ready to use dozens of freely available pluggable type systems to improve code quality, which are used daily at companies such as Amazon, Google, and Uber.

Prerequisite knowledge

  • A working knowledge of Java

What you'll learn

  • Gain an improved theoretical and practical understanding of type systems
  • Learn how to deploy pluggable type checking in your own projects, which improves reliability, documentation, and design
Photo of Michael Ernst

Michael Ernst

University of Washington

Michael Ernst is a professor in the computer science and engineering department at the University of Washington. He’s also the specification lead for JSR 308, which makes Java’s annotation system more expressive. Michael’s research aims to make software more reliable, more secure, and easier (and more fun) to produce. His primary technical interests are in software engineering and related areas, including programming languages, type theory, security, program analysis, bug prediction, testing, and verification. His research combines strong theoretical foundations with realistic experimentation with an eye to changing the way that software developers work. Previously, he was a tenured professor at MIT and a researcher at Microsoft Research.