Automatically Inferring Properties of Computer Programs Automatically Inferring Properties of Computer Programs

This thesis presents two independent pieces of research. First, we consider the problem of automatically inferring properties of programs. Our approach is to explore the application of familiar type inference principles to a \type system" suuciently expressive that the typing problem is eeectively the checking of program speciications. We present such a type system, and use familiar syntax-directed type inference rules to give a polynomial-time procedure for inferring type theorems in this type system. We discuss examples of simple functional programs and the speciication information this procedure automatically infers. The enriched notion of type allows the deenition of any recursively enumerable set as a type, and includes argument-dependent output types for functions. The inference procedure is capable for example of automatically inferring that an insertion sort program always returns a sorted permutation of its input. We present both rst-order and higher-order versions of our sample programming language and inference algorithms for both languages. We believe most of the interesting inferential challenges are already present in the rst-order case. The second piece of research we present addresses the satissability of sets of formulas in a particular set constraints language. We consider set expressions built up from set constants by union, set complement, and taking the image of a set expression under a function or relation. Previous work in this area has neglected the \Tarskian" case where the functions and relations are allowed to take on arbitrary meanings, rather than only a standard Herbrand meaning. We prove that the satissability of a nite set of subset formulas between these \Tarskian" set expressions is in nondeter-ministic doubly exponential time. Our proof is by reduction to a new Diophantine inequation solvability problem, which we show to be in nondeterministic exponential time, but conjecture to be in NP.

[1]  William M. Farmer,et al.  IMPS: An interactive mathematical proof system , 1990, Journal of Automated Reasoning.

[2]  Editors , 2003 .

[3]  Robert Givan,et al.  Tarskian Set Constraints , 2002, Inf. Comput..

[4]  Alexander Schrijver,et al.  Theory of linear and integer programming , 1986, Wiley-Interscience series in discrete mathematics and optimization.

[5]  David A. McAllester,et al.  Walther Recursion , 1996, CADE.

[6]  Alexander Aiken,et al.  Decidability of Systems of Set Constraints with Negative Constraints , 1994, Inf. Comput..

[7]  Witold Charatonik,et al.  Set constraints with projections are in NEXPTIME , 1994, Proceedings 35th Annual Symposium on Foundations of Computer Science.

[8]  Witold Charatonik,et al.  Negative set constraints with equality , 1994, Proceedings Ninth Annual IEEE Symposium on Logic in Computer Science.

[9]  Alexander Aiken,et al.  Soft typing with conditional types , 1994, POPL '94.

[10]  Alexander Aiken,et al.  The Complexity of Set Constraints , 1993, CSL.

[11]  M. Gordon,et al.  Introduction to HOL: a theorem proving environment for higher order logic , 1993 .

[12]  Harald Ganzinger,et al.  Set constraints are the monadic class , 1993, [1993] Proceedings Eighth Annual IEEE Symposium on Logic in Computer Science.

[13]  Robert Givan,et al.  Natural Language Syntax and First-Order Inference , 1992, Artificial Intelligence.

[14]  Wilfred Z. Chen Tactic-based Theorem Proving and Knowledge-based Forward Chaining: an Experiment with Nuprl and Ontic , 1992, CADE.

[15]  Robert Givan,et al.  New Results on Local Inference Relations , 1992, KR.

[16]  Werner Nutt,et al.  The Complexity of Concept Languages , 1997, KR.

[17]  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.

[18]  Gert Smolka,et al.  Attributive Concept Descriptions with Complements , 1991, Artif. Intell..

[19]  Pierre Jouvelot,et al.  Algebraic reconstruction of types and effects , 1991, POPL '91.

[20]  Joxan Jaffar,et al.  A decision procedure for a class of set constraints , 1990, [1990] Proceedings. Fifth Annual IEEE Symposium on Logic in Computer Science.

[21]  Robert S. Boyer,et al.  Computational Logic , 1990, ESPRIT Basic Research Series.

[22]  Bernhard Nebel,et al.  Terminological Reasoning is Inherently Intractable , 1990, Artif. Intell..

[23]  Joxan Jaffar,et al.  A finite presentation theorem for approximating logic programs , 1989, POPL '90.

[24]  Chris Hankin,et al.  Abstract Interpretation of Declarative Languages , 1987 .

[25]  Ronald J. Brachman,et al.  An Overview of the KL-ONE Knowledge Representation System , 1985, Cogn. Sci..

[26]  Narendra Karmarkar,et al.  A new polynomial-time algorithm for linear programming , 1984, STOC '84.

[27]  Ernst L. Leiss,et al.  On Equations for Regular Languages, Finite Automata, and Sequential Networks , 1980, Theor. Comput. Sci..

[28]  Robin Milner,et al.  Edinburgh lcf: a mechanized logic of computation , 1978 .

[29]  I. Borosh,et al.  Bounds on positive integral solutions of linear Diophantine equations , 1976 .

[30]  John C. Reynolds,et al.  Towards a theory of type structure , 1974, Symposium on Programming.

[31]  M. Rabin Decidability of second-order theories and automata on infinite trees , 1968 .

[32]  A. Tarski,et al.  Boolean Algebras with Operators , 1952 .

[33]  A. Tarski,et al.  Boolean Algebras with Operators. Part I , 1951 .

[34]  John McCarthy,et al.  A Basis for a Mathematical Theory of Computation , 1899 .