Methods as Assertions

نویسندگان

  • John Lamping
  • Martín Abadi
چکیده

A method definition can be viewed as a logical assertion.Wheneverwe 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 specificationof 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.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

An Evaluation of Specification-Derived Assertions

Assertions are a mechanism that can be used to enhance the effectiveness of software testing. Where software testing is concerned with verification of a program’s output, assertions provide a method for verifying the internal values of a program. When used properly, assertions can provide assurance that a program is correct. However, as far as we are aware, there has been little research into m...

متن کامل

Polymorphism in Object-Oriented Contract Verification

The role that design by contract plays in the specification, monitoring, and reuse of classes is of increasing importance in the OO community. Although recognizably useful, nevertheless, because of lack of expressiveness of existing assertion languages, contracts can bring undesirable effects such as the increasing in class coupling when we deal with complex classes. A means of surpassing those...

متن کامل

Rule-based Approach to Extracting Location, Creator and Membership-related Information from Wikipedia-based Information-rich Taxonomy for ConceptNet Expansion

In this paper we present a method for extracting IsA assertions (hyponymy relations), AtLocation assertions (informing of the location of an object or place), LocatedNear assertions (informing of neighboring locations), CreatedBy assertions (informing of the creator of an object) and MemberOf assertions (informing of group membership) automatically from Japanese Wikipedia XML dump files. These ...

متن کامل

Amending Contracts for Choreographies ∗ Laura Bocchi Julien

Distributed interactions can be suitably designed in terms of choreographies. Such abstractions can be thought of as global descriptions of the coordination of several distributed parties. Global assertions define contracts for choreographies by annotating multiparty session types with logical formulae to validate the content of the exchanged messages. The introduction of such constraints is a ...

متن کامل

Amending Contracts for Choreographies

Distributed interactions can be suitably designed in terms of choreographies. Such abstractions can be thought of as global descriptions of the coordination of several distributed parties. Global assertions define contracts for choreographies by annotating multiparty session types with logical formulae to validate the content of the exchanged messages. The introduction of such constraints is a ...

متن کامل

Extracting location and creator-related information from Wikipedia-based information-rich taxonomy for ConceptNet expansion

Our research goal is to generate new assertions suitable for introduction to the Japanese part of the ConceptNet common sense knowledge ontology. In this paper we present a method for extracting IsA assertions (hyponymy relations), AtLocation assertions (informing of the location of an object or place), LocatedNear assertions (informing of neighboring locations) and CreatedBy assertions (inform...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • TAPOS

دوره 1  شماره 

صفحات  -

تاریخ انتشار 1994