Objects' state, intended as some abstraction over the value of fields, is always in the mind of a COOL (Concurrent Object-Oriented Language) programmer. In fact, as the state of an object changes so does its coordination behaviour. We introduce a language feature for expressing the notion of state in Java-like languages. The proposed feature takes the form of state class, a new kind of class, equipped with a static type and effect system guaranteeing that during the execution of a method on a receiver o: (1) Even though the state of o may vary through states with different parameters, no attempt will be made to access non-existing parameters, and (2) No method invoked on a receiver different from this may cause (through method calls on o) a change in the state of o.
A State Abstraction for Coordination in Java-like Languages
DAMIANI, Ferruccio;GIACHINO, Elena;
2006-01-01
Abstract
Objects' state, intended as some abstraction over the value of fields, is always in the mind of a COOL (Concurrent Object-Oriented Language) programmer. In fact, as the state of an object changes so does its coordination behaviour. We introduce a language feature for expressing the notion of state in Java-like languages. The proposed feature takes the form of state class, a new kind of class, equipped with a static type and effect system guaranteeing that during the execution of a method on a receiver o: (1) Even though the state of o may vary through states with different parameters, no attempt will be made to access non-existing parameters, and (2) No method invoked on a receiver different from this may cause (through method calls on o) a change in the state of o.File | Dimensione | Formato | |
---|---|---|---|
paper05.pdf
Accesso aperto
Tipo di file:
POSTPRINT (VERSIONE FINALE DELL’AUTORE)
Dimensione
195.01 kB
Formato
Adobe PDF
|
195.01 kB | Adobe PDF | Visualizza/Apri |
I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.