Mode Analysis Domains for Typed Logic Programs

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 Godel language and tested on a number of example programs to demonstrate the viability of the approach.

[1]  Bart Demoen,et al.  Deriving Polymorphic Type Dependencies for Logic Programs Using Multiple Incarnations of Prop , 1994, SAS.

[2]  Alexander Aiken,et al.  Directional Type Checking of Logic Programs , 1994, SAS.

[3]  John P. Gallagher,et al.  Practical Model-Based Static Analysis for Definite Logic Programs , 1995, ILPS.

[4]  Bart Demoen,et al.  Analysing Logic Programs Using 'Prop'-ositional Logic Programs and a Magic Wand , 1993, ILPS.

[5]  Michael Codish,et al.  Type Dependencies for Logic Programs Using ACI-Unification , 2000, ISTCS.

[6]  J. Lloyd Foundations of Logic Programming , 1984, Symbolic Computation.

[7]  Andy King,et al.  Analysis of Logic Programs with Delay , 1997, LOPSTR.

[8]  Ruthann Robson A/K/A , 1997 .

[9]  G. Smaus Mode Analysis Domains for TypedLogi ProgramsJan , 2000 .

[10]  Jerzy Tiuryn,et al.  Type reconstruction in the presence of polymorphic recursion , 1993, TOPL.

[11]  Stefan Kahrs,et al.  Limits of ML-Definability , 1996, PLILP.

[12]  I-Peng Lin,et al.  Recursive Modes for Precise Analysis of Logic Programs , 1997, ILPS.

[13]  Patrick Cousot,et al.  Comparing the Galois Connection and Widening/Narrowing Approaches to Abstract Interpretation , 1992, PLILP.

[14]  J. Davenport Editor , 1960 .

[15]  Pascal Van Hentenryck,et al.  Type analysis of Prolog using type graphs , 1994, PLDI '94.

[16]  Zoltan Somogyi,et al.  The Execution Algorithm of Mercury, an Efficient Purely Declarative Logic Programming Language , 1996, J. Log. Program..

[17]  Andy King,et al.  Determinacy and determinacy analysis , 1997, J. Program. Lang..

[18]  Alan Mycroft,et al.  A Polymorphic Type System for Prolog , 1984, Logic Programming Workshop.

[19]  Zoltan Somogyi A System of Precise Models for Logic Programs , 1987, ICLP.