Chapter Dynamic Dispatch for Method Contracts Through Abstract Predicates

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...

Full description

Bibliographic Details
Format: eBook
Language:English
Published: Springer Nature 2017
Subjects:
KeY
Online Access:Open Access: DOAB: description of the publication
Open Access: DOAB, download the publication
LEADER 03531namaa2200565uu 4500
001 doab30241
003 oapen
005 20210210
006 m o d
007 cr|mn|---annan
008 210210s2017 xx |||||o ||| 0|eng d
020 |a 978-3-319-46969-0 7 
024 7 |a 10.1007/978-3-319-46969-0 7  |2 doi 
040 |a oapen  |c oapen 
041 0 |a eng 
042 |a dc 
072 7 |a U  |2 bicssc 
720 1 |a Mostowski, Wojciech  |4 aut 
720 1 |a Ulbrich, Mattias  |4 aut 
245 0 0 |a Chapter Dynamic Dispatch for Method Contracts Through Abstract Predicates 
260 |b Springer Nature  |c 2017 
300 |a 1 online resource (30 p.) 
336 |a text  |b txt  |2 rdacontent 
337 |a computer  |b c  |2 rdamedia 
338 |a online resource  |b cr  |2 rdacarrier 
506 0 |a Open Access  |f Unrestricted online access  |2 star 
520 |a 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. 
540 |a Creative Commons  |f https://creativecommons.org/licenses/by/4.0/  |2 cc  |u https://creativecommons.org/licenses/by/4.0/ 
546 |a English 
650 7 |a Computing and Information Technology  |2 bicssc 
653 |a Boolean data type 
653 |a dispatch 
653 |a dispatch 
653 |a Dynamic dispatch 
653 |a encapsulation 
653 |a encapsulation 
653 |a First-order logic 
653 |a ghost 
653 |a ghost 
653 |a Inheritance (object-oriented programming) 
653 |a Java Modeling Language 
653 |a KeY 
653 |a Liskov substitution principle 
653 |a Postcondition 
653 |a Predicate (mathematical logic) 
653 |a thema EDItEUR::U Computing and Information Technology 
773 1 |7 nnaa  |o OAPEN Library UUID: Transactions on Modularity and Composition I 
793 0 |a DOAB Library. 
856 4 0 |u https://directory.doabooks.org/handle/20.500.12854/30241  |7 0  |z Open Access: DOAB: description of the publication 
856 4 0 |u https://library.oapen.org/bitstream/20.500.12657/30616/1/644831.pdf  |7 0  |z Open Access: DOAB, download the publication