Chapter-by-chapter notes on David Gries' book, plus the overview hub.
Choose a concept, then work through an example
17 guides in this section. Each article states its audience and assumptions, explains specialized terms, and gives a worked example or practical exercise.
Technical topics distinguish toy models from product behavior. Leadership topics distinguish context-dependent frameworks from evidence and personal claims.
17 guides
Connect a specification to an algorithm through predicates, weakest preconditions, invariants, and termination.
Preconditions and postconditions · Predicates and state · Hoare triples and total correctness · Weakest preconditions · Loop invariants · Variants and well-founded ordersRead propositions, equivalence, and implication as precise statements about program behavior.
Predicates and state · Quantifiers and implication · Preconditions and postconditions · Hoare triples and total correctnessUse predicates, quantifiers, and capture-free substitution to specify arrays and state.
Predicates and state · Quantifiers and implication · Substitution without capture · Preconditions and postconditions · Aliasing and frame conditionsCompute entry requirements backward from a desired output while keeping termination and definedness explicit.
Weakest preconditions · Substitution without capture · Hoare triples and total correctness · Predicates and state · Guarded commands and nondeterminismTranslate assignment and sequencing into predicates, including parallel assignment and array updates.
Weakest preconditions · Substitution without capture · Aliasing and frame conditions · Preconditions and postconditionsUnderstand guard coverage and correctness for every enabled nondeterministic branch.
Guarded commands and nondeterminism · Weakest preconditions · Predicates and state · Preconditions and postconditionsProve a loop by establishing and preserving its invariant and showing a decreasing well-founded measure.
Loop invariants · Variants and well-founded orders · Hoare triples and total correctness · Preconditions and postconditions · Guarded commands and nondeterminismInvent an invariant from the required result and use it to choose safe state updates.
Preconditions and postconditions · Loop invariants · Variants and well-founded orders · Weakest preconditionsConnect array sums, division, search, maxima, power, GCD, and partitioning to their complete contracts.
Preconditions and postconditions · Loop invariants · Variants and well-founded orders · Guarded commands and nondeterminism · Complexity and workload assumptionsBuild proofs with explicit assumptions, valid inference rules, and correctly discharged scopes.
Predicates and state · Quantifiers and implication · Hoare triples and total correctness · Guarded commands and nondeterminismUse procedure contracts while preserving old input values, frame conditions, and parameter-mode assumptions.
Preconditions and postconditions · Aliasing and frame conditions · Hoare triples and total correctness · Recursion and induction · Substitution without captureChoose genuinely decreasing measures and recognize invalid termination examples.
Variants and well-founded orders · Loop invariants · Quantifiers and implication · Complexity and workload assumptionsTranslate a recurrence into an iterative accumulator or explicit stack with a clear invariant.
Recursion and induction · Loop invariants · Variants and well-founded orders · Aliasing and frame conditions · Complexity and workload assumptionsOptimize through maintained relations without changing numeric or observable semantics accidentally.
Refinement and observational equivalence · Loop invariants · Complexity and workload assumptions · Preconditions and postconditionsDerive intersection and sorted-matrix search from shrinking candidate regions.
Loop invariants · Variants and well-founded orders · Preconditions and postconditions · Quantifiers and implication · Complexity and workload assumptionsUnderstand reversible mappings on explicit domains and why overwritten information may prevent undo.
Program inversion and lost information · Preconditions and postconditions · Aliasing and frame conditions · Variants and well-founded ordersDocument the specification, invariant, frame, and progress argument that readers need to maintain correct code.
Preconditions and postconditions · Loop invariants · Variants and well-founded orders · Hoare triples and total correctness · Refinement and observational equivalenceNo matches. Try a broader concept or clear the search.