Abstract
Fickle is a class-based object oriented imperative language, which extends Java with object re-classification. In this paper, we introduce a natural observational equivalence on Fickle programs. This is a contextual equivalence on main methods with respect to a given sequence of class definitions, i.e. a program. To study it, we use the formal computational model for OO-programming based on coalgebras, which has recently emerged, whereby objects are taken to be equal when the actions of methods on them yield the same observations and equivalent next states. However, in order to deal with imperative features, we need to extend the original approach of H.Reichel and B.Jacobs in various ways. In particular, we introduce a coalgebraic description of objects (states of a class), which induces a coinductive behavioural equivalence on programs. For simplicity, we focus on Fickle objects whose methods do not take more than one object parameter as argument. Completeness results as well as problematic issues arising from binary methods are also discussed.
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.