Browse Prior Art Database

Specifying and Checking the Correctness of Event Callback Mechanisms

IP.com Disclosure Number: IPCOM000146580D
Publication Date: 2007-Feb-16
Document File: 3 page(s) / 40K

Publishing Venue

The IP.com Prior Art Database

Abstract

Disclosed is a method that extends design by contract (DBC) approaches by specifying APIs that use event dispatch models and other callback mechanisms. Benefits include creating easier processes for coding and testing.

This text was extracted from a Microsoft Word document.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 53% of the total text.

Specifying and Checking the Correctness of Event Callback Mechanisms

Disclosed is a method that extends design by contract (DBC) approaches by specifying APIs that use event dispatch models and other callback mechanisms. Benefits include creating easier processes for coding and testing.

Background

DBC is a methodology for designing software, and its central idea is that software entities have obligations to other entities based upon a set of formalized rules between them. The “contract” or formal specification consists of declarations of invariants, pre-conditions, and post-conditions. Invariants are Boolean expressions which must be true while the class code is not executing. Invariants are useful for describing the possible states of an object. The pre- and post-conditions are also Boolean expressions which describe the behavior of the method. Invariants check if an object is in a normal state; if the invariant expression is false during the check, the contract is broken.

However, there are some areas where the DBC approach is not applicable (e.g. low-level APIs, and APIs which use event models).

General Description

The disclosed method extends DBC approaches by specifying APIs that use event dispatch models and other callback mechanisms. A callback behavior is when a method under test must call another object’s method as a part of a specified functionality. The GUI pattern MVC is widely use...