Typed Static Analysis: Application to the Groundness Analysis of Typed Prolog

We enrich the domain Pos used for the static analysis of Prolog programs by combining it with types. We adopt the prescriptive view on typing, and we assume that programs are well-typed in an already existing type system. Typed static analysis of Typed Prolog programs gives access to more refined properties than untyped analysis because types give information on the inductive structure of terms that untyped static analysis does not discover. The increased refinement is not in variables assigned to true (e.g., variable recognized as bound to ground terms), but rather in variables not assigned to true; they can be assigned a more informative value than false. For instance, the proposed analysis can show that a variable is bound to a nil-terminated list whose elements are not necessarily ground. We contend that this kind of property is sometimes more useful than groundness. Because

[1]  David Scott Warren,et al.  Memoing for logic programs , 1992, CACM.

[2]  Rodney W. Topor,et al.  A Semantics for Typed Logic Programs , 1992, Types in Logic Programming.

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

[4]  Kim Marriott,et al.  Precise and efficient groundness analysis for logic programs , 1993, LOPL.

[5]  Saumya K. Debray,et al.  Detection and Optimization of Functional Computations in Prolog , 1986, ICLP.

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

[7]  Chris Mellish,et al.  Abstract Interpretation of Prolog Programs , 1986, ICLP.

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

[9]  Saumya K. Debray,et al.  Global Flow Analysis as a Practical Compilation Tool , 1992, J. Log. Program..

[10]  Jerzy Tiuryn,et al.  Type Inference Problems: A Survey , 1990, MFCS.

[11]  Jeffrey D. Ullman,et al.  A survey of deductive database systems , 1995, J. Log. Program..

[12]  John Wylie Lloyd,et al.  Foundations of Logic Programming , 1987, Symbolic Computation.

[13]  Gopalan Nadathur,et al.  Higher-Order Logic Programming , 1986, ICLP.

[14]  Frédéric Malésieux,et al.  Typed Static Analysis: Application to Groundness Analysis of Prolog and λ Prolog , 2001 .

[15]  Kim Marriott,et al.  Two Classes of Boolean Functions for Dependency Analysis , 1998, Sci. Comput. Program..

[16]  Keith L. Clark,et al.  Negation as Failure , 1987, Logic and Data Bases.

[17]  Alonzo Church,et al.  A formulation of the simple theory of types , 1940, Journal of Symbolic Logic.

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

[19]  Annalisa Bossi,et al.  Proving Termination of Logic Programs by Exploiting Term Properties , 1991, TAPSOFT, Vol.2.

[20]  Dale A. Miller,et al.  AN OVERVIEW OF PROLOG , 1988 .

[21]  PrologPascale Louvet,et al.  Parametric Polymorphism for Typed Prolog and , 1996 .

[22]  William A. Howard,et al.  The formulae-as-types notion of construction , 1969 .

[23]  Robin Milner,et al.  A Theory of Type Polymorphism in Programming , 1978, J. Comput. Syst. Sci..

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

[25]  Saumya K. Debray,et al.  Understanding Finiteness Analysis Using Abstract Interpretation , 1992, JICSLP.

[26]  J. Roger Hindley,et al.  Introduction to combinators and λ-calculus , 1986, Acta Applicandae Mathematicae.

[27]  Radhia Cousot,et al.  Static determination of dynamic properties of generalized type unions , 1977, Language Design for Reliable Software.

[28]  Simon J. E. Taylor,et al.  Status of the Mercury system , 1996 .

[29]  Richard A. O'Keefe,et al.  The Craft of Prolog , 1990 .

[30]  John W. Lloyd,et al.  The Gödel programming language , 1994 .

[31]  Uday S. Reddy,et al.  Typed Prolog: A Semantic Reconstruction of the Mycroft-O'Keefe Type System , 1991, ISLP.

[32]  Dean Jacobs,et al.  Accurate and Efficient Approximation of Variable Aliasing in Logic Programs , 1989, NACLP.

[33]  Peter J. Stuckey,et al.  Sharing and groundness dependencies in logic programs , 1999, TOPL.

[34]  Olivier Ridoux,et al.  The Compilation of Prolog and its Execution with MALI , 1993 .

[35]  Patrick Cousot,et al.  Abstract Interpretation and Application to Logic Programs , 1992, J. Log. Program..

[36]  Gérard Ferrand,et al.  NSTO Programs (Not Subject to Occur-Check) , 1991, ISLP.

[37]  Gopalan Nadathur,et al.  The Type System of a Higher-Order Logic Programming Language , 1992, Types in Logic Programming.

[38]  Michael Hanus Horn Clause Programs with Polymorphic Types: Semantics and Resolution , 1991, Theor. Comput. Sci..

[39]  Giorgio Levi,et al.  Declarative Modeling of the Operational Behavior of Logic Languages , 1989, Theor. Comput. Sci..

[40]  Andy King,et al.  Mode Analysis Domains for Typed Logic Programs , 1999, LOPSTR.

[41]  Gopalan Nadathur,et al.  Hereditary Harrop Formulas and Uniform Proof Systems , 1987, Logic in Computer Science.

[42]  A. Cortesi,et al.  Prop revisited: propositional formula as abstract domain for groundness analysis , 1991, [1991] Proceedings Sixth Annual IEEE Symposium on Logic in Computer Science.

[43]  Hendrik Pieter Barendregt,et al.  Introduction to generalized type systems , 1991, Journal of Functional Programming.

[44]  Jan-Georg Smaus,et al.  Les programmes bien typés ont tout bon , 2000, JFPLC.

[45]  Gopalan Nadathur,et al.  Uniform Proofs as a Foundation for Logic Programming , 1991, Ann. Pure Appl. Log..

[46]  Frédéric Malésieux,et al.  Typed Static Analysis: Application to Groundness Analysis of PROLOG and lambda-PROLOG , 1999, Fuji International Symposium on Functional and Logic Programming.