43 research outputs found
Continuation semantics for PROLOG with cut
We present a denotational continuation semantics for PROLOG with cut. First a uniform language B is studied, which captures the control flow aspects of PROLOG. The denotational semantics for B is proven equivalent to a transition system based operational semantics.
The congruence proof relies on the representation of the operational semantics as a chain
of approximations and on a convenient induction principle. Finally, we interpret the abstract language B such that we obtain equivalent denotational and operational models for
PROLOG itself
Dynamically typed languages
Dynamically typed languages such as Python and Ruby have experienced a rapid grown in popularity in recent times. However, there is much confusion as to what makes these languages interesting relative to statically typed languages, and little knowledge of their rich history. In this chapter I explore the general topic of dynamically typed languages, how they differ from statically typed languages, their history, and their defining features
Theory and practice in the construction of efficient interpreters
Various characteristics of a programming language, or of the hardware on which it is to be
implemented, may make interpretation a more attractive implementation technique than compilation
into machine instructions. Many interpretive techniques can be employed; this thesis is mainly
concerned with an efficient and flexible technique using a form of interpretive code known as
indirect threaded code (ITC). An extended example of its use is given by the Setl-s implementation
of Setl, a programming language based on mathematical set theory. The ITC format, in which pointers
to system routines are embedded in the code, is described and its extension to cope with
polymorphic operators. The operand formats and some of the system routines are described in detail
to illustrate the effect of the language design on the interpreter.
Setl must be compiled into indirect threaded code and its elaborate syntax demands the use of a
sophisticated parser. In Setl-s an LR(1) parser is implemented as a data structure which is
interpreted in a way resembling that in which ITC is interpreted at runtime. Qualitative and
quantitative aspects of the compiler, interpreter and system as a whole are discussed.
The semantics of a language can be defined mathematically using denotational semantics. By setting
up a suitable domain structure, it is possible to devise a semantic definition which embodies the
essential features of ITC. This definition can be related, on the one hand to the standard
semantics of the language, and on the other to its implementation as an ITC-based interpreter. This
is done for a simple language known as X10. Finally, an indication is given of how this approach
could be extended to describe Setl-s, and of the insight gained from such a description. Some
possible applications of the theoretical analysis in the building of ITC-based interpreters are
suggested
Dynamically typed languages.
Dynamically typed languages such as Python and Ruby have experienced a rapid grown in popularity in recent times. However, there is much confusion as to what makes these languages interesting relative to statically typed languages, and little knowledge of their rich history. In this chapter I explore the general topic of dynamically typed languages, how they differ from statically typed languages, their history, and their defining features
Recommended from our members
The distributed computer system
This thesis was submitted for the degree of Doctor of Philosophy and awarded by Brunel University
Recommended from our members
Type checking and parameterized types
A method for implementing parameterized types is given. Two simplifying restrictions are assumed: types are only parameterized with other types, and assignment is like that of SNOBOL, CLU, and Smalltalk. An algorithm for type checking that handles parameterized types and overloading is presented