skip to main content
article
Open Access

Equality-based flow analysis versus recursive types

Published:01 November 1998Publication History
Skip Abstract Section

Abstract

Equality-based control-flow analysis has been studied by Henglein, Bondorf and Jørgensen, DeFouw, Grove, and Chambers, and others. It is faster than the subset-based-0-CFA, but also more approximate. Heintze asserted in 1995 that a program can be safety checked with an equality-based control-flow analysis if and only if it can be typed with recursive types. In this article we falsify Heintze's assertion, and we present a type system equivalent to equality-based control-flow analysis. The new type system contains both recursive types and an unusual notion of subtyping. We have st if s and t unfold to the same regular tree, and we have ⊥≤t≤⊤ where t is a function type. In particular, there is no nontrivial subtyping between function types.

References

  1. AMADIO, R. M. AND CARDELLI, L. 1993. Subtyping recursive types. ACM Trans. Program. Lang. Syst. 15, 4, 575-631. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. ASHLEY, J. M. 1996. A practical and flexible flow analysis for higher-order languages. In Proceedings of POPL '96, 23rd Annual SIGPLAN-SIGA CT Symposium on Principles of Programming Languages. ACM, New York, 184-194. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. BONDORF, t. AND JORGENSEN, J. 1993. Efficient analyses for realistic off-line partial evaluation. J. of Func. Program. 3, 3, 315-346.Google ScholarGoogle ScholarCross RefCross Ref
  4. BRUCE, I~. B., CARDELLI, L., CASTAGNA, G., EIFRIG, J., SMITH, S. F., TRIFONOV, V., LEAVENS, G. T., AND PIERCE, B. C. 1995. On binary methods. Theory Pract. Obj. Syst. 1, 3, 221-242. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. DEFouw, G., GROVE, D., AND CHAMBERS, C. 1998. Fast interprocedural class analysis. In Proceedings of POPL '98, 25th Annual SIGPLAN-SIGACT Symposium on Principles of Programming Languages. ACM, New York, 222-236. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. GOSLING, J., JoY, B., AND STEELE, G. 1996. The Java Language Specification. Addison-Wesley, Reading, Mass. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. HEINTZE, N. 1995. Control-flow analysis and type systems. In Proceedings of SAS'95, International Static Analysis Symposium. Lecture Notes in Computer Science, vol. 983. Springer-Verlag, Berlin, 189-206. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. HEINTZE, N. AND MCALLESTER, D. 1997. Linear-time subtransitive control flow analysis. In Proceedings of ACM SIGPLAN 1997 Conference on Programming Language Design and Iraplementation. ACM, New York, 261-272. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. HENGLEIN, F. 1992. Dynamic typing. In Proceedings of ESOP'92, European Symposium on Programming. Lecture Notes in Computer Science, vol. 582. Springer-Verlag, Berlin, 233-253. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. MILNER, R., WOFTE, M., AND HARPER, R. 1990. The Definition of Standard ML. MIT Press, Cambridge, Mass. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. PALSBERG~ J. 1995. Closure analysis in constraint form. ACM Trans. Program. Lang. Syst. 17, 1 (Jan.), 47-62. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. PALSBERG, J. AND O'I~EEFE, P. M. 1995. A type system equivalent to flow analysis. ACM Trans. Program. Lang. Syst. 17, 4 (July), 576-599. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. PALSBERG~ J. AND PAVLOPOULOU~ C. 1998. From polyvariant flow information to intersection and union types. In Proceedings of POPL'98, 25th Annual SIGPLAN-SIGACT Symposium on Principles of Programming Languages. ACM, New York, 197-208. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. PALSBERG~ J. AND SCHWARTZBACH~ M. I. 1994. Object-Oriented Type Systems. John Wiley & Sons, New York. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. SHAPIRO~ M. AND HORWITZ~ S. 1997. Fast and accurate flow-insensitive points-to analysis. In Proceedings of POPL '97, 2~th Annual SIGPLAN-SIGACT Symposium on Principles of Programming Languages. ACM, New York, 1-14. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. SHIVERS~ O. 1991. Control-flow analysis of higher-order languages. Ph.D. thesis, CMU-CS-91-145, Carnegie Mellon Univ., Pittsburgh, Pa. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. STEENSGAARD~ B. 1996. Points-to analysis in almost linear time. In Proceedings of POPL'96, 23nd Annual SIGPLAN-SIGA CT Symposium on Principles of Programming Languages. ACM, New York, 32-41. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Equality-based flow analysis versus recursive types

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      • Published in

        cover image ACM Transactions on Programming Languages and Systems
        ACM Transactions on Programming Languages and Systems  Volume 20, Issue 6
        Nov. 1998
        212 pages
        ISSN:0164-0925
        EISSN:1558-4593
        DOI:10.1145/295656
        Issue’s Table of Contents

        Copyright © 1998 ACM

        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 1 November 1998
        Published in toplas Volume 20, Issue 6

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • article

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader