Abstract

A method definition can be viewed as a logical assertion. Whenever we declare a method as the implementation of an operation, we assert that if the operation is invoked on objects of the appropriate types then the method body will satisfy the specification of the operation. This view of methods as assertions is simple but general. Among its applications are: methods defined on interfaces as well as on classes; an elementary type system for objects that handles multi‐methods; and a mechanism for method dispatch based on the desired output type as well as on the types of arguments. Further, these applications are compatible with traditional execution models and implementation techniques. Logical reasoning about methods plays a role at compile time, then gets out of the way.

Full Text
Paper version not known

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.