Type Analysis for CHIP

This paper proposes a tool to support reasoning about (partial) correctness of constraint logic programs. The tool infers a specification that approximates the semantics of a given program. The semantics of interest is an operational "call-success" semantics. The main intended application is program debugging. We consider a restricted class of specifications, which are regular types of constrained atoms. Our type inference approach is based on bottom-up abstract interpretation, which is used to approximate the declarative semantics (c-semantics). By using "magic transformations" we can describe the call-success semantics of a program by the declarative semantics of another program. We are focused on CLP over finite domains. Our prototype program analyzer works for the programming language CHIP.

[1]  John P. Gallagher,et al.  Fast and Precise Regular Approximations of Logic Programs , 1994, ICLP.

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

[3]  Ferenc Gécseg,et al.  Tree Languages , 1997, Handbook of Formal Languages.

[4]  Pascal Van Hentenryck,et al.  Type Analysis of Prolog Using Type Graphs , 1995, J. Log. Program..

[5]  Annalisa Bossi,et al.  Verifying Correctness of Logic Programs , 1989, TAPSOFT, Vol.2.

[6]  Roberto Barbuti,et al.  A Bottom-Up Polymorphic Type Inference in Logic Programming , 1992, Sci. Comput. Program..

[7]  Wlodzimierz Drabent,et al.  Inductive Assertion Method for Logic Programs , 1988, Theor. Comput. Sci..

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

[9]  Wlodzimierz Drabent,et al.  Inferring call and success types for CLP programs , 1998 .

[10]  Jan Ma,et al.  A Type-based Diagnoser for Chip , 1998 .

[11]  Jan Maluszynski,et al.  Directional Types and the Annotation Method , 1997, J. Log. Program..

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

[13]  Keith L. Clark Predicate logic as a computational formalism , 1979 .

[14]  John W. Lloyd,et al.  The Go¨del programming language , 1994 .

[15]  Wlodzimierz Drabent,et al.  Diagnosis of CHIP Programs Using Type Information , 1999, APPIA-GULP-PRODE.

[16]  Frédéric Benhamou,et al.  Applying Interval Arithmetic to Real, Integer, and Boolean Constraints , 1997, J. Log. Program..

[17]  Prateek Mishra,et al.  Towards a Theory of Types in Prolog , 1984, SLP.

[18]  Thom W. Frühwirth,et al.  Logic programs as types for logic programs , 1991, [1991] Proceedings Sixth Annual IEEE Symposium on Logic in Computer Science.

[19]  Wlodzimierz Drabent,et al.  Inductive Assertion Method for Logic Programs , 1987, Theoretical Computer Science.

[20]  Gerda Janssens,et al.  Deriving Descriptions of Possible Values of Program Variables by Means of Abstract Interpretation , 1990, J. Log. Program..

[21]  John P. Gallagher,et al.  Regular approximations of logic programs and their uses , 1992 .

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

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

[24]  Giorgio Levi,et al.  Abstract Diagnosis , 1999, J. Log. Program..

[25]  Justin Zobel,et al.  A Regular Type Language for Logic Programs , 1992, Types in Logic Programming.

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

[27]  Krzysztof R. Apt,et al.  Meta-Variables in Logic Programming, or in Praise of Ambivalent Syntax , 1996, Fundam. Informaticae.

[28]  Ehud Shapiro,et al.  A Type System for Logic Programs , 1988, J. Log. Program..

[29]  Giorgio Levi,et al.  Proving Properties of Logic Programs by Abstract Diagnosis , 1996, LOMAPS.

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

[31]  Lee Naish,et al.  Types and the Intended Meaning of Logic Programs , 1992, Types in Logic Programming.

[32]  Pascal Van Hentenryck Constraint satisfaction in logic programming , 1989, Logic programming.

[33]  Manuel V. Hermenegildo,et al.  A Framework for Assertion-Based Debugging in Constraint Logic Programming , 1998, CP.

[34]  Michael J. Maher,et al.  Constraint Logic Programming: A Survey , 1994, J. Log. Program..