Abstract
The inheritance anomaly [23] refers to the serious difficulty in combining inheritance and concurrency in a simple and satisfactory way within a concurrent object-oriented language. The problem is closely connected with the need to impose synchronization constraints on the acceptance of a message by an object. In most concurrent object-oriented languages this synchronization is achieved by synchronization code controlling the acceptance of messages by objects. Synchronization code is often hard to inherit and tends to require extensive redefinitions. The solutions that have appeared so far in the literature to alleviate this problem seem to implicitly assume that better, more reusable, mechanisms are needed to create and structure synchronization code. The approach taken in this paper is to consider the inheritance anomaly as a problem caused by the very presence of synchronization code. The goal is then to completely eliminate synchronization code. This is achieved by using order-sorted rewriting logic, an abstract model of concurrent computation that is machine-independent and extremely fine grain, and that can be used directly to program concurrent object-oriented systems. Our proposed solution involves a distinction between two different notions of inheritance, a type-theoretic one called class inheritance, and a notion called module inheritance that supports reuse and modification of code. These two different notions address two different ways in which the inheritance anomaly can appear; for each of them we propose declarative solutions in which no explicit synchronization code is ever used.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.