Practical Reasoning About Invocations and Implementations of Pure Methods

نویسندگان

  • Ádám Darvas
  • K. Rustan M. Leino
چکیده

User-defined functions used in the specification of objectoriented programs are called pure methods. Providing sound and practical support for pure methods in a verification system faces many challenges, especially when pure methods have executable implementations and can be invoked from code at run time. This paper describes a design for reasoning about pure methods in the context of sound, modular verification. The design addresses (1) how to axiomatize pure methods as mathematical functions enabling reasoning about their result values; (2) preconditions and frame conditions for pure methods enabling reasoning about the implementation of a pure method. Two important considerations of the design are that it work with object invariants and that its logical encoding be suitable for fully automatic theorem provers. The design has been implemented in the Spec# programming system.

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

ثبت نام

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

منابع مشابه

Reasoning About Class Behavior

We present a sound and complete method for reasoning about contextual equivalence between different implementations of classes in an imperative subset of Java. To the extent of our knowledge this is the first such method for a language with unrestricted inheritance, where the context can arbitrarily extend classes to distinguish presumably equivalent implementations. Similar reasoning technique...

متن کامل

Ethnomethodology and Conversational Analysis

In a speech community, people utilize their communicative competence which they have acquired from their society as part of their distinctive sociolinguistic identity. They negotiate and share meanings, because they have commonsense knowledge about the world, and have universal practical reasoning. Their commonsense knowledge is embodied in their language. Thus, not only does social life depend...

متن کامل

On the Role of Invariants in Reasoning about Object-Oriented Languages

The aim of this paper is to clarify the different roles that class invariants play in the verification of object-oriented programs, namely in method specifications as proof obligations for method implementations (assume the precondition and then prove the postcondition) and in specifications as assumptions on method invocations (prove the precondition, and then assume the postcondition), in ord...

متن کامل

Proving Class Equivalence

We present a sound and complete method for reasoning about contextual equivalence between different implementations of classes in an imperative subset of Java. Our technique successfully deals with public and private methods and fields, imperative fields, inheritance, and invocations of callbacks. To the extent of our knowledge this is the first sound and complete proof method of equivalence be...

متن کامل

Reasoning with specifications containing method calls in JML and first-order provers

Allowing method invocations in program specifications increases modularity and comprehensibility and is as important in specifications as it is in the program itself. However, method invocations do not map neatly into the first-order logics that are often used for assuring the correctness of specifications. One problem is translating specifications in a way that acknowledges the potential for e...

متن کامل

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


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

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

ثبت نام

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

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

دوره   شماره 

صفحات  -

تاریخ انتشار 2007