next up previous contents
Next: Actor Creation Up: Writing Concurrent Programs Previous: Writing Concurrent Programs   Contents


SALSA Language Support for Actor State Modification

SALSA is a dialect of Java, and it is intended to reuse as many features of Java as possible. SALSA actors can contain internal state in the form of Java objects or primitive types. However, it is important that this internal state must be completely encapsulated, that is, not shared with other actors. It is also important that the internal state be serializable. [*]

The following piece of code illustrates how the internal state is modified, as follows:

 
behavior test{
  Integer a;
  int b;

void act(String[] args) { a=new Integer(3); b=a.intValue()+2; } }



Wei-Jen Wang 2005-10-24