Skip to main content

Parameterizing a Groundness Analysis of Logic Programs

  • Conference paper
  • First Online:
Static Analysis (SAS 2001)

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

Included in the following conference series:

Abstract

We present a parametric groundness analysis whose input and output are parameterized by a set of groundness parameters. The result of the analysis can be instantiated for different uses of the program. It can also be used to derive sufficient conditions for safely removing groundness checks for built-in calls in the program. The parametric groundness analysis is obtained by generalizing a non-parametric groundness analysis that uses the abstract domain Con. It is shown to be as precise as the non-parametric groundness analysis for any possible values for the groundness parameters. Experimental results of a prototype implementation of the parametric groundness analysis are given.

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.

Similar content being viewed by others

References

  1. K.R. Apt. Logic programming. In J.V. Leeuwen, editor, Handbook of Theoretical Computer Science: (Volume B) Formal Models and Semantics, pages 493–574. Elsevier Science Publishers B.V., 1990.

    Google Scholar 

  2. T. Armstrong, K. Marriott, P. Schachte, and H. Søndergaard. Boolean functions for dependency analysis: Algebraic properties and efficient representation. Lecture Notes in Computer Science, 864:266–280, 1994.

    Google Scholar 

  3. T. Armstrong, K. Marriott, P. Schachte, and H. Søndergaard. Two classes of Boolean functions for dependency analysis. Science of Computer Programming, 31(1):3–45, 1998.

    Article  MATH  MathSciNet  Google Scholar 

  4. R. Bagnara and P. Schachte. Factorizing equivalent variable pairs in ROBDD-based implementations of Pos.Lecture Notes in Computer Science, 1548:471–485, 1999.

    Article  Google Scholar 

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

    Article  MathSciNet  MATH  Google Scholar 

  6. M. Codish, D. Dams, and Yardeni E. Derivation and safety of an abstract unification algorithm for groundness and aliasing analysis. In K. Furukawa, editor, Proceedings of the Eighth International Conference on Logic Programming, pages 79–93. The MIT Press, 1991.

    Google Scholar 

  7. M. Codish and B. Demoen. Deriving polymorphic type dependencies for logic programs using multiple incarnations of Prop. Lecture Notes in Computer Science, 864:281–297, 1994.

    Google Scholar 

  8. M. Codish and B. Demoen. Analysing logic programs using “Prop”-ositional logic programs and a magic wand. Journal of Logic Programming, 25(3):249–274, 1995.

    Article  MATH  MathSciNet  Google Scholar 

  9. M. Codish, A. Mulkers, M. Bruynooghe, M. García de la Banda, and M. Hermenegildo. Improving abstract interpretations by combining domains. InPEPM93 [41], pages 194–205.

    Google Scholar 

  10. M. Codish and H. Søndergaard. The boolean logic of set sharing analysis. Lecture Notes in Computer Science, 1490:89–101, 1998.

    Article  Google Scholar 

  11. Michael Codish. Worst-case groundness analysis using positive boolean functions. The Journal of Logic Programming, 41(1):125–128, 1999.

    Article  MATH  MathSciNet  Google Scholar 

  12. Michael Codish, Andy Heaton, Andy King, Muhamed Abo-Zaed, and Pat Hill. Widening Positive Boolean functions for Goal-dependent Groundness Analysis. Technical Report 12-98, Computing Laboratory, May 1998.

    Google Scholar 

  13. Michael Codish and Vitaly Lagoon. Type dependencies for logic programs using aci-unification. Journal of Theoretical Computer Science, 238:131–159, 2000.

    Article  MATH  MathSciNet  Google Scholar 

  14. A. Cortesi and G. Filé. Abstract interpretation of logic programs: an abstract domain for groundness, sharing, freeness and compoundness analysis. In Proceedings of the Symposium on Partial Evaluation and Semantics-based Program Manipulation, pages 52–61, New Haven, Connecticut, USA, 1991.

    Google Scholar 

  15. A. Cortesi, G. Filé, R. Giacobazzi, C. Palamidessi, and F. Ranzato. Complementation in abstract interpretation. ACM Transactions on Programming Languages and Systems, 19(1):7–47, 1997.

    Article  Google Scholar 

  16. A. Cortesi, G. Filé, and W. Winsborough. Comparison of abstract interpretations. In Proceedings of the 19th Int. Colloquium on Automata, Languages and Programming ICALP’92, pages 523–534. Springer Verlag, 1992.

    Google Scholar 

  17. A. Cortesi, G. Filé, and W. Winsborough. Optimal groundness analysis using propositional logic. Journal of Logic Programming, 27(2):137–168, 1996.

    Article  MATH  MathSciNet  Google Scholar 

  18. P. Cousot and R. Cousot. Abstract interpretation: a unified framework for static analysis of programs by construction or approximation of fixpoints. In Proceedings of the fourth annual ACM symposium on Principles of programming languages, pages 238–252. The ACM Press, 1977.

    Google Scholar 

  19. P. Cousot and R. Cousot. Systematic design of program analysis frameworks. In Proceedings of the sixth annual ACM symposium on Principles of programming languages, pages 269–282. The ACM Press, 1979.

    Google Scholar 

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

    Article  MATH  MathSciNet  Google Scholar 

  21. M. A. Covington, D. Nute, and A. Vellino. PROLOG PROGRAMMING IN DEPTH. Scott, Foresman & Co., 1988.

    Google Scholar 

  22. P.W. Dart. On derived dependencies and connected databases. Journal of Logic Programming, 11(2):163–188, 1991.

    Article  MATH  MathSciNet  Google Scholar 

  23. R. Giacobazzi and F. Scozzari. Intuitionistic Implication in Abstract Interpretation. In Proceedings of Programming Languages: Implementations, Logics and Programs, pages 175–189. Springer-Verlag, 1997. LNCS 1292.

    Chapter  Google Scholar 

  24. Andy Heaton, Muhamed Abo-Zaed, Michael Codish, and Andy King. Simple, efficient and scalable groundness analysis of logic programs. The Journal of Logic Programming, 45(1–3):143–156, 2000.

    Article  MATH  MathSciNet  Google Scholar 

  25. P. Van Hentenryck, A. Cortesi, and B. Le Charlier. Evaluation of the Domain PROP. Journal of Logic Programming, 23(3):237–278, 1995.

    Article  MATH  MathSciNet  Google Scholar 

  26. D. Jacobs and A. Langen. Accurate and Efficient Approximation of Variable Aliasing in Logic Programs. In Ewing L. Lusk and Ross A. Overbeek, editors, Proceedings of the North American Conference on Logic Programming, pages 154–165, Cleveland, Ohio, USA, 1989.

    Google Scholar 

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

    Article  MATH  Google Scholar 

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

    Article  MATH  MathSciNet  Google Scholar 

  29. B. Le Charlier and P. Van Hentenryck. Groundness analysis of Prolog: implementation and evaluation of the domain Prop. InPEPM93 [41], pages 99–110.

    Google Scholar 

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

    Google Scholar 

  31. L. Lu. Abstract interpretation, bug detection and bug diagnosis in normal logic programs. PhD thesis, University of Birmingham, 1994.

    Google Scholar 

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

    Article  MATH  MathSciNet  Google Scholar 

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

    Article  MATH  MathSciNet  Google Scholar 

  34. K. Marriott and H. Søndergaard. Precise and efficient groundness analysis for logic programs. ACM Letters on Programming Languages and Systems, 2(1–4):181–196, 1993.

    Article  Google Scholar 

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

    Article  Google Scholar 

  36. C. Mellish. Some global optimisations for a Prolog compiler. Journal of Logic Programming, 2(1):43–66, 1985.

    Article  MATH  Google Scholar 

  37. C. Mellish. Abstract interpretation of Prolog programs. In S. Abramsky and C. Hankin, editors, Abstract interpretation of declarative languages, pages 181–198. Ellis Horwood Limited, 1987.

    Google Scholar 

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

    Article  MATH  Google Scholar 

  39. U. Nilsson. Towards a framework for the abstract interpretation of logic programs. In Proceedings of the International Workshop on Programming Language Implementation and Logic Programming, pages 68–82. Springer-Verlag, 1988.

    Google Scholar 

  40. R. A. O’Keefe. Finite fixed-point problems. In J.-L. Lassez, editor, Proceedings of the fourth International Conference on Logic programming, volume 2, pages 729–743. The MIT Press, 1987.

    Google Scholar 

  41. ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation. The ACM Press, 1993.

    Google Scholar 

  42. F. Scozzari. Logical optimality of groundness analysis. Lecture Notes in Computer Science, 1302:83–97, 1997.

    Article  Google Scholar 

  43. H. Søndergaard. An application of abstract interpretation of logic programs: occur check problem. Lecture Notes in Computer Science, 213:324–338, 1986.

    Google Scholar 

  44. H. Søndergaard. Immediate fixpoints and their use in groundness analysis. Lecture Notes in Computer Science, 1180:359–370, 1996.

    Google Scholar 

  45. L. Sterling and E. Shapiro. The Art of Prolog. The MIT Press, 1986.

    Google Scholar 

  46. R. Sundararajan and J.S. Conery. An abstract interpretation scheme for groundness, freeness, and sharing analysis of logic programs. In R. Shyamasundar, editor, Proceedings of 12th Conference on Foundations of Software Technology and Theoretical Computer Science, pages 203–216. Springer-Verlag, 1992.

    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

Lu, L. (2001). Parameterizing a Groundness Analysis of Logic Programs. In: Cousot, P. (eds) Static Analysis. SAS 2001. Lecture Notes in Computer Science, vol 2126. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-47764-0_9

Download citation

  • DOI: https://doi.org/10.1007/3-540-47764-0_9

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-42314-0

  • Online ISBN: 978-3-540-47764-8

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics