A State Abstraction for Coordination in Java-like Languages
Ferruccio Damiani, Elena Giachino, Paola Giannini, Nicholas R. Cameron, Sophia Drossopoulou · Institutional Research Information System University of Turin (University of Turin) · 2006
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. 1