Abstract

This paper presents a formal imperative calculus to formalize the semantics of class-based object-oriented programming languages. The tractability of this approach is demonstrated by our formalization of a core subset of the Java programming language called Cool: Core Object-Oriented Language. Cool is relatively small but retains many of modern class-based object-oriented languages' key features, including classes, inheritance, objects, virtual functions and dynamic method dispatch etc. The technical contribution of this paper can be summarized as: first, this paper formalizes a syntactic specification for Cool; second, this paper presents static semantics for Cool via typing rules, and its operational semantics via small-step transition relation. Finally, this paper proves that the formal calculus proposed is type safe.

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

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.