|
|
1 | (6) |
|
2 Understanding Decimal Addition |
|
|
7 | (8) |
|
2.1 Experience Versus Understanding |
|
|
7 | (1) |
|
|
8 | (5) |
|
2.2.1 2 + 1 = 3 is a Definition |
|
|
9 | (1) |
|
2.2.2 1 + 2 = 3 is a Theorem |
|
|
9 | (2) |
|
2.2.3 9 + 1 = 10 is a Brilliant Theorem |
|
|
11 | (2) |
|
|
13 | (1) |
|
|
14 | (1) |
|
3 Basic Mathematical Concepts |
|
|
15 | (18) |
|
|
16 | (5) |
|
3.1.1 Implicit Quantification |
|
|
16 | (1) |
|
|
17 | (1) |
|
3.1.3 Sequences, Their Indexing and Overloading |
|
|
18 | (2) |
|
3.1.4 Bytes, Logical Connectives, and Vector Notation |
|
|
20 | (1) |
|
|
21 | (3) |
|
|
24 | (1) |
|
|
24 | (1) |
|
|
25 | (1) |
|
|
25 | (4) |
|
|
25 | (2) |
|
3.4.2 Directed Acyclic Graphs and the Depth of Nodes |
|
|
27 | (1) |
|
|
28 | (1) |
|
|
29 | (1) |
|
|
30 | (3) |
|
4 Number Formats and Boolean Algebra |
|
|
33 | (18) |
|
|
33 | (4) |
|
4.2 Two's Complement Numbers |
|
|
37 | (2) |
|
|
39 | (8) |
|
|
42 | (2) |
|
|
44 | (1) |
|
4.3.3 Disjunctive Normal Form |
|
|
45 | (2) |
|
|
47 | (1) |
|
|
48 | (3) |
|
|
51 | (20) |
|
|
51 | (5) |
|
|
56 | (4) |
|
|
60 | (6) |
|
|
66 | (1) |
|
|
66 | (1) |
|
|
67 | (4) |
|
|
71 | (10) |
|
6.1 Basic Random Access Memory |
|
|
71 | (2) |
|
6.2 Read-Only Memory (ROM) |
|
|
73 | (1) |
|
6.3 Combining RAM and ROM |
|
|
73 | (2) |
|
6.4 Three-Port RAM for General-Purpose Registers |
|
|
75 | (2) |
|
|
77 | (2) |
|
|
79 | (1) |
|
|
79 | (2) |
|
|
81 | (28) |
|
7.1 Adder and Incrementer |
|
|
81 | (8) |
|
7.1.1 Carry Chain Adder and Incrementer |
|
|
82 | (1) |
|
7.1.2 Conditional-Sum Adders |
|
|
83 | (3) |
|
7.1.3 Parallel Prefix Circuits |
|
|
86 | (2) |
|
7.1.4 Carry-Look-Ahead Adders |
|
|
88 | (1) |
|
|
89 | (5) |
|
7.3 Arithmetic Logic Unit (ALU) |
|
|
94 | (2) |
|
|
96 | (2) |
|
7.5 Branch Condition Evaluation Unit |
|
|
98 | (2) |
|
|
100 | (1) |
|
|
101 | (8) |
|
8 A Basic Sequential MIPS Machine |
|
|
109 | (36) |
|
|
110 | (2) |
|
|
110 | (1) |
|
|
111 | (1) |
|
|
111 | (1) |
|
|
112 | (11) |
|
8.2.1 Configuration and Instruction Fields |
|
|
112 | (2) |
|
8.2.2 Instruction Decoding |
|
|
114 | (1) |
|
|
115 | (3) |
|
|
118 | (1) |
|
|
118 | (2) |
|
|
120 | (2) |
|
|
122 | (1) |
|
8.3 A Sequential Processor Design |
|
|
123 | (17) |
|
8.3.1 Hardware Configuration |
|
|
123 | (2) |
|
8.3.2 Fetch and Execute Cycles |
|
|
125 | (1) |
|
|
125 | (1) |
|
|
126 | (2) |
|
8.3.5 Proof Goals for the Execute Stage |
|
|
128 | (1) |
|
8.3.6 Instruction Decoder |
|
|
128 | (4) |
|
8.3.7 Reading from General-Purpose Registers |
|
|
132 | (1) |
|
8.3.8 Next PC Environment |
|
|
133 | (2) |
|
|
135 | (1) |
|
8.3.10 Shifter Environment |
|
|
136 | (1) |
|
|
137 | (1) |
|
8.3.12 Collecting Results |
|
|
137 | (1) |
|
|
138 | (1) |
|
8.3.14 Memory Environment |
|
|
138 | (2) |
|
8.3.15 Writing to the General-Purpose Register File |
|
|
140 | (1) |
|
|
140 | (1) |
|
|
141 | (4) |
|
9 Some Assembler Programs |
|
|
145 | (14) |
|
|
146 | (1) |
|
9.2 Software Multiplication |
|
|
147 | (2) |
|
|
149 | (7) |
|
9.3.1 School Method for Non-negative Integer Division |
|
|
149 | (1) |
|
9.3.2 `Small' Unsigned Integer Division |
|
|
150 | (3) |
|
9.3.3 Unsigned Integer Division |
|
|
153 | (2) |
|
|
155 | (1) |
|
|
156 | (1) |
|
|
156 | (3) |
|
|
159 | (20) |
|
10.1 Introduction to Context-Free Grammars |
|
|
160 | (8) |
|
10.1.1 Syntax of Context-Free Grammars |
|
|
160 | (1) |
|
10.1.2 Quick and Dirty Introduction to Derivation Trees |
|
|
161 | (2) |
|
|
163 | (2) |
|
10.1.4 Clean Definition of Derivation Trees |
|
|
165 | (2) |
|
10.1.5 Composition and Decomposition of Derivation Trees |
|
|
167 | (1) |
|
10.1.6 Generated Languages |
|
|
168 | (1) |
|
10.2 Grammars for Expressions |
|
|
168 | (7) |
|
10.2.1 Syntax of Boolean Expressions |
|
|
168 | (2) |
|
10.2.2 Grammar for Arithmetic Expressions with Priorities |
|
|
170 | (1) |
|
|
171 | (4) |
|
10.2.4 Distinguishing Unary and Binary Minus |
|
|
175 | (1) |
|
|
175 | (1) |
|
|
176 | (3) |
|
|
179 | (74) |
|
|
180 | (10) |
|
11.1.1 Names and Constants |
|
|
180 | (2) |
|
|
182 | (1) |
|
11.1.3 Arithmetic and Boolean Expressions |
|
|
183 | (1) |
|
|
183 | (1) |
|
|
184 | (1) |
|
11.1.6 Type and Variable Declarations |
|
|
184 | (1) |
|
11.1.7 Function Declarations |
|
|
185 | (1) |
|
11.1.8 Representing and Processing Derivation Trees in C0 |
|
|
186 | (3) |
|
11.1.9 Sequence Elements and Flattened Sequences in the C0 Grammar |
|
|
189 | (1) |
|
|
190 | (9) |
|
|
190 | (3) |
|
|
193 | (1) |
|
|
194 | (2) |
|
11.2.4 Variables and Subvariables of all C0 Configurations |
|
|
196 | (1) |
|
11.2.5 Range of Types and Default Values |
|
|
197 | (2) |
|
|
199 | (11) |
|
11.3.1 Variables, Subvariables, and Their Type in CO Configurations c |
|
|
199 | (3) |
|
11.3.2 Value of Variables, Type Correctness, and Invariants |
|
|
202 | (2) |
|
11.3.3 Expressions and Statements in Function Bodies |
|
|
204 | (3) |
|
|
207 | (2) |
|
11.3.5 Result Destination Stack |
|
|
209 | (1) |
|
11.3.6 Initial Configuration |
|
|
209 | (1) |
|
11.4 Expression Evaluation |
|
|
210 | (12) |
|
11.4.1 Type, Right Value, and Left Value of Expressions |
|
|
212 | (2) |
|
|
214 | (1) |
|
|
215 | (2) |
|
11.4.4 Pointer Dereferencing |
|
|
217 | (1) |
|
|
217 | (1) |
|
|
218 | (1) |
|
|
219 | (1) |
|
|
219 | (2) |
|
|
221 | (1) |
|
|
222 | (10) |
|
|
223 | (1) |
|
11.5.2 Conditional Statement |
|
|
224 | (1) |
|
|
224 | (1) |
|
|
225 | (2) |
|
|
227 | (3) |
|
|
230 | (2) |
|
11.6 Proving the Correctness of C0 Programs |
|
|
232 | (14) |
|
11.6.1 Assignment and Conditional Statement |
|
|
232 | (2) |
|
11.6.2 Computer Arithmetic |
|
|
234 | (1) |
|
|
234 | (2) |
|
|
236 | (6) |
|
|
242 | (4) |
|
|
246 | (2) |
|
|
248 | (5) |
|
|
253 | (80) |
|
12.1 Compiler Consistency |
|
|
254 | (21) |
|
|
254 | (2) |
|
12.1.2 Size of Types, Displacement, and Base Address |
|
|
256 | (4) |
|
12.1.3 Consistency for Data, Pointers, and the Result Destination Stack |
|
|
260 | (2) |
|
12.1.4 Consistency for the Code |
|
|
262 | (2) |
|
12.1.5 Consistency for the Program Rest |
|
|
264 | (6) |
|
12.1.6 Relating the Derivation Tree and the Program Rest |
|
|
270 | (5) |
|
12.2 Translation of Expressions |
|
|
275 | (27) |
|
12.2.1 Sethi-Ullman Algorithm |
|
|
275 | (5) |
|
|
280 | (6) |
|
12.2.3 Composable MIPS Programs |
|
|
286 | (2) |
|
12.2.4 Correctness of Code for Expressions |
|
|
288 | (2) |
|
|
290 | (1) |
|
|
291 | (2) |
|
|
293 | (1) |
|
|
294 | (1) |
|
12.2.9 Dereferencing Pointers |
|
|
295 | (1) |
|
|
296 | (1) |
|
|
297 | (1) |
|
12.2.12 Binary Arithmetic Operators |
|
|
298 | (2) |
|
|
300 | (1) |
|
12.2.14 Translating Several Expressions and Maintaining the Results |
|
|
301 | (1) |
|
12.3 Translation of Statements |
|
|
302 | (14) |
|
|
303 | (1) |
|
|
304 | (1) |
|
|
305 | (2) |
|
|
307 | (1) |
|
|
308 | (1) |
|
|
308 | (5) |
|
|
313 | (2) |
|
12.3.8 Summary of Intermediate Results |
|
|
315 | (1) |
|
12.4 Translation of Programs |
|
|
316 | (6) |
|
12.4.1 Statement Sequences |
|
|
316 | (1) |
|
|
317 | (1) |
|
12.4.3 Function Declaration Sequences |
|
|
318 | (1) |
|
|
318 | (2) |
|
12.4.5 Jumping Out of Loops and Conditional Statements |
|
|
320 | (2) |
|
12.5 Compiler Correctness Revisited |
|
|
322 | (3) |
|
12.5.1 Christopher Lee and the Truth About Life After Death |
|
|
322 | (1) |
|
12.5.2 Consistency Points |
|
|
323 | (1) |
|
12.5.3 Compiler Correctness for Optimizing Compilers |
|
|
324 | (1) |
|
|
325 | (1) |
|
|
326 | (7) |
|
13 Compiler Consistency Revisited |
|
|
333 | (42) |
|
13.1 Reconstructing a Well-Formed CO Configuration |
|
|
334 | (21) |
|
13.1.1 Associating Code Addresses with Statements and Functions |
|
|
335 | (2) |
|
13.1.2 Reconstructing Everything Except Heap and Pointers |
|
|
337 | (3) |
|
13.1.3 Reachable Subvariables |
|
|
340 | (2) |
|
13.1.4 Implementation Subvariables |
|
|
342 | (5) |
|
13.1.5 Heap Reconstruction Is not Unique |
|
|
347 | (1) |
|
13.1.6 Heap Isomorphisms and Equivalence of CO Configurations |
|
|
348 | (3) |
|
13.1.7 Computations Starting in Equivalent Configurations |
|
|
351 | (4) |
|
|
355 | (10) |
|
|
356 | (4) |
|
13.2.2 Garbage-Collected Equivalent Configurations |
|
|
360 | (2) |
|
13.2.3 Construction of a Garbage-Collected MIPS Configuration |
|
|
362 | (3) |
|
|
365 | (7) |
|
|
365 | (1) |
|
|
366 | (1) |
|
13.3.3 Semantics and Compiler Correctness |
|
|
367 | (5) |
|
|
372 | (1) |
|
|
373 | (2) |
|
14 Operating System Support |
|
|
375 | (54) |
|
|
376 | (8) |
|
14.1.1 Types of Interrupts |
|
|
376 | (1) |
|
14.1.2 Special Purpose Registers and New Instructions |
|
|
376 | (2) |
|
14.1.3 MIPS ISA with Interrupts |
|
|
378 | (3) |
|
14.1.4 Specification of Most Internal Interrupt Event Signals |
|
|
381 | (1) |
|
|
381 | (3) |
|
14.1.6 Hardware Correctness |
|
|
384 | (1) |
|
|
384 | (7) |
|
|
385 | (3) |
|
|
388 | (3) |
|
|
391 | (30) |
|
14.3.1 Hardware Model of a Disk |
|
|
392 | (3) |
|
14.3.2 Accessing a Device with Memory-Mapped I/O |
|
|
395 | (2) |
|
14.3.3 Nondeterminism Revisited |
|
|
397 | (3) |
|
14.3.4 Nondeterministic ISA for Processor + Disk |
|
|
400 | (4) |
|
14.3.5 Hardware Correctness |
|
|
404 | (2) |
|
|
406 | (4) |
|
14.3.7 Disk Liveness in Reordered Computations |
|
|
410 | (4) |
|
14.3.8 C0 + Assembly + Disk + Interrupts |
|
|
414 | (3) |
|
|
417 | (4) |
|
|
421 | (3) |
|
|
424 | (5) |
|
15 A Generic Operating System Kernel |
|
|
429 | (74) |
|
15.1 Physical and Virtual Machines |
|
|
431 | (3) |
|
|
431 | (1) |
|
|
431 | (3) |
|
15.2 Communicating Virtual Machines |
|
|
434 | (4) |
|
|
434 | (1) |
|
|
435 | (3) |
|
|
438 | (14) |
|
|
439 | (2) |
|
15.3.2 Virtual Address Translation via C Data Structures |
|
|
441 | (1) |
|
15.3.3 Simulation Relation for Virtual Machines |
|
|
442 | (2) |
|
15.3.4 Encoding an Abstract Kernel by a Concrete Kernel |
|
|
444 | (2) |
|
15.3.5 Simulation Relation for the Abstract Kernel of CVM |
|
|
446 | (3) |
|
15.3.6 Technical Invariants |
|
|
449 | (1) |
|
15.3.7 Formulating the Correctness Theorem |
|
|
450 | (2) |
|
|
452 | (9) |
|
15.4.1 Overview of the runvm Primitive |
|
|
453 | (1) |
|
15.4.2 Program Annotations |
|
|
454 | (1) |
|
15.4.3 Maintaining k-consis |
|
|
455 | (3) |
|
15.4.4 Maintaining consis |
|
|
458 | (1) |
|
15.4.5 Maintaining inv-vm |
|
|
459 | (2) |
|
15.5 Simulation of CVM Steps |
|
|
461 | (17) |
|
|
461 | (2) |
|
15.5.2 C0 Step of the Kernel |
|
|
463 | (1) |
|
15.5.3 IS A Step of a User Without Interrupt |
|
|
464 | (2) |
|
15.5.4 Restoring a User Process |
|
|
466 | (4) |
|
|
470 | (2) |
|
15.5.6 Boot Loader and Initialization |
|
|
472 | (2) |
|
|
474 | (4) |
|
|
478 | (12) |
|
15.6.1 Testing for ipf Page Fault |
|
|
478 | (3) |
|
15.6.2 Auxiliary Data Structures |
|
|
481 | (4) |
|
15.6.3 Swapping a Page Out |
|
|
485 | (2) |
|
15.6.4 Swapping a Page In |
|
|
487 | (3) |
|
|
490 | (1) |
|
15.7 Other CVM Primitives and Dispatching |
|
|
490 | (9) |
|
15.7.1 Accessing Registers of User Processes |
|
|
491 | (1) |
|
15.7.2 Accessing User Pages |
|
|
491 | (1) |
|
|
492 | (5) |
|
15.7.4 Application Binary Interface and Dispatcher for the Abstract Kernel |
|
|
497 | (2) |
|
|
499 | (1) |
|
|
500 | (3) |
References |
|
503 | (4) |
Index |
|
507 | |