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

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

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 large choice of application­ ming languages. extra is related within the Iiterature on semantics-directed compiler building [1] yet right here too the point of view is particularly common (though restricted 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 comparable to 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 according to the functor-category semantics devel­ oped via 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 therapy of boolean expressionsl yet doesn't care for techniques. 2 forms and Syntax An ALGOL-like language is a typed lambda calculus with an strange repertoire of primitive forms. all through such a lot of this paper we think that the primi­ tive kinds 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 lower than the binary operation -.

Show description

Read or Download ALGOL-like Languages PDF

Similar programming: programming languages books

Oracle InterMedia Java Classes. User's Guide and Reference

This consultant describes find out how to use Oracle interMedia Java periods. This advisor is for builders or database directors who're drawn to storing, retrieving, and manipulating multimedia info in an Oracle database, together with builders of multimedia specialization purposes. clients of this consultant must have adventure with Java and JDBC.

Developing Applications with Java(TM) and UML

Constructing functions with Java™ and UML specializes in the craft of making caliber Java software program. The ebook introduces the basics of the Unified Modeling Language (UML) and demonstrates the right way to use this common object-oriented notation to construct extra powerful Java functions that satisfy clients' requisites and stand the attempt of time.

Extra info for ALGOL-like Languages

Example text

The second deficiency is that Section 11 of (Reynolds, 1982) proposes two axioms, Strong Constancy and Leftside Non-interference Composition, which are intuitively true and seem to be very desirable or essential for verifying certain kinds of programs, yet which are shown there to be invalid relative to the interpretation in (Reynolds, 1981a). This paper describes a new approach to capturing the intended interpretation of specification logic. We now give an informal (and simplified) presentation of the model.

Thus in the n = 0 case, even a command is implemented by a subroutine accepting a "return address" argument of simple type compl. However, such an argument, or any other subroutine of simple type compl, accepts no arguments. Calling a subroutine is a more complex operation than merely jumping to an instruction sequence, since it may be necessary to switch context from a ]ohn C. Reynolds 29 frame Iist appropriate to the calling program to a frame Iist appropriate to the subroutine, and since arguments may be passed by placing them in a vector accessible from the new frame Iist.

Reprinted with the permission of Academic Press. P. W. O’Hearn et al. ), Algol -like Languages © Springer Science+Business Media New York 1997 42 Chapter 13. Semantical Analysis of Specification Logic Specification logic is essentially a many-sorted first-order theory, with Hoare triples as atmnic formulas, and conventional logical connectives, such as conjunction, implication, and quantification. There are some additional atomic formulas to permit expression of certain kinds of assumptions about free identifiers, such as non-inter(erence.

Download PDF sample

Rated 4.83 of 5 – based on 47 votes