Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionBoth sides next revision | ||
alvis:agentstate [2013/12/31 01:40] marcin [Context information list] | — (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Agent state ====== | ||
- | **Definition 1.** A **state of an agent** //X// is a tuple // | ||
- | where: | ||
- | * // | ||
- | * // | ||
- | * // | ||
- | * // | ||
- | |||
- | If necessary //am//, //pc//, //ci//, //pv// will be indicated by indexes //S//, //S//' etc. to point out the state they refer to. | ||
- | |||
- | ===== Agent mode ===== | ||
- | |||
- | All possible modes and transitions among them, for α^0 system layer, are shown in Fig. 1. | ||
- | * **Finished** (**F**) means that an agent has finished its work. | ||
- | * **Init** (**I**) is the default mode for agents that are inactive in the initial state. | ||
- | * **Running** (**X**) means that an agent is performing one of its statements. | ||
- | * **Taken** (**T**) means that one of the passive agent procedures has been called and the agent is executing it. | ||
- | * For passive agents, **waiting** (**W**) means that the corresponding agent is inactive and waits for another agent to call one of its accessible procedures. For active agents, the mode means that the corresponding agent is waiting either for a communication with another active agent, or for a currently inaccessible procedure of a passive agent. | ||
- | |||
- | |||
- | {{: | ||
- | |||
- | **Fig. 1. ** Possible transitions among modes: a) active agents, b) passive agents. | ||
- | |||
- | ===== Program counter ===== | ||
- | |||
- | The **program counter** points out the current statement of an agent i.e. the next statement to be executed or the statement that has been already executed by an agent but needs a feedback from another agent to be completed (e.g. a communication between agents). For active agents in the **init** or **finished** mode and for passive agents in the **waiting** mode, the program counter is equal to 0. | ||
- | |||
- | We say that: | ||
- | * // | ||
- | * // | ||
- | * // | ||
- | * // | ||
- | * // | ||
- | |||
- | ===== Context information list ===== | ||
- | |||
- | The context information list contains additional information about the current state of an agent e.g. if an agent is in the **waiting** mode, //ci// contains information about events the agent is waiting for. Possible entries put into //ci// lists are given in Table 1. If an agent is in the **init** or **finished** mode, its context information list is empty. | ||
- | |||
- | **Table 1.** Relationships between the mode and the context information list of an agent. | ||
- | |||
- | ^ agent //X// ^ // | ||
- | | active | **X**, **W** | // | ||
- | | active | **W** | // | ||
- | | active | **W** | // | ||
- | | active | **W** | //guard// | //X// waits for an open branch of a **select** statement | | ||
- | | passive | **T** | // | ||
- | | passive | **T** | // | ||
- | | passive | **T** | //guard// | //X// waits for an open branch of a **select** statement | | ||
- | | passive | **T** | // | ||
- | | passive | **W** | // | ||
- | | passive | **W** | // | ||
- | |||
- | |||
- | **FIXME** | ||
- | |||
- | **[[: |