![]()
![]()
Next:Behavior
of ambientsUp:implementationPrevious:implementation
We present the sketch of the definition of classes for Ambient Calculus.
The class of Ambient
| //Ambient.java |
| public class Ambient{ |
| Name name; //Name of ambient |
| Ambient parent; //Reference to parent ambient |
| Ambient[] sibling; //Reference to sibling ambients |
| Ambient[] children; //Reference to children ambients |
| Agent[] agents; //Other agents |
| } |
| //Name.java |
| public class Name{ |
| int entryKey; //Key for entering permission |
| int exitKey; //Key for exiting permission |
| int openKey; //Key for opening permission |
| } |
| //Agent.java |
| public class Agent implements Runnable{ |
| Ambient myAmbient; //belonging Ambient |
| Capability[] capabilities; //available capabilities |
| } |