Skip to main content
Log in

Path Dependent Analysis of Logic Programs

  • Published:
Higher-Order and Symbolic Computation

Abstract

This paper presents an abstract semantics that uses information about execution paths to improve precision of data flow analyses of logic programs. The abstract semantics is illustrated by abstracting execution paths using call strings of fixed length and the last transfer of control. Abstract domains that have been developed for logic program analyses can be used with the new abstract semantics without modification.

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. Barbuti, R. and Giacobazzi, R. A bottom-up polymorphic type inference in logic programming. Science of Computer Programming, 19(3) (1992) 133–181.

    Google Scholar 

  2. Barbuti, R., Giacobazzi, R., and Levi, G. A general framework for semantics-based bottom-up abstract interpretation of logic programs. ACM Transactions on Programming Languages and Systems, 15(1) (1993) 133–181.

    Google Scholar 

  3. Bossi, A., Gabbrielli, M., Levi, G., and Meo, M.C. A compositional semantics for logic programs. Theor. Comput. Sci., 122(1/2) (1994) 3–47.

    Google Scholar 

  4. Bruynooghe, M. A practical framework for the abstract interpretation of logic progams. Journal of Logic Programming, 10(2) (1991) 91–124.

    Google Scholar 

  5. Bruynooghe, M., Codish, M., Genaim, S., and Vanhoof, W. Reuse of results in termination analysis of typed logic programs. In Proceedings of The Ninth International Static Analysis Symposium, M. Hermenegildo and G. Puebla (Eds.), Vol. 2477 of Lecture Notes in Computer Science, 2002, pp. 477–492.

  6. Codish, M., Dams, D., and Yardani, E. Bottom-up abstract interpretation of logic programs. Theoretical Computer Science, 124 (1994) 93–125.

    Google Scholar 

  7. Codish M. and Lagoon, V. Type dependencies for logic programs using ACI-unification. Theoretical Computer Science, 238 (2000) 131–159.

    Google Scholar 

  8. Comini, M., Levi, G., Meo, M.C., and Vitiello, G. Abstract diagnosis. Journal of Logic Programming, 39(1-3) (1999) 43–93.

    Google Scholar 

  9. Cousot, P. and Cousot, R. Abstract interpretation: A unified framework for static analysis of programs by construction or approximation of fixpoints. In Principles of Programming Languages. The ACM Press, 1977, pp. 238–252.

  10. Cousot, P. and Cousot, R. Abstract interpretation and application to logic programs. Journal of Logic Programming, 13(1-4) (1992) 103–179.

    Google Scholar 

  11. Cousot, P. and Cousot, R. Formal language, grammar and set-constraint-based program analysis by abstract interpretation. In Conference Record of FPCA'95 Conference on Functional Programming and Computer Architecture. The ACM Press, 1995, pp. 170–181.

  12. De Schreye, D. and Bruynooghe, M. An application of abstract interpretation in source level program transformation. In Proceedings of the First International Workshop on Programming Language Implementation and Logic Programming, P. Deransart, B. Lorho, and J. Maluszynski (Eds.), pp. 35–57.

  13. Debray, S.K. Functional computations in logic programs. ACM Transactions on Programming Languages and Systems, 11(3) (1989) 451–481.

    Google Scholar 

  14. Debray, S.K. Static inference of modes and data dependencies in logic programs. ACM Transaction on Programming Languages and Systems, 11(3) (1989) 418–450.

    Google Scholar 

  15. Debray, S.K. and Warren, D.S. Automatic mode inference for logic programs. Journal of Logic Programming, 5(3) (1988) 207–230.

    Google Scholar 

  16. Deransart, P., Lorho, B., and Maluszynski, J. (Eds.). In Proceedings of the First International Workshop on Programming Language Implementation and Logic Programming. Vol. 348 of Lecture Notes in Computer Science. Springer, 1988.

  17. Giacobazzi, R. Abductive analysis of modular logic programs. Journal of Logic and Computation, 8(4) (1998) 457–484.

    Google Scholar 

  18. Hermenegildo, M., Warren, R., and Debray, S.K. Global flow analysis as a practical compilation tool. Journal of Logic Programming, 13(4) (1992) 349–366.

    Google Scholar 

  19. Horwitz, S., Reps, T., and Binkley, D. Interprocedural slicing using dependence graphs. ACM Transactions on Programming Languages and Systems, 12(1) (1990) 26–60.

    Google Scholar 

  20. Horwitz, S., Reps, T., and Sagiv, M. Demand interprocedural dataflow analysis. ACM SIGSOFT Software Engineering Notes, 20(4) (1995) 104–115.

    Google Scholar 

  21. Jacobs, D. and Langen, A. Static analysis of logic programs for independent and parallelism. Journal of Logic Programming, 13(1-4) (1992) 291–314.

    Google Scholar 

  22. Janssens, G. and Bruynooghe, M. Deriving descriptions of possible values of program variables by means of abstract interpretation. Journal of Logic Programming, 13(1-4) (1992) 205–258.

    Google Scholar 

  23. Kanamori, T. Abstract interpretation based on Alexander Templates. Journal of Logic Programming, 15(1/2) (1993) 31–54.

    Google Scholar 

  24. Kanamori, T. and Horiuchi, K. Type inference in Prolog and its application. In Proceedings of the Ninth International Joint Conference on Artificial Intelligence, A.K. Joshi (Ed.). Morgan Kaufmann, 1985, pp. 704–707.

  25. Kanamori, T. and Kawamura, T. Abstract interpretation based on OLDT resolution. Journal of Logic Programming, 15(1/2) (1993) 1–30.

    Google Scholar 

  26. King, A. and Lu, L. A backward analysis for constraint logic programs. Theory and Practice of Logic Programming, 2(4/5) (2002) 517–547. http://xxx.lanl.gov/abs/cs.PL/0201011.

    Google Scholar 

  27. Kowalski, R.A. and Bowen, K.A. (Eds.). In Proceedings of the Fifth International Conference and Symposium on Logic Programming. The MIT Press, 1988.

  28. Le Charlier, B. and Van Hentenryck, P. Experimental evaluation of a generic abstract interpretation algorithm for Prolog. ACM Transaction on Programming Languages and Systems, 16(1) (1994) 35–101.

    Google Scholar 

  29. Levi, G. and Spoto, F. An experiment in domain refinement: Type domains and type representations for logic programs. In Principles of Declarative Programming, C. Palamidessi, H. Glaser, and K. Meinke (Eds.), Vol. 1490 of Lecture Notes in Computer Science. Springer, 1998, pp. 152–169.

  30. Lindgren, T. Control flow analysis of Prolog. In Logic Programming, Proceedings of the 1995 International Symposium, J.W. Lloyd (Ed.). The MIT Press, 1995, pp. 432–446.

  31. Lloyd, J.W. Foundations of Logic Programming. Springer-Verlag, 1987.

  32. Lu, L. Abstract interpretation, bug detection and bug diagnosis in normal logic programs. Ph.D. Thesis, University of Birmingham, 1994.

  33. Lu, L. A polymorphic type analysis in logic programs by abstract interpretation. Journal of Logic Programming, 36(1) (1998) 1–54.

    Google Scholar 

  34. Lu, L. A precise type analysis of logic programs. In Proceedings of the Second International ACM SIGPLAN Conference on Principles and Practice of Declarative Programming, M. Gabbrielli and F. Pfenning (Eds.). The ACM Press, 2000, pp. 214–225.

  35. Lu, L. and King, A. Type inference generalises type checking. In Proceedings of Ninth International Static Analysis Symposium, M. Hermenegildo and G. Puebla (Eds.),Vol. 2477 of Lecture Notes in Computer Science, 2002, pp. 85–101.

  36. Marriott, K. and Søndergaard, H. Bottom-up abstract interpretation of logic programs. In Proceedings of the Fifth International Conference and Symposium on Logic Programming, R.A. Kowalski and K.A. Bowen (Eds.), pp. 733–748.

  37. Marriott, K. and Søndergaard, H. Bottom-up dataflow analysis of normal logic programs. Journal of Logic Programming, 13(1-4) (1992) 181–204.

    Google Scholar 

  38. Marriott, K., Søndergaard, H., and Jones, N.D. Denotational abstract interpretation of logic programs. ACM Transactions on Programming Languages and Systems, 16(3) (1994) 607–648.

    Google Scholar 

  39. Mazur, N., Janssens, G., and Vanhoof, W. Collecting potential optimizations. In Proceedings of International Symposium on Logic-Based Program Synthesis and Transformation, 2002, pp. 115–120.

  40. Mellish, C. Abstract interpretation of Prolog programs. In Abstract Interpretation of Declarative Languages, S. Abramsky and C. Hankin (Eds.). Ellis Horwood Limited, 1987, pp. 181–198.

  41. Muthukumar, K. and Hermenegildo, M. Compile-time derivation of variable dependency using abstract interpretation. Journal of Logic Programming, 13(1-4) (1992) 315–347.

    Google Scholar 

  42. Nielson, F. and Riis Nielson, H. Infinitary control flow analysis: A collecting semantics for closure analysis. In Proc. POPL'97. ACM Press, 1997, pp. 332–345.

  43. Nielson, F., Riis Nielson, H., and Hankin, C.L. Principles of Program Analysis. Springer, 1999.

  44. Nilsson, U. Towards a framework for abstract interpretation of logic programs. In Proceedings of the First International Workshop on Programming Language Implementation and Logic Programming, P. Deransart, B. Lorho, and J. Maluszynski (Eds.), pp. 68–82.

  45. Reps, T. Shape analysis as a generalized path problem. In Proceedings of the ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation. The ACM Press, 1995, pp. 1–11.

  46. Reps, T. Program analysis via graph-reachability. In Proceedings of the 1997 International Symposium on Logic Programming. The MIT Press, 1997, pp. 5–19.

  47. Reps, T. Undecidability of context-sensitive data-dependence analysis. ACM Transactions on Programming Languages and Systems, 22(1) (2000) 162–186.

    Google Scholar 

  48. Reps, T., Horwitz, S., Sagiv, M., and Rosay, G. Speeding up slicing. ACM SIGSOFT Software Engineering Notes, 19(5) (1994) 11–20.

    Google Scholar 

  49. Ryder, B.G., Landi, W.A., Stocks, P.H., Zhang, S., and Altucher, R. A schema for interprocedural modification side-effect analysis with pointer aliasing. ACM Transactions on Programming Languages and Systems, 23(2) (2001) 105–186.

    Google Scholar 

  50. Sharir, M. and Pnueli, A. Two approaches to interprocedural data flow analysis. In Program Flow Analysis, S.S. Muchnick and N.D. Jones (Eds.). Prentice Hall International, 1981, pp. 189–233.

  51. Søndergaard, H. An application of abstract interpretation of logic programs: Occur check problem. In ESOP 86, European Symposium on Programming, B. Robinet and R. Wilhelm (Eds.), Vol. 213 of Lecture Notes in Computer Science. Springer, 1986, pp. 324–338.

  52. Tamaki, H. and Sato, T. OLD resolution with tabulation. In Proceedings of the Third International Conference on Logic Programming. London, UK, 1986, pp. 84–98.

  53. Taylor, A. Removal of dereferencing and trailing in Prolog compilation. In Proceedings of the Sixth International Conference on Logic Programming, G. Levi and M. Martelli (Eds.). The MIT Press, 1989, pp. 48–60.

  54. van Emden, M.H. and Kowalski, R.A. The semantics of predicate logic as a programming language. Artificial Intelligence, 23(10) (1976) 733–742.

    Google Scholar 

  55. Verschaetse, K. and De Schreye, D. Deriving termination proofs for logic programs, using abstract procedures. In Proceedings of the Eighth International Conference on Logic Programming, K. Furukawa (Ed.). The MIT Press, 1991, pp. 301–315.

  56. Waern, A. An implementation technique for the abstract interpretation of Prolog. In Proceedings of the Fifth International Conference and Symposium on Logic Programming, R.A. Kowalski and K.A. Bowen (Eds.), pp. 700–710.

  57. Winsborough W. Path-dependent reachability analysis for multiple specialization. In Proceedings of the North American Conference on Logic Programming, E.L. Lusk and R.A. Overbeek (Eds.). Cleveland, Ohio, USA, 1989, pp. 133–153.

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

About this article

Cite this article

Lu, L. Path Dependent Analysis of Logic Programs. Higher-Order and Symbolic Computation 16, 341–377 (2003). https://doi.org/10.1023/A:1025824903683

Download citation

  • Issue Date:

  • DOI: https://doi.org/10.1023/A:1025824903683

Navigation