Skip to main content

Mode Analysis Domains for Typed Logic Programs

  • Conference paper
Book cover Logic-Based Program Synthesis and Transformation (LOPSTR 1999)

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

Abstract

Precise mode information is important for compiler optimisations and in program development tools. Within the framework of abstract compilation, the precision of a mode analysis depends, in part, on the expressiveness of the abstract domain and its associated abstraction function. This paper considers abstract domains for polymorphically typed logic programs and shows how specialised domains may be constructed for each type in the program. These domains capture the degree of instantiation to a high level of precision. By providing a generic definition of abstract unification, the abstraction of a program using these domains is formalised. The domain construction procedure is fully implemented using the Gödel language and tested on a number of example programs to demonstrate the viability of the approach.

Note: Some proofs have been omitted for space reasons. They can be found in the full version of this paper [17].

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.

References

  1. Aiken, A., Lakshman, T.K.: Directional type checking of logic programs. In: LeCharlier, B. (ed.) SAS 1994. LNCS, vol. 864, pp. 43–60. Springer, Heidelberg (1994)

    Google Scholar 

  2. Christiansen, H.: Deriving declarations from programs. Technical report, Roskilde University, P.O.Box 260, DK-4000 Roskilde (1997)

    Google Scholar 

  3. Codish, M., Demoen, B.: Deriving polymorphic type dependencies for logic programs using multiple incarnations of Prop. In: LeCharlier, B. (ed.) SAS 1994. LNCS, vol. 864, pp. 281–297. Springer, Heidelberg (1994)

    Google Scholar 

  4. Codish, M., Demoen, B.: Analyzing 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 

  5. Codish, M., Lagoon, V.: Type dependencies for logic programs using ACI unification. In: Israeli Symposium on Theory of Computing and Systems, pp. 136–145. IEEE Press, Los Alamitos (1996)

    Google Scholar 

  6. Cousot, P., Cousot, R.: Comparing the Galois connection and widening/ narrowing approaches to abstract interpretation. In: Bruynooghe, M., Wirsing, M. (eds.) PLILP 1992. LNCS, vol. 631, pp. 269–295. Springer, Heidelberg (1992)

    Chapter  Google Scholar 

  7. Gallagher, J., Boulanger, D., Sağlam, H.: Practical model-based static analysis for definite logic programs. In: Lloyd, J.W. (ed.) ILPS 1995, pp. 351–365. MIT Press, Cambridge (1995)

    Google Scholar 

  8. Heaton, A., Hill, P., King, A.: Analysing logic programs with delay for downward-closed properties. In: Fuchs, N.E. (ed.) LOPSTR 1997. LNCS, vol. 1463, p. 148. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

  9. Hill, P.M., King, A.: Determinacy and determinacy analysis. Journal of Programming Languages 5(1), 135–171 (1997)

    Google Scholar 

  10. Hill, P.M., Lloyd, J.W.: The Gödel Programming Language. MIT Press, Cambridge (1994)

    MATH  Google Scholar 

  11. Kahrs, S.: Limits ofML-definability. In: Kuchen, H., Swierstra, S.D. (eds.) PLILP 1996. LNCS, vol. 1140, pp. 17–31. Springer, Heidelberg (1996)

    Google Scholar 

  12. Kfoury, A.J., Tiuryn, J., Urzyczyn, P.: Type recursion in the presence of polymorphic recursion. ACM Transactions on Programming Languages and Systems 15(2), 290–311 (1993)

    Article  Google Scholar 

  13. Lloyd, J.W.: Foundations of Logic Programming. Springer, Heidelberg (1987)

    MATH  Google Scholar 

  14. Meertens, L.: First steps towards the theory of rose trees. CWI, Amsterdam; IFIP Working Group 2.1 working paper 592 ROM-25 (1988)

    Google Scholar 

  15. Mycroft, A., O’Keefe, R.: A polymorphic type system for Prolog. Artificial Intelligence 23, 295–307 (1984)

    Article  MATH  MathSciNet  Google Scholar 

  16. Pfenning, F. (ed.): Types in Logic Programming, ch. 1. MIT Press, Cambridge (1992)

    Google Scholar 

  17. Smaus, J.-G., Hill, P.M., King, A.M.: Mode analysis domains for typed logic programs. Technical Report, 06, School of Computer Studies, University of Leeds (2000) Springer-Verlag

    Google Scholar 

  18. Somogyi, Z.: A system of precise modes for logic programs. In: ICLP 1987, pp. 769–787. MIT Press, Cambridge (1987)

    Google Scholar 

  19. Somogyi, Z., Henderson, F., Conway, T.: The execution algorithm of Mercury, an efficient purely declarative logic programming language. Journal of Logic Programming (November 1996)

    Google Scholar 

  20. Stroetmann, K., Glaβ, T.: A semantics for types in Prolog: The type system of pan version 2.0. Technical report, Siemens AG, München, Germany (1995)

    Google Scholar 

  21. Tan, J., Lin, I.-P.: Recursive modes for precise analysis of logic programs. In: ILPS 1997, pp. 277–290. MIT Press, Cambridge (1997)

    Google Scholar 

  22. van Emden, M.: AVL tree insertion: A benchmark program biased towards Prolog. Logic Programming Newsletter 2 (1981)

    Google Scholar 

  23. Van Hentenryck, P., Cortesi, A., Le Charlier, B.: Type analysis of Prolog using type graphs. Technical Report CS-93-52, Brown University Box 1910, Providence, RI 02912 (November 1993)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2000 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Smaus, JG., Hill, P.M., King, A. (2000). Mode Analysis Domains for Typed Logic Programs. In: Bossi, A. (eds) Logic-Based Program Synthesis and Transformation. LOPSTR 1999. Lecture Notes in Computer Science, vol 1817. Springer, Berlin, Heidelberg. https://doi.org/10.1007/10720327_6

Download citation

  • DOI: https://doi.org/10.1007/10720327_6

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-67628-7

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

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics