## Exact Intersection Typing Inference and Call-by-Name Evaluation (2004)

### BibTeX

@TECHREPORT{Sebastien04exactintersection,

author = {Adam Bakewell Sebastien and Sébastien Carlier and A. J. Kfoury and J. B. Wells},

title = {Exact Intersection Typing Inference and Call-by-Name Evaluation},

institution = {},

year = {2004}

}

### OpenURL

### Abstract

It is known that inferring an exact intersection typing for a #-term (i.e., a typing where the intersection operator is not idempotent) is equivalent to strong #-normalisation of that term. Intersection typing derivations can provide very precise information about program behaviour, making them --- in principle --- an attractive framework for program analysis. The recent innovation of expansion variables greatly simplifies the production of such typing derivations, allows their production for all #-normalising terms and allows inference to be done in a truly compositional way --- a big advantage for programs where components are updated frequently and separately. We present a new, truly compositional, exact intersection typing inference procedure for the recent, expansion variable-based, System E framework. Inference uses a confluent rewrite system to solve instances of a unification problem with expansion variables. Moreover, we explain precisely how the inferred typing-derivation describes the evaluation of the term, showing that the typing derivation most accurately describes its call-by-name evaluation via a linear transformation. For other evaluation strategies, di#erent inference algorithms will be required. 1