Skip to main content
Log in

Selectors Make Set-Based Analysis Too Hard

  • Published:
Higher-Order and Symbolic Computation

Abstract

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Aiken, A. Introduction to set constraint-based program analysis. Science of Computer Programming, 35 (1999) 79–111.

    Article  MATH  MathSciNet  Google Scholar 

  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.

  3. Cormen, T.H., Leiserson, C.E., and Rivest, R.L. Introduction to Algorithms. MIT Press/McGraw-Hill, Cambridge, MA/New York, 1990.

  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.

  5. Dybvig, R.K. Chez Scheme User's Guide. Cadence Research Systems, 1998.

  6. Dybvig, R.K. and Hieb, R. A new approach to procedures with variable arity. Lisp and Symbolic Computation, 3 (1990) 229–244.

    Article  Google Scholar 

  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.

  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.

    Article  MATH  Google Scholar 

  9. Flanagan, C. MrSpidey: Static Debugger Manual. Rice University, 1995.

  10. Flanagan, C. Effective static debugging via componential set-based analysis. PhD thesis, Rice University, 1997.

  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. Flatt, M. MzScheme: Language Reference Manual. Rice University. 2000, Version 103.

  13. Heintze, N. Set based program analysis. PhD thesis, Carnegie-Mellon Univ., Pittsburgh, Pa, 1992.

  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.

  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.

  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.

  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.

  18. McAllester, D. and Heintze, N. On the complexity of set-based analysis. In 1997 International Conference on Functional Programming, 1997.

  19. Palsberg, J. Closure analysis in constraint form. Proceedings of the ACM Transactions on Programming Languages and Systems, 17(1) (1995) 47–62.

  20. Palsberg, J. and Schwartzbach, M.I. Object-Oriented Type Systems, Wiley Professional Computing. Chichester, Wiley, 1994.

  21. Sestoft, P. Replacing Function Parameters by Global Variables. Master's thesis, DIKU, University of Copenhagen, 1988.

  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.

  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.

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Philippe Meunier.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Meunier, P., Findler, R.B., Steckler, P. et al. Selectors Make Set-Based Analysis Too Hard. Higher-Order Symb Comput 18, 245–269 (2005). https://doi.org/10.1007/s10990-005-4876-5

Download citation

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10990-005-4876-5

Keywords

Navigation