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.
It is important that practical data-flow analyzers are backed by reliably proven theoretical results. Abstract interpretation provides a sound mathematical framework and necessary generic properties for an abstract domain to be well-defined and sound with respect to the concrete semantics. In logic programming, the abstract domain Sharing is a standard choice for sharing analysis for both practical work and further theoretical study. In spite of this, we found that there were no satisfactory proofs for the key properties of commutativity and idempotence that are essential for Sharing to be well-defined and that published statements of the soundness of Sharing assume the occurs-check. This paper provides a generalization of the abstraction function for Sharing that can be applied to any language, with or without the occurs-check. Results for soundness, idempotence and commutativity for abstract unification using this abstraction function are proven.
Type classes are a novel combination of parametric polymorphism and constrained types. Although most implementations restrict type classes to be single-parameter, the generalization to multi-parameter type classes has gained increasing attention. A problem with multi-parameter type classes is the increased possibilities they introduce for ambiguity in inferred types, impacting their usefulness in many practical situations. A new type-checking strategy, domain-driven unifying resolution, is identified as an approach to solve these problems. Domain-driven unifying resolution is simple, efficient, and practically useful. However, even with severe restrictions on instance definitions, it is not possible to guarantee that type-checking with unifying resolution terminates. This is in contrast with the naive generalization of single parameter resolution strategies. Domain-driven unifying resolution is guaranteed to terminate if the type class constraints are satisfiable; however satisfiability is undecidable even with severe restrictions on instance definitions. These results shed some light on ambiguity problems with multi-parameter type classes.
DrScheme is a programming environment for Scheme. It fully integrates a graphics-enriched editor, a parser for multiple variants of Scheme, a functional read-eval-print loop, and an algebraic printer. The environment is especially useful for students, because it has a tower of syntactically restricted variants of Scheme that are designed to catch typical student mistakes and explain them in terms the students understand. The environment is also useful for professional programmers, due to its sophisticated programming tools, such as the static debugger, and its advanced language features, such as units and mixins. Beyond the ordinary programming environment tools, DrScheme provides an algebraic stepper, a context-sensitive syntax checker, and a static debugger. The stepper reduces Scheme programs to values, according to the reduction semantics of Scheme. It is useful for explaining the semantics of linguistic facilities and for studying the behavior of small programs. The syntax checker annotates programs with font and color changes based on the syntactic structure of the program. On demand, it draws arrows that point from bound to binding occurrences of identifiers. It also supports α-renaming. Finally, the static debugger provides a type inference system that explains specific inferences in terms of a value-flow graph, selectively overlaid on the program text.
We present CMS, a simple and powerful calculus of modules supporting mutual recursion and higher order features, which can be instantiated over an arbitrary core calculus satisfying standard assumptions. The calculus allows expression of a large variety of existing mechanisms for combining software components, including parameterized modules similar to ML functors, extension with overriding as in object-oriented programming, mixin modules and extra-linguistic mechanisms like those provided by a linker. Hence CMS can be used as a paradigmatic calculus for modular languages, in the same spirit the lambda calculus is used for functional programming. We first present an untyped version of the calculus and then a type system; we prove confluence, progress, and subject reduction properties. Then, we define a derived calculus of mixin modules directly in terms of CMS and show how to encode other primitive calculi into CMS (the lambda calculus and the Abadi-Cardelli object calculus). Finally, we consider the problem of introducing a subtype relation for module types.
In the preceding chapter we introduced the classes of primitive recursive and recursive functions. In this chapter we introduce the related notions of primitive recursive and recursive sets and relations, which help provide many more examples of primitive recursive and recursive functions. The basic notions are developed in section 7.1. Section 7.2 introduces the related notion of a semirecursive set or relation. The optional section 7.3 presents examples of recursive total functions that are not primitive recursive.
Recursive Relations
A set of, say, natural numbers is effectively decidable if there is an effective procedure that, applied to a natural number, in a finite amount of time gives the correct answer to the question whether it belongs to the set. Thus, representing the answer ‘yes’ by 1 and the answer ‘no’ by 0, a set is effectively decidable if and only if its characteristic function is effectively computable, where the characteristic function is the function that takes the value 1 for numbers in the set, and the value 0 for numbers not in the set. A set is called recursively decidable, or simply recursive for short, if its characteristic function is recursive, and is called primitive recursive if its characteristic function is primitive recursive. Since recursive functions are effectively computable, recursive sets are effectively decidable. Church's thesis, according to which all effectively computable functions are recursive, implies that all effectively decidable sets are recursive.
A model of a set of sentences is any interpretation in which all sentences in the set are true. Section 12.1 discusses the sizes of the models a set of sentences may have (where by the size of a model is meant the size of its domain) and the number of models of a given size a set of sentences may have, introducing in the latter connection the important notion of isomorphism. Section 12.2 is devoted to examples illustrating the theory, with most pertaining to the important notion of an equivalence relation. Section 12.3 includes the statement of two major theorems about models, the Löwenheim—Skolem (transfer) theorem and the (Tarski—Maltsev) compactness theorem, and begins to illustrate some of their implications. The proof of the compactness theorem will be postponed until the next chapter. The Löwenheim—Skolem theorem is a corollary of compactness (though it also admits of an independent proof, to be presented in a later chapter, along with some remarks on implications of the theorem that have sometimes been thought ‘paradoxical’).
The Size and Number of Models
By a model of a sentence or set of sentences we mean an interpretation in which the sentence, or every sentence in the set, comes out true. Thus Γ implies D if every model of Γ is a model of D, D is valid if every interpretation is a model of D, and Γ is unsatisfiable if no interpretation is a model of Γ.
A normal form theorem of the most basic type tells us that for every formula A there is a formula A* of some special syntactic form such that A and A* are logically equivalent. A normal form theorem for satisfiability tells us that for every set Γ of sentences there is a set Γ* of sentences of some special syntactic form such that Γ and Γ* are equivalent for satisfiability, meaning that one will be satisfiable if and only if the other is. In section 19.1 we establish the prenex normal form theorem, according to which every formula is logically equivalent to one with all quantifiers at the beginning, along with some related results. In section 19.2 we establish the Skolem normal form theorem, according to which every set of sentences is equivalent for satisfiability to a set of sentences with all quantifiers at the beginning and all quantifiers universal. We then use this result to give an alternative proof of the Löwenheim—Skolem theorem, which we follow with some remarks on implications of the theorem that have sometimes been thought ‘paradoxical’. In the optional section 19.3 we go on to sketch alternative proofs of the compactness and Gödel completeness theorems, using the Skolem normal form theorem and an auxiliary result known as Herbrand's theorem. In section 19.4 we establish that every set of sentences is equivalent for satisfiability to a set of sentences not containing identity, constants, or function symbols. Section 19.1 presupposes only Chapters 9 and 10, while the rest of the chapter presupposes also Chapter 12. […]
In the preceding chapter we connected our work on recursion with our work on formulas and proofs in one way, by showing that various functions associated with formulas and proofs are recursive. In this chapter we connect the two topics in the opposite way, by showing how we can ‘talk about’ recursive functions using formulas, and prove things about them in theories formulated in the language of arithmetic. In section 16.1 we show that for any recursive function f, we can find a formula φf such that for any natural numbers a and b, if f(a) = b then ∀y(φf(a, y) ↔ y = b) will be true in the standard interpretation of the language of arithmetic. In section 16.1 we strengthen this result, by introducing a theory Q of minimal arithmetic, and showing that for any recursive function f, we can find a formula ψf such that for any natural numbers a and b, if f (a) = b then ∀y(ψf (a, y) ↔ y = b) will be not merely true, but provable in Q. In section 16.2 we briefly introduce a stronger theory P of Peano arithmetics, which includes axioms of mathematical induction, and explain how these axioms enable us to prove results not obtainable in Q. The brief, optional section 16.3 is an appendix for readers interested in comparing our treatment of these matters here with other treatments in the literature.
By a model of (true) arithmetic is meant any model of the set of all sentences of the language L of arithmetic that are true in the standard interpretation N. By a nonstandard model is meant one that is not isomorphic to N. The proof of the existence of an (enumerable) nonstandard model of arithmetic is as an easy application of the compactness theorem (and the Löwenheim—Skolem theorem). Every enumerable nonstandard model is isomorphic to a nonstandard model ℳ whose domain is the same as that of N, namely, the set of natural numbers; though of course such an ℳ cannot assign the same denotations as N to the nonlogical symbols of L. In section 25.1 we analyze the structure of the order relation in such a nonstandard model. A consequence of this analysis is that, though the order relation cannot be the standard one, it at least can be a recursive relation. By contrast, Tennenbaum's theorem tells us that it cannot happen that the addition and multiplication relations are recursive. This theorem and related results will be taken up in section 25.2. Section 25.3 is a sort of appendix (independent of the other sections, but alluding to results from several earlier chapters) concerning nonstandard models of an expansion of arithmetic called analysis.
Order in Nonstandard Models
Let ℳ be a model of (true) arithmetic not isomorphic to the standard model N.
The original authors of this work, the late George Boolos and my late colleague Richard Jeffrey, stated in the preface to the first edition that the work was intended for students of philosophy, mathematics, and other fields who desired a more advanced knowledge of logic than is supplied by an introductory course or textbook on the subject, and added the following:
The aim has been to present the principal fundamental theoretical results about logic, and to cover certain other meta-logical results whose proofs are not easily obtainable elsewhere. We have tried to make the exposition as readable as was compatible with the presentation of complete proofs, to use the most elegant proofs we knew of, to employ standard notation, and to reduce hair (as it is technically known).
Such have remained the aims of all subsequent editions, including the present one.
The ‘principal fundamental theoretical results about logic’ are primarily the theorems of Gödel—the completeness theorem and especially the incompleteness theorems—with their attendant lemmas and corollaries. The ‘other meta-logical results’ included have been of two kinds. On the one hand, filling roughly the first third of the book, there is an extended exposition by R.C.J. of the theory of Turing machines, a topic frequently alluded to in the literature of philosophy, computer science, and cognitive studies, but often omitted in textbooks on the level of this one.