Iterative Type Inference with Attribute Grammars
Arie Middelkoop , S. Doaitse Swierstra and Atze Dijkstra
Abstract: Type inference is the process of constructing a typing derivation while gradually discovering type information.
During this process, inference algorithms typically make subtle decisions based on the derivation constructed so far.
Because a typing derivation is a decorated tree we aim to use attribute grammars as the main implementation tool. Unfortunately, we can neither express iteration, nor express decisions based on intermediate derivations in such grammars.
Here, we present the language |rulerfront|, a conservative extension to ordered attribute grammars, that deals with the aforementioned problems. We show why this extension is suitable for the description of constraint-based inference algorithms.