ALGOL-like Languages by Peter W. O’Hearn, Robert D. Tennent 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 contemporary higher-level programming languagel one must constitution the interpretation to a machine-like intermediate language in a fashion that displays the semantics of the language. little is expounded approximately such struc­ turing in compiler texts which are meant to hide a large choice of software­ ming languages. extra is related within the Iiterature on semantics-directed compiler building [1] yet right here too the perspective is especially 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 categorical case of call-by-value languages resembling SCHEME and ML [21 3]. ln this paperl we are going to describe a mode of structuring the interpretation of ALGOL-like languages that's in line with the functor-category semantics devel­ oped by way of Reynolds [4] and Oles [51 6]. an alternate strategy 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 tactics. 2 forms and Syntax An ALGOL-like language is a typed lambda calculus with an strange repertoire of primitive forms. all through so much of this paper we imagine that the primi­ tive varieties are comm(and) int(eger)exp(ression) int(eger)acc(eptor) int(eger)var(iable) I and that the set eight of sorts is the least set containing those primitive varieties and closed below the binary operation -.

Show description

Read Online or Download ALGOL-like Languages PDF

Similar programming: programming languages books

Read e-book online Framework Design Guidelines: Conventions, Idioms, and PDF

;Framework layout instructions: Conventions, Idioms, and styles for Reusable . web Libraries moment variation КНИГИ ; ОС и БД Название: Framework layout directions: Conventions, Idioms, and styles for Reusable . web Libraries moment version Автор: Krzysztof Cwalina, Brad Abrams Издательство: Addison-Wesley expert Год: 2008 Формат: PDF Размер: 39.

Additional info for ALGOL-like Languages

Example text

F_:x_----'y'-)-..... G(y) F(g,y-z)l F(z) IG(g,y-z) m(f;g:x- z) G(z) is required whenever the partial function at the bottom gives a defined result. We define the morphism part to yield covariant functors; for example, (F - G)(f) (m E (F - G)(x)) = m(f; g). These constructions will be used to construct meaning functors [ y] for the phrase types y of our language from the following "primitive" functors, where X is now the category of possible worlds defined in Section 3: (i) S is the contravariant functor from X to D defined as follows: for any X-object X, S(X) = X, discretely-ordered, and, for any X-morphism f,Q:X- Y, S(f, Q) is the function f E Y - X.

It is interpreted here as an intuitionistic theory, using a form of possible-world semantics first applied to programming-language interpretation by Reynolds and F. J. Oles to give an abstract treatment of stack-oriented storage management. The model provides a satisfactory solution to all previously-known problems with the interpretation of specification logic; however, unexpected new problems have been discovered in doing this work, and these remain unsolved. Contents 1 2 3 4 5 6 7 Introduction Syntax Possible Worlds Semantic-domain Functors Semantic Valuations Formal System and Soundness Concluding Remarks Appendix Acknowledgements References 41 44 47 48 53 58 60 61 62 62 1 Inttoduction In the beginning, C.

For products, the morphism parts are defined componentwise: (F xx G) (S s S') (a, e) = (F(S s S')a, G(S s S')e) . Similarly, the morphism parts of the meanings of type assignments, which are products of meanings of types over sets of identifiers, are also defined componentwise: [rr]*(S s S')I1L = [TTL](S s S')(17t). 10 Boolean Expressionsand Conditionals It would be Straightforward to translate boolean expressions in the same manner as integer expressions. However, it is more interesting, and in most cases more efficient, to provide a "control-flow" translation, in which boolean expressions are compiled into trees of branch instructions.

Download PDF sample

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


by Kevin
4.1

Rated 4.41 of 5 – based on 25 votes