Download the Full Version of textbook for Fast Typing at textbookfull.
com
Practical Foundations For Programming Languages
2nd Edition Robert Harper
https://textbookfull.com/product/practical-foundations-for-
programming-languages-2nd-edition-robert-harper/
OR CLICK BUTTON
DOWNLOAD NOW
Download More textbook Instantly Today - Get Yours Now at textbookfull.com
Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.
Foundations of Programming Languages Second Edition Lee
https://textbookfull.com/product/foundations-of-programming-languages-
second-edition-lee/
textboxfull.com
Foundations of Programming Languages Kent D. Lee
https://textbookfull.com/product/foundations-of-programming-languages-
kent-d-lee/
textboxfull.com
Concepts of Programming Languages Global Edition Robert W.
Sebesta [Sebesta R.W.]
https://textbookfull.com/product/concepts-of-programming-languages-
global-edition-robert-w-sebesta-sebesta-r-w/
textboxfull.com
Concepts of programming languages Twelfth Edition Sebesta
https://textbookfull.com/product/concepts-of-programming-languages-
twelfth-edition-sebesta/
textboxfull.com
Concepts of programming languages 11th Edition Sebesta
https://textbookfull.com/product/concepts-of-programming-
languages-11th-edition-sebesta/
textboxfull.com
Programming Languages and Systems Amal Ahmed
https://textbookfull.com/product/programming-languages-and-systems-
amal-ahmed/
textboxfull.com
Understanding Programming Languages 1st Edition Cliff B.
Jones
https://textbookfull.com/product/understanding-programming-
languages-1st-edition-cliff-b-jones/
textboxfull.com
Programming Languages and Systems 1st Edition Nobuko
Yoshida
https://textbookfull.com/product/programming-languages-and-
systems-1st-edition-nobuko-yoshida/
textboxfull.com
Foundations of Psychological Testing A Practical Approach
6th Edition Leslie A Miller Robert L Lovler
https://textbookfull.com/product/foundations-of-psychological-testing-
a-practical-approach-6th-edition-leslie-a-miller-robert-l-lovler/
textboxfull.com
Practical Foundations for Programming Languages
This text develops a comprehensive theory of programming languages based on type sys-
tems and structural operational semantics. Language concepts are precisely defined by their
static and dynamic semantics, presenting the essential tools both intuitively and rigorously
while relying on only elementary mathematics. These tools are used to analyze and prove
properties of languages and provide the framework for combining and comparing language
features. The broad range of concepts includes fundamental data types such as sums and
products, polymorphic and abstract types, dynamic typing, dynamic dispatch, subtyping
and refinement types, symbols and dynamic classification, parallelism and cost semantics,
and concurrency and distribution. The methods are directly applicable to language imple-
mentation, to the development of logics for reasoning about programs, and to the formal
verification language properties such as type safety.
This thoroughly revised second edition includes exercises at the end of nearly every
chapter and a new chapter on type refinements.
Robert Harper is a professor in the Computer Science Department at Carnegie Mellon
University. His main research interest is in the application of type theory to the design
and implementation of programming languages and to the mechanization of their meta-
theory. Harper is a recipient of the Allen Newell Medal for Research Excellence and the
Herbert A. Simon Award for Teaching Excellence, and is an Association for Computing
Machinery Fellow.
Practical Foundations for
Programming Languages
Second Edition
Robert Harper
Carnegie Mellon University
32 Avenue of the Americas, New York, NY 10013
Cambridge University Press is part of the University of Cambridge.
It furthers the University’s mission by disseminating knowledge in the pursuit of
education, learning, and research at the highest international levels of excellence.
www.cambridge.org
Information on this title: www.cambridge.org/9781107150300
© Robert Harper 2016
This publication is in copyright. Subject to statutory exception
and to the provisions of relevant collective licensing agreements,
no reproduction of any part may take place without the written
permission of Cambridge University Press.
First published 2016
Printed in the United States of America
A catalog record for this publication is available from the British Library.
Library of Congress Cataloging in Publication Data
Names: Harper, Robert, 1957–
Title: Practical foundations for programming languages / Robert Harper,
Carnegie Mellon University.
Description: Second edition. | New York NY : Cambridge University Press,
2016. | Includes bibliographical references and index.
Identifiers: LCCN 2015045380 | ISBN 9781107150300 (alk. paper)
Subjects: LCSH: Programming languages (Electronic computers)
Classification: LCC QA76.7 .H377 2016 | DDC 005.13–dc23
LC record available at http://lccn.loc.gov/2015045380
ISBN 978-1-107-15030-0 Hardback
Cambridge University Press has no responsibility for the persistence or accuracy of
URLs for external or third-party Internet Web sites referred to in this publication
and does not guarantee that any content on such Web sites is, or will remain,
accurate or appropriate.
Contents
Preface to the Second Edition page xv
Preface to the First Edition xvii
Part I Judgments and Rules
1 Abstract Syntax 3
1.1 Abstract Syntax Trees 3
1.2 Abstract Binding Trees 6
1.3 Notes 10
2 Inductive Definitions 12
2.1 Judgments 12
2.2 Inference Rules 12
2.3 Derivations 14
2.4 Rule Induction 15
2.5 Iterated and Simultaneous Inductive Definitions 17
2.6 Defining Functions by Rules 18
2.7 Notes 19
3 Hypothetical and General Judgments 21
3.1 Hypothetical Judgments 21
3.2 Hypothetical Inductive Definitions 24
3.3 General Judgments 26
3.4 Generic Inductive Definitions 27
3.5 Notes 28
Part II Statics and Dynamics
4 Statics 33
4.1 Syntax 33
4.2 Type System 34
4.3 Structural Properties 35
4.4 Notes 37
vi Contents
5 Dynamics 39
5.1 Transition Systems 39
5.2 Structural Dynamics 40
5.3 Contextual Dynamics 42
5.4 Equational Dynamics 44
5.5 Notes 46
6 Type Safety 48
6.1 Preservation 48
6.2 Progress 49
6.3 Run-Time Errors 50
6.4 Notes 52
7 Evaluation Dynamics 53
7.1 Evaluation Dynamics 53
7.2 Relating Structural and Evaluation Dynamics 54
7.3 Type Safety, Revisited 55
7.4 Cost Dynamics 56
7.5 Notes 57
Part III Total Functions
8 Function Definitions and Values 61
8.1 First-Order Functions 61
8.2 Higher-Order Functions 62
8.3 Evaluation Dynamics and Definitional Equality 65
8.4 Dynamic Scope 66
8.5 Notes 67
9 System T of Higher-Order Recursion 69
9.1 Statics 69
9.2 Dynamics 70
9.3 Definability 71
9.4 Undefinability 73
9.5 Notes 75
Part IV Finite Data Types
10 Product Types 79
10.1 Nullary and Binary Products 79
10.2 Finite Products 81
10.3 Primitive Mutual Recursion 82
10.4 Notes 83
vii Contents
11 Sum Types 85
11.1 Nullary and Binary Sums 85
11.2 Finite Sums 86
11.3 Applications of Sum Types 88
11.4 Notes 91
Part V Types and Propositions
12 Constructive Logic 95
12.1 Constructive Semantics 95
12.2 Constructive Logic 96
12.3 Proof Dynamics 100
12.4 Propositions as Types 101
12.5 Notes 101
13 Classical Logic 104
13.1 Classical Logic 105
13.2 Deriving Elimination Forms 109
13.3 Proof Dynamics 110
13.4 Law of the Excluded Middle 111
13.5 The Double-Negation Translation 113
13.6 Notes 114
Part VI Infinite Data Types
14 Generic Programming 119
14.1 Introduction 119
14.2 Polynomial Type Operators 119
14.3 Positive Type Operators 122
14.4 Notes 123
15 Inductive and Coinductive Types 125
15.1 Motivating Examples 125
15.2 Statics 128
15.3 Dynamics 130
15.4 Solving Type Equations 131
15.5 Notes 132
Part VII Variable Types
16 System F of Polymorphic Types 137
16.1 Polymorphic Abstraction 137
16.2 Polymorphic Definability 140
16.3 Parametricity Overview 142
16.4 Notes 144
viii Contents
17 Abstract Types 146
17.1 Existential Types 146
17.2 Data Abstraction 149
17.3 Definability of Existential Types 150
17.4 Representation Independence 151
17.5 Notes 153
18 Higher Kinds 154
18.1 Constructors and Kinds 155
18.2 Constructor Equality 156
18.3 Expressions and Types 157
18.4 Notes 158
Part VIII Partiality and Recursive Types
19 System PCF of Recursive Functions 161
19.1 Statics 162
19.2 Dynamics 163
19.3 Definability 165
19.4 Finite and Infinite Data Structures 167
19.5 Totality and Partiality 167
19.6 Notes 169
20 System FPC of Recursive Types 171
20.1 Solving Type Equations 171
20.2 Inductive and Coinductive Types 172
20.3 Self-Reference 174
20.4 The Origin of State 176
20.5 Notes 177
Part IX Dynamic Types
21 The Untyped λ-Calculus 181
21.1 The λ-Calculus 181
21.2 Definability 182
21.3 Scott’s Theorem 184
21.4 Untyped Means Uni-Typed 186
21.5 Notes 187
22 Dynamic Typing 189
22.1 Dynamically Typed PCF 189
22.2 Variations and Extensions 192
22.3 Critique of Dynamic Typing 194
22.4 Notes 195
ix Contents
23 Hybrid Typing 198
23.1 A Hybrid Language 198
23.2 Dynamic as Static Typing 200
23.3 Optimization of Dynamic Typing 201
23.4 Static versus Dynamic Typing 203
23.5 Notes 204
Part X Subtyping
24 Structural Subtyping 207
24.1 Subsumption 207
24.2 Varieties of Subtyping 208
24.3 Variance 211
24.4 Dynamics and Safety 215
24.5 Notes 216
25 Behavioral Typing 219
25.1 Statics 220
25.2 Boolean Blindness 226
25.3 Refinement Safety 228
25.4 Notes 229
Part XI Dynamic Dispatch
26 Classes and Methods 235
26.1 The Dispatch Matrix 235
26.2 Class-Based Organization 238
26.3 Method-Based Organization 239
26.4 Self-Reference 240
26.5 Notes 242
27 Inheritance 245
27.1 Class and Method Extension 245
27.2 Class-Based Inheritance 246
27.3 Method-Based Inheritance 248
27.4 Notes 249
Part XII Control Flow
28 Control Stacks 253
28.1 Machine Definition 253
28.2 Safety 255
28.3 Correctness of the K Machine 256
28.4 Notes 259
x Contents
29 Exceptions 260
29.1 Failures 260
29.2 Exceptions 262
29.3 Exception Values 263
29.4 Notes 264
30 Continuations 266
30.1 Overview 266
30.2 Continuation Dynamics 268
30.3 Coroutines from Continuations 269
30.4 Notes 272
Part XIII Symbolic Data
31 Symbols 277
31.1 Symbol Declaration 277
31.2 Symbol References 280
31.3 Notes 282
32 Fluid Binding 284
32.1 Statics 284
32.2 Dynamics 285
32.3 Type Safety 286
32.4 Some Subtleties 287
32.5 Fluid References 288
32.6 Notes 289
33 Dynamic Classification 291
33.1 Dynamic Classes 291
33.2 Class References 293
33.3 Definability of Dynamic Classes 294
33.4 Applications of Dynamic Classification 295
33.5 Notes 296
Part XIV Mutable State
34 Modernized Algol 301
34.1 Basic Commands 301
34.2 Some Programming Idioms 306
34.3 Typed Commands and Typed Assignables 307
34.4 Notes 310
35 Assignable References 313
35.1 Capabilities 313
35.2 Scoped Assignables 314
xi Contents
35.3 Free Assignables 316
35.4 Safety 318
35.5 Benign Effects 320
35.6 Notes 321
36 Lazy Evaluation 323
36.1 PCF By-Need 323
36.2 Safety of PCF By-Need 326
36.3 FPC By-Need 328
36.4 Suspension Types 329
36.5 Notes 331
Part XV Parallelism
37 Nested Parallelism 335
37.1 Binary Fork-Join 335
37.2 Cost Dynamics 338
37.3 Multiple Fork-Join 341
37.4 Bounded Implementations 342
37.5 Scheduling 346
37.6 Notes 348
38 Futures and Speculations 350
38.1 Futures 350
38.2 Speculations 351
38.3 Parallel Dynamics 352
38.4 Pipelining with Futures 354
38.5 Notes 356
Part XVI Concurrency and Distribution
39 Process Calculus 359
39.1 Actions and Events 359
39.2 Interaction 361
39.3 Replication 363
39.4 Allocating Channels 364
39.5 Communication 366
39.6 Channel Passing 369
39.7 Universality 371
39.8 Notes 372
40 Concurrent Algol 375
40.1 Concurrent Algol 375
40.2 Broadcast Communication 378
40.3 Selective Communication 380
xii Contents
40.4 Free Assignables as Processes 382
40.5 Notes 383
41 Distributed Algol 385
41.1 Statics 385
41.2 Dynamics 388
41.3 Safety 390
41.4 Notes 391
Part XVII Modularity
42 Modularity and Linking 395
42.1 Simple Units and Linking 395
42.2 Initialization and Effects 396
42.3 Notes 398
43 Singleton Kinds and Subkinding 399
43.1 Overview 399
43.2 Singletons 400
43.3 Dependent Kinds 402
43.4 Higher Singletons 405
43.5 Notes 407
44 Type Abstractions and Type Classes 409
44.1 Type Abstraction 410
44.2 Type Classes 412
44.3 A Module Language 414
44.4 First- and Second-Class 418
44.5 Notes 419
45 Hierarchy and Parameterization 422
45.1 Hierarchy 422
45.2 Abstraction 425
45.3 Hierarchy and Abstraction 427
45.4 Applicative Functors 429
45.5 Notes 431
Part XVIII Equational Reasoning
46 Equality for System T 435
46.1 Observational Equivalence 435
46.2 Logical Equivalence 439
46.3 Logical and Observational Equivalence Coincide 440
46.4 Some Laws of Equality 443
46.5 Notes 444
xiii Contents
47 Equality for System PCF 445
47.1 Observational Equivalence 445
47.2 Logical Equivalence 446
47.3 Logical and Observational Equivalence Coincide 446
47.4 Compactness 449
47.5 Lazy Natural Numbers 452
47.6 Notes 453
48 Parametricity 454
48.1 Overview 454
48.2 Observational Equivalence 455
48.3 Logical Equivalence 456
48.4 Parametricity Properties 461
48.5 Representation Independence, Revisited 464
48.6 Notes 465
49 Process Equivalence 467
49.1 Process Calculus 467
49.2 Strong Equivalence 469
49.3 Weak Equivalence 472
49.4 Notes 473
Part XIX Appendices
A Background on Finite Sets 477
Bibliography 479
Index 487
Preface to the Second Edition
Writing the second edition to a textbook incurs the same risk as building the second version
of a software system. It is difficult to make substantive improvements, while avoiding the
temptation to overburden and undermine the foundation on which one is building. With the
hope of avoiding the second system effect, I have sought to make corrections, revisions,
expansions, and deletions that improve the coherence of the development, remove some
topics that distract from the main themes, add new topics that were omitted from the first
edition, and include exercises for almost every chapter.
The revision removes a number of typographical errors, corrects a few material errors
(especially the formulation of the parallel abstract machine and of concurrency in Algol),
and improves the writing throughout. Some chapters have been deleted (general pattern
matching and polarization, restricted forms of polymorphism), some have been completely
rewritten (the chapter on higher kinds), some have been substantially revised (general
and parametric inductive definitions, concurrent and distributed Algol), several have been
reorganized (to better distinguish partial from total type theories), and a new chapter
has been added (on type refinements). Titular attributions on several chapters have been
removed, not to diminish credit, but to avoid confusion between the present and the original
formulations of several topics. A new system of (pronounceable!) language names has been
introduced throughout. The exercises generally seek to expand on the ideas in the main
text, and their solutions often involve significant technical ideas that merit study. Routine
exercises of the kind one might include in a homework assignment are deliberately few.
My purpose in writing this book is to establish a comprehensive framework for formu-
lating and analyzing a broad range of ideas in programming languages. If language design
and programming methodology are to advance from a trade-craft to a rigorous discipline,
it is essential that we first get the definitions right. Then, and only then, can there be mean-
ingful analysis and consolidation of ideas. My hope is that I have helped to build such a
foundation.
I am grateful to Stephen Brookes, Evan Cavallo, Karl Crary, Jon Sterling, James R.
Wilcox and Todd Wilson for their help in critiquing drafts of this edition and for their
suggestions for modification and revision. I thank my department head, Frank Pfenning,
for his support of my work on the completion of this edition. Thanks also to my editors, Ada
Brunstein and Lauren Cowles, for their guidance and assistance. And thanks to Andrew
Shulaev for corrections to the draft.
Neither the author nor the publisher make any warranty, express or implied, that the
definitions, theorems, and proofs contained in this volume are free of error, or are consistent
with any particular standard of merchantability, or that they will meet requirements for any
particular application. They should not be relied on for solving a problem whose incorrect
xvi Preface to the Second Edition
solution could result in injury to a person or loss of property. If you do use this material
in such a manner, it is at your own risk. The author and publisher disclaim all liability for
direct or consequential damage resulting from its use.
Pittsburgh
July 2015
Preface to the First Edition
Types are the central organizing principle of the theory of programming languages. Lan-
guage features are manifestations of type structure. The syntax of a language is governed
by the constructs that define its types, and its semantics is determined by the interactions
among those constructs. The soundness of a language design—the absence of ill-defined
programs—follows naturally.
The purpose of this book is to explain this remark. A variety of programming language
features are analyzed in the unifying framework of type theory. A language feature is defined
by its statics, the rules governing the use of the feature in a program, and its dynamics, the
rules defining how programs using this feature are to be executed. The concept of safety
emerges as the coherence of the statics and the dynamics of a language.
In this way, we establish a foundation for the study of programming languages. But
why these particular methods? The main justification is provided by the book itself. The
methods we use are both precise and intuitive, providing a uniform framework for explaining
programming language concepts. Importantly, these methods scale to a wide range of
programming language concepts, supporting rigorous analysis of their properties. Although
it would require another book in itself to justify this assertion, these methods are also
practical in that they are directly applicable to implementation and uniquely effective as a
basis for mechanized reasoning. No other framework offers as much.
Being a consolidation and distillation of decades of research, this book does not provide
an exhaustive account of the history of the ideas that inform it. Suffice it to say that much
of the development is not original but rather is largely a reformulation of what has gone
before. The notes at the end of each chapter signpost the major developments but are
not intended as a complete guide to the literature. For further information and alternative
perspectives, the reader is referred to such excellent sources as Constable (1986, 1998),
Girard (1989), Martin-Löf (1984), Mitchell (1996), Pierce (2002, 2004), and Reynolds
(1998).
The book is divided into parts that are, in the main, independent of one another. Parts
I and II, however, provide the foundation for the rest of the book and must therefore be
considered prior to all other parts. On first reading, it may be best to skim Part I, and begin
in earnest with Part II, returning to Part I for clarification of the logical framework in which
the rest of the book is cast.
Numerous people have read and commented on earlier editions of this book and have
suggested corrections and improvements to it. I am particularly grateful to Umut Acar,
Jesper Louis Andersen, Carlo Angiuli, Andrew Appel, Stephanie Balzer, Eric Bergstrom,
Guy E. Blelloch, Iliano Cervesato, Lin Chase, Karl Crary, Rowan Davies, Derek Dreyer,
Dan Licata, Zhong Shao, Rob Simmons, and Todd Wilson for their extensive efforts in
xviii Preface to the First Edition
reading and criticizing the book. I also thank the following people for their suggestions:
Joseph Abrahamson, Arbob Ahmad, Zena Ariola, Eric Bergstrome, William Byrd, Alejan-
dro Cabrera, Luis Caires, Luca Cardelli, Manuel Chakravarty, Richard C. Cobbe, James
Cooper, Yi Dai, Daniel Dantas, Anupam Datta, Jake Donham, Bill Duff, Matthias Felleisen,
Kathleen Fisher, Dan Friedman, Peter Gammie, Maia Ginsburg, Byron Hawkins, Kevin
Hely, Kuen-Bang Hou (Favonia), Justin Hsu, Wojciech Jedynak, Cao Jing, Salil Joshi,
Gabriele Keller, Scott Kilpatrick, Danielle Kramer, Dan Kreysa, Akiva Leffert, Ruy Ley-
Wild, Karen Liu, Dave MacQueen, Chris Martens, Greg Morrisett, Stefan Muller, Tom
Murphy, Aleksandar Nanevski, Georg Neis, David Neville, Adrian Trejo Nuñez, Cyrus
Omar, Doug Perkins, Frank Pfenning, Jean Pichon, Benjamin Pierce, Andrew M. Pitts,
Gordon Plotkin, David Renshaw, John Reynolds, Andreas Rossberg, Carter Schonwald,
Dale Schumacher, Dana Scott, Shayak Sen, Pawel Sobocinski, Kristina Sojakova, Daniel
Spoonhower, Paulo Tanimoto, Joe Tassarotti, Peter Thiemann, Bernardo Toninho, Michael
Tschantz, Kami Vaniea, Carsten Varming, David Walker, Dan Wang, Jack Wileden, Sergei
Winitzki, Roger Wolff, Omer Zach, Luke Zarko, and Yu Zhang. I am very grateful to the
students of 15-312 and 15-814 at Carnegie Mellon who have provided the impetus for the
preparation of this book and who have endured the many revisions to it over the last ten
years.
I thank the Max Planck Institute for Software Systems for its hospitality and support.
I also thank Espresso a Mano in Pittsburgh, CB2 Cafe in Cambridge, and Thonet Cafe
in Saarbrücken for providing a steady supply of coffee and a conducive atmosphere for
writing.
This material is, in part, based on work supported by the National Science Foundation
under Grant Nos. 0702381 and 0716469. Any opinions, findings, and conclusions or rec-
ommendations expressed in this material are those of the author(s) and do not necessarily
reflect the views of the National Science Foundation.
Robert Harper
Pittsburgh
March 2012
PART I
Judgments and Rules
1 Abstract Syntax
Programming languages express computations in a form comprehensible to both people
and machines. The syntax of a language specifies how various sorts of phrases (expressions,
commands, declarations, and so forth) may be combined to form programs. But what are
these phrases? What is a program made of?
The informal concept of syntax involves several distinct concepts. The surface, or con-
crete, syntax is concerned with how phrases are entered and displayed on a computer. The
surface syntax is usually thought of as given by strings of characters from some alphabet
(say, ASCII or Unicode). The structural, or abstract, syntax is concerned with the structure
of phrases, specifically how they are composed from other phrases. At this level, a phrase
is a tree, called an abstract syntax tree, whose nodes are operators that combine several
phrases to form another phrase. The binding structure of syntax is concerned with the
introduction and use of identifiers: how they are declared, and how declared identifiers can
be used. At this level, phrases are abstract binding trees, which enrich abstract syntax trees
with the concepts of binding and scope.
We will not concern ourselves in this book with concrete syntax but will instead consider
pieces of syntax to be finite trees augmented with a means of expressing the binding and
scope of identifiers within a syntax tree. To prepare the ground for the rest of the book, we
define in this chapter what is a “piece of syntax” in two stages. First, we define abstract
syntax trees, or ast’s, which capture the hierarchical structure of a piece of syntax, while
avoiding commitment to their concrete representation as a string. Second, we augment
abstract syntax trees with the means of specifying the binding (declaration) and scope
(range of significance) of an identifier. Such enriched forms of abstract syntax are called
abstract binding trees, or abt’s for short.
Several functions and relations on abt’s are defined that give precise meaning to the
informal ideas of binding and scope of identifiers. The concepts are infamously difficult to
define properly and are the mother lode of bugs for language implementors. Consequently,
precise definitions are essential, but they are also fairly technical and take some getting
used to. It is probably best to skim this chapter on first reading to get the main ideas, and
return to it for clarification as necessary.
1.1 Abstract Syntax Trees
An abstract syntax tree, or ast for short, is an ordered tree whose leaves are variables, and
whose interior nodes are operators whose arguments are its children. Ast’s are classified
4 Abstract Syntax
into a variety of sorts corresponding to different forms of syntax. A variable stands for an
unspecified, or generic, piece of syntax of a specified sort. Ast’s can be combined by an
operator, which has an arity specifying the sort of the operator and the number and sorts
of its arguments. An operator of sort s and arity s1 , . . . , sn combines n ≥ 0 ast’s of sort
s1 , . . . , sn , respectively, into a compound ast of sort s.
The concept of a variable is central and therefore deserves special emphasis. A variable
is an unknown object drawn from some domain. The unknown can become known by
substitution of a particular object for all occurrences of a variable in a formula, thereby
specializing a general formula to a particular instance. For example, in school algebra
variables range over real numbers, and we may form polynomials, such as x 2 + 2 x + 1,
that can be specialized by substitution of, say, 7 for x to obtain 72 + (2 × 7) + 1, which can
be simplified according to the laws of arithmetic to obtain 64, which is (7 + 1)2 .
Abstract syntax trees are classified by sorts that divide ast’s into syntactic categories.
For example, familiar programming languages often have a syntactic distinction between
expressions and commands; these are two sorts of abstract syntax trees. Variables in abstract
syntax trees range over sorts in the sense that only ast’s of the specified sort of the variable
can be plugged in for that variable. Thus, it would make no sense to replace an expression
variable by a command, nor a command variable by an expression, the two being different
sorts of things. But the core idea carries over from school mathematics, namely that a
variable is an unknown, or a place-holder, whose meaning is given by substitution.
As an example, consider a language of arithmetic expressions built from numbers,
addition, and multiplication. The abstract syntax of such a language consists of a single
sort Exp generated by these operators:
1. An operator num[n] of sort Exp for each n ∈ N.
2. Two operators, plus and times, of sort Exp, each with two arguments of sort Exp.
The expression 2 + (3 × x), which involves a variable, x, would be represented by the ast
plus(num[2]; times(num[3]; x))
of sort Exp, under the assumption that x is also of this sort. Because, say, num[4], is an ast
of sort Exp, we may plug it in for x in the above ast to obtain the ast
plus(num[2]; times(num[3]; num[4])),
which is written informally as 2 + (3 × 4). We may, of course, plug in more complex ast’s
of sort Exp for x to obtain other ast’s as result.
The tree structure of ast’s provides a very useful principle of reasoning, called structural
induction. Suppose that we wish to prove that some property P(a) holds for all ast’s a of a
given sort. To show this, it is enough to consider all the ways in which a can be generated
and show that the property holds in each case under the assumption that it holds for its
constituent ast’s (if any). So, in the case of the sort Exp just described, we must show
1. The property holds for any variable x of sort Exp: prove that P(x).
2. The property holds for any number, num[n]: for every n ∈ N, prove that P(num[n]).
5 1.1 Abstract Syntax Trees
3. Assuming that the property holds for a1 and a2 , prove that it holds for plus(a1 ; a2 ) and
times(a1 ; a2 ): if P(a1 ) and P(a2 ), then P(plus(a1 ; a2 )) and P(times(a1 ; a2 )).
Because these cases exhaust all possibilities for the formation of a, we are assured that
P(a) holds for any ast a of sort Exp.
It is common to apply the principle of structural induction in a form that takes account of
the interpretation of variables as place-holders for ast’s of the appropriate sort. Informally, it
is often useful to prove a property of an ast involving variables in a form that is conditional
on the property holding for the variables. Doing so anticipates that the variables will be
replaced with ast’s that ought to have the property assumed for them, so that the result of
the replacement will have the property as well. This amounts to applying the principle of
structural induction to properties P(a) of the form “if a involves variables x1 , . . . , xk , and
Q holds of each xi , then Q holds of a,” so that a proof of P(a) for all ast’s a by structural
induction is just a proof that Q(a) holds for all ast’s a under the assumption that Q holds
for its variables. When there are no variables, there are no assumptions, and the proof of P
is a proof that Q holds for all closed ast’s. On the other hand, if x is a variable in a, and we
replace it by an ast b for which Q holds, then Q will hold for the result of replacing x by b
in a.
For the sake of precision, we now give precise definitions of these concepts. Let S be
a finite set of sorts. For a given set S of sorts, an arity has the form (s1 , . . . , sn )s, which
specifies the sort s ∈ S of an operator taking n ≥ 0 arguments, each of sort si ∈ S. Let
O = { Oα } be an arity-indexed family of disjoint sets of operators Oα of arity α. If o is
an operator of arity (s1 , . . . , sn )s, we say that o has sort s and has n arguments of sorts
s 1 , . . . , sn .
Fix a set S of sorts and an arity-indexed family O of sets of operators of each arity. Let
X = { Xs }s∈S be a sort-indexed family of disjoint finite sets Xs of variables x of sort s.
When X is clear from context, we say that a variable x is of sort s if x ∈ Xs , and we say
that x is fresh for X , or just fresh when X is understood, if x ∈ / Xs for any sort s. If x is
fresh for X and s is a sort, then X , x is the family of sets of variables obtained by adding
x to Xs . The notation is ambiguous in that the sort s is not explicitly stated but determined
from context.
The family A[X ] = { A[X ]s }s∈S of abstract syntax trees, or ast’s, of sort s is the smallest
family satisfying the following conditions:
1. A variable of sort s is an ast of sort s: if x ∈ Xs , then x ∈ A[X ]s .
2. Operators combine ast’s: if o is an operator of arity (s1 , . . . , sn )s, and if a1 ∈ A[X ]s1 ,
. . . , an ∈ A[X ]sn , then o(a1 ; . . . ;an ) ∈ A[X ]s .
It follows from this definition that the principle of structural induction can be used to prove
that some property P holds of every ast. To show P(a) holds for every a ∈ A[X ], it is
enough to show:
1. If x ∈ Xs , then Ps (x).
2. If o has arity (s1 , . . . , sn )s and Ps1 (a1 ) and . . . and Psn (an ), then Ps (o(a1 ; . . . ;an )).
6 Abstract Syntax
For example, it is easy to prove by structural induction that A[X ] ⊆ A[Y] whenever
X ⊆ Y.
Variables are given meaning by substitution. If a ∈ A[X , x]s , and b ∈ A[X ]s , then
[b/x]a ∈ A[X ]s is the result of substituting b for every occurrence of x in a. The ast a is
called the target, and x is called the subject, of the substitution. Substitution is defined by
the following equations:
1. [b/x]x = b and [b/x]y = y if x = y.
2. [b/x]o(a1 ; . . . ;an ) = o([b/x]a1 ; . . . ;[b/x]an ).
For example, we may check that
[num[2]/x]plus(x; num[3]) = plus(num[2]; num[3]).
We may prove by structural induction that substitution on ast’s is well-defined.
Theorem 1.1. If a ∈ A[X , x], then for every b ∈ A[X ] there exists a unique c ∈ A[X ]
such that [b/x]a = c
Proof By structural induction on a. If a = x, then c = b by definition; otherwise, if
a = y = x, then c = y, also by definition. Otherwise, a = o(a1 , . . . , an ), and we have
by induction unique c1 , . . . , cn such that [b/x]a1 = c1 and . . . [b/x]an = cn , and so c is
c = o(c1 ; . . . ;cn ), by definition of substitution.
1.2 Abstract Binding Trees
Abstract binding trees, or abt’s, enrich ast’s with the means to introduce new variables and
symbols, called a binding, with a specified range of significance, called its scope. The scope
of a binding is an abt within which the bound identifier can be used, either as a place-holder
(in the case of a variable declaration) or as the index of some operator (in the case of a
symbol declaration). Thus, the set of active identifiers can be larger within a subtree of
an abt than it is within the surrounding tree. Moreover, different subtrees may introduce
identifiers with disjoint scopes. The crucial principle is that any use of an identifier should
be understood as a reference, or abstract pointer, to its binding. One consequence is that
the choice of identifiers is immaterial, so long as we can always associate a unique binding
with each use of an identifier.
As a motivating example, consider the expression let x be a1 in a2 , which introduces
a variable x for use within the expression a2 to stand for the expression a1 . The variable
x is bound by the let expression for use within a2 ; any use of x within a1 refers to a
different variable that happens to have the same name. For example, in the expression
let x be 7 in x + x occurrences of x in the addition refer to the variable introduced by the
let. On the other hand, in the expression let x be x ∗ x in x + x, occurrences of x within
the multiplication refer to a different variable than those occurring within the addition. The
7 1.2 Abstract Binding Trees
latter occurrences refer to the binding introduced by the let, whereas the former refer to
some outer binding not displayed here.
The names of bound variables are immaterial insofar as they determine the same
binding. So, for example, let x be x ∗ x in x + x could just as well have been written
let y be x ∗ x in y + y, without changing its meaning. In the former case, the variable x
is bound within the addition, and in the latter, it is the variable y, but the “pointer structure”
remains the same. On the other hand, the expression let x be y ∗ y in x + x has a different
meaning to these two expressions, because now the variable y within the multiplication
refers to a different surrounding variable. Renaming of bound variables is constrained to
the extent that it must not alter the reference structure of the expression. For example, the
expression
let x be 2 in let y be 3 in x + x
has a different meaning than the expression
let y be 2 in let y be 3 in y + y,
because the y in the expression y + y in the second case refers to the inner declaration, not
the outer one as before.
The concept of an ast can be enriched to account for binding and scope of a variable.
These enriched ast’s are called abstract binding trees, or abt’s for short. Abt’s generalize
ast’s by allowing an operator to bind any finite number (possibly zero) of variables in each
argument. An argument to an operator is called an abstractor and has the form x1 , . . . , xk .a.
The sequence of variables x1 , . . . , xk are bound within the abt a. (When k is zero, we elide
the distinction between .a and a itself.) Written in the form of an abt, the expression
let x be a1 in a2 has the form let(a1 ; x.a2 ), which more clearly specifies that the variable
x is bound within a2 , and not within a1 . We often write x to stand for a finite sequence
x1 , . . . , xn of distinct variables and write x .a to mean x1 , . . . , xn .a.
To account for binding, operators are assigned generalized arities of the form
(υ1 , . . . , υn )s, which specifies operators of sort s with n arguments of valence υ1 , . . . , υn .
In general a valence υ has the form s1 , . . . , sk .s, which specifies the sort of an argument as
well as the number and sorts of the variables bound within it. We say that a sequence x of
variables is of sort s to mean that the two sequences have the same length k and that the
variable xi is of sort si for each 1 ≤ i ≤ k.
Thus, to specify that the operator let has arity (Exp, Exp.Exp)Exp indicates that it is
of sort Exp whose first argument is of sort Exp and binds no variables and whose second
argument is also of sort Exp and within which is bound one variable of sort Exp. The
informal expression let x be 2 + 2 in x × x may then be written as the abt
let(plus(num[2]; num[2]); x.times(x; x))
in which the operator let has two arguments, the first of which is an expression, and the
second of which is an abstractor that binds one expression variable.
Fix a set S of sorts and a family O of disjoint sets of operators indexed by their generalized
arities. For a given family of disjoint sets of variables X , the family of abstract binding
8 Abstract Syntax
trees, or abt’s B[X ], is defined similarly to A[X ], except that X is not fixed throughout the
definition but rather changes as we enter the scopes of abstractors.
This simple idea is surprisingly hard to make precise. A first attempt at the definition is
as the least family of sets closed under the following conditions:
1. If x ∈ Xs , then x ∈ B[X ]s .
2. For each operator o of arity (s1 .s1 , . . . , sn .sn )s, if a1 ∈ B[X , x1 ]s1 , . . . , and an ∈
B[X , xn ]sn , then o( xn .an ) ∈ B[X ]s .
x1 .a1 ; . . . ;
The bound variables are adjoined to the set of active variables within each argument, with
the sort of each variable determined by the valence of the operator.
This definition is almost correct but fails to properly account for renaming of bound vari-
ables. An abt of the form let(a1 ; x.let(a2 ; x.a3 )) is ill-formed according to this definition,
because the first binding adds x to X , which implies that the second cannot also add x to
X , x, because it is not fresh for X , x. The solution is to ensure that each of the arguments
is well-formed regardless of the choice of bound variable names, which is achieved using
fresh renamings, which are bijections between sequences of variables. Specifically, a fresh
renaming (relative to X ) of a finite sequence of variables x is a bijection ρ : x ↔ x
between x and x , where x is fresh for X . We write
ρ (a) for the result of replacing each
occurrence of xi in a by ρ(xi ), its fresh counterpart.
This is achieved by altering the second clause of the definition of abt’s using fresh
renamings as follows:
For each operator o of arity (s1 .s1 , . . . , sn .sn )s, if for each 1 ≤ i ≤ n and each fresh
renaming ρi : xi ↔ xi , we have ρi (ai ) ∈ B[X , xi ], then o( xn .an ) ∈ B[X ]s .
x1 .a1 ; . . . ;
The renaming ρi (ai ) of each ai ensures that collisions cannot occur and that the abt is valid
for almost all renamings of any bound variables that occur within it.
The principle of structural induction extends to abt’s and is called structural induction
modulo fresh renaming. It states that to show that P[X ](a) holds for every a ∈ B[X ], it is
enough to show the following:
1. if x ∈ Xs , then P[X ]s (x).
2. For every o of arity (s1 .s1 , . . . , sn .sn )s, if for each 1 ≤ i ≤ n, P[X , xi ]si (
ρi (ai )) holds
for every ρi : xi ↔ xi with xi ∈ / X , then P[X ]s (o( x1 .a1 ; . . . ;
xn .an )).
The second condition ensures that the inductive hypothesis holds for all fresh choices of
bound variable names, and not just the ones actually given in the abt.
As an example let us define the judgment x ∈ a, where a ∈ B[X , x], to mean that x
occurs free in a. Informally, this means that x is bound somewhere outside of a, rather
than within a itself. If x is bound within a, then those occurrences of x are different
from those occurring outside the binding. The following definition ensures that this is the
case:
9 1.2 Abstract Binding Trees
1. x ∈ x.
2. x ∈ o( xn .an ) if there exists 1 ≤ i ≤ n such that for every fresh renaming
x1 .a1 ; . . . ;
ρ : xi ↔ zi we have x ∈ ρ (ai ).
The first condition states that x is free in x but not free in y for any variable y other than x.
The second condition states that if x is free in some argument, independently of the choice
of bound variable names in that argument, then it is free in the overall abt.
The relation a =α b of α-equivalence (so-called for historical reasons) means that a and
b are identical up to the choice of bound variable names. The α-equivalence relation is the
strongest congruence containing the following two conditions:
1. x =α x.
xn .an ) =α o(
x1 .a1 ; . . . ;
2. o( xn .an ) if for every 1 ≤ i ≤ n, ρi (ai ) =α ρi (ai ) for
x1 .a1 ; . . . ;
all fresh renamings ρi : xi ↔ zi and ρi : xi ↔ zi .
The idea is that we rename xi and xi consistently, avoiding confusion, and check that ai
and ai are α-equivalent. If a =α b, then a and b are α-variants of each other.
Some care is required in the definition of substitution of an abt b of sort s for free
occurrences of a variable x of sort s in some abt a of some sort, written [b/x]a. Substitution
is partially defined by the following conditions:
1. [b/x]x = b, and [b/x]y = y if x = y.
2. [b/x]o( x1 .a1 ; . . . ;
xn .an ) = o(
x1 .a1 ; . . . ; xn .an ), where, for each 1 ≤ i ≤ n, we require
/ b, and we set ai = [b/x]ai if x ∈
that xi ∈ / xi , and ai = ai otherwise.
The definition of [b/x]a is quite delicate and merits careful consideration.
One trouble spot for substitution is to notice that if x is bound by an abstractor within
a, then x does not occur free within the abstractor and hence is unchanged by substitution.
For example, [b/x]let(a1 ; x.a2 ) = let([b/x]a1 ; x.a2 ), there being no free occurrences of
x in x.a2 . Another trouble spot is the capture of a free variable of b during substitution.
For example, if y ∈ b and x = y, then [b/x]let(a1 ; y.a2 ) is undefined, rather than
being let([b/x]a1 ; y.[b/x]a2 ), as one might at first suspect. For example, provided that
x = y, [y/x]let(num[0]; y.plus(x; y)) is undefined, not let(num[0]; y.plus(y; y)), which
confuses two different variables named y.
Although capture avoidance is an essential characteristic of substitution, it is, in a sense,
merely a technical nuisance. If the names of bound variables have no significance, then
capture can always be avoided by first renaming the bound variables in a to avoid any
free variables in b. In the foregoing example, if we rename the bound variable y to
y to obtain a let(num[0]; y .plus(x; y )), then [b/x]a is defined and is equal to
let(num[0]; y .plus(b; y )). The price for avoiding capture in this way is that substitution
is only determined up to α-equivalence, and so we may no longer think of substitution as a
function but only as a proper relation.
Exploring the Variety of Random
Documents with Different Content
utterly detested and abhorred the hellish principle of killing all who
differed in judgment from them, and proposed not to injure or
offend any, but to stand to the defence of the glorious reformation
and of their own lives; yet they declared unto all, that whosoever
stretched forth their hands against them by shedding their blood,
either by authoritative commanding, as the justiciary; or actual
doing, as the military; or searching out and delivering them up to
their enemies, as the gentry; or informing against them wickedly and
willingly, as the viperous and malicious bishops and curates; or
raising the hue and cry, as the common intelligencers—that they
should repute them enemies to God and the covenanted work of
reformation, and punish them according to their power and the
degree of the offence.
This declaration was affixed to several market-crosses, and posted
upon a great many church-doors in Nithsdale, Galloway, Ayr, and
Lanark shires, and produced considerable effect upon the baser sort
of informers, who were deterred for some time from pursuing their
infamous vocation, and a few of the most virulent curates in
Nithsdale and Galloway, who withdrew for a time to other quarters.
The state of the country, which had been rapidly declining, was
now wretched beyond conception. What prosperity it had begun to
enjoy under the equitable and liberal dominion of Cromwell, was
now blasted in the bud. The little commerce which he encouraged,
and the agricultural improvements which the English army are said
to have introduced, were interrupted and destroyed by the
cultivators being in vast numbers called to attend the autumnal
circuits, or forced to wander as fugitives, while the soldiers rioted in
the spoliation of their crops, the breakage of their utensils, and the
seizure of their horses. A famine threatened, and the bishops had
appointed a fast to mourn for the sins of the land; but neither they
nor the rulers appear to have had any sympathy for the suffering
people.
The persecution continued with unabated or rather increasing
violence; and the following are a few instances illustrative of the
style in which it was conducted:—William Hanna, in the parish of
Turnergarth, in Annandale, had been imprisoned in the year 1667,
and fined one hundred pounds for hearing a Presbyterian minister
preach. After his liberation, the curate of the parish was exceedingly
troublesome, citing him before his session, and threatening him with
excommunication. When one of his children died, the curate would
not allow it to be buried in consecrated ground, because it had not
been “regularly” baptized! and when some friends came to dig a
grave in William’s own burying-ground, he came out of the manse in
great fury, and carried off the spades and shovels, telling them “if
they buried the child there by night or day he would cause trail it out
again.” In 1681, he had a horse worth four pounds sterling carried
away for not paying thirteen shillings Scots of cess; and after a train
of constant harassings he was at last denounced and declared
fugitive. He then hoping to find a little repose, went into England;
but no sooner had he crossed the border, than he was seized and
sent back prisoner to Scotland, which Queensberry no sooner heard
of than he ordered him to be laid in irons in Dumfries jail, till he was
sent to Edinburgh (October this year) to be immured in a dark hole
under the Canongate jail, where he had neither air nor light. Here,
being taken ill, he begged only for a little free air; but the soldier
who guarded him, told him to “seek mercy from Heaven, for they
had none to give.” In this dungeon he lay till sent to Dunotter.
His son William, a youth not sixteen years of age, was denounced
for not keeping the church—How many youths in Scotland would be
denounced if that were now a crime?—and forced to flee to England
a year after his father, where he abode some time. Venturing to
return home in September 1682, he fell sick of an ague, and, while
labouring under this disorder, was captured by some of the
straggling soldiery, and forced to accompany them on foot for
several days, in their ranging through the neighbourhood. At one
time, coming to a martyr’s grave, who had been shot in the fields,
they placed him upon it, and covering his face, threatened him if he
would not promise regularity and ecclesiastical obedience, they
would shoot him. The intrepid youth told them, “God had sent him
to the world and appointed his time to go out of it; but he was
determined to swear nothing he thought sinful.” Instead of
respecting this courage in one so young, they sent the boy to
Edinburgh, where he was first tortured with the thumbkins, then laid
him in irons so strait that his flesh swelled out above them, after
having been robbed of all the money sent him by his friends. This
year he was banished to Barbadoes, and sold for a slave.
Age or sex was no protection. A respectable woman, seventy-
three years old, who dwelt in Carsphairn, had a son cited to appear
before one of these courts, 1680, for hearing Mr Cameron preach.
Not, however, making his appearance, he was intercommuned—his
mother’s house was searched for him, when not finding him, the
soldiers spulzied the furniture. This year the military ruffians came
again, and again missing the son, and finding nothing worth
plundering, carried the mother to Dumfries. Here she was offered
the test, and was about to comply, when the monsters in human
shape, seeing her likely to yield, added a clause to the oath, that she
would never speak to or harbour her son. This her maternal feelings
refused; and for this was publicly scourged through Dumfries on the
next market day. Nor was she even after her punishment liberated
till she paid two hundred merks.
Enraged at the Apologetical Declaration, the council were still
more infuriated by what seemed a practical following up of its
principles, in the putting to death of two soldiers, Thomas Kennoway
[vide p. 420] and Duncan Stuart. Kennoway was returning from
Edinburgh, whither he had been for instructions with a list of one
hundred and fifty persons he was required, it was said, upon his own
information, to apprehend. Meeting Stuart at Livingstone, they both
went into a public-house, when Kennoway produced his commission,
and boasted over his cups that he hoped in a short time he would be
as good a laird as many in that country, only he regretted he was
turning old, and would not have long to enjoy his good fortune.
They thence adjourned to Swine-Abbey, where they were both
murdered, but by whom was never discovered. The authors of the
declaration were, however, immediately suspected; and the council
resolving upon an indiscriminate revenge, consulted the session as
to whether avowing or refusing to disavow the declaration
constituted treason? That prostituted court replied in the affirmative.
But the forms of law were too dilatory for the sanguinary council. On
the same day they voted “that any person who owns or who will not
disown the late treasonable declaration upon oath, whether they
have arms or not, shall immediately be put to death;” and on the
day following, gave a commission with justiciary powers to Lords
Livingstone, Ross, Torphichen, and a number of other officers of the
army, five to be a quorum, with instructions to assemble the
inhabitants of Livingstone and the five adjacent parishes, and to
murder upon the spot, after a mock trial, all who would not disown
the late traitorous declaration or assassination of the soldiers; and if
any be absent, their houses to be burned and their goods seized;
and as to the families of those who were condemned or executed,
every person above the age of twelve years, were to be made
prisoners in order to transportation. They also approved of an oath
(known by the name of the abjuration-oath) to be offered to all
persons whom they or their commissioners should think fit,
renouncing the pretended declaration of war and disowning the
villanous authors thereof.
The extortions were tremendous. In the month of December, six
gentlemen of Renfrew were fined in nearly twenty thousand pounds
sterling, and although some abatement was made, yet had Sir John
Maxwell of Pollock to pay five thousand; the Cunninghams of
Craigends, elder and younger, four thousand; Porterfield of Fulwood,
upwards of sixteen hundred; and Mr James Pollock of Balgray, five
hundred pounds sterling; besides various other gentlemen in the
same districts, who were robbed of upwards of twenty thousand
pounds sterling, by the council and the sheriffs. The pretexts under
which such impositions were levied were, the dreadful negative
treason of not attending ordinances in their own parish churches,
and the more positive delinquencies of hearing Presbyterian
ministers preach the gospel, or holding converse with the proscribed
—men of whom the world was not worthy.
The real cause will be found in the grants which the debased and
thievish councillors received of the spoils.[157] To accomplish their
laudable designs, they despatched Lieut.-General Drummond to the
south and west, to pursue and bring the rebels and their abettors to
trial, and pass sentence upon them as he should see cause; and
likewise ordered him to plant garrisons where he should think it
expedient, especially in Lanarkshire; and besides gave commission
to William Hamilton, laird of Orbiston, to levy two hundred
Highlandmen of the shire of Dumbarton, not only “to apprehend the
denounced rebels and fugitives in that quarter, and in case of their
refusing, to be taken, to kill, wound, and destroy them,” but “to
employ spies and intelligencers to go in company with the said
rebels and fugitives, as if they were of their party, the better to
discover where they haunt and are reset.”
157. Sir George Mackenzie got £1500 of Sir William Scott of Harden’s fine; the
Duke of Gordon and the Marquis of Atholl shared the fine of Harden, junior—
three thousand five hundred pounds between them! Some degree of honour,
as the times went, might perhaps then attach to the open driving of their
neighbours’ cattle, not infrequent on the Highland borders, as it was
accompanied with danger and required at least brute-courage; but these
legal thefts, like the pilfering of the pick-pocket or the petty-fogging lawyer—
his twin-brother in our day—excite unmingled disgust, because the thieves
know they can do it safely.
But the chief instigators were the curates, and among them Peter
Pierson, at Carsphairn, particularly distinguished himself. When
Grierson of Lag held a court at Carsphairn church the preceding
autumn, he sat with him, described the characters of the
parishioners who were summoned, and appeared and gave
information respecting the absentees. Soldiers were in consequence
sent after them, who spoiled their houses and haled many old and
infirm people, and women with child, and the sick, before the
commissioner, who handled them but roughly. The whole parish was
thus thrown into confusion, and Pierson being a surly ill-natured
man, and very “blustering” withal, boasting in public companies that
he feared no whigs—he only feared rats and mice—he came to be
very generally disliked throughout the district, and was particularly
obnoxious to the wanderers who were under hiding in that quarter. A
few of them, therefore, determined to force him to sign a written
declaration, that he would give up his trade of informer, and
proceeded to the manse early in December, when they understood
he was alone; for he did not even keep a servant. Two of their
number being sent before, got entrance and delivered their
commission, which put Pierson into the utmost rage, and drawing a
broadsword and cocking a pistol, he got between them and the door.
Upon this they called out, when other two, James Macmichael,
gamekeeper to the Laird of Maxwellton, and Rodger Padzen came
and knocked at the door. Pierson opened it, and was proceeding to
attack them, when Macmichael shot him dead on the spot. The rest
at a distance, on hearing the noise, ran up and cried—“Take no
lives;” but it was too late. This deed was instantly and strongly
disavowed by the wanderers, who would never allow any of the
party to join with their societies; but one of the assassins was
afterwards discovered to be a government spy, and Padzen ere long
enlisted in Strachan’s troop of dragoons, which gave credibility to the
report, that the whole had been a government plot, to bring
discredit on the persecuted wanderers, and justify the savage,
unconstitutional measures the managers were pursuing.
Several instances of severity, which occurred during this month,
evince the natural tendency of persecution to harden the hearts and
destroy every good feeling in the breasts of the persecutors. A poor
man, who had been imprisoned in Dumfries jail, for not hearing the
curate, having broken the prison and fled to England, his wife with
seven small children begged their way after him; but finding no
shelter there, she was forced to return. When journeying back, she
had stopped to rest at a small alehouse. While sitting peaceably
there, Johnston of Wester-raw, with some other persecutors
happening to come in, required her to take the test, which she
refusing, they haled her to Dumfries prison; and though she
earnestly begged they would allow her to take her sucking-child—an
infant of three months old—along with her, they would not consent,
but threatened unless she complied next day they would drown her.
Still she held fast her integrity, and lay for five weeks in jail, till she
was sent to Edinburgh, whither her poor children, who, forbid to
enter Dumfries, had been supported by charity, followed her, and
where she somehow or other got released.[158]
158.
The poor children who were able to walk came afterwards to Dumfries, and
the eldest applied to the bailies that they might only have liberty to see and
speak to their mother. This request was refused, and they were turned out of
the town. When going past the prison, one of them saw her looking out at a
window, but was not suffered to speak to her. When forced away from the
spot, the child blessed the Lord that he had once more seen his mother.—
Wodrow, vol. ii. p. 441.
John Linning, a dyer in Glasgow, a blind man, chargeable with
nothing but non-conformity, was confined fourteen weeks. When a
young daughter of his was taken sick, she cried out passionately for
her father; yet would not the magistrates either suffer him to visit
her on her deathbed or attend her funeral.
Claverhouse acted up to his instructions, and merited well of his
employers. When ranging through Galloway (December 18) he came
unexpectedly upon some of the wanderers, who were under hiding
at Auchincloy, near the Water of Dee, and surprised six of them
together; four he murdered upon the spot, and two he carried with
him to Kirkcudbright, where, calling an assize, he went through the
farce of a trial, and immediately ordered them to be executed! Nor
would he permit them to write a few lines to their relatives to inform
them of their fate. Other two escaped, and were pursued by some of
the soldiers, who being informed of a house at which they had called
in passing, but never sat down, entered the cottage, and missing
their prey, took all its inmates prisoners and burnt it to the ground.
James Graham, a tailor in Corsmichael, was not so fortunate.
Returning home from his work to his mother’s house, he too was
overtaken, when walking peaceably along the highway, by
Claverhouse and his squad. They knew him not, and had nothing to
lay to his charge; but searching him, and finding a Bible in his
pocket, that was crime enough. They took it and his tools from him,
and carried him as a disloyal rebel to Kirkcudbright; thence he was
sent to Dumfries, where he lay some time in irons, and was
afterwards sent to Edinburgh, where, being questioned upon the
declaration of the societies, and refusing to answer, he was found
guilty of the treason he had not confessed—and of which there was
no proof—condemned and hung!
About the latter end of this month, Lady Cavers, who had been in
prison, first in Edinburgh tolbooth and then in Stirling Castle,
upwards of two years, for keeping conventicles and being present at
them, was released through the intervention of her son, Sir William
Douglas, upon his return from his travels, who became bound for
her living regularly in future or leaving the kingdom within three
months. Yet was she not let go till she paid an enormous fine of five
hundred pounds sterling—a sum, says Wodrow, exceeding three
years’ rent of her estate—though the said rents had been
sequestered, and her tenants plundered, during the time of her
imprisonment.
About the same time, Dame Margaret Weems, Lady Colville, was
imprisoned in Edinburgh tolbooth, for her ecclesiastical irregularities,
especially for breeding up her son, Lord Colville, in fanaticism, and
putting him out of the way when the council was going to commit
his education to others.
In the parish of Nithsdale, James Crosbie, for refusing the test,
had his ears cropt and was banished as a slave to Jamaica. In the
parish of Auchinleck, William Johnstone being summoned to the
court, and not appearing, a party of soldiers were sent to his house,
which they plundered; and, as he and his wife had fled, they carried
away with them a maid-servant who had charge of the children,
leaving two or three destitute infants to shift for themselves; and
because she refused to take the abjuration, which she told them she
did not understand, they put burning matches between her fingers,
and roasted the flesh to the bone. Her patience and composure
under such torment so astonished the savages, that, after the
infliction, they allowed her to return home. John Hallome, a youth of
eighteen, seized while travelling on the road by Lieutenant
Livingstone, and refusing the oath, was carried to Kirkcudbright,
where a jury of soldiers being called, and he of course found guilty,
he was instantly shot.
The year closed with the appointment of ten special
commissioners, to whom two were added in January next year, to
hold justiciary courts in twelve shires. Their instructions were, to
hang immediately in the place all males who owned or did not
disown the “horrid principles” of the declaration, and to drown such
women as had been active in disseminating them; and the same day
a proclamation was issued, requiring all heritors, and in their
absence, their factors and chamberlains, to convocate all the
inhabitants on their lands, and to bring them before any of the privy
councillors or commissioners appointed by the council, and cause
them swear the abjuration-oath, and receive a testificate to serve as
a free pass, without which any person who should adventure to
travel should be holden and used as a communer with the said
execrable rebels; and all housekeepers, as well as hostler-houses,
inn-keepers, or other houses of common resort, were forbid to
entertain any person who could not produce such a testificate, under
the same penalty; which testificate the holders, if required, were
obliged to swear was no forged or false document—so suspicious
ever are rogues of deceit!—and finally, whoever should discover any
of the said traitors and assassins, who had been in any way
accessary to the said traitorous and damnable paper, or the
publishing or spreading of the same, were to receive a reward of five
hundred merks, Scots, for each of them who should be found guilty.
[1685.] This year was ushered in by increasing severities, and
whoever would not disclaim the society’s declaration, and take the
abjuration-oath, were subjected to be shot by any trooper who
chose to interrogate them, or to be sent by the justiciary miscreants
to slavery, exile, imprisonment, or death, after being robbed of all
they possessed. Nor did the decrepitude of age, the stenderness of
sex, or even boyhood, afford any plea for mitigation. Captain
Douglas, the Marquis of Queensberry’s brother, stationed in the
parish of Twineholme, oppressed it terribly in the beginning of
January, having prevailed with a poor tenant, after many severities,
to swear the oath, they insisted upon his discovering the retreats of
the wanderers. While dragging him along with them for this purpose,
they met another poor man upon the road, who would neither
answer their questions nor swear. Him they immediately murdered;
and when their prisoner entreated the captain to give him a little
more time, and not be so hasty, they beat and bruised the
intercessor so cruelly, that in a few days he died the victim of his
humanity.[159]
159.
How low the clergy could descend in their malice, may be judged from the
case of a cripple but pious beggar, John Watson, in the parish of Cathcart.
Mr Robert Fennie, curate of the parish, enraged at the poor man, because he
would not come to hear him, gave information against him as a disloyal and
dangerous person, and procured a party of soldiers to be sent to seize him.
John could neither get from them nor go with them; nor would he swear the
abjuration-oath. The soldiers, ashamed of their errand, were at a loss what
to do, when some of his neighbours offered to send him to Hawk-head, Lord
Ross’s residence, in a sledge; and they were proceeding accordingly, when
his lordship hearing of the cavalcade, and being informed of the
circumstances, sent his servant with an alms, and ordered them to carry the
cripple home again.—Wodrow, vol. ii. p. 457.
On the 18th, four of the persecuted were surprised at prayer, in a
sequestered spot in the parish of Monigaff, in Galloway, by Colonel
Douglas, with a party of horse; and as their serious occupation was
sufficient evidence of their “atrocious rebellion,” they were, without
any process, murdered on the spot. On the 26th, three remarkable
characters were forfeited—Sir Patrick Home of Polwart, George
Pringle of Torwoodlee, and Andrew Fletcher of Saltoun. They all
escaped to the Continent, and were reserved by Providence for
better days. On the 30th, Dalziel of Kirkmichael and Lieutenant
Straiton, with fifty soldiers, surprised a few of those under hiding
asleep in the fields at Mortoun, in Nithsdale; but they all fled and
escaped, except David Macmichael, who from bodily indisposition,
and being wounded, could not follow. Him they took to Durisdeer,
and told him if he would not own the supremacy in church and
state, and take the oath that would be tendered, the law declared
him guilty of death. “That,” said David, “is what of all things I cannot
do; but very cheerfully I submit to the Lord’s disposal as to my life.”
The commander said, “Do not you know your life is in my
hands.”—“No!” replied he, “I know my life is in the Lord’s hand; and
if he see good, he can make you the instrument to take it away.”
Being ordered to prepare for death next day, he answered, “If my
life must go for his cause, I am willing; my God will prepare me!” He
next day suffered at Dalveen with a composure and courage that
melted even the rude soldiers who shot him.
An instance of the ferocious thirst after blood which urged on the
persecutors, occurred February 1st. John Park and James Aldie, two
young men, in Eastwood, were brought before the commissioners
for Renfrewshire, Lord Ross and Hamilton of Orbiston; and when
they were persuaded to consent taking the abjuration, “that shall
not save you,” said Orbiston; “unless you take the test, you shall
hang.”—“Then,” replied the intrepid conscientious youths, “if the
abjuration will not save us, we will take no oath at all.” They were
condemned, and immediately led to execution. While they were yet
hanging, Robert King, miller at Pollockshaws, in the same parish,
was brought into court, and had the test offered to him, which he
refused. He was then led to the window, bid look upon the two
suspended before it, and told if he did not comply, he should
immediately be tied up along with them. Still resisting, he was shut
up in a dark corner and assured that he had only an hour to live.
They would, however, out of charity, give him three warnings by
sound of trumpet, but if he sat the third, there was no mercy. He
heard the two blasts, when his courage failing, he took the test. His
wife was a “composed woman, of uncommon sound sense.” One
day, as some of the plunderers were driving away her cattle, having
rifled the house besides, she came to the door, and was looking after
them, when a soldier, rather more merciful than his comrades,
turned and said, “Poor woman, I pity thee.” Janet answered with
great gravity, yet cheerfulness, “Poor! I am not poor; you cannot
make me poor! God is my portion; you cannot make me poor!”
On the 3d of February, the privy council passed an act for
classifying prisoners; but the king dying, these measures underwent
considerable alteration. Charles, it is said, having become dissatisfied
with the rash violence of the Duke of York’s proceedings, meditated
the recall of his favourite bastard Monmouth, the exile of his brother,
and the adoption of more moderate measures. If he entertained any
such designs, they were never to be accomplished. An attack of
apoplexy, or poison, as was suspected at the time, finished all his
earthly projects; and, after a few days’ illness, he died in the fifty-
fifth year of his age. But oh! how different his deathbed from the
scaffold scenes we have been recording. He could only mutter he
hoped he would climb to heaven after all! and eagerly grasped at
the delusive phantoms of Romish superstition. When Huddleston, a
papist priest, who had saved his life at Worcester, was introduced to
save his soul, he sighed out expressively, “He is welcome!” received
the last sacraments of that church, and expired in her communion.
BOOK XXI.
A.D. 1685.
Accession of James VII.—Proceedings of the privy council—Field murders—
Northern commission—Indemnity—Outrages in the south—Two women
drowned—John Brown, the Christian carrier—Parliament—Argyle’s expedition—
Suspected persons sent to Dunotter—Argyle defeated—taken—executed—
Colonel Rumbold—Nisbet of Hardhill and other sufferers.
An express which left London on the 2d of February, arrived in
Edinburgh on the 6th, bringing intelligence of the king having been
struck with an apoplectic fit. On the 10th, early in the morning, the
privy council received the news of his death, and at ten o’clock, the
authorities proceeded in their robes to the cross, where the
Chancellor, “who,” says Fountainhall, “carried his own purse, and
weeping,” proclaimed James Duke of Albany, the only undoubted
and lawful king of this realm, under the name of James VII. But he
had not taken, and never did take, the Scottish coronation oath:—so
scrupulous was he with regard to his own conscience in matters of
religion. The proclamation, however, which was sent down from
London, paid less respect to the consciences of his subjects, who
were bound by every sacred and constitutional tie to resist popery
and popish rulers. After declaring that his majesty, their only
righteous sovereign over all persons and in all causes, held his
imperial crown from God alone, thus concluded—“And we—(the
lords of his majesty’s privy council, with the concurrence of several
others, lords spiritual and temporal, barons and burgesses of this
realm)—hereby give our oaths, with uplifted hands, that we shall
bear true and faithful allegiance unto our said sacred Sovereign,
James VII., King of Great Britain, France, and Ireland, Defender of
the Faith!! &c. and to his lawful heirs and successors; and shall
perform all duties, service, and obedience to him, as becomes his
faithful, loyal, and dutiful subjects. So help us GOD.” Then followed
another, announcing that his majesty continued all the servants of
the crown in their offices till he had leisure to send down new
commissioners.
Next day the Court of Session met, when the lords not only took
the oath of allegiance, and swore the test again themselves, but
administered them likewise to all the advocates, clerks, and writers.
The king’s speech to his cabinet—-in which he promised to follow
the example of his brother in his great clemency and tenderness to
his people, to preserve the government in church and state, as by
law established; and as he would never depart from the just rights
and prerogatives of the crown, so he would never invade any man’s
property—was extensively circulated; and the people were desired to
believe that the royal papist would promote the Protestant religion,
or at least preserve it.
As a practical illustration of his majesty’s professions, the council
appointed a committee to inquire into the state of the prisoners in
the Canongate jail; and, upon their report, sent two to the justiciary,
and fourteen to the plantations, because they would not violate their
consciences; and for the same obstinacy, the Dumbarton
commission court fined John Napier of Kilmahew in £2000 sterling;
John Zuil of Darleith, £1000; John Campbell of Carrick, £1500, for
himself and lady; and Isabel Buchanan, £100; and ordered them to
be imprisoned till they paid their fines, or gave satisfaction to
Queensberry, the lord-treasurer.
At the same time, the work of blood went on in the fields. Captain
Bruce surprised (February 19th) six of the wanderers on Lochenket-
muir, in Galloway, and ordered four of them to be shot without
further inquiry. The other two he carried to Sir Robert Grierson of
Lag, at Irongray, who, upon their refusing the abjuration, instantly
hanged them upon an oak-tree. One of them, a married man, before
his execution, was asked if he had any word to send to his wife,
answered, “I leave her and my two babes on the Lord and on his
promise;—a father to the fatherless, and an husband to the widow is
the Lord, in his holy habitation.” Two days after, five were murdered
at Kirkconnel; and early next month, other three, in the parish of
Kirkpatrick, were despatched in the same summary manner, by the
same miserable slave of the prelates.
But the day did not suffice. Like the wild beasts, these monsters
prowled about at night, seeking for their prey. On the 28th, about
eleven o’clock, p.m., Lieutenant Douglas surrounded the house of
Dalwin, and apprehended David Martin. When going away, they
perceived a youth, Edward Kyan, concealing himself between the
end of one house and the sidewall of another. He was immediately
dragged forth; and, without being asked any other question than
where he lived, the lieutenant shot him through the head, first with
one pistol and then with another; and the soldiers pretending to
observe some motion, shot him a third time. Martin underwent a
more aggravated death. When the soldiers stripped him of his coat,
they made him kneel beside the mangled body of his friend. Six
were ordered to present their pieces, when another of the party
stept between them and their intended victim, and begged the
lieutenant to spare him till next day, alleging they might get some
discoveries, to which Douglas consenting, his life was spared; but
terror had deprived the poor youth of his reason, who at the same
time being struck with palsy, was carried to bed, where he lingered
four years, and died. Several women compassionating the sufferer,
were cruelly beat and wounded, for displaying the natural sympathy
of their sex. After this exploit, Douglas caught one Edward Mackeen,
and because he had a flint-stone, perhaps for striking fire in his
hiding-place, shot him without other evidence of guilt.
Sir Robert Grierson of Lag, while ranging the country, having
surprised Mr Bell of Whiteside, step-son to Viscount Kenmuir, with
whom he himself was well acquainted, and other four in company, in
the parish of Tongland, Galloway, they surrendered without
resistance, upon assurance of having their lives spared; but the
wretch murdered them instantly, without even allowing them time to
pray; and when Mr Bell earnestly begged only for a quarter of an
hour to prepare for death, he refused it with an oath, asking
contemptuously, “What the devil! have you not had time enough to
prepare since Bothwell?”
While the south suffered severely, the north was not exempted.
On the 2d of March, the Earls of Errol and Kintore, and Sir George
Monro of Culrain, who had been sent thither commissioners, gave in
their report to the council, and have thus themselves recorded the
oppressions for which they received the thanks of their worthy
employers. On their arrival in Morayshire, their first act was to cause
a gallows be erected at Elgin, where the court sat, in order to
stimulate the loyalty of the inhabitants. Then they issued orders to
the sheriff for summoning all disorderly persons within the shires of
Banff, Ross, and Sutherland, to appear before them on a certain day,
and forbade any person to leave the district without their license,
and all who entered it from the south to produce their papers for
examination. At the same time, they graciously “allowed” the
heritors and the burghs to meet and make address of what they
would offer for the security and the peace of the government; and
they “unanimously and voluntarily!” made offer of three months’
supply, signed a bond for securing the peace, and did also swear the
test and oath of allegiance, except a few heritors, to whom the lords
thought fit not to tender the same at that time, but who appeared
willing to take it, and some loyal persons absent on excuses—
evidently papists, as these alone among the recusants found any
favour.[160]
160.
This appears pretty plain from the manner in which Presbyterians were
treated and the way their fines were disposed of. The Laird of Grant was
fined in £42,000, Scots; the Laird of Brody, £24,000; Laird of Lethin,
£40,000; Francis Brody of Miltoun, £10,000; Francis Brody of Windyhills,
£3333: 6: 8.; James Brody of Kinlee, £333: 6: 8. These were the sums as
reported to the council. In a particular narrative sent Wodrow by “a worthy
gentleman in Murray, upon whom the reader may depend for the truth of it,”
the sums are rated higher; and it is mentioned besides, that the Laird of
Brody—this Brody’s grandfather, which family seems, either from their wealth
or worth, or both, to have been peculiarly mulcted—was fined forty-five
thousand merks, merely for having a conventicle in his house. Of this
plunder, £22,000 were paid to one Colonel Maxwell, a papist; £40,000,
Lethin’s fine, were gifted to the Scottish papistical college at Douay, which
was compounded for; £30,000 paid to the Earl of Perth. The remainder
appears to have been bestowed on the satellites of the party. Gray of Crichy,
who adjudged the estate, got the proceeds.—Wodrow, vol. ii. p. 468.
They did very strictly examine all the ministers and elders, with
several persons of honour and loyalty, anent the disorderly persons
therein, libelled all persons delated, banished some, fined others,
and remitted a few to the council. The aged Laird of Fowlis—“a
disorderly person not able to travel”!—they imprisoned at Tain, and
the younger, at Inverness, in case he refused the bond of peace.
They cleansed the country of all “outted” ministers and vagrant
preachers; banished four of them for keeping conventicles and
refusing to keep the kirk!!—one being an heritor, they fined in ten
thousand merks besides!—and sent the five prisoners to Edinburgh.
A good many common and very mean people, who were accused
and indicted for church disorders, upon inquiry being found to have
been formerly punished and since regular, were set free upon finding
security for their future good behaviour.
The case of the Laird of Grant, however, deserves especial notice,
for the peculiarly unprincipled rapacity displayed by the ravening
crew. The decreet against him was founded on his wife’s having
confessed two years and a half’s withdrawing from ordinances, his
keeping an unlicensed chaplain, hearing “outted” ministers preach
and pray several times, which he himself had confessed. To this he
answered in a petition to the council, for relief, April 2:—that the
parish church was vacant for a year and a half of the time
mentioned; and that during the remainder his wife was so unwell,
that she was given over by her physicians; and that both before and
after the time libelled, she had been a constant hearer. Nor did he or
his wife ever hear an “outted” minister either preach or pray, except
in the House of Lethin, when his mother-in-law, the Lady Lethin, was
on her deathbed, and there were not more than five or six present,
who were members of the family, performing the last sacred duties
to their dying relative; that Alexander Murray, called his unlicensed
chaplain, was never in his service, but was a minister, instituted by
Bishop Murdo Mackenzie into the kirk of Daviot, who had given up
his charge in consequence of bodily infirmity; and he (Grant) was
most desirous, and cheerfully offered, to give all the evidences and
demonstrations of his loyalty and affection to the government that
could be demanded. Yet did his majesty’s high commissioner and the
lords of the privy council, find “that the lords commissioners of the
district of Moray had proceeded conform to their instructions, in
fining the Laird of Grant, and ordained the same to be put to
execution, ay and while the said fine be fully satisfied and paid.”
About this time, rumours of Argyle’s intended invasion having
reached the council, they published what they called the king’s act of
indemnity to all below the rank of heritors and burgesses; but all
who were capable of paying a fine being excepted, it was considered
as a just “demonstration of Our innate clemency, which also has
shined in the whole line of our royal race;” and as it declared “Our
resolution to imitate our said dearest royal brother,” the
Presbyterians anticipated that they would reap little advantage from
such a boon. Nor were they mistaken; or if they had been so, the
council would soon have undeceived them; for on the 10th, they
gifted to the Laird of Pitlochie, one hundred of the prisoners “who
were willing to go to the plantations,” only excluding such as were
able to be fined—“all heritors who had above £100, Scots, rents.”
Nor did the wanton massacre in the fields intermit. Subalterns
intrusted with the power of life and death abused it, as might have
been expected; and the most valuable of the Scottish peasantry
were destroyed by a licentious soldiery, who delighted to indulge in
riot with the worst; but now their outrages deplorably increased,
especially those in the south and west, where a Cornet Douglas and
a Lieutenant Murray eminently distinguished themselves in this
cowardly warfare. Claverhouse went still farther, and endeavoured to
ruin the peace of mind, as well as plunder the estates and torture
the bodies, of the sufferers. On the 10th of March, he parcelled out
Annandale and Nithsdale into a number of divisions, of about six or
eight miles square. He then assembled the whole inhabitants, men
and women, old and young, belonging to each of them in one place,
and made them swear the oaths of allegiance and abjuration, and
afterwards promise that they would renounce their hopes of heaven,
if ever they repented of what they had done! If any one refused, he
was carried to a little distance from the rest, a napkin tied over his
face, and blank cartridge fired over his head. Having thus suffered
the terror of death, he was once more offered his life upon taking
the test and becoming bound to inform against all disloyal persons.
Few were able to withstand so trying a compulsitor. But perhaps the
most heartless trait in his conduct, was his treatment of the children.
Those above six and under ten years of age were collected together,
and a party of soldiers being drawn out before them, they were bid
pray, for they were going to be shot; and when the terrified
creatures answered—“Sir, we cannot pray,” they were told they
would be let free if they would tell where they saw men with guns in
their houses, and if they got any meat or drink there.
Among the villanous apostates who associated with the
wanderers, on purpose to betray them, was Andrew Watson, who
got acquainted with many of their hiding-places throughout Galloway
and Nithsdale, and among others of a cave near Ingliston, which had
been a secret and secure retreat to many for several years. He gave
information of it. In consequence, Colonel James Douglas and
Lieutenant Livingstone surprised five lurking within it; among whom
was a brother of the proprietor of the estate, John Gibson. He was
first taken out; and being permitted to pray, he went through his
devotional exercises with a cheerfulness that astonished his
murderers, and greatly encouraged his sister, who through the
compassion of some of the soldiers, had got admission to him,
telling her that was the joyfulest day he had ever had in the world;
and his mother also being allowed to speak with him, he begged her
not to give way to grief, but to bless the Lord upon his account, who
had made him both willing and ready to suffer for his cause. The
rest were then despatched, without being allowed formally to pray.
They lie buried in Glencairn churchyard. Another wretch of the same
description, an Alexander Ferguson of Kilkerran, informed against
John Semple, one of the excellent of the earth, who led a quiet and
peaceable life, nor had ever carried arms or had been connected
with any disturbance, only he came not to church to hear the
Episcopal minister, and did sometimes relieve the poor. A party at
midnight, guided by the informer, came to his house, and after
seeing them shoot the good man, while attempting to escape at a
window, the miscreant went with the murderers to the barns of
Bargeny, and caroused with them till next night.
Towards the end of this month, three women—Margaret
Maclauchlin, a widow about sixty-three years of age; Margaret
Wilson, aged eighteen; and Agnes Wilson, aged thirteen—were
brought to trial before the commission court, composed of the Laird
of Lag, Colonel David Graham, sheriff, Major Windham, Captain
Strachan, and Provost Cultrain, indicted for rebellion, Bothwell
Bridge, Airs-moss, and being present at twenty conventicles. The
absurdity of the charges carried their own refutation. But this was
not sufficient, there was no proof produced; but they refused to
swear the abjuration-oath, and were therefore condemned to be
drowned. On the last day of April, the council, when the subject was
laid before them, suspended the execution of the sentence for an
indefinite time, and recommended to the secretaries to procure a
complete remission; but the voice of mercy, though uttered by the
council on behalf of helpless females, could not be listened to. The
only argument that had any effect was money; and the afflicted
father was allowed to purchase, with nearly the whole of his worldly
substance, the life of his youngest daughter. Windram guarded the
others to the place of execution, where an immense number of
spectators assembled to witness the unusual sight. The old woman’s
stake was fixed much further in the sands than her companion’s, and
thus was first despatched. When the water was overflowing her, one
of the persecutors asked her what she thought of that sight? She
answered, “What do I see? Christ and his members wrestling there.
Think you we are the sufferers? No! it is Christ in us; for he sends
none a warfare on their own charges.” She then sung the 25th Psalm
from the 7th verse, and read the 8th chapter of the Romans, and
then prayed. While engaged in prayer, the water covered her. She
was then dragged out by Windram’s orders, and when sufficiently
recovered to speak, was asked if she would pray for the king. She
answered, she wished the salvation of all men, and the damnation of
none. “Dear Margaret,” urged a bystander, deeply affected, “Dear
Margaret, say—God save the king; say—God save the king!” She
replied with great composure—“God save him if he will; it is his
salvation I desire!” on which, it is said, Lag bellowed out—“Damned
bitch! we do not want such prayers:—tender the oaths to her;”
which she refused, and was immediately thrust under the water.
Sir James Johnstone of Wester-raw, another hypocritical turncoat
who had sworn the covenants and was now a zealous apostle of
Episcopacy, evinced his ardour in the cause, by ordering the corpse
of one of the wanderers who had died in the house of Widow Hislop,
to be dug out of his grave and exposed. The house they pillaged and
pulled down, and turned the widow and her children to the fields.
Her son had been previously murdered by Wester-raw, to whom
Claverhouse had brought him; yet while procuring his death, the
latter seemed to have some compunctious visitations, for he said to
his associates, ere the deed was perpetrated, “The blood of this poor
man be upon you, Wester-raw—I am free of it.”
The christian Carrier shot by Claverhouse anno 1685.
Vide page 529
Edinr. Hugh Paton, Carver & Gilder to the Queen 1842.
May-day morning was dewed this year with the blood of John
Brown, in Priestfield, a carrier to his employment, distinguished by
the honourable title, or, as they called it, nicknamed, “The Christian
Carrier.” Having performed Airs-moss between five and six o’clock—
fearless of danger, for he was blameless in life—he had gone out to
cast peats in the field. While thus engaged, he was suddenly
surrounded by Claverhouse with three troops of horse, and brought
back to his humble dwelling. After the usual questions, Claverhouse
said to him—“Go to your prayers, for you shall immediately die.” He
did so; but when praying, the impatient assassin thrice interrupted
him, saying—“I gave you time to pray, and ye’re begun to preach.”
John turning calmly round upon his knees, replied—“Sir, you know
neither the nature of preaching nor praying, that calls this
preaching,” and then continued without confusion. When he had
ended, Claverhouse said, “Take good-night of your wife and
children.” She was standing weeping, with an infant in her arms, and
another child of his first wife beside her. He came near and said,
“Now, Marian, the day is come that I told you would come when I
first spoke to you of marrying me.”—“Indeed, John,” she replied, “I
can willingly part with you.”—“Then,” answered he, “that’s all that I
desire. I have no more to do but die. I have been in case to meet
with death for many years.” He kissed his wife and bairns, and
wished purchased and promised blessings to be multiplied upon
them. When he had finished, Claverhouse ordered six of his men to
fire, which they did; and the most part of the bullets striking,
splintered his skull, and scattered his brains upon the ground.[161]
“What thinkest thou now of thy husband, woman?” asked
Claverhouse. “I ever thought much good of him,” she replied; “and
as much now as ever.”—“It were but justice to lay thee beside him,”
said the murderer.—“If ye were permitted,” answered the new made
widow, “I doubt not but your cruelty would go that length:—but how
will ye make answer for this morning’s work?”—“To man,” said he, “I
can be answerable; and as for God I will take him in my own hand,”
and mounting his horse, marched off with his troop. The poor
woman, left with the corpse of her husband lying before her, set the
bairns upon the ground, and gathered his brains, and tied up his
head, and straighted his body, and covered him with her plaid, and
sat down and wept; it being a very desert place, where never victual
grew, and far from neighbours. Claverhouse afterwards repeatedly
confessed, that he never could altogether forget Brown’s prayer.
161.
Wodrow says the men refused, and Claverhouse pistolled the good man with
his own hand.
Amid these bloody scenes, a parliament was convoked, April 28, to
confirm the despotism by which they were enacted, for so
subservient had those assemblies now become, that, like the
parliaments of Paris, they met only to register the royal edicts. The
Duke of Queensberry was the commissioner. In his first message to
his first high court, James frankly told them that his main design was
to give them an opportunity not only “of showing their duty to Us in
the same loyal manner as they had done to Our late dearest brother,
but likewise of being patterns to others in their exemplary
compliance with Our desires as they had most eminently been in
times past, to a degree never to be forgotten by Us; but also of
protecting religion against fanatical contrivances, murderers, and
assassins, and to take care that such conspirators might meet their
just deservings.”
The speeches of the Commissioner and Chancellor echoed the
letter, and inveighed against the persecuted Presbyterians, as
wretches of such monstrous principles and practices, as past ages
never heard, nor those to come will hardly believe, whose
extirpation his majesty asked, as no more rebels against their king,
than enemies of mankind. The address followed in a strain of
adulation and abject baseness, clearly evincing the absence of every
right-hearted man from the meeting. “We can assure your majesty,”
said they, “that the subjects of this your majesty’s ancient kingdom,
are so desirous to exceed all their predecessors in extraordinary
marks of affection and obedience, that, God be praised! the only
way to be popular with us is to be eminently loyal;” “and therefore
your majesty may expect that we will think your commands sacred
as your person, and that your inclination will prevent our debates.”
Their first act was “an act ratifying and confirming all the acts and
statutes formerly passed for the security, liberty, and freedom of the
true church of God and the Protestant religion.” Their next, an offer
of their lives and fortunes to the king, accompanied by a declaration
of their abhorrence and detestation, not only of the authors and
actors of all preceding rebellions against the sovereign, but likewise
all principles and positions which are contrary or derogatory to the
king’s sacred, supreme, sovereign, absolute power and authority,
which none, whether persons or collective bodies, can participate of
any manner of way, or upon any pretext, but in dependance on him,
and by commission from him. All persons summoned as witnesses
against frequenters of conventicles, who refused to answer, were to
be reputed guilty of the same crimes as the persons accused—to
administer or receive the covenants, or even to write in their
defence, was declared treason. Field preachers were already
subjected to confiscation or death. Hearing was now made liable to
the same punishment, which was also extended to preachers in
house conventicles, expounding the Scriptures, or even worshipping
God in a private house. If there were more than five persons, in
addition to the family, present, it was to be considered as an house-
conventicle; but if any were listening outside, it was to be reputed a
field-conventicle, for which the whole congregation, with the
preacher, were to suffer death. At the same time, the test was
extended, with exemptions only favourable to the papists. Then, as a
final winding up of this scene of iniquity, followed the forfeiture of Sir
John Cochrane, Sir Patrick Home, Lord Melville, Pringle of
Torwoodlee, Stuart of Cultness, Fletcher of Saltoun, and several
other gentlemen, implicated in the late conspiracy with Cessnock
and his son, whose estates, together with those of Argyle, Douchal,
and Jarvieswood, were annexed for ever to the crown; while to
preserve their own estates from a similar fate, the act of entail was
passed, professing to secure the estates of the nobles, but in fact
enabling them to evade the just claims of their creditors.
Meanwhile the Scottish exiles, reduced to despair, resolved to
attempt the liberation of their native land, with which they had never
ceased to hold a secret correspondence; and after many meetings in
Holland, an expedition set sail on the 2d of May, of which Argyle was
elected General, and the expense supplied by Mrs Smith, a rich
sugar baker’s widow, at Amsterdam; but accounts of his
preparations had been sent to the government, and measures were
taken to frustrate his object before his arrival, which were increased
on the council’s receiving notice from the Bishop of Orkney, that the
Earl had touched there on his passage. The strengths in Argyleshire
were ordered to be dismantled, and the sons of the chiefs to be sent
as hostages to Edinburgh; and all the non-conformist prisoners,
about two hundred and fifty, were, on May 18th, hurried off under
night from the jails of Edinburgh and Canongate, and sent across
the Firth in open boats to Burntisland, and confined for two days and
nights in two small rooms, where they had no space almost to lie
down, and no place to retire to. Nor had they any provisions, and
only a few were allowed to purchase a little bread and water.
When it was imagined hunger and fatigue would have worn out
their powers of endurance, liberty was offered them on condition of
swearing the oaths of allegiance and supremacy; but many who
could have taken the first refused the last as blasphemous. To
acknowledge a papist as the head of Christ’s church, was what they
durst not do. About forty complied and were released, the rest were
driven like cattle to Dunotter Castle—an old, ruinous building, in the
county of Kincardine, situated on an almost insulated perpendicular
rock, 150 feet above the level of the sea, where they were received
by George Keith of Whiteridge, sheriff-depute of Mearns, and thrust
into a dark vault, with only one small window towards the sea, and
full of mire ancle deep. They had no provision but what they were
forced to purchase, at a dear rate and of the worst quality, from the
governor’s brother. Even their water was brought in small quantities,
though their keepers would sometimes pour whole barrels into the
cavern to increase their discomfort. Means of cleanliness they had
none, and the smell of the place became so noxious, for it was a
warm summer, that several of them died; and it was considered little
less than miraculous that any survived.
Within a few days, the governor removed about forty of the men
to another low small cell, scarcely less disagreeable, as the only light
or air they had was through a small crevice in the wall, near which
they used to lie down by turns, that they might breathe a little fresh
air. Shortly after, the governor’s lady having visited these miserable
abodes, prevailed upon her husband to separate the prisoners; and
the females were removed from the large vault into two more
comfortable smaller apartments. The men, however, continued to
suffer the utmost misery in the large vault, and a contagious
disorder having broken out among them, many died. The survivors,
reduced to desperation, endeavoured to escape, and having got out
one night by the window, were creeping along the hazardous
precipice, when an alarm was given by some women—most probably
the soldiers’ wives—who were washing near the rock. Immediately
the guards were called, the gates shut, and the hue and cry raised,
and fifteen were intercepted; yet twenty-five had got off before the
alarm was given. Those who were retaken, were most inhumanly
tortured. They were laid upon their backs upon a form, their hands
bound down to the foot of the form, and a burning match put
between every finger—“six soldiers attending by turns to blow the
matches,” and keep them in flame—and this was continued for three
hours without intermission by the governor’s orders! Several died
under this torture, and those who survived were disabled for life.
About July, in consequence of representations to the council, the
prisoners were brought south, and the Earls Marishal, Errol, Kintore,
Panmure, and the Lord President of the Court of Session,
empowered to call them before them, and banish such as would not
take the oaths of allegiance and abjuration, to his majesty’s
plantations—the men having their ears cut off, the women their
cheeks branded—with certification that such as should return to the
kingdom should incur the pain of death.
Unfortunately for the success of Argyle’s expedition, while the
Scottish government were fully apprised of its approach, adverse
winds and untoward circumstances retarded its progress; so that
when the Earl arrived, he found he had been anticipated by the
measures of the council; and where he expected willing vassals, he
met only heartless or deceitful adherents; but the worst symptom
was the insubordination of his officers, especially Sir Patrick Home
and Sir John Cochrane, who disputed when they ought to have
obeyed, and argued when they should have acted. In such
circumstances, after landing, he lost instead of gathering strength as
he advanced, while the ships and military stores he left behind in the
Castle of Ellengreg, fell, together with it, into the hands of some
English frigates, which arrived on the coast. He published two
proclamations, but they produced no effect, and unhappily were
even counteracted from quarters whence, if he had not received
decided support, it was not too much to have expected a friendly
neutrality.
The wanderers, although they were favourable to Argyle,
unfortunately could not embark with him, upon account of the too
promiscuous admittance of persons to trust in that party, and
because they could not espouse his declaration as the state of their
quarrel. But they published another declaration at Sanquhar, May 28,
1685, against the usurpation of a bloody papist advancing himself to
the throne, as the height of confederacy with an idolater, forbidden
by the law of God and contrary to the law of the land.
Thwarted at every step, and prevented from following his own
brave resolution, and giving the enemy battle, Argyle was at last,
either by treachery or mistake, landed in a morass, where his
baggage and horse were swamped, and universal confusion ensuing,
his little band, which had with difficulty been collected and kept
together, despersed during the night. Argyle himself, forced to
withdraw, was retiring in the disguise of a peasant, when he was
attacked in crossing the Cart at Inchannon (June 17th) by two of the
militia, with whom he grappled, and would have overcome, had not
five more arrived and wounded and secured him. When falling, he
had exclaimed—“Alas! unfortunate Argyle,” which first discovered
him to his captors, who appeared deeply concerned at his seizure,
but durst not let him go. He was immediately carried to Edinburgh,
where the marked ignominy with which he was treated, bore strong
testimony to the high estimation in which the illustrious prisoner was
held. By an especial order of the council, dated June 20th, he was
conducted through the Water-gate, and carried up the main streets
to the Castle, with his hands bound and his head bare, preceded by
the hangman, and surrounded by Captain Graham’s guards; and
there he was safely lodged in irons. In the privy council, it was
debated whether he should be tried for his present rebellion or
executed upon his former sentence. The most iniquitous proposition
of the two prevailed, in which the king of course concurred, only he
suggested the propriety of the Earl’s being tortured before he was
executed, in order to try if any information could be elicited
respecting those who had assisted or who were acquainted with the
expedition. His openness upon his examination prevented his
persecutors incurring the infamy which the royal mandate implied,
and he was ordered to prepare for execution next day after the
receipt of the royal letter.
The interval he spent with a cheerful tranquillity, which soothed
his afflicted relatives and amazed his political antagonists. Being
accustomed to sleep a little after dinner, on his last solemn day he
retired to his closet, and laid himself down on bed, and for about a
quarter of an hour slept as sweetly as ever he did. At this moment
an officer of state came to inquire for him. Being informed that he
was asleep and desired not to be disturbed, the officer, who doubted
the story, insisted upon being admitted to his lordship. He was
admitted accordingly, but instantly rushed from the apartment to a
friend’s house on the Castle Hill, and threw himself on a bed in great
agony of mind. When asked by the lady of the house if he was
unwell or would take a glass of sack—“No! no!” replied he; “I have
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
Let us accompany you on the journey of exploring knowledge and
personal growth!
textbookfull.com