OOPSLA '04

Program
Technical Program
  Invited Speakers
  Technical Papers
  Onward!
  Panels
  Practitioner Reports
  Tutorials
Workshops
DesignFest
Educators' Symposium
Demonstrations
Posters
Doctoral Symposium
Exhibits
Student Research Comp.
FlashBoF
 
Turing Lecture
 
Social Events
 
Week at a Glance
 
Final Program (1.5M .pdf)

Find in Program
 

Page
Printer-friendly

Basket
view, help

"ConstrainedJava"
Object-Oriented Programming, Systems, Languages and Applications
Home    Program    Housing & Transportation    Registration    Submissions    Wiki    Maps
 


 : Tuesday Demonstrations : All Demonstrations : Tuesday

ConstrainedJava

Courtyard, Demo room 3
Tuesday, 15:30, 45 minutes
 


 
7·8·9·10·11·12·13·14·15·16·17·18·19·20·21

This event is also being given Thursday at 11:30.

Donald Gordon, Victoria University of Wellington
James Noble, Victoria University of Wellington
Robert Biddle, Carleton University

Demonstration number: 18

Keywords: encapsulation, message constraints, aliasing

Encapsulation is a fundamental principle of object-oriented programming. Support for encapsulation in many languages is limited to specifying access restrictions for fields; this does not guard against unrestricted aliasing, where due to programmer error, references to internal parts of aggregate objects can leak into other parts of the program, breaking encapsulation. Several systems have been proposed to deal with this problem. ConstrainedJava is a programming language with a syntax and semantics similar to those of Java (based on the BeanShell Java source interpreter), extended to maintain runtime ownership relationships between individual objects. Constraints on message sends between objects can then be imposed based on these ownership relationships. This enforces the encapsulation topology intended by the programmer, ensuring that references which leak from aggregate objects cannot cause unforseen dependencies, as message sends to these leaked references are disallowed. It also allows the programmer to explicitly define dependencies between objects, by providing notification of changes to objects and their children in the ownership tree.

The demonstration will include examples of message constraints, and the types of behaviour they inhibit. Also shown will be a demonstration of a GUI which utilises the explicit dependencies to simplify relating object state to widget state, and a demonstration of the natural cloning operation enabled by utilising ownership information to decide whether references or objects themselves should be copied.