Set-based analysis for logic programming and tree automata

  • J. M. Talbot
  • S. Tison
  • P. Devienne
Logic Programming II
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1302)

Abstract

Compile-time program analysis aims to extract from a program properties useful for efficient implementations and sofware verification. A property of interest is the computational semantics of a program. For decidability reasons, only an approximation of this semantics can be computed. Set-based analysis [Hei92a] provides an elegant and accurate method for this. In the logic programming framework, this computation can be related to type inference [MR85]. In [FSVY91], a simpler presentation based on program transformation and algorithms on alternating tree automata is proposed. Unfortunately, the authors focussed on type checking (i.e. a membership test to the approximate semantics). We propose in this paper a new method to achieve set-based analysis reusing the main transformation described in [FSV Y91]. The main tool for both computation and representation of the result of set-based analysis is tree automata. This leads to a global and coherent presentation of the problem of set-based analysis combined with the simplicity of [FSVY91]. We obtain also a complexity characterization for the problem and our method. We expect that this tree automaton approach will lead to an efficient implementation, contrary to the first conclusions of [FSVY91].

Keywords

Logic programming Set-based analysis Tree automata Type inference 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. [CC77]
    P. Cousot and R. Cousot. Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In 4th ACM Principles of Programming Languages Conference, pages 238–252, 1977.Google Scholar
  2. [CC92a]
    P. Cousot and R. Cousot. Abstract interpretation and application to logic programs. Journal of Logic Programming, 1992.Google Scholar
  3. [CC92b]
    P. Cousot and R. Cousot. Comparing the Galois connection and widenig/narrowing approaches to abstract interpretation. In Proc. PIPL'92. Springer-Verlag, 1992.Google Scholar
  4. [CC95]
    P. Cousot and R. Cousot. Formal language, grammar and set-constraint-based program analysis by abstract interpretation. In Conference Record of FPCA'95 — Conference on Functional Programming Languages and Computer Architecture, pages 170–181, 1995.Google Scholar
  5. [CH92]
    B. Le Charlier and P. Van Hentenryck. Experimental evaluation of a generic abstract interpretation algorithm for Prolog. In Proc. IEEE ICCL 1992, pages 138–146, 1992. [Deu91] A. Deutsch. An operational model of strictness properties and its abstraction. In Proc. 1991 Glasgow University Functional Programming Workshop, pages 82–99, 1991.Google Scholar
  6. [FSVY91]
    T. Frühwirth, E. Shapiro, M.Y. Vardi, and E. Yardeni. Logic programs as types for logic programs. In Proceedings of the 6th IEEE-LICS, pages 300–309, jun 1991.Google Scholar
  7. [GdW92]
    J. Gallagher and D.A. de Waal. Regular approximations of logic programs and their uses. Technical Report CSTR-92-O6, University of Bristol, mar 1992.Google Scholar
  8. [GdW94]
    J. Gallagher and D.A. de Waal. Fast and precise regular approximations of logic programs. In Proceedings of the 11th Int. Conf. on Logic Programming, pages 599–613. MIT-Presse, 1994.Google Scholar
  9. [GS84]
    F. Gécseg and M. Steinby. Tree Automata. Akadémiai Kiadó, Budapest, 1984.Google Scholar
  10. [Hei92a]
    N. Heintze. Practical aspects of set based analysis. In Proceedings of the International Joint Conference and Symposium on Logic Programming, nov 1992.Google Scholar
  11. [Hei92b]
    N. Heintze. Set Based Program Analysis. PhD thesis, Carnegie Mellon University, sep 1992.Google Scholar
  12. [Hei94]
    N. Heintze. Set-based analysis of ML programs. In Lisp and Functional Programming, pages 306–317. ACM, 1994.Google Scholar
  13. [HJ90]
    N. Heintze and J. Jaffar. A finite presentation theorem for approximating logic programs. In Proceedings of the 17th ACMPOPL, pages 197–209, jan 1990.Google Scholar
  14. [HJ92]
    N. Heintze and J. Jaffar. An engine for logic program analysis. In Proceedings of the 7th IEEE-LICS, pages 318–328, jun 1992.Google Scholar
  15. [Llo87]
    J. Lloyd. Foundations of Logic Programming. Springer-Verlag, 1987.Google Scholar
  16. [Mis84]
    P. Mishra. Toward a theory of types in prolog. In Proceedings of the 1st IEEE Symposium on Logic Programming, pages 289–298, jul 1984.Google Scholar
  17. [MO84]
    A. Mycroft and R.A. O'Keefe. A polymorphic type system for prolog. Artificial Intelligence, 23:295–307, 1984.Google Scholar
  18. [MR85]
    P. Mishra and U. Reddy. Declaration-free type checking. In Proceedings of the 12 th Annual ACM Symposium on the Principles of Programming Languages, pages 7–21, 1985.Google Scholar
  19. [XW88]
    J. Xu and D.S. Warren. A type inference system for prolog. In Proceedings of the 5th Int. Conf. and Symp. on Logic Programming, pages 604–619. MIT-Press, jul 1988.Google Scholar
  20. [Zob87]
    J. Zobel. Derivation of polymorphic types for prolog programs. In Proceedings of the 4th Int. Conf. on Logic Programming, 1987. *** DIRECT SUPPORT *** A0008C44 00004Google Scholar

Copyright information

© Springer-Verlag 1997

Authors and Affiliations

  • J. M. Talbot
    • 1
    • 2
  • S. Tison
    • 1
    • 2
  • P. Devienne
    • 1
    • 2
  1. 1.CNRS-URA 369Laboratoire d'Informatique Fondamentale de LilleFrance
  2. 2.UFR IEEA-Batiment M3Université des Sciences et Technologies de LilleVilleneuve d'Ascq Cedex

Personalised recommendations