A representation invariant I(r) specifies which concrete storage states r are valid at the API boundary. Construction must establish it, and each completed operation must preserve it. Internal steps may temporarily violate it only while that state is inaccessible to observers; callbacks or concurrent access would require further reasoning.[ref]
Reading 13: Abstraction Functions & Rep Invariants. Reading 13, How to Establish Invariants: creation, preservation and absence of representation exposure
The short proof pattern is mathematical induction on the number of completed calls: the initial state satisfies I; every permitted transition from an I-state ends in an I-state; hence every state observable through the API satisfies I. An unrestricted external write falls outside this argument.
Ancestors (4)
Incoming links (116)
- Abstract data type
- Abstract data type invariant
- Abstraction function
- Array multiset
- Bounded queue with encapsulation
- Circular buffer indices
- Constant-time distinct-size counter
- Correct operations through an abstraction function
- Defensive copying
- Encapsulation (computer programming)
- List-based set representation
- Object composition
- Object constructor
- Past exam of the computer science course of the University of Oxford / 2015 / Advanced data structures and algorithms / 1 / d / Solution
- Past exam of the computer science course of the University of Oxford / 2015 / Object oriented programming / 2 / d / Solution
- Past exam of the computer science course of the University of Oxford / 2015 / Object oriented programming / 2 / e / Solution
- Past exam of the computer science course of the University of Oxford / 2015 / Object oriented programming / 3 / d / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2005 / Functional programming, data structures and algorithms, procedural programming, and digital hardware / 10 / b / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2005 / Functional programming, data structures and algorithms, procedural programming, and digital hardware / 2 / a / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2005 / Functional programming, data structures and algorithms, procedural programming, and digital hardware / 8 / a / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2005 / Functional programming, data structures and algorithms, procedural programming, and digital hardware / 8 / b / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2013 / Imperative programming / 2 / b / i / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2013 / Imperative programming / 5 / a / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2013 / Imperative programming / 5 / b / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2013 / Imperative programming / 5 / c / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2013 / Imperative programming / 6 / c / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2013 / Imperative programming / 8 / a / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2013 / Imperative programming / 8 / c / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2013 / Imperative programming / 8 / d / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2014 / Imperative programming / 3 / b / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2014 / Imperative programming / 3 / c / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2014 / Imperative programming / 3 / e / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2014 / Imperative programming / 4 / b / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2014 / Imperative programming / 4 / c / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2014 / Imperative programming / 4 / d / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2014 / Imperative programming / 4 / f / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2014 / Imperative programming / 5 / b / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2014 / Imperative programming / 7 / a / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2014 / Imperative programming / 7 / b / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2014 / Imperative programming / 8 / c / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2015 / Imperative programming / 3 / c / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2015 / Imperative programming / 4 / e / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2015 / Imperative programming / 6 / a / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2015 / Imperative programming / 6 / b / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2015 / Imperative programming / 7 / b / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2015 / Imperative programming (resit) / 1 / b / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2015 / Imperative programming (resit) / 6 / a / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2015 / Imperative programming (resit) / 6 / b / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2015 / Imperative programming (resit) / 6 / d / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2015 / Imperative programming (resit) / 7 / c / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2016 / Imperative programming / 5 / c / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2016 / Imperative programming / 5 / d / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2016 / Imperative programming (resit) / 3 / a / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2016 / Imperative programming (resit) / 3 / d / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2017 / Imperative programming / 8 / a / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2017 / Imperative programming (resit) / 1 / c / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2018 / Imperative programming / 3 / d / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2018 / Imperative programming / 3 / e / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2018 / Imperative programming / 3 / g / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2018 / Imperative programming / 4 / b / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2018 / Imperative programming / 4 / c / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2018 / Imperative programming / 4 / d / i / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2018 / Imperative programming / 5 / b / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2018 / Imperative programming / 5 / c / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2018 / Imperative programming / 5 / d / i / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2019 / Functional programming, design and analysis of algorithms / 3 / a / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2019 / Functional programming, design and analysis of algorithms / 3 / b / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2019 / Functional programming, design and analysis of algorithms / 3 / c / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2019 / Imperative programming / 3 / c / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2019 / Imperative programming / 5 / c / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2019 / Imperative programming / 5 / d / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2019 / Imperative programming / 7 / a / i / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2019 / Imperative programming resit / 3 / d / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2019 / Imperative programming resit / 3 / g / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2019 / Imperative programming resit / 4 / b / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2019 / Imperative programming resit / 5 / a / ii / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2019 / Imperative programming resit / 5 / b / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2019 / Imperative programming resit / 6 / b / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2021 / Imperative programming / 3 / b / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2021 / Imperative programming / 3 / c / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2021 / Imperative programming / 4 / b / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2021 / Imperative programming / 5 / b / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2021 / Imperative programming / 5 / c / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2021 / Imperative programming / 6 / b / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2021 / Imperative programming / 6 / f / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2021 / Imperative programming (resit) / 3 / c / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2021 / Imperative programming (resit) / 3 / d / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2021 / Imperative programming (resit) / 4 / b / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2021 / Imperative programming (resit) / 4 / c / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2021 / Imperative programming (resit) / 8 / b / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2022 / Imperative programming (resit)
- Past exam of the year 1 of the computer science course of the University of Oxford / 2022 / Imperative programming (resit) / 3 / c / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2022 / Imperative programming (resit) / 3 / d / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2022 / Imperative programming (resit) / 4 / b / i / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2022 / Imperative programming (resit) / 4 / c / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2022 / Imperative programming (resit) / 4 / d / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2022 / Imperative programming (resit) / 5 / a / ii / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2022 / Imperative programming (resit) / 5 / b / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2022 / Imperative programming (resit) / 6 / a / ii / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2022 / Imperative programming (resit) / 6 / b / i / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2022 / Imperative programming (resit) / 8 / a / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2022 / Imperative programming (resit) / 8 / e / ii / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2023 / Imperative programming / 3 / d / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2023 / Imperative programming / 3 / f / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2023 / Imperative programming / 4 / a / Solution
- Past exam of the year 1 of the computer science course of the University of Oxford / 2023 / Imperative programming / 5 / c / Solution
- Protected access
- Representation exposure
- Representation independence
- Representation invariant
- Sentinel node
- Shared-array double stack
- Sparse linked vector representation
- Stackable trait modification
- Type guard
- Unreduced rational representation
Discussion (0) New discussion
There are no discussions about this article yet.
Articles by others on the same topic (0)
There are currently no matching articles.