The syntax of ACLPL
is sketched below.
Behavior ::= behavior RulesList endbehavior
RulesList ::= Rule | Rule RulesList
Rule ::= ReactiveRule | ProactiveRule
ReactiveRule ::= on message Msg check
Condition do ActionsList
ProactiveRule ::= check Condition do
ActionsList
Msg ::= Performative {
content: Content;
sender: Sender;
receiver: Receiver; }
Condition ::= StateCondition and AuxiliaryCondition
StateCondition ::= true | Goal
AuxiliaryCondition ::= true | Goal
Goal ::= A | A and Goal | A or Goal
Action ::= assert_state(Fact) | retract_state(Fact)
| send(Receiver, Msg)
An agent is given an initial state that is a (possibly empty) set
of atomic ground formulas. A reactive rule is
fired by a message taken from the agent's mail-box, and if the condition
is satisfied, corresponding actions are executed. Condition is actually
formed by two distinct conditions. The former is about the agent state,
and expresses what the state must contain in order to execute
a sequence of actions.
The latter is an auxiliary condition, and is actually a set of calls to
auxiliary procedures.
If these calls succeed, the auxiliary condition is satisfied
and the sequence of actions is then executed.
An auxiliary procedure is either a prolog-like
clause defined in the agent code,
or a built-in procedure.
If the prototype contains only reactive, proactive or reactive-proactive
agents, ACLPL can be used in step 3 of the development method as
alternative to
. Use of ACLPL is limited to the behavior specification level.
Notice that the syntax of ACLPL could be extended in such a way behavioral
specification of more complex agents can be performed.