Selectors Make Set-Based Analysis Too Hard

A set-based program analysis establishes constraints between sets of abstract values for all expressions in a program. Solving the system of constraints produces a conservative approximation to the program's runtime flow of values.Some practical set-based analyses use explicit selectors to extract the relevant values from an approximation set. For example, if the analysis needs to determine the possible return values of a procedure, it uses the appropriate selector to extract the relevant component from the abstract representation of the procedure.In this paper, we show that this selector-based approach complicates the constraint solving phase of the analysis too much and thus fails to scale up to realistic programming languages. We demonstrate this claim with a full-fledged value flow analysis for case-lambda, a multi-branched version of lambda. We show how both the theoretical underpinnings and the practical implementation become too complex. In response, we present a variant of set-based closure analysis that computes equivalent results in a much more efficient manner.

[1]  Robert Hieb,et al.  Revised 5 Report on the Algorithmic Language , 1999 .

[2]  Peter Sestoft,et al.  Replacing function parameters by global variables , 1989, FPCA.

[3]  Nevin Heintze,et al.  Set-based analysis of ML programs , 1994, LFP '94.

[4]  Patrick Cousot,et al.  Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints , 1977, POPL.

[5]  Mitchell Wand,et al.  A Modular, Extensible Proof Method for Small-Step Flow Analyses , 2002, ESOP.

[6]  David A. McAllester,et al.  Linear-time subtransitive control flow analysis , 1997, PLDI '97.

[7]  Alexander Aiken,et al.  Soft typing with conditional types , 1994, POPL '94.

[8]  Jens Palsberg,et al.  Object-oriented type systems , 1994, Wiley professional computing.

[9]  Alexander Aiken,et al.  Introduction to Set Constraint-Based Program Analysis , 1999, Sci. Comput. Program..

[10]  Cormac Flanagan,et al.  Effective Static Debugging via Compential Set-Based Analysis , 1997 .

[11]  R. K. Shyamasundar,et al.  Introduction to algorithms , 1996 .

[12]  R. Kent Dybvig,et al.  Revised5 Report on the Algorithmic Language Scheme , 1986, SIGP.

[13]  David A. McAllester,et al.  On the cubic bottleneck in subtyping and flow analysis , 1997, Proceedings of Twelfth Annual IEEE Symposium on Logic in Computer Science.

[14]  David A. McAllester,et al.  On the complexity of set-based analysis , 1997, ICFP '97.

[15]  Matthew Flatt,et al.  PLT MzScheme: Language Manual , 2000 .

[16]  Olin Shivers,et al.  The semantics of Scheme control-flow analysis , 1991, PEPM '91.

[17]  Robert Hieb,et al.  A new approach to procedures with variable arity , 1990, LISP Symb. Comput..

[18]  Christopher T. Haynes,et al.  Type reconstruction for variable-arity procedures , 1994, LFP '94.

[19]  Matthias Felleisen,et al.  DrScheme: a programming environment for Scheme , 2002, J. Funct. Program..

[20]  Nevin Charles Heintze,et al.  Set based program analysis , 1992 .

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

[22]  Jens Palsberg,et al.  Closure analysis in constraint form , 1995, TOPL.

[23]  Ronald L. Rivest,et al.  Introduction to Algorithms , 1990 .