Read e-book online ALGOL-like Languages PDF

By Peter W. O’Hearn, Robert D. Tennent

ISBN-10: 147573851X

ISBN-13: 9781475738513

ISBN-10: 1475738536

ISBN-13: 9781475738537

To build a compiler for a latest higher-level programming languagel one must constitution the interpretation to a machine-like intermediate language in a manner that displays the semantics of the language. little is expounded approximately such struc­ turing in compiler texts which are meant to hide a wide selection of software­ ming languages. extra is related within the Iiterature on semantics-directed compiler development [1] yet the following too the perspective is particularly common (though constrained to at least one languages with a finite variety of syntactic types). at the different handl there's a significant physique of labor utilizing the continuation-passing transformation to constitution compilers for the explicit case of call-by-value languages resembling SCHEME and ML [21 3]. ln this paperl we are going to describe a style of structuring the interpretation of ALGOL-like languages that's in keeping with the functor-category semantics devel­ oped through Reynolds [4] and Oles [51 6]. another procedure utilizing type concept to constitution compilers is the early paintings of F. L. Morris [7]1 which anticipates our remedy of boolean expressionsl yet doesn't take care of systems. 2 kinds and Syntax An ALGOL-like language is a typed lambda calculus with an strange repertoire of primitive varieties. all through such a lot of this paper we imagine that the primi­ tive forms are comm(and) int(eger)exp(ression) int(eger)acc(eptor) int(eger)var(iable) I and that the set eight of varieties is the least set containing those primitive kinds and closed lower than the binary operation -.

Show description

Read or Download ALGOL-like Languages PDF

Best programming: programming languages books

Download e-book for iPad: Professionell entwickeln mit Visual C# 2010 by Matthias Geirhos

Эта энциклопедия будет интересна в первую очередь современным охотникам, любителям стрельбы по тарелочкам и коллекционерам. Написанная специалистом по оружию, она может служить справочным пособием для всех любителей охотничьего оружия.

Additional resources for ALGOL-like Languages

Sample text

We will return to this problern in Section 6. 2 Syntax The type structure for the language to be considered is given in Table I. For simplicity, we have avoided coercions and conventional variables (but have retained acceptors, which are the "updating" components of variables; see (Reynolds, 1980, Reynolds, 1981b). lnformally, a data type T (such as Boolean or integer) denotes a set [ T] of values appropriate for some acceptor or expression, whereas a phrase type )' denotes a set or poset [y] of meanings appropriate for some kind of phrase.

Let v, = [P,]Xu(f,Q; g,R)zo for i = 1,2. By the assumption about P1, if [C]X u(f, Q; g,R)zo is defined, it is equal to to [C]X u(f, Q; g,R; fZt>zo E Z1o where Z1 = {z1 e z I [PdX u(f, Q; g,R)zl = vt} , Robert D. _ E] l ·-T _ { [A]xufv(idy)Yo. YI E S(y), if [P]xufyo and [C]xufyo = Yl then [Q]xufyl [C#P]xuf = for all g:y- z and v E {true,false}, S

The context switch causes the register SR to increase by an amount ö that is the current frame displacement at the time of the call. srr The new frame contains two words: the lower word points to the global frame Iist, while the upper word points to a call block, which in turn contains the argument Iist and the quantity ö. The latter is the distance between the base of the frame pointing to the call block and the old frame Iist, which is in turn the global frame Iist to be used when calling the arguments.

Download PDF sample

ALGOL-like Languages by Peter W. O’Hearn, Robert D. Tennent


by Paul
4.4

Rated 4.94 of 5 – based on 8 votes