To save content items to your account,
please confirm that you agree to abide by our usage policies.
If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account.
Find out more about saving content to .
To save content items to your Kindle, first ensure no-reply@cambridge.org
is added to your Approved Personal Document E-mail List under your Personal Document Settings
on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part
of your Kindle email address below.
Find out more about saving to your Kindle.
Note you can select to save to either the @free.kindle.com or @kindle.com variations.
‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi.
‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.
Topology, or the theory of topological spaces, is a thoroughly developed and established branch of mathematics. Its concepts and results are used in almost all areas. In the introduction to his famous treatise General Topology (Kelley [1955]), Kelley states that he almost labelled it: “What every young analyst should know”. In fact, topology is useful in many areas not apparently related to analysis, such as logic and program semantics. As we shall see, Scott–Ershov domains viewed as topological spaces look quite different from the space of, say, real numbers.
The raison d'être of topological spaces is that the continuous functions live on them, that is continuity is a topological concept. More precisely, the topologies on spaces X and Y determine the continuous functions from X into Y. Conversely, given a class of functions from a set X into a set Y we may want to find topologies on X and on Y so that the functions that are continuous with respect to these make up the given class of functions. For example, we have already decided for good reasons which functions between domains are to be continuous. Scott has found a topology on domains for these functions, appropriately called the Scott topology. Ershov's concept of a domain was actually formalized as a topological notion, that is, a domain or, in his terminology, an f0-space is a topological space with certain strong properties (see Exercise 10.7.4).
Power domains were introduced by Plotkin [1976] in order to give a semantics for non-deterministic or parallel programs. Assume that each run or possible outcome of a class of non-deterministic programs has an interpretation in a fixed domain D. Then an interpretation of a non-deterministic program in this class would be the set of interpretations of all possible outcomes of the program. Thus an appropriate domain to interpret this class of non-deterministic programs should be something analogous to the power set of D, let us call it a power domain of D. In this chapter we shall introduce three concepts of power domains, due to Smyth [1978], Hoare and Plotkin [1976], respectively. It turns out that Scott–Ershov domains are closed under Smyth's and Hoare's power domain operations but unfortunately not under Plotkin's. The class of countably based algebraic cpo's (we call these quasidomains) is closed under Plotkin's power domain construction. However, as we observed in Chapter 3, this class is not satisfactory for semantics, since it is not closed under the formation of function space. Therefore we introduce the class of SFP-objects, a subclass of the quasidomains, which is closed under all three power domain constructions as well as under the formation of function space. In fact the category of SFP-objects is the largest full subcategory of the category of quasidomains which is cartesian closed. Thus every countably based Scott–Ershov domain is an SFP-object but there are SFP-objects that are not domains.
In this chapter we investigate some ways domains can be used in order to study other mathematical structures of interest. In Sections 8.1 and 8.2 we consider ultrametric spaces and algebras and show how these can be topologically embedded into domains in a simple way. In Section 8.3 we consider the problem of abstracting the “total” elements of a domain from the partial ones. Then, in Section 8.4, this is used to show how the Kleene–Kreisel continuous functionals are represented in the partial continuous functionals.
Section 8.1 Metric and Ultrametric Spaces
In a general topological space, open sets are used to separate points or sets of points from each other. In many concrete spaces of interest one can do much more in that there is a natural function or metric which to each pair of points assigns a distance between the points, a non-negative real number. It was Fréchet [1906] who abstracted the properties needed from natural metrics on concrete spaces, such as the Euclidean spaces, in order to develop an abstract theory of metric spaces. Chronologically, the theory of metric spaces preceded the general theory of topological spaces introduced by Hausdorff, so that the abstraction to metric spaces was a first important step in obtaining general topological spaces. On the other hand, the metric spaces form an important subclass of the topological spaces.
Metric spaces have been used with success by several authors in order to give semantics for certain programming language constructs.
The λ-calculus was originally introduced as a tool for the study of functionality and higher order logic. Later it was shown that the number-theoretic functions representable in the λ-calculus were precisely those represented in radically different approaches to the notion of computability such as Turing machines or the schemes defining the partial recursive functions we have seen previously. Thus as a tool for studying computability, the λ-calculus is completely general. It also inspired early work on the programming language LISP and can itself be viewed as a high level programming language. Though entirely too cumbersome for everyday programming needs there are well known methods for representing programs, written in standard imperative programming languages like FORTRAN, as λ-terms (see Tennant [1981]). One reason for doing so is in order to understand these programs as functions in the standard mathematical sense of the word. Once these terms are then modelled or interpreted in a mathematical structure like a Scott–Ershov domain one can claim to have understood them in terms of the functions they are names for or denote, hence the terminology denotational semantics. Although the study of the denotational semantics for programming languages falls outside the scope of this book, we will summarize in this chapter the results showing that the λ-calculus itself can be modelled using domains. In doing so we hope that we will have provided at least the basic material needed to make the transition from the mathematical theory of domains to the topic of program semantics.
In section two of chapter three we proved a representation theorem stating that a domain D is, up to isomorphism, the ideal completion of its compact elements, Dc. An ordered set having the properties derivable for Dc was christened a cusl or conditional upper semilattice with least element. It turns out that a somewhat weaker version of cusl's, namely precusVs, serves just as well as a representation of domains and is better suited for the purposes of the last section of this chapter, which deals with solutions of domain equations to identity. In this chapter we sketch, without detailed proof, the basic results known on the representation of domains in this sense.
We begin with two additional representations of domains, information systems and formal spaces. Both have their origins in the works of D. S. Scott, Scott [1982] and [1982a], where the latter were presented in a less general form as neighbourhood systems. The versions presented here differ at some points from those of Scott for reasons to be explained later. Each of these three representations has its own particular point of departure. Cusl's and precusl's, by virtue of their emphasis on an ordering, give an algebraic representation. Information systems, based upon a relation of entailment, give a logical representation in analogy with the corresponding notion in formal logical systems. Finally, formal spaces, through their emphasis upon a relation of (formal) inclusion between neighbourhoods, provide a topological representation.
A domain is a structure modelling the notion of approximation and of computation. A computation performed using an algorithm proceeds in discrete steps. After each step there is more information available about the result of the computation. In this way the result obtained after each step can be seen as an approximation of the final result. This final result may be reached after finitely many steps as, for example, when computing the greatest common divisor of two positive integers using the Euclidean algorithm. However, it may also be the case that a computation never stops, in which case the final result is the sequence of approximations obtained from each step in the computation. The latter situation occurs by necessity when computing on infinite objects such as real numbers. Thus an appropriate model of approximation can provide a good model of computation.
To be somewhat more technically precise, a domain is a structure having one binary relation ⊑, a partial order, with the intended meaning that x ⊑y just in case x is an approximation of y or y contains at least as much information as x. We also require that a domain should include a least element modelling no information. This is not necessary, but is useful for establishing the existence of fixed points. To model infinite computations we require a domain to be complete in the sense that each increasing sequence of approximations should be represented by an element in the domain, that is, should have a supremum.
The class of partial recursive functions is the mathematical abstraction of the class of partial functions computable by an algorithm. In this chapter we present them in the form of the μ-recursive functions. We then state some basic results, the main motivation being to set the stage for the theory of effective domains. Finally we show that the partial μ-recursive functions can be obtained from some simple initial functions using substitution and the fixed point theorem for computable functional. This illuminates the central role of taking fixed points and supports the claim of Chapter 1 that the function computed by an algorithm or a program is the least fixed point of a computable functional.
Section 9.1 Partial Recursive Functions
An algorithm for a class K of problems is a method or procedure which can be described in a finite way (a finite set of instructions) and which can be followed by someone or something to yield a computation solving each problem in K. The computation should proceed in discrete steps. For a given problem in K the procedure should say exactly how to perform each step in the computation. After performing a step, the procedure should prescribe how to do the next step. This next step must only depend on the problem and on the then existing situation, that is what has been done during previous steps.