Skip to main content

Methods as assertions

  • Conference paper
  • First Online:
Book cover Object-Oriented Programming (ECOOP 1994)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 821))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Agrawal, R., DeMichiel, L. G., and Lindsay, B. G. Static type checking of multi-methods. In Proceedings of the Conference on Object-Oriented Programming Systems, Languages, and Applications (1991), ACM. Also published in SIGPLAN Notices, 16(11) (1991), pp. 113–128.

    Google Scholar 

  2. Andreoli, J.-M., and Pareschi, R. Linear objects: logical processes with builtin inheritance. In Proceedings of the Seventh International Conference on Logic Programming (1990), D. H. D. Warren and P. Szeredi, Eds., MIT Press, pp. 495–510.

    Google Scholar 

  3. Bobrow, D. G., DeMichiel, L. G., Gabriel, R. P., Keene, S. E., Kiczales, G., and Moon, D. A. Common Lisp object system specification. Sigplan Notices 23, Special Issue (1988).

    Google Scholar 

  4. Bobrow, D. G., Gabriel, R. P., and White, J. L. CLOS in context: the shape of the design space. In Object Oriented Programming: The CLOS Perspective, A. Paepcke, Ed. MIT Press, 1993, pp. 29–61.

    Google Scholar 

  5. Canning, P., Cook, W., Hill, W., Mitchell, J., and Olthoff, W. F bounded quantification for object-oriented programming. In Functional Programming and Computer Architecture (1989).

    Google Scholar 

  6. Cardelli, L. A semantics of multiple inheritance. Information and Computation, 76 (1988).

    Google Scholar 

  7. Cardelli, L., and Wegner, P. On understanding types, data abstraction and polymorphism. Computing Surveys 17, 4 (1985).

    Article  Google Scholar 

  8. Castagna, G., Ghelli, G., and Longo, G. A calculus for overloaded functions with subtyping. In ACM Conference on LISP and Functional Programming (1992). Full paper to appear in Information and Computation.

    Google Scholar 

  9. Chambers, C. The Cecil language: Specification and rationale. Tech. Rep. 93-03-05, Department of Computer Science, University of Washington, 1993.

    Google Scholar 

  10. Chambers, C. Predicate classes. In Proceedings of the European Conference on Object-Oriented Programming (1993).

    Google Scholar 

  11. Dixon, M. Embedded Computation and the Semantics of Programs. PhD thesis, Stanford University, 1991. Also published as Xerox PARC technical report SSL-91-1.

    Google Scholar 

  12. Goldberg, A., and Robson, D.Smalltalk-80: The Language and its Implementation. Addison-Wesley, Reading, MA, 1983.

    MATH  Google Scholar 

  13. Hodas, J. S., and Miller, D. Representing objects in a logic programming language with scoping constructs. In Proceedings of the Seventh International Conference on Logic Programming (1990), D. H. D. Warren and P. Szeredi, Eds., MIT Press, pp. 511-526.

    Google Scholar 

  14. Kiczales, G. Traces (a cut at the “make isn't generic” problem). In Proceedings of International Symposium on Object Technologies for Advanced Software (1993), S. Nishio and A. Yonezawa, Eds., JSST, Springer-Verlag, pp. 27–43. Lecture Notes in Computer Science 742.

    Google Scholar 

  15. Pierce, B. C., and Turner, D. Object oriented programming without recursive types. In ACM Symposium on Principles of Programming Languages (1993).

    Google Scholar 

  16. Shapiro, E., and Takeuchi, A. Object oriented programming in Concurrent Prolog. New Generation Computing 1 (1983), 25–48.

    Article  Google Scholar 

  17. Stroustrup, B. The C++ Programming Language, Second Edition. Addison-Wesley, 1991.

    Google Scholar 

  18. Takashio, K., and Tokoro, M. DROL: An object-oriented programming language for distributed real-time systems. In Proceedings of the Conference on Object-Oriented Programming: Systems, Languages, and Applications (1992), pp. 276–294.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Mario Tokoro Remo Pareschi

Rights and permissions

Reprints and permissions

Copyright information

© 1994 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Lamping, J., Abadi, M. (1994). Methods as assertions. In: Tokoro, M., Pareschi, R. (eds) Object-Oriented Programming. ECOOP 1994. Lecture Notes in Computer Science, vol 821. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0052176

Download citation

  • DOI: https://doi.org/10.1007/BFb0052176

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-58202-1

  • Online ISBN: 978-3-540-48567-4

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics