From Polyvariant flow information to intersection and union types

JENS PALSBERG, CHRISTINA PAVLOPOULOU
2001 Journal of functional programming  
Many polyvariant program analyses have been studied in the 1990s, including k-CFA, polymorphic splitting, and the cartesian product algorithm. The idea of polyvariance is to analyze functions more than once and thereby obtain better precision for each call site. In this paper we present an equivalence theorem which relates a co-inductivelydefined family of polyvariant flow analyses and a standard type system. The proof embodies a way of understanding polyvariant flow information in terms of
more » ... n and intersection types, and, conversely, a way of understanding union and intersection types in terms of polyvariant flow information. We use the theorem as basis for a new flow-type system in the spirit of the λ CIL -calculus of Wells, Dimock, Muller, and Turbak, in which types are annotated with flow information. A flow-type system is useful as an interface between a flowanalysis algorithm and a program optimizer. Derived systematically via our equivalence theorem, our flow-type system should be a good interface to the family of polyvariant analyses that we study.
doi:10.1017/s095679680100394x fatcat:h4ddsoodafajrfjjom4a2nqmji