📖
Chapter Dynamic Dispatch for Method Contracts Through Abstract Predicates
Mostowski, Wojciech, Ulbrich, Mattias

Chapter Dynamic Dispatch for Method Contracts Through Abstract Predicates

Author / Organization:
Humanities & Social Sciences Open Access Books Published 2020 Verification Pending

Overview & Synopsis

Dynamic method dispatch is a core feature of object-oriented programming by which the executed implementation for a polymorphic method is only chosen at runtime. In this paper, we present a specification and verification methodology which extends the concept of dynamic dispatch to design-by-contract specifications. The formal specification language JML has only rudimentary means for polymorphic abstraction in expressions. We promote these to fully flexible specification-only query methods called model methods that can, like ordinary methods, be overridden to give specifications a new semantics in subclasses in a transparent and modular fashion. Moreover, we allow them to refer to more than one program state which give us the possibility to fully abstract and encapsulate two-state specification contexts, i.e., history constraints and method postconditions. Finally, we provide an elegant and flexible mechanism to specify restrictions on specifications in subtypes. Thus behavioural subtyping can be enforced, yet it still allows for other specification paradigms. We provide the semantics for model methods by giving a translation into a first order logic and according proof obligations. We fully implemented this framework in the KeY program verifier and successfully verified relevant examples. We have also implemented an extension to KeY to support permission-based verification of concurrent Java programs. In this context model methods provide a modular specification method to treat code synchronisation through API methods.

Advertisement
SPONSOR CONTENT
Indexed from repository: OAPEN Library (www.oapen.org)
Loading document from verified source...
Keyboard Shortcuts: ← / → for pages • + / - for zoom • 0 to fit width Powered by Mozilla PDF.js v3.11

Document Information

Document Title Chapter Dynamic Dispatch for Method Contracts Through Abstract Predicates
Author / Organization Mostowski, Wojciech, Ulbrich, Mattias
Subject & Discipline dispatch
Categories Humanities & Social Sciences Open Access Books
Publication Year 2020
License / Rights Open Access / Creative Commons
Resource Verification Listed PDF (Verification Pending)
Original Host Website OAPEN Library (www.oapen.org)
File Format application/pdf (Portable Document Format)
Language EN
Catalog ID DOC-38222
Original Source Link Visit Source Page on www.oapen.org »