'

Title: Typical: Taking the Tedium Out of Typing


(NYU-CS-TR904)

Authors: Robert Grimm, Laune Harris and Anh Le 

Abstract:
The implementation of real-world type checkers requires a non-trivial
engineering effort.  The resulting code easily comprises thousands of
lines, which increases the probability of software defects in a
component critical to compiler correctness.  To make type checkers
easier to implement and extend, this paper presents Typical, a
domain-specific language and compiler that directly and concisely
captures the structure of type systems.  Our language builds on the
functional core for ML to represent syntax trees and types as variants
and to traverse them with pattern matches.  It then adds declarative
constructs for common type checker concerns, such as scoping rules,
namespaces, and constraints on types.  It also integrates error
checking and reporting with other constructs to promote comprehensive
error management.  We have validated our system with two real-world
type checkers written in Typical, one for Typical itself and the
other for C.