First International Conference on Software Engineering and Formal Methods (SEFM'03)
Facilitating Program Verification with Dependent Types
Brisbane, Australia
September 22-September 27
ISBN: 0-7695-1949-0
The use of types in capturing program invariants is over-whelming in practical programming. The type systems in languages such as ML and Java scale convincingly to realistic programs but they are of relatively limited expressive power. In this paper, we show that the use of a restricted form of dependent types can enable us to capture many more program invariants such as memory safety while retaining practical type-checking. The programmer can encode program invariants with type annotations and then verify these invariants through static type-checking. Also the type annotations can serve as informative program documentation, which are mechanically veri.ed and can thus be fully trusted. We argue with realistic examples that this restricted form of dependent types can signi.cantly facilitate program verification as well as program documentation.