Advertisement

Implementing Groundness Analysis with Definite Boolean Functions

  • Jacob M. Howe
  • Andy King
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1782)

Abstract

The domain of definite Boolean functions, Def, can be used to express the groundness of, and trace grounding dependencies between, program variables in (constraint) logic programs. In this paper, previously unexploited computational properties of Def are utilised to develop an efficient and succinct groundness analyser that can be coded in Prolog. In particular, entailment checking is used to prevent unnecessary least upper bound calculations. It is also demonstrated that join can be defined in terms of other operations, thereby eliminating code and removing the need for preprocessing formulae to a normal form. This saves space and time. Furthermore, the join can be adapted to straightforwardly implement the downward closure operator that arises in set sharing analyses. Experimental results indicate that the new Def implementation gives favourable results in comparison with BDD-based groundness analyses.

Keywords

Abstract interpretation (constraint) logic programs definite Boolean functions groundness analysis 

References

  1. 1.
    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.zbMATHCrossRefMathSciNetGoogle Scholar
  2. 2.
    R. Bagnara. A Reactive Implementation of Pos using ROBDDs. In Programming Languages: Implementation, Logics and Programs, volume 1140 of Lecture Notes in Computer Science, pages 107–121. Springer, 1996.Google Scholar
  3. 3.
    R. Bagnara and P. Schachte. Factorizing Equivalent Variable Pairs in ROBDD-Based Implementations of Pos. In Seventh International Conference on Algebraic Methodology and Software Technology, volume 1548 of Lecture Notes in Computer Science, pages 471–485. Springer, 1999.CrossRefGoogle Scholar
  4. 4.
    N. Baker and H. Søndergaard. Definiteness Analysis for CLP(\( \mathcal{R} \)). In Australian Computer Science Conference, pages 321–332, 1993.Google Scholar
  5. 5.
    P. Bigot, S. Debray, and K. Marriott. Understanding Finiteness Analysis using Abstract Interpretation. In Joint International Conference and Symposium on Logic Programming, pages 735–749. MIT Press, 1992.Google Scholar
  6. 6.
    F. Bueno, D. Cabeza, M. Hermenegildo, and G. Puebla. Global Analysis of Standard Prolog Programs. In European Symposium on Programming, volume 1058 of Lecture Notes in Computer Science, pages 108–124. Springer, 1996.Google Scholar
  7. 7.
    M. Codish. Efficient Goal Directed Bottom-up Evaluation of Logic Programs. Journal of Logic Programming, 38(3):355–370, 1999.zbMATHCrossRefMathSciNetGoogle Scholar
  8. 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.zbMATHCrossRefMathSciNetGoogle Scholar
  9. 9.
    M. Codish, A. Heaton, A. King, M. Abo-Zaed, and P. Hill. Widening Positive Boolean Functions for Goal-dependent Groundness Analysis. Technical Report 12-98, Computing Laboratory, May 1998. http://www.cs.ukc.ac.uk/pubs/1998/589.
  10. 10.
    M. Codish, H. Søndergaard, and P. Stuckey. Sharing and Groundness Dependencies in Logic Programs. ACM Transactions on Programming Languages and Systems, 1999. To appear.Google Scholar
  11. 11.
    M.-M. Corsini, K. Musumbu, A. Rauzy, and B. Le Charlier. Efficient Bottom-up Abstract Interpretation of Prolog by means of Constraint Solving over Finite Domains. In Programming Language Implementation and Logic Programming, volume 714 of Lecture Notes in Computer Science, pages 75–91. Springer, 1993.Google Scholar
  12. 12.
    P. Dart. On Derived Dependencies and Connected Databases. Journal of Logic Programming, 11(1&2):163–188, 1991.zbMATHCrossRefMathSciNetGoogle Scholar
  13. 13.
    S. Dawson, C. R. Ramakrishnan, and D. S. Warren. Practical Program Analysis Using General Purpose Logic Programming Systems — A Case Study. In Programming Language Design and Implementation, pages 117–126. ACM Press, 1996.Google Scholar
  14. 14.
    B. De Backer and H. Beringer. A CLP Language Handling Disjunctions of Linear Constraints. In International Conference on Logic Programming, pages 550–563. MIT Press, 1993.Google Scholar
  15. 15.
    C. Fecht. Abstrakte Interpretation logischer Programme: Theorie, Implementierung, Generierung. PhD thesis, Universität des Saarlandes, 1997.Google Scholar
  16. 16.
    M. García de la Banda, M. Hermenegildo, M. Bruynooghe, V. Dumortier, G. Janssens, and W. Simoens. Global Analysis of Constraint Logic Programs. ACM Transactions on Programming Languages and Systems, 18(5):564–614, 1996.CrossRefGoogle Scholar
  17. 17.
    M. Hermenegildo, R. Warren, and S. Debray. Global Flow Analysis as a Practical Compilation Tool. Journal of Logic Programming, 13(4):349–366, 1992.CrossRefGoogle Scholar
  18. 18.
    A. King, J.-G. Smaus, and P. Hill. Quotienting Share for Dependency Analysis. In European Symposium on Programming, volume 1576 of Lecture Notes in Computer Science, pages 59–73. Springer, 1999.Google Scholar
  19. 19.
    B. Le Charlier and P. Van Hentenryck. Experimental Evaluation of a Generic Abstract Interpretation Algorithm for Prolog. ACM Transactions on Programming Languages and Systems, 16(1):35–101, 1994.CrossRefGoogle Scholar
  20. 20.
    G. Plotkin. A Note on Inductive Generalisation. Machine Intelligence, 5:153–163, 1970.MathSciNetGoogle Scholar
  21. 21.
    P. Van Hentenryck, A. Cortesi, and B. Le Charlier. Evaluation of the domain Prop. Journal of Logic Programming, 23(3):237–278, 1995.zbMATHCrossRefMathSciNetGoogle Scholar
  22. 22.
    J. Wunderwald. Memoing Evaluation by Source-to-Source Transformation. In Logic Program Synthesis and Transformation, Lecture Notes in Computer Science, pages 17–32. Springer, 1995. 1048.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2000

Authors and Affiliations

  • Jacob M. Howe
    • 1
  • Andy King
    • 1
  1. 1.Computing LaboratoryUniversity of KentUK

Personalised recommendations