Constraint Abstractions

Many type based program analyses with subtyping, such as flow analysis, are based on inequality constraints over a lattice. When inequality constraints are combined with polymorphism it is often hard to scale the analysis up to large programs. A major source of inefficiency in conventional implementations stems from computing substitution instances of constraints. In this paper we extend the constraint language with constraint abstractions so that instantiation can be expressed directly in the constraint language and we give a cubic-time algorithm for constraint solving. As an application, we illustrate how a flow analysis with flow subtyping, flow polymorphism and flow-polymorphic recursion can be implemented in O(n3) time where n is the size of the explicitly typed program.

[1]  Jens Palsberg,et al.  Optimal Representations of Polymorphic Types with Subtyping (Extended Abstract) , 1997, TACS.

[2]  Josef Svenningsson,et al.  A Usage Analysis with Bounded Usage Polymorphism and Subtyping , 2000, IFL.

[3]  Erik Barendsen,et al.  Uniqueness Typing for Functional Languages with Graph Rewriting Semantics , 1996, Math. Struct. Comput. Sci..

[4]  E. R I K B A R En D S E N,et al.  Uniqueness Typing for Functional Languages with Graph Rewriting Semantics , 1996 .

[5]  Karl-Filip Faxén Optimizing Lazy Functional Programs Using Flow Inference , 1995, SAS.

[6]  Patrick Cousot,et al.  Inductive definitions, semantics and abstract interpretations , 1992, POPL '92.

[7]  Stefan Kaes Type inference in the presence of overloading, subtyping and recursive types , 1992, LFP '92.

[8]  Jakob Rehof,et al.  Type-base flow analysis: from polymorphic subtyping to CFL-reachability , 2001, POPL '01.

[9]  Thomas W. Reps,et al.  Interconvertibility of a class of set constraints and context-free-language reachability , 2000, Theor. Comput. Sci..

[10]  François Pottier,et al.  Simplifying subtyping constraints , 1996, ICFP '96.

[11]  Thomas W. Reps,et al.  Program analysis via graph reachability , 1997, Inf. Softw. Technol..

[12]  Fritz Henglein,et al.  Polymorphic Recursion and Subtype Qualifications: Polymorphic Binding-Time Analysis in Polynomial Time , 1995, SAS.

[13]  Jakob Rehof Minimal typings in atomic subtyping , 1997, POPL '97.

[14]  Prateek Mishra,et al.  Polymorphic Subtype Inference: Closing the Theory-Practice Gap , 1989, TAPSOFT, Vol.2.

[15]  Matthias Felleisen,et al.  Componential set-based analysis , 1997, TOPL.

[16]  Christian Mossin,et al.  Flow analysis of typed higher-order programs , 1996, Technical report / University of Copenhagen / Datalogisk institut.

[17]  Fritz Henglein,et al.  Type inference with polymorphic recursion , 1993, TOPL.

[18]  Philip Wadler,et al.  Once upon a type , 1995, FPCA '95.

[19]  Scott F. Smith,et al.  Subtyping Constrained Types , 1996, SAS.

[20]  Geoffrey Smith,et al.  Principal Type Schemes for Functional Programs with Overloading and Subtyping , 1994, Sci. Comput. Program..

[21]  Pavel Curtis Constrained qualification in polymorphic type analysis , 1990 .

[22]  Alexander Aiken,et al.  Polymorphic versus Monomorphic Flow-Insensitive Points-to Analysis for C , 2000, SAS.

[23]  Scott F. Smith,et al.  Sound polymorphic type inference for objects , 1995, OOPSLA.

[24]  Jens Palsberg,et al.  Optimal Representations of Polymorphic Types with Subtyping , 1999, High. Order Symb. Comput..

[25]  Manuel Fähndrich,et al.  Making Set-Constraint Program Analyses Scale , 1996 .