644831.pdf

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

Πλήρης περιγραφή

Λεπτομέρειες βιβλιογραφικής εγγραφής
Γλώσσα:English
Έκδοση: Springer Nature 2020
id oapen-20.500.12657-30616
record_format dspace
spelling oapen-20.500.12657-306162024-03-25T09:51:39Z Chapter Dynamic Dispatch for Method Contracts Through Abstract Predicates Mostowski, Wojciech Ulbrich, Mattias dispatch encapsulation ghost dispatch encapsulation ghost Boolean data type Dynamic dispatch First-order logic Inheritance (object-oriented programming) Java Modeling Language KeY Liskov substitution principle Postcondition Predicate (mathematical logic) thema EDItEUR::U Computing and Information Technology 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. 2020-03-18 13:36:15 2020-04-01T13:03:06Z 2018-03-03 23:55 2020-03-18 13:36:15 2020-04-01T13:03:06Z 2018-02-01 23:55:55 2020-03-18 13:36:15 2020-04-01T13:03:06Z 2020-04-01T13:03:06Z 2017 chapter 644831 OCN: 1030820407 http://library.oapen.org/handle/20.500.12657/30616 eng application/pdf Attribution 4.0 International 644831.pdf Springer Nature Transactions on Modularity and Composition I 10.1007/978-3-319-46969-0 7 10.1007/978-3-319-46969-0 7 6c6992af-b843-4f46-859c-f6e9998e40d5 a327be69-274f-41cf-9fb4-9aa085dab800 7292b17b-f01a-4016-94d3-d7fb5ef9fb79 European Research Council (ERC) 30 1 258405 FP7 FP7 Ideas: European Research Council FP7-IDEAS-ERC - Specific Programme: "Ideas" Implementing the Seventh Framework Programme of the European Community for Research, Technological Development and Demonstration Activities (2007 to 2013) open access
institution OAPEN
collection DSpace
language English
description 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.
title 644831.pdf
spellingShingle 644831.pdf
title_short 644831.pdf
title_full 644831.pdf
title_fullStr 644831.pdf
title_full_unstemmed 644831.pdf
title_sort 644831.pdf
publisher Springer Nature
publishDate 2020
_version_ 1799945229292273664