{"product_id":"program-construction-9780470848821","title":"Program Construction","description":"\u003cb\u003eBook Synopsis\u003c\/b\u003e\u003cbr\u003eMost texts on logic or discrete math fail to show why math and logic are fundamental tools for programmers. \u003ci\u003eProgram Construction\u003c\/i\u003e illustrates the importance of math and logic to programming, providing a complete, self-contained account of the principles of logical reasoning. Designed specifically so users can construct programs that meet their specifications, the book details program construction principles in a straightforward fashion, avoiding overly complicated theory, and then illustrating each with convincing examples.\u003cbr\u003e\u003cbr\u003e\u003cb\u003eTable of Contents\u003c\/b\u003e\u003cbr\u003e\u003cp\u003ePreface ix\u003c\/p\u003e \u003cp\u003e\u003cb\u003e1 A Science of Computing\u003c\/b\u003e \u003cb\u003e1\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003e1.1 Debugging 2\u003c\/p\u003e \u003cp\u003e1.2 Testing a Correct Program 3\u003c\/p\u003e \u003cp\u003e1.3 Testing an Incorrect Program 5\u003c\/p\u003e \u003cp\u003e1.4 Correct by Construction 6\u003c\/p\u003e \u003cp\u003e\u003cb\u003e2 A Searching Problem and Its Solution 9\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003e2.1 Problem Statement 9\u003c\/p\u003e \u003cp\u003e2.2 Problem Solution 11\u003c\/p\u003e \u003cp\u003e2.3 Proof of Correctness 12\u003c\/p\u003e \u003cp\u003e2.4 What, Why and How 14\u003c\/p\u003e \u003cp\u003e2.5 Exercises 15\u003c\/p\u003e \u003cp\u003e2.6 Summary 21\u003c\/p\u003e \u003cp\u003e\u003cb\u003e3 Calculational Proof 23\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003e3.1 The Nature of Proof 23\u003c\/p\u003e \u003cp\u003e3.2 Construction versus Verification 26\u003c\/p\u003e \u003cp\u003e3.3 Formatting Calculations 31\u003c\/p\u003e \u003cp\u003e3.3.1 Basic Structure 31\u003c\/p\u003e \u003cp\u003e3.3.2 Hints 32\u003c\/p\u003e \u003cp\u003e3.3.3 Relations between Steps 34\u003c\/p\u003e \u003cp\u003e3.3.4 ‘IT’ and ‘Only If’ 36\u003c\/p\u003e \u003cp\u003e3.4 A Classic Example 37\u003c\/p\u003e \u003cp\u003e3.5 Summary 39\u003c\/p\u003e \u003cp\u003e\u003cb\u003e4 Implementation Issues 41\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003e4.1 Binary Search 41\u003c\/p\u003e \u003cp\u003e4.1.1 Implementation 44\u003c\/p\u003e \u003cp\u003e4.2 Verifying Correctness—A Taster 45\u003c\/p\u003e \u003cp\u003e4.3 Summary 52\u003c\/p\u003e \u003cp\u003e\u003cb\u003e5 Calculational Logic: Part 1 53\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003e5.1 Logical Connectives 54\u003c\/p\u003e \u003cp\u003e5.2 Boolean Equality 56\u003c\/p\u003e \u003cp\u003e5.3 Examples of the Associativity of Equivalence 59\u003c\/p\u003e \u003cp\u003e5.4 Continued Equivalences 61\u003c\/p\u003e \u003cp\u003e5.5 The Island of Knights and Knaves 63\u003c\/p\u003e \u003cp\u003e5.6 Negation 65\u003c\/p\u003e \u003cp\u003e5.7 Summary 68\u003c\/p\u003e \u003cp\u003e\u003cb\u003e6 Number Conversion\u003c\/b\u003e \u003cb\u003e71\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003e6.1 The Floor Function 71\u003c\/p\u003e \u003cp\u003e6.2 Properties of Floor 73\u003c\/p\u003e \u003cp\u003e6.3 Indirect Equality 75\u003c\/p\u003e \u003cp\u003e6.4 Rounding Off 77\u003c\/p\u003e \u003cp\u003e6.5 Summary 80\u003c\/p\u003e \u003cp\u003e\u003cb\u003e7 Calculational Logic: Part 2\u003c\/b\u003e \u003cb\u003e83\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003e7.1 Disjunction 83\u003c\/p\u003e \u003cp\u003e7.2 Conjunction 85\u003c\/p\u003e \u003cp\u003e7.3 Implication 88\u003c\/p\u003e \u003cp\u003e7.3.1 Definitions and Basic Properties 89\u003c\/p\u003e \u003cp\u003e7.3.2 Replacement Rules 90\u003c\/p\u003e \u003cp\u003e7.4 Exercises: Logic Puzzles 93\u003c\/p\u003e \u003cp\u003e7.5 Summary 96\u003c\/p\u003e \u003cp\u003e\u003cb\u003e8 Maximum and Minimum\u003c\/b\u003e \u003cb\u003e97\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003e8.1 Definition of Maximum 97\u003c\/p\u003e \u003cp\u003e8.2 Using Indirect Equality 98\u003c\/p\u003e \u003cp\u003e8.3 Exercises 101\u003c\/p\u003e \u003cp\u003e8.4 Summary 103\u003c\/p\u003e \u003cp\u003e\u003cb\u003e9 The Assignment Statement\u003c\/b\u003e \u003cb\u003e105\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003e9.1 Hoare Triples 105\u003c\/p\u003e \u003cp\u003e9.2 Ghost Variables 107\u003c\/p\u003e \u003cp\u003e9.3 Hoare Triples as Program Specifications 109\u003c\/p\u003e \u003cp\u003e9.4 Assignment Statements 112\u003c\/p\u003e \u003cp\u003e9.5 The Assignment Axiom 113\u003c\/p\u003e \u003cp\u003e9.6 Calculating Assignments 115\u003c\/p\u003e \u003cp\u003e9.7 Complications 118\u003c\/p\u003e \u003cp\u003e9.8 Summary 119\u003c\/p\u003e \u003cp\u003e\u003cb\u003e10 Sequential Composition and Conditional Statements 121\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003e10.1 Sequential Composition 121\u003c\/p\u003e \u003cp\u003e10.2 The skip Statement 123\u003c\/p\u003e \u003cp\u003e10.3 Conditional Statements 124\u003c\/p\u003e \u003cp\u003e10.4 Reasoning about Conditional Statements 126\u003c\/p\u003e \u003cp\u003e10.5 Constructing Conditional Statements 130\u003c\/p\u003e \u003cp\u003e10.6 Combining the Rules 132\u003c\/p\u003e \u003cp\u003e10.7 Summary 136\u003c\/p\u003e \u003cp\u003e\u003cb\u003e11 Quantifiers\u003c\/b\u003e \u003cb\u003e137\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003e11.1 DotDotDot and Sigmas 137\u003c\/p\u003e \u003cp\u003e11.2 Introducing Quantifier Notation 141\u003c\/p\u003e \u003cp\u003e11.2.1 Summation 141\u003c\/p\u003e \u003cp\u003e11.2.2 Free and Bound Variables 143\u003c\/p\u003e \u003cp\u003e11.2.3 Properties of Summation 146\u003c\/p\u003e \u003cp\u003e11.2.4 The Gauss Legend 131\u003c\/p\u003e \u003cp\u003e11.2.5 Warning 152\u003c\/p\u003e \u003cp\u003e11.3 Universal and Existential Quantification 153\u003c\/p\u003e \u003cp\u003e11.3.1 Universal Quantification 154\u003c\/p\u003e \u003cp\u003e11.3.2 Existential Quantification 155\u003c\/p\u003e \u003cp\u003e11.3.3 De Morgan’s Rules 156\u003c\/p\u003e \u003cp\u003e11.4 Quantifier Rules 156\u003c\/p\u003e \u003cp\u003e11.4.1 The Notation 157\u003c\/p\u003e \u003cp\u003e11.4.2 Free and Bound Variables 158\u003c\/p\u003e \u003cp\u003e11.4.3 Dummies 158\u003c\/p\u003e \u003cp\u003e11.4.4 Range Part 158\u003c\/p\u003e \u003cp\u003e11.4.5 Trading 159\u003c\/p\u003e \u003cp\u003e11.4.6 Term Part 159\u003c\/p\u003e \u003cp\u003e11.4.7 Distributivity Properties 159\u003c\/p\u003e \u003cp\u003e11.5 Summary 163\u003c\/p\u003e \u003cp\u003e\u003cb\u003e12\u003c\/b\u003e \u003cb\u003eInductive Proofs and Constructions\u003c\/b\u003e \u003cb\u003e165\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003e12.1 Patterns and Invariants 166\u003c\/p\u003e \u003cp\u003e12.2 Mathematical Induction 170\u003c\/p\u003e \u003cp\u003e12.3 Strong Induction 175\u003c\/p\u003e \u003cp\u003e12.4 Prom Verification to Construction 179\u003c\/p\u003e \u003cp\u003e12.5 Summary 182\u003c\/p\u003e \u003cp\u003e\u003cb\u003e13\u003c\/b\u003e \u003cb\u003eIteration\u003c\/b\u003e \u003cb\u003e183\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003e13.1 The do-od Statement 183\u003c\/p\u003e \u003cp\u003e13.2 Constructing Loops 184\u003c\/p\u003e \u003cp\u003e13.3 Basic Arithmetic Operations 187\u003c\/p\u003e \u003cp\u003e13.3.1 Summing the Elements of an Array 187\u003c\/p\u003e \u003cp\u003e13.3.2 Evaluating a Polynomial 188\u003c\/p\u003e \u003cp\u003e13.3.3 Evaluation of Powers 191\u003c\/p\u003e \u003cp\u003e13.4 Summary 195\u003c\/p\u003e \u003cp\u003e\u003cb\u003e14\u003c\/b\u003e \u003cb\u003eSorting and Searching Algorithms\u003c\/b\u003e \u003cb\u003e197\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003e14.1 The Dutch National Flag 197\u003c\/p\u003e \u003cp\u003e14.1.1 Problem Statement 197\u003c\/p\u003e \u003cp\u003e14.1.2 The Solution 199\u003c\/p\u003e \u003cp\u003e14.1.3 Verifying the Solution 201\u003c\/p\u003e \u003cp\u003e14.2 Finding the \u003ci\u003eK\u003c\/i\u003e Smallest Values 205\u003c\/p\u003e \u003cp\u003e14.2.1 The Specification 206\u003c\/p\u003e \u003cp\u003e14.2.2 The Algorithm 268\u003c\/p\u003e \u003cp\u003e14.3 Summary 212\u003c\/p\u003e \u003cp\u003e\u003cb\u003e15\u003c\/b\u003e \u003cb\u003eRemainder Computation\u003c\/b\u003e \u003cb\u003e215\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003e15.1 Formal Specification 215\u003c\/p\u003e \u003cp\u003e15.2 Elementary Algorithm 217\u003c\/p\u003e \u003cp\u003e15.3 The mod and div Functions 219\u003c\/p\u003e \u003cp\u003e15.3.1 Basic Properties 221\u003c\/p\u003e \u003cp\u003e15.3.2 Separating mod from ÷ 223\u003c\/p\u003e \u003cp\u003e15.3.3 Separating ÷ from mod 224\u003c\/p\u003e \u003cp\u003e15.3.4 Modular Arithmetic 224\u003c\/p\u003e \u003cp\u003e15.4 Long Division 228\u003c\/p\u003e \u003cp\u003e15.4.1 Implementing Long Division 229\u003c\/p\u003e \u003cp\u003e15.4.2 Discarding Auxiliary Variables 233\u003c\/p\u003e \u003cp\u003e15.5 On-Line Remainder Computation 234\u003c\/p\u003e \u003cp\u003e15.6 Casting Out Nines 238\u003c\/p\u003e \u003cp\u003e15.7 Summary 239\u003c\/p\u003e \u003cp\u003e\u003cb\u003e16 Cyclic Codes\u003c\/b\u003e \u003cb\u003e241\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003e16.1 Codes and Codewords 241\u003c\/p\u003e \u003cp\u003e16.2 Boolean Polynomials 243\u003c\/p\u003e \u003cp\u003e16.3 Dara and Generator Polynomials 246\u003c\/p\u003e \u003cp\u003e16.4 Long Division 247\u003c\/p\u003e \u003cp\u003e16.5 Hardware Implementations 249\u003c\/p\u003e \u003cp\u003e16.6 Summary 253\u003c\/p\u003e \u003cp\u003eAppendix 255\u003c\/p\u003e \u003cp\u003eSolutions to Exercises 263\u003c\/p\u003e \u003cp\u003eReferences 331\u003c\/p\u003e \u003cp\u003eGlossary of Symbols 333\u003c\/p\u003e \u003cp\u003eIndex 335\u003c\/p\u003e","brand":"John Wiley \u0026 Sons Inc","offers":[{"title":"Default Title","offer_id":48864640368983,"sku":"9780470848821","price":45.55,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0817\/1739\/5799\/files\/9780470848821.jpg?v=1722272850","url":"https:\/\/bookcurl.com\/products\/program-construction-9780470848821","provider":"Book Curl","version":"1.0","type":"link"}