Control-Flow Analysis in Cubic Time

  • Flemming Nielson
  • Helmut Seidl
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2028)


It is well-known that context-independent control flow analysis can be performed in cubic time for functional and object-oriented languages. Yet recent applications of control flow analysis to calculi of computation (like the π-calculus and the ambient calculus) have reported considerably higher complexities. In this paper we introduce two general techniques, the use of Horn clauses with sharing and the use of tiling of Horn clauses, for reducing the worst-case complexity of analyses. Applying these techniques to the π-calculus and the ambient calculus we reduce the complexity from O(n 5) to O(n 3) in both cases.


Program analysis Horn clauses with sharing tiling of Horn clauses π-calculus ambient calculus 0-CFA 


  1. 1.
    A. Aiken. Introduction to set constraint-based program analysis. Science of Computer Programming, 35:79–111, 1999.zbMATHCrossRefMathSciNetGoogle Scholar
  2. 2.
    C. Bodei, P. Degano, F. Nielson, and H. Riis Nielson. Static analysis for the π-calculus with applications to security. Information and Computation, (to appear), 2001.Google Scholar
  3. 3.
    C. Bodei, P. Degano, F. Nielson, and H. Riis Nielson. Control flow analysis for the π-calculus. In Proceedings of CONCUR’98, volume 1466 of LNCS, pages 84–98. Springer-Verlag, 1998.Google Scholar
  4. 4.
    L. Cardelli and A. D. Gordon. Mobile ambients. In Proceedings of FoSSaCS’98, volume 1378 of LNCS, pages 140–155. Springer-Verlag, 1998.Google Scholar
  5. 5.
    W. F. Dowling and J. H. Gallier. Linear-time algorithms for testing the satisfiability of propositional Horn formulae. Journal of Logic Programming, 3:267–284, 1984.CrossRefMathSciNetGoogle Scholar
  6. 6.
    J. van Leeuwen. Graph Algorithms. Handbook of Theoretical Computer Science, A:525–631, 1990.Google Scholar
  7. 7.
    D. McAllester. On the complexity analysis of static analyses. In 6th Static Analysis Symposium (SAS), pages 312–329. LNCS 1694, Springer Verlag, 1999.Google Scholar
  8. 8.
    R. Milner, J. Parrow, and D. Walker. A calculus of mobile processes (I and II). Information and Computation, 100(1):1–77, 1992.zbMATHCrossRefMathSciNetGoogle Scholar
  9. 9.
    F. Nielson, H. Riis Nielson, and C. L. Hankin. Principles of Program Analysis. Springer, 1999.Google Scholar
  10. 10.
    F. Nielson, H. Riis Nielson, R. R. Hansen, and J. G. Jensen. Validating firewalls in mobile ambients. In Proceedings of CONCUR’99, volume 1664 of LNCS, pages 463–477, 1999.Google Scholar
  11. 11.
    J. Rehof and T. Mogensen. Tractable constraints in finite semilattices. Science of Computer Programming (SCP), 35(1):191–221, 1999.zbMATHCrossRefMathSciNetGoogle Scholar
  12. 12.
    M. Yannakakis. Graph-theoretic concepts in database theory. In 9th ACM Symp. on Principles of Database Systems (PODS), pages 230–242, 1990.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2001

Authors and Affiliations

  • Flemming Nielson
    • 1
  • Helmut Seidl
    • 2
  1. 1.Computer Science DepartmentAarhus UniversitycAarhus CDenmark
  2. 2.FB IV ― InformatikUniversität TrierTrierGermany

Personalised recommendations