Skip to main content

Constraint Abstractions

  • Conference paper
  • First Online:
Programs as Data Objects (PADO 2001)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 2053))

Included in the following conference series:

Abstract

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(n 3) time where n is the size of the explicitly typed program.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. A. Aiken, E. Wimmers, and J. Palsberg. Optimal representation of polymorphic types with subtyping. In Proceedings TACS’97 Theoretical Aspects of Computer Software, pages 47–77. Springer Lecture Notes in Computer Science, vol. 1281, September 1997.

    Chapter  Google Scholar 

  2. E. Barendsen and S. Smetsers. Uniqueness Typing for Functional Languages with Graph Rewriting Semantics. Mathematical Structures in Computer Science, 6:579–612, 1996.

    MATH  MathSciNet  Google Scholar 

  3. P. Cousot and R. Cousot. Inductive definitions, semantics and abstract interpretation. In Conference Record of the Ninthteenth Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 83–94, Albuquerque, New Mexico, January 1992. ACM Press, New York, NY.

    Google Scholar 

  4. P. Curtis. Constrained qualification in polymorphic type analysis. Technical Report CSL-09-1, Xerox Parc, February 1990.

    Google Scholar 

  5. D. Dussart, F. Henglein, and C. Mossin. Polymorphic recursion and subtype qualifications: Polymorphic binding-time analysis in polynomial time. In proceedings of 2nd Static Analysis Symposium, September 1995.

    Google Scholar 

  6. J. Eifrig, S. Smith, and V. Trifonov. Sound polymorphic type inference for objects. In Proceedings OOPSLA’95, 1995.

    Google Scholar 

  7. M. Fändrich and A. Aiken. Making set-constraint program analyses scale. In Workshop on Set Constraints, 1996.

    Google Scholar 

  8. Karl-Filip Faxén. Optimizing lazy functional programs using flow inference. In Proc. of SAS’95, pages 136–153. Springer-Verlag, LNCS 983, September 1995.

    Google Scholar 

  9. C. Flanagan and M. Felleisen. Componential set-based analysis. In Proceedings of the ACM SIGPLAN’97 Conference on Programming Language Design and Implementation. ACM, June 1997.

    Google Scholar 

  10. J. Foster, M. Fändrich, and A. Aiken. Polymorphic versus Monomorphic Flow-insensitive Points-to Analysis for C. In Proceedings of 2000 Static Analysis Symposium, June 2000.

    Google Scholar 

  11. Y. Fuh and P. Mishra. Polymorphic subtype inference: Closing the theorypractice gap. In Proceedings of Int’l J’t Conf. on Theory and Practice of Software Development, pages 167–183. Springer-Verlag, March 1989.

    Google Scholar 

  12. J. Gustavsson and J. Svenningsson. A usage analysis with bounded usage polymorphism and subtyping. In Proceedings of the 12th International Workshop on Implementation of Functional Languages. Springer-Verlag, LNCS, September 2000. To appear.

    Google Scholar 

  13. Fritz Henglein. Type inference with polymorphic recursion. ACM Transactions on Programming Languages and Systems, 15(2):253–289, April 1993.

    Article  Google Scholar 

  14. Stefan Kaes. Type inference in the presence of overloading, subtyping and recursive types. In 1992 ACM conference on LISP and Functional Programming, pages 193–204, San Francisco, CA, 1992. ACM Press.

    Chapter  Google Scholar 

  15. C. Mossin. Flow Analysis of Typed Higher-Order Programs (Revised Version). PhD thesis, University of Copenhagen, Denmark, August 1997.

    Google Scholar 

  16. David Melski and Thomas Reps. Interconvertibility of a class of set constraints and context-free language reachability. Theoretical Computer Science, 248, November 2000.

    Google Scholar 

  17. F. Pottier. Simplifying subtyping constraints. In Proceedings ICFP’97, International Conference on Functional Programming, pages 122–133. ACM Press, May 1996.

    Google Scholar 

  18. J. Rehof. Minimal typings in atomic subtyping. In Proceedings POPL’97, 24th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 278–291, Paris, France, January 1997. ACM.

    Chapter  Google Scholar 

  19. T. Reps. Program analysis via graph reachability. In Proc. of ILPS’ 97, pages 5–19. Springer-Verlag, October 1997.

    Google Scholar 

  20. Jakob Rehof and Manuel Fändrich. Type-Based Flow Analysis: From Polymorphic Subtyping to CFL-Reachability. In Proceedings of 2001 Symposium on Principles of Programming Languages, 2001.

    Google Scholar 

  21. G. S. Smith. Principal type schemes for functional programs with overloading and subtyping. Science of Computer Programming, 23:197–226, 1994.

    Article  MATH  MathSciNet  Google Scholar 

  22. Josef Svenningsson. An efficient algorithm for a sharing analysis with polymorphism and subtyping. Masters thesis, June 2000.

    Google Scholar 

  23. V. Trifonov and S. Smith. Subtyping constrained types. In Proceedings SAS’96, Static Analysis Symposium, pages 349–365, Aachen, Germany, 1996. Springer Verlag.

    Google Scholar 

  24. D. N. Turner, P. Wadler, and C. Mossin. Once upon a type. In Proc. of FPCA, La Jolla, 1995.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2001 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Gustavsson, J., Svenningsson, J. (2001). Constraint Abstractions. In: Danvy, O., Filinski, A. (eds) Programs as Data Objects. PADO 2001. Lecture Notes in Computer Science, vol 2053. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-44978-7_5

Download citation

  • DOI: https://doi.org/10.1007/3-540-44978-7_5

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-42068-2

  • Online ISBN: 978-3-540-44978-2

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics