Behavioral subtyping through typed assertions
Herbert Toth

TL;DR
This paper introduces client conformance, a new approach to runtime assertion checking that improves behavioral subtyping by considering the client's static type, ensuring safer and more predictable method executions in class hierarchies.
Contribution
It proposes client conformance, a novel mechanism for runtime assertion checking that addresses deficiencies in existing methods by incorporating the client's perspective.
Findings
Enhances runtime assertion checking for better safety
Preserves the percolation pattern mechanism
Reduces unsafe or surprising executions
Abstract
This paper presents a critical discussion of popular approaches to ensure the Liskov substitution principle in class hierarchies (e.g. Design by Contract(TM), specification inheritance). It will be shown that they have some deficiencies which are due to the way how effective constraints are calculated for subclass methods. A new mechanism, called client conformance, is introduced that takes the client's view on the program state into account more properly: The client's static type determines the context in which reasoning about program state is to be done. This is the context to which the runtime assertion checking (RAC) of server methods must be adapted appropriately. In a stepwise argumentation we show the improvements for RAC that can be reached following this approach in a natural way, preserving the percolation pattern mechanism: Clients will neither be confronted with unsafe or…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLogic, programming, and type systems · Software Engineering Research · Distributed systems and fault tolerance
