Nominal verification of algorithm W
Christian Urban, Tobias Nipkow
Abstract
Christian Urban, Tobias Nipkow
Abstract
The Milner-Damas typing algorithm W is one of the classic algorithms in computer science. In this paper we describe a formalized soundness and completeness proof for this algorithm. Our formalization is based on names for both term and type variables, and is carried out in Isabelle/HOL using the Nominal Datatype Package. It turns out that in our formalization we have to deal with a number of issues that are often overlooked in informal presentations of W . “ Alpha-conversion always bites you when you least expect it .” A remark made by Xavier Leroy when discussing with us the informal proof about W in his PhD thesis. Introduction Milner's polymorphic type system for ML is probably the most influential programming language type system. The second author learned about it from a paper by Clément et al . He was immediately taken by their view that type inference can be viewed as Prolog execution, in particular because the Isabelle system, which he had started to work on, was based on a similar paradigm as the Typol language developed by Kahn and his coworkers. Milner himself had provided the explicit type inference algorithm W and proved its soundness. Completeness was later shown by Damas and Milner. Neither soundness nor completeness of W are trivial because of the presence of the Let-construct (which is not expanded during type inference).
OpenAlex reports 10 citations for this work. Citation counts describe recorded attention and do not establish research quality.
A contribution statement is not available in the OpenAlex record.
Method details are not available in the OpenAlex metadata.
Findings are not separately available in the OpenAlex metadata.
Limitations are not available in the OpenAlex metadata.
Application details are not available in the OpenAlex metadata.
The Milner-Damas typing algorithm W is one of the classic algorithms in computer science. In this paper we describe a formalized soundness and completeness proof for this algorithm. Our formalization is based on names for both term and type variables, and is carried out in Isabelle/HOL using the Nominal Datatype Package. It turns out that in our formalization we have to deal with a number of issues that are often overlooked in informal presentations of W . “ Alpha-conversion always bites you when you least expect it .” A remark made by Xavier Leroy when discussing with us the informal proof about W in his PhD thesis. Introduction Milner's polymorphic type system for ML is probably the most influential programming language type system. The second author learned about it from a paper by Clément et al . He was immediately taken by their view that type inference can be viewed as Prolog execution, in particular because the Isabelle system, which he had started to work on, was based on a similar paradigm as the Typol language developed by Kahn and his coworkers. Milner himself had provided the explicit type inference algorithm W and proved its soundness. Completeness was later shown by Damas and Milner. Neither soundness nor completeness of W are trivial because of the presence of the Let-construct (which is not expanded during type inference).
Key concepts: Soundness, HOL, Completeness (order theory), Computer science, Algorithm, Proof assistant, Programming language, Theoretical computer science