Proof-Theoretic Methods for Analysis of Functional Programs

We investigate how, in a natural deduction setting, we can specify concisely a wide variety of tasks that manipulate programs as data objects. This study will provide us with a better understanding of various kinds of manipulations of programs and also an operational understanding of numerous features and properties of a rich functional programming language. We present a technique, inspired by structural operational semantics and natural semantics, for specifying properties of, or operations on, programs. Specifications of this sort are presented as sets of inference rules and are encoded as clauses in a higher-order, intuitionistic meta-logic. Program properties are then proved by constructing proofs in this meta-logic. We argue the following points regarding these specifications and their proofs: (i) the specifications are clear and concise and they provide intuitive descriptions of the properties being described; (ii) a wide variety of program analysis tools can be specified in a single unified framework, and thus we can investigate and understand the relationship between various tools; (iii) proof theory provides a well-established and formal setting in which to examine metatheoretic properties of these specifications; and (iv) the meta-logic we use can be implemented naturally in an extended logic programming language and thus we can produce experimental implementations of the specifications. We expect that our efforts will provide new perspectives and insights for many program manipulation tasks. Comments University of Pennsylvania Department of Computer and Information Science Technical Report No. MSCIS-89-07. This technical report is available at ScholarlyCommons: http://repository.upenn.edu/cis_reports/776 PROOF-THEORETIC METHODS FOR ANALYSIS OF FUNCTIONAL PROGRAMS (Dissertation Proposal) , John 3. Hannan MS-CIS-89-07 LlNC LAB 142 Department of Computer and Information Science School of Engineering and Applied Science University of Pennsylvania Philadelphia, PA 191 04

[1]  Dominique Clément,et al.  Natural semantics on the computer , 1984 .

[2]  Gilles Kahn,et al.  Natural Semantics , 1987, STACS.

[3]  G.D. Plotkin,et al.  LCF Considered as a Programming Language , 1977, Theor. Comput. Sci..

[4]  Daniel Le Métayer,et al.  ACE: an automatic complexity evaluator , 1988, TOPL.

[5]  Franco Turini,et al.  Symbolic Evaluation with Structural Recursive Symbolic Constants , 1987, Sci. Comput. Program..

[6]  P. J. Landin The Mechanical Evaluation of Expressions , 1964, Comput. J..

[7]  Michael J. C. Gordon,et al.  The Denotational Description of Programming Languages , 1979, Springer New York.

[8]  Gregor von Bochmann,et al.  A Sampler of Formal Definitions , 1976, CSUR.

[9]  Henk Barendregt,et al.  The Lambda Calculus: Its Syntax and Semantics , 1985 .

[10]  Gillier,et al.  Logic for Computer Science , 1986 .

[11]  Pierre-Louis Curien,et al.  The Categorical Abstract Machine , 1987, Sci. Comput. Program..

[12]  Amy P. Felty,et al.  Specifying Theorem Provers in a Higher-Order Logic Programming Language , 1988, CADE.

[13]  Simon L. Peyton Jones,et al.  Strictness Analysis - A Practical Approach , 1985, FPCA.

[14]  Gordon D. Plotkin,et al.  Call-by-Name, Call-by-Value and the lambda-Calculus , 1975, Theor. Comput. Sci..

[15]  J. Roger Hindley,et al.  The Completeness Theorem for Typing lambda-Terms , 1983, Theor. Comput. Sci..

[16]  Alan Mycroft,et al.  Abstract interpretation and optimising transformations for applicative programs , 1982 .

[17]  Alan Mycroft,et al.  The Theory and Practice of Transforming Call-by-need into Call-by-value , 1980, Symposium on Programming.

[18]  Neil D. Jones Semantics-Directed Compiler Generation , 1980, Lecture Notes in Computer Science.

[19]  John C. Mitchell,et al.  The essence of ML , 1988, POPL '88.

[20]  Joëlle Despeyroux,et al.  Proof of Translation in Natural Semantics , 1986, LICS.

[21]  D. A. Turner,et al.  A new implementation technique for applicative languages , 1979, Softw. Pract. Exp..

[22]  John Hannan,et al.  Enriching a Meta-Language With Higher-Order Features , 1988 .

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

[24]  John C. Mitchell,et al.  Polymorphic Type Inference and Containment , 1988, Inf. Comput..

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

[26]  Patrick Borras,et al.  Centaur: the system , 1988, Software Development Environments.

[27]  Christopher P. Wadsworth,et al.  The Relation Between Computational and Denotational Properties for Scott's Dinfty-Models of the Lambda-Calculus , 1976, SIAM J. Comput..

[28]  Jan Maluszynski,et al.  Relating Logic Programs and Attribute Grammars , 1985, J. Log. Program..

[29]  Yoshihiko Futamura Program Evaluation and Generalized Partial Computation , 1988, FGCS.

[30]  Albert R. Meyer,et al.  What is a Model of the Lambda Calculus? , 1982, Inf. Control..

[31]  Robin Milner,et al.  Principal type-schemes for functional programs , 1982, POPL '82.

[32]  Frank Pfenning,et al.  Higher-order abstract syntax , 1988, PLDI '88.

[33]  Lawrence Charles Paulson A compiler generator for semantic grammars , 1981 .

[34]  Haskell B. Curry,et al.  Combinatory Logic, Volume I , 1959 .

[35]  D. A. Turner Another Algorithm for Bracket Abstraction , 1979, J. Symb. Log..

[36]  Gerhard Gentzen,et al.  Investigations into Logical Deduction , 1970 .

[37]  Thomas W. Reps,et al.  Generating Language-Based Environments , 1982 .

[38]  Gopalan Nadathur,et al.  A Logic Programming Approach to Manipulating Formulas and Programs , 1987, SLP.

[39]  Dale Miller,et al.  Uses of Higher-Order Unification for Implementing Program Transformers , 1988, ICLP/SLP.