Advertisement

Parametric and Termination-Sensitive Control Dependence

  • Feng Chen
  • Grigore Roşu
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4134)

Abstract

A parametric approach to control dependence is presented, where the parameter is any prefix-invariant property on paths in the control-flow graph (CFG). Existing control dependencies, both direct and indirect, can be obtained as instances of the parametric framework for particular properties on paths. A novel control dependence relation, called termination-sensitive control dependence, is obtained also as an instance of the parametric framework. This control dependence is sensitive to the termination information of loops, which can be given via annotations. If all loops are annotated as terminating then it becomes the classic control dependence, while if all loops are annotated as non-terminating then it becomes the weak control dependence; since in practice some loops are terminating and others are not, termination-sensitive control dependence is expected to improve the precision of analysis tools using it. The unifying formal framework for direct and indirect control dependence suggests also, in a natural way, a unifying terminology for the various notions of control dependence, which is also proposed in this paper. Finally, a worst-case O(n 2) algorithm to compute the indirect termination-sensitive control dependence for languages that allow only “structured” jumps (i.e., ones that do not jump into the middle of a different block), such as Java and C#, is given, avoiding the O(n 3) complexity of the trivial algorithm calculating the transitive closure of the direct dependence.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Aho, A.V., Sethi, R., Ullman, J.D.: Compilers, principles, techniques, and tools. Addison-Wesley, Reading (1986)Google Scholar
  2. 2.
    Allen, F.E., Cocke, J.: A program data flow analysis procedure. Commun. ACM 19(3), 137 (1976)CrossRefzbMATHGoogle Scholar
  3. 3.
    Aminof, B., Ball, T., Kupferman, O.: Reasoning about systems with transition fairness. In: Baader, F., Voronkov, A. (eds.) LPAR 2004. LNCS, vol. 3452, pp. 194–208. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  4. 4.
    Bilardi, G., Pingali, K.: A framework for generalized control dependence. In: PLDI 1996 (1996)Google Scholar
  5. 5.
    Bradley, A.R., Manna, Z., Sipma, H.B.: Termination analysis of integer linear loops. In: Abadi, M., de Alfaro, L. (eds.) CONCUR 2005. LNCS, vol. 3653, pp. 488–502. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  6. 6.
    Büchi, J.: Weak second-order arithmetic and finite automata. Zeit. Math. Logik und Grundl. Math. 6, 66–92 (1960)CrossRefzbMATHGoogle Scholar
  7. 7.
    Chen, F., Roşu, G.: Predicting concurrency errors at runtime using sliced causality. Technical Report UIUCDCS-R-2005-2660, Dept. of CS at UIUC (2005)Google Scholar
  8. 8.
    Chen, F., Roşu, G.: Parametric and termination-sensitive control dependence. Technical Report UIUCDCS-R-2006-2712, Dept. of CS at UIUC (2006)Google Scholar
  9. 9.
    Colón, M.A., Sipma, H.B.: Practical methods for proving program termination. In: Brinksma, E., Larsen, K.G. (eds.) CAV 2002. LNCS, vol. 2404, p. 442. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  10. 10.
    Cormen, T.H., Leiserson, C.E., Rivest, R.L.: Introduction to Algorithms. MIT Press, Cambridge (1990)zbMATHGoogle Scholar
  11. 11.
    Denning, D.E., Denning, P.J.: Certification of programs for secure information flow. Commun. ACM 20(7), 504–513 (1977)CrossRefzbMATHGoogle Scholar
  12. 12.
    Ferrante, J., Ottenstein, K.J., Warren, J.D.: The program dependence graph and its use in optimization. ACM Trans. Program. Lang. Syst. 9(3), 319–349 (1987)CrossRefzbMATHGoogle Scholar
  13. 13.
    Horwitz, S., Reps, T.W.: The use of program dependence graphs in software engineering. In: ICSE (1992)Google Scholar
  14. 14.
    Lengauer, T., Tarjan, R.E.: A fast algorithm for finding dominators in a flowgraph. ACM Trans. Program. Lang. Syst. 1(1), 121–141 (1979)CrossRefzbMATHGoogle Scholar
  15. 15.
    Podgurski, A., Clarke, L.A.: A formal model of program dependences and its implications for software testing, debugging, and maintenance. IEEE Transactions on Software Engineering 16(9), 965–979 (1990)CrossRefGoogle Scholar
  16. 16.
    Ranganath, V.P., Amtoft, T., Banerjee, A., Dwyer, M.B., Hatcliff, J.: A new foundation for control-dependence and slicing for modern program structures. In: Sagiv, M. (ed.) ESOP 2005. LNCS, vol. 3444, pp. 77–93. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  17. 17.
    Ryder, B.G., Paull, M.C.: Elimination algorithms for data flow analysis. ACM Comput. Surv. 18(3), 277–316 (1986)CrossRefGoogle Scholar
  18. 18.
    Tip, F.: A survey of program slicing techniques. Technical Report CS-R9438, Centre for Mathematics and Computer Science (1994)Google Scholar
  19. 19.
    Weiser, M.: Program slicing. In: ICSE 1981 (1981)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Feng Chen
    • 1
  • Grigore Roşu
    • 1
  1. 1.Department of Computer ScienceUniversity of Illinois at UrbanaChampaignUSA

Personalised recommendations