ebook img

International Symposium on Theoretical Programming PDF

413 Pages·1974·9.22 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview International Symposium on Theoretical Programming

Lecture Notes in Computer Science Edited by G. Goos, Karlsruhe and J. Hartmanis, Ithaca 5 International Symposium on Theoretical Programming Edited by Andrei Ershov and Valery A. Nepomniaschy I Springer-Verlag Berlin-Heidelber.q • New York 1974 Editorial Board: D. Gries • P. Brinch Hansen C. Moler • G, Seegm~Jller • N, Wirth Prof. Dr. Andrei Ershov Dr. Valery A. Nepomniaschy Computer Center lnformatics Division Novosibirsk 630090/USSR AMS Subject Classifications (1970): 68-02, 68A05, 68A10, 68A20, 68 A 25, 68 A30, 68 A40, 68 A45, 02E10, 02 E15, 02F10 ISBN 3-540-06720-5 Springer-Verlag Berlin • Heidelberg. New York ISBN 0-387-06720-5 Springer-Verlag New York • Heidelberg • Berlin This work is subject to copyright. All rights are reserved, whether the whole or part of the material is concerned, specifically those of translation, reprinting, re-use of illustrations, broadcasting, reproduction by photo- copying machine or similar means, and storage in data banks. Under § 54 of the German Copyright Law where copies are made for other than private use, a fee is payable to the publisher, the amount of the fee to be determined by agreement with the publisher. © by Springer-Verlag Berlin • Heidelberg 1974. Library of Congress Catalog Card Number 74-3538. Printed in Germany. Offsetdruck: Julius Beltz, Hemsbach/Bergstr. Table of Contents Introduction A.P. Ershov . . . . . . . . . . . . . . . . . . . . . . . . . An axiomatic definition of the programming language PASCAL C.A.R. Hoare . . . . . . . . . . . . . . . . . . . . . . . The logic of "can do" E. Engeler . . . . . . . . . 17 Copying in commutation - operator schemata M.I. Schwartzman . . . . . . . . . . . . . . . . . . . . . . 29 On synthesizing programs given by examples J. Barzdin . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 Central technical issues in programming language design J. Schwartz . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 Sur quelques syst~mes de programmation pour les recherches scientifiques A.A. Liapounov . . . . . . . . . . . . . . . . . . . . . . . . . 76 Decision problems in computational models M.S. Paterson . . . . . . . . . . . . . . . . . . . . . . . . . 85 Non-determined algorithm schemata or R-schemata R.I. Podlovchenko . . . . . . . . . . . . . . . . . . . . . . . . 86 Equivalence and optimization of programs A.A. Letichevsky . . . . . . . . . . . . . . . . . . . . . . . . . . 111 On the average speed of automaton with terminal state J.H. Shukurian . . . . . . . . . . . . . . . . . . . . . . . . . . 124 Local-termal equivalence of program schemata V.E. Itkin_ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . I27 On universal classes of program schemas B.A. Trachtenbrot . . . . . . . . . . . . . . . . . . . . . . . . 144 Certain decompositions of G6del numberings and the semantics of programming languages B. Buchberger . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 Criteria for the algorithmic completeness of the systems of operations V.A. Nepomniaschy . . . . . . . . . . . . . . . . . . . . . . 172 Data flow schemas J. B, Dennis, J.B. Fosseen, J.P, Linderman. . . . . . . . . . 187 Operation patterns 217 A. Bahrs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Looking for an approach to a theory of models for parallel computation A.S. Narinyani . . . . . . . . . . . . . . . . . . . . . . . . 247 Configurable computers: a new class of general purpose machines R.E. Miller, J. Cocke . . . . . . . . . . . . . . . . . . . . . . 285 A method for determining program data relationships F. E, Allen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299 T o w a r d s a u t o m a t i c a l c o n s t r u c t i o n of p a r a l l e l p r o g r a m s V.E. Kotov . . . . . . . . . . . . . . . . . . . . . . . . . . . 309 A calculus for the mathematical theory of computation R. Milner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332 Admissibility of fixed-point induction in first-order logic of typed theories 344 S. Igarashi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A formal approximation theoryo f semantic data types T, Ito . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384 Some features of a language for a proof-checking programming system G.S. Tseytin . . . . . . . . . . . . . . . . . . . . . . . . . . 394 INTRODUCTION 1971 and 1972 were the culminating years in the establishment of theo- retical programming. During 15 months at least ten scientific meetings have been held in the United Kingdom, Poland, U.S.S.R., U.S.A., Jugo- slavija, Japan, and certainly in some other countries, demonstrating an existence of an invisible team of scientists who had produced alto- gether about three hundred papers relevant to a section of computer science of a certain objective content. It is no mere chance that the sentence you have just read contains so many indefinite articles: the process of identification of the team of scientists, of the corresponding section of computer science and of its subject matter is still going on. Theory of computing, mathematical foundations of computer science , ~heory of programs, theoretical programming - are not a complete list of identifiers used. However, it is more and more recognized that these identifiers are to a certain degree synonyms signifying that a new mathematical discipline has come into being. The Symposium on Theoretical Programming held in Novosibirsk on August 7 _ 11, 1972 whose proceedings we bring forward to the reader in the marked period of establishment seem to play a special role~ It was attended by 50 specialists from Moscow, Leningrad, Kiev, Novosibirsk, Riga, Yerevan, Rostov-on-the-Don and Tallin and also by 17 foreign scientists from Austria, United Kingdom, Hungary, U.S.A., France, Switzerland and Japan. The Novosibirsk symposium received a lucky priviledge: it was the first thematical scientific meeting at which the representatives of practically all presently existing trends of theoretical programming met. This re- presentation made the symposium especially interesting for the parti- cipants, and, we hope, for a wider group of specialists through publi- cation of the proceedings. The symposium itself (if not to consider the general discussion) did not practically deal with the questions of self-determination. In fact there are no review papers. However~ the wealth and variety of ideas~ concreteness of the results and methods, the authors' scientific in- fluence, many of whom made a basic contribution to theoretical pro- gramming - all these make the Proceedings of the Novosibirsk Symposium a book to be read by everyone who wants to master the present-day state and tendencies of the development of theoretical programming. Corresponding Member of Soviet Academy of Sciences A.P. Ershov, Chairman of the Organizing Committee of the Symposium An Axiomatic Definition of the Programming Language PASCAL C.A.R. Hoare 0 Introduction The purpose of a formal language definition is to act as a "contract" between the implementor and user of the language. It is not intended to be read straight through, but rather to be used by both parties as a work of reference; it will also be used as the basis of more readable descriptions of the language. Thus the objective of a formal descrip- tion is to make it easy to identify the chapter and subsection relevant to any query, and to consult it in isolation, without having to follow cross-references to other sections and chapters. The axiomatic defini- tion of PASCAL seems to achieve this objective to a remarkable degree. The language treated in this paper is a version of PASCAL which has been simplified in several respects. (1) No variable occuring in the record variable part of a with state- ment may be changed within its body. (2) A procedure may not access non-local variables other than those in its parameter list. (3) All actual parameters corresponding to formals specified as var must be distinct identifiers. There are other changes to PASCAL which would considerably simplify the axiomatisation, and might also be of benefit to its user. (1) The alfa type could be regarded as just a packed representation for a character array. (2) Conditional and case expressions could be allowed. (3) Explicit constructors and type transfer functions for defined types could be included in the language. (4) Some simplification of the file type is to be recommended. (5) The variable parameters of a procedure should be indicated on the call side as well as on declaration. (6) Exclusion of backward jumps and mutual recursion would simplify the proof rules. (7) The replacement of classes by partial mappings and permitting recur- sive data type definitions would make the language into a more high- level tool. But there are very good reasons for avoiding these "improvements", since their inclusion would undoubtedly detract from the very high qual ity of the PASCAL implementation. In particular, point (7) would entirely change the nature of the language. The treatmemt given in this paper is not wholly formal, and depends on the good will of the reader. In particular (1) Free variables in axioms are assumed to be universally quantified. (2) The expression of the "induction" axiom is left informal. (3) The types of the variables used may be supplied by context. (4) The name of a type is used as a transfer function constructing a value of the type. Such use of the type name is not available to the programmer. (5) Axioms for a defined type must be modelled after the definition, and be applied only in the block to which the definition is local. (6) The context-free and context-dependent aspects of the syntax are defined in [2], and are not repeated here. (7) Where hypotheses and subsidiary deductions are given in the proof rules, the hypotheses may be accumulated, and the subsidiary de- ductions may be nested in the usual manner. (8) The use of a type name in its own definition is not permitted to the PASCAL programmer. The following abbreviations are standard: (1) n < m forTm ~ n n ~ m for m ~ n n > m for m < n (2) sl,s2,...,Sn:T for Sl:T;s2:T;...;Sn:T (3) P(Q)R, where P and R are propositional formulae and Q is a state- ment of PASCAL is interpreted as stating that if P is true of the program variables before initiating execution of Q, then R will be true on termination. If Q never terminates, or exits by a jump to a label outside itself, P(Q)R is vacuously true. (4) X x stands for the result of substituting y for all the free oc- Y currences of x in X. If y contains free variables which would thereby become bound, this unintended collision is avoided by preliminary change in the name of the bound variables of X. The axioms for data and data structures comprise about half the defi- nition. They are modelled on the constructive definition of integers. Axioms defining the basic operators are modelled on primitive recur- sive definitions, so that it is easy to check that they define a unique computable result for every desired combination of operands, and leave other cases (e.g. division by zero) undefined. The axioms are formulated to apply to the normal unbounded domains of mathematics. An implementor is free to discontinue execution of any program which invokes operations which would exceed the range of efficient operation of his machine (e.g. integer overflow, or exhaustion of stack space). However, to continue execution with the wrong result would violate this axiomatic definition. Most of the formal material of this paper is more fully explained in the references. The main extensions made by this paper are: (1) Definitions of files and classes (2) Treatment of mutual reeursion (3) Attempted definition of the whole of a large, efficient, and use- ful language. 1 Standard Scalar Types 1.1 The Integer Type. 1.1.1 0 is an integer. 1.1.2 if n is an integer, so are succ(n) and pred(n) 1.1.3 These are the only integers. 1.1.4 n = succ(pred(n)) = pred(succ(n)). 1 .1 .5 n~ n. 1.1.6 n < succ(n). 1ol.7 n ~ m D n < succ(m). 1.1.8 m < n ~ m < succ(n). 1.1.9 n + 0 = n. 1.1.10 n + m = pred(n) + succ(m) = succ(n) + pred(m). 1.1~11 n - 0 = n. 1.1.12 n - m : succ(n) - succ(m) : pred(n) - pred(m). 1.1.13n 0 = 0 1.1.14n m = n succ(m) - n = n pred(m) + n. 1.1 • 15 n~O~m - n ~(m div n)~ n~ m. 1.1 .16 n~Oom ~ (m div n)#m ~ m - n. 1.1 .17 m mod n = m - ((m di~v n) ~ n). 1.1 .18 abs(m) = if m ~ 0 then -m else m. 1.1 • 19 sqr(m) = m~m. 1.1 .20 odd(m) = (m mod 2 = 1). 1.1 .21 an integer constant consisting of digits dndn_l...d o means lO r k ~ d n + lon-l~dn_ 1 + " ' " + lO°~d o 1.1.22 1 means succ(O), 2 means succ(1), • . . , 9 m e a n s s u e t ( g ) 1.2 The Boolean Type. 1.2.1 false and true are distinct Boolean values. 1.2.2 These are the only Boolean values. 1.2.3 true = succ(false) & false = pred(true) 1.2.4 false~ x ~ true. 1.2.5 -w(true ~ false). 1.2.6 (-~false) = true & (Ttrue) = false. 1.2.7 true A true = true 1.2.8 falseAx = xAfalse = false 1.2.9 false Vfalse = false 1.2.10 trueVx = xVtrue = true. 1.3 The Character Type. 1.3.1 "A"~ "B"~ ..., are distinct elements of type Char. 1.3.2 These are the only elements of type Char. 1.3.3 if x is a Char, then int(x) is an integer and x = chr(int(x)). 1.3.4 if n is an integer in the range of int, then chr(n) is a character and n = int(chr(n)). 1.3.5 if x and y are Char then x ~ y ~ int(x) ~ int(y). (i) The set of constants denoting values of type Char may be selected by the implementor. They should begin and end with the symbol chosen by the implementor to denote quotation.

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.