×

Method for specifying and verifying multi-threaded object-oriented programs with invariants

  • US 7,774,787 B2
  • Filed: 01/11/2005
  • Issued: 08/10/2010
  • Est. Priority Date: 01/11/2005
  • Status: Active Grant
First Claim
Patent Images

1. A method comprising:

  • executing multiple threads on a computer;

    a thread T1 acquiring a lock on a top object in a hierarchy of objects, wherein an invariant condition is specified for the top object, the invariant condition specifies a relation on data of the top object, and the invariant condition references at least two fields, wherein the at least two fields are of at least two different objects;

    wherein acquiring the lock changes ownership to thread T1 of the top object;

    wherein ownership confers upon thread T1 a right to modify any field of the top object;

    wherein the lock excludes all other threads from accessing the top object and any descendant objects in the hierarchy of objects;

    after acquiring the lock, unpacking the top object, wherein unpacking the top object comprises designating the top object as being of a mutable state, which allows invariants to be temporarily violated and allows field assignments of the top object that temporarily violate the invariant condition; and

    packing the top object, wherein packing the top object comprises verifying that the invariant condition holds and taking the top object from the mutable state to designated as being of a consistent state, wherein being designated as being of a consistent state prevents further modifications.

View all claims
  • 2 Assignments
Timeline View
Assignment View
    ×
    ×