Skip to main content

Set-based analysis for logic programming and tree automata

  • Logic Programming II
  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((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].

This work was supported in part by the European Project ABILE - CEE ERBCHRX CT 94 0624

This is a preview of subscription content, log in via an institution.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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. P. Cousot and R. Cousot. Abstract interpretation and application to logic programs. Journal of Logic Programming, 1992.

    Google Scholar 

  3. 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. 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. 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. 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. 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. 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. F. Gécseg and M. Steinby. Tree Automata. Akadémiai Kiadó, Budapest, 1984.

    Google Scholar 

  10. 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. N. Heintze. Set Based Program Analysis. PhD thesis, Carnegie Mellon University, sep 1992.

    Google Scholar 

  12. N. Heintze. Set-based analysis of ML programs. In Lisp and Functional Programming, pages 306–317. ACM, 1994.

    Google Scholar 

  13. 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. 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. J. Lloyd. Foundations of Logic Programming. Springer-Verlag, 1987.

    Google Scholar 

  16. 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. A. Mycroft and R.A. O'Keefe. A polymorphic type system for prolog. Artificial Intelligence, 23:295–307, 1984.

    Google Scholar 

  18. 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. 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. J. Zobel. Derivation of polymorphic types for prolog programs. In Proceedings of the 4th Int. Conf. on Logic Programming, 1987. *** DIRECT SUPPORT *** A0008C44 00004

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Pascal Van Hentenryck

Rights and permissions

Reprints and permissions

Copyright information

© 1997 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Talbot, J.M., Tison, S., Devienne, P. (1997). Set-based analysis for logic programming and tree automata. In: Van Hentenryck, P. (eds) Static Analysis. SAS 1997. Lecture Notes in Computer Science, vol 1302. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0032738

Download citation

  • DOI: https://doi.org/10.1007/BFb0032738

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-63468-3

  • Online ISBN: 978-3-540-69576-9

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics