Higher-Order and Symbolic Computation

, Volume 18, Issue 3–4, pp 245–269 | Cite as

Selectors Make Set-Based Analysis Too Hard

  • Philippe Meunier
  • Robert Bruce Findler
  • Paul Steckler
  • Mitchell Wand


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.


set-based analysis program analysis static debugging Scheme 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Aiken, A. Introduction to set constraint-based program analysis. Science of Computer Programming, 35 (1999) 79–111.CrossRefzbMATHMathSciNetGoogle Scholar
  2. 2.
    Aiken, A., Wimmers, E.L., and Lakshman, T.K. Soft typing with conditional types. In Proceeding of the 21st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL '94), 1994, pp. 163–173.Google Scholar
  3. 3.
    Cormen, T.H., Leiserson, C.E., and Rivest, R.L. Introduction to Algorithms. MIT Press/McGraw-Hill, Cambridge, MA/New York, 1990.Google Scholar
  4. 4.
    Cousot, P. and Cousot, R. Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In Conference Record of the Fourth Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, 1977, pp. 238–252.Google Scholar
  5. 5.
    Dybvig, R.K. Chez Scheme User's Guide. Cadence Research Systems, 1998.Google Scholar
  6. 6.
    Dybvig, R.K. and Hieb, R. A new approach to procedures with variable arity. Lisp and Symbolic Computation, 3 (1990) 229–244.CrossRefGoogle Scholar
  7. 7.
    Dzeng, H. and Haynes, C.T. Type Reconstruction for variable-arity procedures. In Proceedings of the ACM Conference on Lisp and Functional Programming, 1994, pp. 239–249.Google Scholar
  8. 8.
    Findler, R.B., Clements, J., Flanagan, C., Flatt, M., Krishnamurthi, S., Steckler, P., and Felleisen, M. DrScheme: A progamming environment for scheme. Journal of Functional Programming, 12(2) (2002) 159–182.CrossRefzbMATHGoogle Scholar
  9. 9.
    Flanagan, C. MrSpidey: Static Debugger Manual. Rice University, 1995.Google Scholar
  10. 10.
    Flanagan, C. Effective static debugging via componential set-based analysis. PhD thesis, Rice University, 1997.Google Scholar
  11. 11.
    Flanagan, C. and Felleisen, M. Componential set-based analysis. ACM Trans. on Programming Languages and Systems, 21(2) (1999) 369–415.Google Scholar
  12. 12.
    Flatt, M. MzScheme: Language Reference Manual. Rice University. 2000, Version 103.Google Scholar
  13. 13.
    Heintze, N. Set based program analysis. PhD thesis, Carnegie-Mellon Univ., Pittsburgh, Pa, 1992.Google Scholar
  14. 14.
    Heintze, N. Set-based analysis of ML programs. In Proceedings of the 1994 ACM Conference on LISP and Functional Programming, 1994, pp. 306–317.Google Scholar
  15. 15.
    Heintze, N. and McAllester, D. Linear-time subtransitive control flow analysis. In Proceedings of the 1997 ACM Conference on Programming Language Design and Implementation (PLDI '97), 1997a, pp. 261–272.Google Scholar
  16. 16.
    Heintze, N. and McAllester, D. On the cubic bottleneck in subtyping and flow analysis. In Proceedings of the IEEE Symposium on Logic in Computer Science (LICS '97), 1997b, pp. 342–351.Google Scholar
  17. 17.
    Kelsey, R., Clinger, W., and Rees, J. Revised5 report on the Algorithmic Language Scheme. Higher-Order and Symbolic Computation, 11(1) (1998) 7–105.Google Scholar
  18. 18.
    McAllester, D. and Heintze, N. On the complexity of set-based analysis. In 1997 International Conference on Functional Programming, 1997.Google Scholar
  19. 19.
    Palsberg, J. Closure analysis in constraint form. Proceedings of the ACM Transactions on Programming Languages and Systems, 17(1) (1995) 47–62.Google Scholar
  20. 20.
    Palsberg, J. and Schwartzbach, M.I. Object-Oriented Type Systems, Wiley Professional Computing. Chichester, Wiley, 1994.Google Scholar
  21. 21.
    Sestoft, P. Replacing Function Parameters by Global Variables. Master's thesis, DIKU, University of Copenhagen, 1988.Google Scholar
  22. 22.
    Shivers, O. The semantics of Scheme control-flow analysis. In Proceedings of the 1991 ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation, 1991, pp. 190–198.Google Scholar
  23. 23.
    Wand, M. and Williamson, G.B. A modular, extensible proof method for small-step flow analyses. In Programming Languages and Systems, 11th European Symposium on Programming, ESOP 2002, held as Part of the Joint European Conference on Theory and Practice of Software, ETAPS 2002, Proceedings, D. Le Métayer (Ed.), vol. 2305 of Lecture Notes in Computer Science, 2002, pp. 213–227.Google Scholar

Copyright information

© Springer Science + Business Media, Inc. 2005

Authors and Affiliations

  • Philippe Meunier
    • 1
  • Robert Bruce Findler
    • 2
  • Paul Steckler
    • 1
  • Mitchell Wand
    • 1
  1. 1.College of Computer and Information ScienceNortheastern UniversityBoston
  2. 2.Department of Computer ScienceUniversity of ChicagoChicago

Personalised recommendations