Kybernetika. Jiří Kopřiva A note on the structure of certain predicates concerning the sublanguages of ALGOL 60

Similar documents
Kybernetika. Bohdan Zelinka Finding a spanning tree of a graph with maximal number of terminal vertices

Realization of Generalized Good Translation Algorithm on Computer

Czechoslovak Mathematical Journal

Commentationes Mathematicae Universitatis Carolinae

SC/MATH Boolean Formulae. Ref: G. Tourlakis, Mathematical Logic, John Wiley & Sons, York University

A Catalog of While Loop Specification Patterns

This book is licensed under a Creative Commons Attribution 3.0 License

CSC 501 Semantics of Programming Languages

Chapter 3. Describing Syntax and Semantics

Programming Language Definition. Regular Expressions

Mathematica Slovaca. Roman Nedela Locally-cyclic graphs covering complete tripartite graphs. Terms of use: Persistent URL:

ALGORITHMIC DECIDABILITY OF COMPUTER PROGRAM-FUNCTIONS LANGUAGE PROPERTIES. Nikolay Kosovskiy

Context-free Grammars

Automated Reasoning. Natural Deduction in First-Order Logic

Chapter 3. Describing Syntax and Semantics

Algorithms for finding the minimum cycle mean in the weighted directed graph

Acta Universitatis Carolinae. Mathematica et Physica

Programming Languages Third Edition

Overview. Probabilistic Programming. Dijkstra s guarded command language: Syntax. Elementary pgcl ingredients. Lecture #4: Probabilistic GCL

2 Introduction to operational semantics

Handout 9: Imperative Programs and State

Propositional Logic. Part I

EXTERNAL VISIBILITY. 1. Definitions and notation. The boundary and interior of

Theoretical Part. Chapter one:- - What are the Phases of compiler? Answer:

ApplMath Lucie Kárná; Štěpán Klapka Message doubling and error detection in the binary symmetrical channel.

Safe Stratified Datalog With Integer Order Does not Have Syntax

Diffie-Hellman Protocol as a Symmetric Cryptosystem

Chapter 3. Describing Syntax and Semantics ISBN

Consider a description of arithmetic. It includes two equations that define the structural types of digit and operator:

Discrete Cubic Interpolatory Splines

A THEOREM ON HYPERSIMPLE SETS

Program Calculus Calculational Programming

The Solution Set of Interval Linear Equations Is Homeomorphic to the Unit Cube: An Explicit Construction

CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Chapter p. 1/27

A matching of maximum cardinality is called a maximum matching. ANn s/2

Revisiting Kalmar completeness metaproof

CMPS Programming Languages. Dr. Chengwei Lei CEECS California State University, Bakersfield

Maximum number of edges in claw-free graphs whose maximum degree and matching number are bounded

Relational Database: The Relational Data Model; Operations on Database Relations

AN ALGORITHM FOR A MINIMUM COVER OF A GRAPH

A digital pretopology and one of its quotients

Lecture 6,

Introduction to Axiomatic Semantics (1/2)

Lecture 4: Syntax Specification

Appendix 1. Description Logic Terminology

Appendix 1. Description Logic Terminology

Syntax and Semantics

Chapter 3. Syntax - the form or structure of the expressions, statements, and program units

CSCE 314 Programming Languages

Denotational Semantics of a Simple Imperative Language Using Intensional Logic

Robert Cowen and Stephen H. Hechler. Received June 4, 2003; revised June 18, 2003

SOFTWARE ENGINEERING DESIGN I

Formally-Proven Kosaraju s algorithm

Commentationes Mathematicae Universitatis Carolinae

Semantics of COW. July Alex van Oostenrijk and Martijn van Beek

THE COMMUTATOR SUBGROUPS OF THE ALTERNATING KNOT GROUPS

LANGUAGE PROCESSORS. Presented By: Prof. S.J. Soni, SPCE Visnagar.

CMPSCI 250: Introduction to Computation. Lecture #1: Things, Sets and Strings David Mix Barrington 22 January 2014

Going beyond propositional logic

Modified Report on the Algorithmic Language Algol 60

Kurt Gödel and Computability Theory

Modified Report on the Algorithmic Language ALGOL 60

Discrete Applied Mathematics. A revision and extension of results on 4-regular, 4-connected, claw-free graphs

arxiv: v1 [math.co] 4 Apr 2011

MATH Iris Loeb.

The Football Pool Problem for 5 Matches

3. DESCRIBING SYNTAX AND SEMANTICS

Chapter 3: CONTEXT-FREE GRAMMARS AND PARSING Part 1

On an adjacency property of almost all tournaments

Lecture 5 - Axiomatic semantics

degree at least en? Unfortunately, we can throw very little light on this simple question. Our only result in this direction (Theorem 3) is that, if w

Contents. Chapter 1 SPECIFYING SYNTAX 1

2.8 Universal Turing Machines and the Halting Problem

Introduction to Axiomatic Semantics (1/2)

3 No-Wait Job Shops with Variable Processing Times

An Annotated Language

COMPOSITIO MATHEMATICA

Formal Semantics of Programming Languages

CPS 506 Comparative Programming Languages. Syntax Specification

Introduction to Automata Theory. BİL405 - Automata Theory and Formal Languages 1

Verifying a Border Array in Linear Time

Chapter 3: Propositional Languages

Formal Predicate Calculus. Michael Meyling

GLOBAL GEOMETRY OF POLYGONS. I: THE THEOREM OF FABRICIUS-BJERRE

CMSC 330: Organization of Programming Languages. Formal Semantics of a Prog. Lang. Specifying Syntax, Semantics

Formal Semantics of Programming Languages

Describing Syntax and Semantics

Principles of Programming Languages

ON THE NOTION OF «-CARDINALITY

STRICT RADICAL CLASSES OF ASSOCIATIVE RINGS

Chapter 3. Semantics. Topics. Introduction. Introduction. Introduction. Introduction

Chapter 3: Syntax and Semantics. Syntax and Semantics. Syntax Definitions. Matt Evett Dept. Computer Science Eastern Michigan University 1999

On Generalization of Fuzzy Concept Lattices Based on Change of Underlying Fuzzy Order

Denotational Semantics

A Note on the Succinctness of Descriptions of Deterministic Languages

SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION

The Generic Contact of Convex Bodies with Circumscribed Homothets of a Convex Surface

Formal Semantics. Prof. Clarkson Fall Today s music: Down to Earth by Peter Gabriel from the WALL-E soundtrack

Aplikace matematiky. Terms of use: Aplikace matematiky, Vol. 29 (1984), No. 1, Persistent URL:

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Transcription:

Kybernetika Jiří Kopřiva A note on the structure of certain predicates concerning the sublanguages of ALGOL 60 Kybernetika, Vol. 1 (1965), No. 2, (122)--126 Persistent URL: http://dml.cz/dmlcz/125213 Terms of use: Institute of Information Theory and Automation AS CR, 1965 Institute of Mathematics of the Academy of Sciences of the Czech Republic provides access to digitized documents strictly for personal use. Each copy of any part of this document must contain these Terms of use. This paper has been digitized, optimized for electronic delivery and stamped with digital signature within the project DML-CZ: The Czech Digital Mathematics Library http://project.dml.cz

KYBERNETIKA ČfSLQ 2, RQČNtK 1/1965 A Note on the Structure of Certain Predicates Concerning the Sublanguages of ALGOL 60 JlRI KOPRIVA The paper only formalizes the results of Reference [1] and completes these results by some details. In [1] the struture of the particular languages Sec of ALGOL 60 generated by the various types of the metavariables a is described. Here, the results are formulated in the form of the predicates F x ( ) expressing the property f e Soc. It is shown how these predicates are formed from other predicates being more simple in a certain sense. It is established how many times one needs to apply the operations used in [1] in order that one may get a set containing the considered phrase I if F (S) is true. 1. In [2] and [3] the primitive recursiveness of the predicates Ea( ) is proved, where FjS,) denotes that the sequence, of the terminal symbols (letters of a finite terminal alphabet) is one of the "values" of the metavariable {auxiliary symbol) a in the sense of [4], Section 1.1. The values of the variables are constructed sequentially by the use of the metalinguistic formulae(syntactic definitions) which describe the syntax of an ALGOL - like language. In [2] and [3] certain formal restrictive conditions are given. These conditions are not fulfilled in [4]. Of course, these conditions are only formal and they do not change the structure of the generated sublanguages. We shall give small formal restrictions here, too. Let r be the set of all the metalinguistic variables of ALGOL 60 except the variables <any sequence not containing;>, <any sequence not containing end or; or else> and<code>. These variables are omitted from this set. Let T, be the set of all the basic symbols of ALGOL 60 except the symbol comment, which is omitted from it. On the contrary, the variable <code> may be joined to this set. In the sequel, the letters a, /? (also subscribted) denote the symbols from T = T u T t. The other Greek letters (also subscribted) denote the phrases formed from the elements in r (including the empty phrase). The metalinguistic formulae as (1) <empty> : : =

(cf. [4], 1.1) shorten the length of phrases they are applied to. In order that we may exclude this possibility we assume for the definition (1) to be eliminated. Of course, we must perform the corresponding changes in the syntax. Then the empty phrase cannot be a value of any variable. But the sets of the values of the most important metavariables of the language ALGOL 60 will remain unchanged. The detailed analysis of this matter is performed in [5], Section 2. We write a /? if there exists a metalinguistic formula of the form a :: = (pl3\jj (i.e., the definition not containing the symbol ). Every syntactic definition of ALGOL 60 consists of such elementary definitions. We write a ~ /? if either a = ft or there are a l5..., a p, j3 u...,,3 q such that a ; ^ a ;+1 for all 1 <. i < p and /? ; ^ fi i+1 for all 1 g i < q and a l = a = \3 q and tt p ft fi t. The relation ~ between variables is obviously an equivalence relation. Let _j,...,i m be all the equivalence classes of this equivalence relation. Let Ij for 1 <. j <. n denotes the set {a there are a 1,..., a p such that a ; t*> a ;+1 for all 1 <. i < p and a, ± e I,, a p = a}. It is possible to establish a simple order _",...., _, of all equivalence classes such that j Zj = l)z k for all j = 1,..., m. k=l The detailed description of these classes is given in [5]. In the sequel, the subscripts designate the mentioned order of the classes I t. For any set <J of phrases we put 4>* = (J <P k, where.! = <p and $ t + 1 = <p<p k f or k=l all k ^ 1 (cf. [1], p. 79). Let A a be the set of all cp's with the property a : : = cp. There are two types of variables a 6 T. a is of the type (i) if ;-i a e 11 => [_ j = {a} & [cp e _ _ cp e ( (J l J u T t)*]]. J = I a is of the type (ii) if [a e _,. & _ ; = {a x,..., a }] _. [n = 1 => (3(p) (3i//) (3co) [<p e A x & cp = i/raco]]. The type (ii) includes the types (ii), (iii), and (iv) from [1]. Let S a denote the set of all the values of the variable a, i.e., the set of all the phrases from T* such that they can be obtained from a by repeated application of suitable syntactic definitions. Let a be of the type (i) and let A x = {<p u..., cp r}, where Then we have obviously where Sj3 = {j8} for cpj = PJA... PJISJ for all 1 < j < r and flm e T. per,.*) Sa= [)%!.%,, j = i *) For any sets 0 and V 7 of phrases 9V denotes the concatenation of them., i.e., <t> l P = = {w <P 6 <p, v e y}.

Let a be of the type (ii). Then we get the representation as follows. Let us put A a = _«u A a, where q> e A' x a (3/?) (3i//) (_a>) [a ~ /1& <p = t///?co] a'id_^' = _ _j. We shall introduce some auxiliary operations. Let the considered variable a belong to the class _, = {a 1;..., a } and let <2>, f^,..., <P be any sets of phrases. Then [< ; <.5 l5..., _J = {< rvr V r 1<Pi>,- 2... "A/^r I <Po<*i t<pi<xi 2... a. r<p,-<and i// ;j. e 4> fj. for all 1 ^ j ^ r}, [...] 1 = [...], [...]*+' = [[...]*; _.,..., _J, [...]" = U [ ]* _ = i and further [<2>; $!,..., *J 0 = {(po^i^l^h ^i,<p. I <Po<*n<Pi<*i 2 <Xi r<p r > (2) where <p ; does not contain any a 7 for 1 _ / _ n, fl Js i _ r, and i// ;j. e # ;j for all 1 = jf <; r}. // 4>j= 0 for some j, 1 <.,/ g n,.hen.here is no phrase obtained by the operation (2) from a phrase q> e cp containing aj. For any variable a of the type (ii) we obtain Sa by replacing each symbol /? in each phrase from the set [[ ;_:.,...,-j-; _;,...,_;] 0 u_: by the set S/? and by the subsequent concatenation of S/J's. 2. Each of several first classes _ ; contains only one variable a (of the type (i)) swch that cos _ a => <pe r t. (There are only two classes containing more than one element. One of them contains the variable <expression> and further 25 variables. The second class of them contains the variable <statement> and further 13 variables.) // a is a variable belonging to some of these first classes one has obviously Such variables are e.g. <letter>, <logical value>, <relational operator> etc. Let now a be a variable of the type (i) such that there is a phrase <p e A a containing some metavariable. Then one has F x( ) s (3r) [1 g r ^ 5 & (p) [1 = p = r =>

The right side of each elementary syntactic definition of ALGOL 60 contains 5 symbols at most. The metavariables of the just described type are e.g. <formal parameter>, <procedure heading>, <assignment statement> and others. Let now a be of the type (ii) and let it belong to the class Z t = {a t,..., a }. Let l(q>) denote the length of the phrase (p, i.e., the number of symbols generating (p. One can establish by the detailed analysis of the syntactic definitions of ALGOL 60 that the following affirmation is true. Let the phrase cp contain one variable from the class E i at least. For the set l<p;a' xi,...,a'j" to contain all the phrases generated from (p and having the length l(<p) + 1 it is sufficient to take p = 12. If the class I, contains one element, i.e. I, i = {a}, then the application of any syntatic definition of the form a :: = a,, where a, e A' x, will lengthen the phrase q> immediatelly, because the syntax of ALGOL 60 does not contain the definition of the form a : : = a. If the class E t contains more than one element then the most unfavourable case gives the following sequence each member of which except the last represents the left side of the elementary definition with the right side formed by the following member: <actual parameter list>, <actual parameter>, <expression>, <Boolean expression>, <simple Boolean>, <implication>, <Boolean term>, <Boolean factor>, <Boolean secondary>, <Boolean primary>, <variable>, Subscripted variable>. The definition (only) of the last member contains four symbols on the right side. Let denote the phrase whose appurtenance to the set Sa ought to be investigated. The immediate consequence of the affirmation formulated above is following: the set Q 1 = la;a' Xi,...,A' Xn Y 2^-» contains all the phrases obtainable from a and having the positive length less or equal to /( ). By the help of the set Q t we shall now build the set Q 2 = IQ 1 ;A: I,...,A:J 0 VA:. Let Q be the set of the phrases from Q 2 having the length less or equal to l( ). Each symbol fi in each phrase from the set Q being replaced by the set SP and the necessary concatenations being performed we get a finite set of phrases which must contain the considered phrase, if FjS,) is true. We shall investigate the dependence of the predicate Fj( ) on the more simple predicates by the formalisation of the described process. A predicate F p ( ) is called more simple than the predicate Fj ) if j] belongs to the class preceding the class containing a. C 6 l<p; *i, -., * ] = (3r) [0 ^ r l(cp) & (3<p 0 ) (p) [1 p g r => <= (3g (3<p p ) (3^) [igi^n&^s$ p & 9 - <Po«h<PiX i2 *i r (pr& C = = (P0^1<Pl^2 <Ar<Pr]]],

Cefit Ce K;^,, -.., <J 12t ' (?)_1] = (3C (0) )[C (0) e j;&(i)[l ^ i ^ 12(/( ) - 1) 3 = (3C (i) ) [C (i) e [C (i_1) ; 4;.,..., 4J&C = c (12(,(?) -,)) ]]], CeO.Bf-10.;^..;], v Ce^ = a [(3a>) [to e fi. & C e [to; ^, -., AlJ\ & (i) [1 ^ i ^ n => lc = W-f]] vce^', Cei2sC6i2 2 &/(C)^/( ), F.( ) = (3C) [C e Q& (p) [1 ^ p g /(C) ^ - TO (-O [MO & c = /?!.. j8, (0 & c = &... *,«,]]] It follows from the written relations that the predicates F f {^p) are more simple than the predicate FjS.) (in the sense mentioned above). (Received July 19th, 1964.) REFERENCES [ 1 ] K. Čulík: Formal structure of ALGOL and simplification of its description. Symbolic languages in data processing (Roma 1962). Gordon-Breach, New York 1963, 75 82. [2] R. Péter: Primitiv rekursive Wortbeziehungen in der Programmierungssprache ALGOL 60". Magyar Tud. Akad. Mat. Kutató Int. Közl. 6 (1961), 137 144. [3] R. Péter: Über die Rekursivität der Begriffe der mathematischen Grammatiken. To appear in Publications of the Math. Inst. of the Hungarian Acad. of Sciences. [4] J. W. Backus et al.: Revised Report on the algorithmic language ALGOL 60. Numerische Mathematik 4 (1963), 420 453. [5] J. Kopřiva: Some notes on the formal structure of ALGOL 60. To appear in Publications of the University in Brno. Poznámka k struktuře určitých predikátů v podjazycích ALGOLu 60 JIŘÍ KOPŘIVA Pomocí symbolů a vztahů formální logiky je popsán postup sestrojení podjazyků Sa ALGOLu 60 příslušných k metaproměnným a různých typů. Základem jsou výsledky práce [1] ze seznamu literatury, které jsou zde doplněny několika detaily. Jedná se např. o stanovení toho, kolikrát je potřeba užít vytvářející operaci, abychom dostali takovou množinu frází, která obsahuje uvažovanou frázi C v případě, že C e Sx. Doc. Dr. Jiří Kopřiva, Csc, Laboratoř počítacích strojů, Třída obránců míru 21, Brno.