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].
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
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)
Christiansen, H.: Deriving declarations from programs. Technical report, Roskilde University, P.O.Box 260, DK-4000 Roskilde (1997)
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)
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)
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)
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)
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)
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)
Hill, P.M., King, A.: Determinacy and determinacy analysis. Journal of Programming Languages 5(1), 135–171 (1997)
Hill, P.M., Lloyd, J.W.: The Gödel Programming Language. MIT Press, Cambridge (1994)
Kahrs, S.: Limits ofML-definability. In: Kuchen, H., Swierstra, S.D. (eds.) PLILP 1996. LNCS, vol. 1140, pp. 17–31. Springer, Heidelberg (1996)
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)
Lloyd, J.W.: Foundations of Logic Programming. Springer, Heidelberg (1987)
Meertens, L.: First steps towards the theory of rose trees. CWI, Amsterdam; IFIP Working Group 2.1 working paper 592 ROM-25 (1988)
Mycroft, A., O’Keefe, R.: A polymorphic type system for Prolog. Artificial Intelligence 23, 295–307 (1984)
Pfenning, F. (ed.): Types in Logic Programming, ch. 1. MIT Press, Cambridge (1992)
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
Somogyi, Z.: A system of precise modes for logic programs. In: ICLP 1987, pp. 769–787. MIT Press, Cambridge (1987)
Somogyi, Z., Henderson, F., Conway, T.: The execution algorithm of Mercury, an efficient purely declarative logic programming language. Journal of Logic Programming (November 1996)
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)
Tan, J., Lin, I.-P.: Recursive modes for precise analysis of logic programs. In: ILPS 1997, pp. 277–290. MIT Press, Cambridge (1997)
van Emden, M.: AVL tree insertion: A benchmark program biased towards Prolog. Logic Programming Newsletter 2 (1981)
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)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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