Example:#include "maisie.h"
Compilation of the Parsec source file will generate an ".mo" file, containing prototypes for entities and messages. The ".mo" file will then be recompiled.
Old Format: entity job{ cpu, disk, dmean } ename disk, cpu; int dmean; { message ack { } ack1; message finish { } finish1; int i, t, end, start, t_wait, tid; invoke cpu with req {self}; . . . .New Format: entity job{ ename cpu, ename disk, int dmean } { message ack { } ack1; message finish { } finish1; int i, t, end, start, t_wait, tid; invoke cpu with req {self}; . . . .
If a function, say f has been defined, and is subsequently declared as a friend function within an entity, it is not necessary for the declaration to include the function prototype.
Maisie on the SP2 required every message type definition to also declare a variable of the type, even if such a variable was not required in the program. This is not necessary in Parsec.
Legal Syntax: entity job{ ename cpu, ename disk, int dmean } { message ack { } ack1; message finish{}; int i, t, end, start, t_wait, tid; invoke cpu with req {self}; . . . .Illegal Syntax: entity job{ ename cpu, ename disk, int dmean } { message ack ack1; message finish; int i, t, end, start, t_wait, tid; invoke cpu with req {self}; . . . .
The names of message types in a Parsec program are assumed to be global. In other words, a given identifier, say m1 can be used to define only one message type in a program. In the previous version, it was possible for a programmer to use m1 to define multiple message types (in the declaration of different entity types). Message definitions are global and the message variables are local.
Before: entity job{ ename cpu, ename disk, int dmean } { message ack { } ack1; message m1 { }; int i, t, end, start, t_wait, tid; invoke cpu with req {self}; . . . .Recommended: message ack { }; message m1 { }; entity job{ ename cpu, ename disk, int dmea