• h
σ
−→ h
0
in B
C
A
if and only if h
0
is h augmented with
the transition a
k
σ
k
−→ a
k+1
where a
k
is the last state
of h and
– either a
k
σ
k+1
−−−→ a
k+1
is a transition of A
– or there exists i ∈ C(h) such that a
k
i|σ
k
−−→ a
k+1
in
A
The controlled behavior B
C
A
is the unfolding of A
where any transitions with a non-empty precondition
is kept (without the precondition) only if the con-
troller allows it, i.e. when the controller outputs the
corresponding instruction.
Example 3. Let us consider again the example com-
posed of two drones from Figure 1. Let us consider
the controller that is initially issuing all instructions
{i
1
, i
2
, m, c}. Two of these instruction are without any
effect, they are m and c, the other two enable the tran-
sition go
1
and go
2
of each drone. This means that
the controlled behavior has 4 transitions in its initial
state (the empty history) being the two transition for
the two drones.
At some point, if the controller issues the empty set
of instructions while the first drone is in state a
1
and
the second is in state a
2
, there is still 4 uncontrollable
transitions in the corresponding controlled behavior
state, they are pat
1
, back
1
, pat
2
and back
2
.
Now we can state the composition problem in our
framework.
Composition Problem. Given an agent community
A and a modal specification S, does there exist a con-
troller C for A such that the behavior B
C
A
satisfies S .
In Section 3 we show that the notion of controlla-
bility is the key to solving this problem and we pro-
vide an algorithm to compute controllability. How-
ever, when the answer to this problem is positive one
usually wants the composition to be effectively com-
puted. This is the object of Section 4 where we show
that from the output of the controllability algorithm it
is easy to build a specific controller but also to con-
struct a structure that captures all the controllers and
thus allows to switch from a controller to another dur-
ing the execution.
2.4 Framework Discussion
As stated in the introduction, the framework proposed
in this paper extends the one of (De Giacomo et al.,
2013) in two directions: the model for the agents and
their relation with the controller is more general and
the modal specifications offers a better expressivity
for the goals of the composition. The contribution
offered by modal specifications having already been
highlighted, we aim the discussion here toward the
contribution brought by the instruction-based model
of agents.
In the more general version of the Roman model,
the control over the agent is done by the controller
selecting an agent and one action of this agents for
matching one transition of the target behavior. This
means that the controller have a total control over the
actions of the agents except from the fact that some
actions of some agent may be nondeterministic. In
the framework we propose, the Roman model corre-
sponds precisely to the special case where all the ac-
tions are subject to a precondition ; the preconditions
for an action σ in the agent A
k
being some instruction
σ
k
. That is, every transition is of the form a
σ
k
|σ
−−→ a
0
.
Because of space constraints, we do not include
in the framework proposed in this paper the notion of
environment and its effect upon the agents. We ensure
the reader that it can be included without modifying
the synthesis algorithm and the complexity results.
The environment has to be considered as embedded in
the agents in the framework of this paper. In practice,
the environement may be responsible for many oc-
curences of nondeterminism, in particular whenever
an agent has two different possible actions when given
an identical instruction.
The improvements over the Roman model offered
by our framework are: first, the actions without pre-
conditions are uncontrollable. It is reasonable that in
an agent setting, some action cannot be controlled.
Some effects of uncontrollable actions can be simu-
lated by nondeterminism but this is not the case where
some agent may become unresponsive to some in-
struction after an uncontrollable action. However, this
mechanism is particularly useful for embedding the
possible failure of some agent component in the ob-
jective of composition and thus making sure there is a
correct answer for this failure in the solution.
Second, an agent in a specific state and given a
specific instruction may respond with some different
actions. This can be a consequence of the fact that
the agent is an abstraction of the real agent, the fact
that the instruction leave the possibility for the agent
to choose autonomously its response to the instruc-
tion, or the fact that the environement may alter the
available response to the instruction at the given state.
Finally, an instruction may be given to a set of
agents and not to one particular agent. This allows
one to represent systems where the agents are more
autonomous about their organization. This can model
for example a set of elevators in the same building:
when a user calls the elevator, she does not know
which elevator will answer her call.
Related works also include the framework of (Bal-
ModalSpecificationsforCompositionofAgentBehaviors
441