···509509 \item $M$ is the set of messages sent to the agent.
510510\end{itemize}
511511512512-Each plan entry is a tuple $(\pi, r, p)$, where $\pi$ is the executing plan, $r$ is the instatation of the PG-rule throug which $\pi$ is generated, and $\pi$ is the plan identifier. The belief base and each goal in the goal base are consistent as only positive atoms are used to represent them.
512512+Each plan entry is a tuple $(\pi, r, p)$, where $\pi$ is the executing plan, $r$ is the instatation of the PG-rule throug which $\pi$ is generated, and $p$ is the plan identifier. The belief base and each goal in the goal base are consistent as only positive atoms are used to represent them.
513513514514\paragraph{Multi-agents system}
515515···647647648648$$ {\langle \iota, \sigma, \gamma, \rho, \theta, \xi \rangle \rightarrow \langle \iota, \sigma', \gamma', \rho', \theta', \xi' \rangle } \over {\langle \iota, \sigma, \gamma, \Pi, \theta, \xi \rangle \rightarrow \langle \iota, \sigma', \gamma', \Pi', \theta', \xi' \rangle}$$
649649650650-where $\rho = \{\pi, r, id\} \subset \Pi $ and $\Pi' = (\Pi \diagdown \rho) \cup \rho'$.
650650+where $\rho = \{\pi, r, id\} \subset \Pi $ and $\Pi' = (\Pi/\rho) \cup \rho'$.
651651652652\subsubsection{Practical reasoning rules}
653653···677677the execution of the first action of the plan is failed. Suppose the execution (of the first action)
678678of a plan $\pi$ of an agent fails. Then, a plan repair rule $\pi_{1} \leftarrow \beta \pi_{2}$ can be applied to repair $\pi$ if the abstract plan expression $\pi_{1}$ matches $\pi$ and $\beta$ is entailed by the agent's belief base. The result of the match will be used to instantiate the abstract plan expression $\pi_{2}$ and to generate a new plan that replaces the failed plan.
679679680680-$$ {Plan Unify(\pi, \pi_{1}) = (\tau_{d}, \tau_{p}, \pi *) \& \sigma \vDash \beta\tau_{d}\tau \& id ºin I} \over {\langle \iota, \sigma, \gamma, \{(\pi, r, id)\}, \theta, \langle E, I, M \rangle \rangle \rightarrow \langle \iota, \sigma, \gamma, \{(\pi_{2}\tau_{d}\tau\tau_{p};\pi *, r, id)\}, \theta, \langle E, I \diagdown \{id\}, M \rangle \rangle}$$
680680+$$ {Plan Unify(\pi, \pi_{1}) = (\tau_{d}, \tau_{p}, \pi *) \& \sigma \vDash \beta\tau_{d}\tau \& id ºin I} \over {\langle \iota, \sigma, \gamma, \{(\pi, r, id)\}, \theta, \langle E, I, M \rangle \rangle \rightarrow \langle \iota, \sigma, \gamma, \{(\pi_{2}\tau_{d}\tau\tau_{p};\pi *, r, id)\}, \theta, \langle E, I/\{id\}, M \rangle \rangle}$$
681681682682Plan repair rules should be used cautiously. If the repaired part of a failed plan includes an action through which variables are bound (e.g., test or external actions), then the variables should not occur in the unrepaired part of the plan (i.e., plan part bound to plan variables or the plan part $\pi$*).
683683···691691Therefore, {\bf the configuration of a multi-agent system can be modified} when either the configuration of one of the involved individual agents is modified or when the shared environments change.
692692693693\section{2APL Platform}\label{sec:platform} %%%%%%% BORJA+MARCOS HERE
694694+695695+\subsection{Management of Messages}
696696+697697+The fact that 2APL platform is built on the top of JADE (Java Agent DEvelopment Framework) allows to use all the functionality that this framework has to communicate to other agents. Thus, as JADE, 2APL follows FIPA specifications.
698698+699699+In order to be able to sending messages to running agent, 2APL implements {\bf the message agent}.The message agent can be accessed by clicking on the message agent button in the toolbar. We must specify the receiver, that can be in JADE format, the performatice and the content. Moreover, optionaly, we can specify the language and the ontology of the message.
700700+701701+In Figure~\ref{fig:message_agent} we can see the form to send a message to a running agent.
702702+703703+\begin{figure}[htp]
704704+\centering
705705+\includegraphics[keepaspectratio,scale=0.65]{fig/messageagent.png}
706706+\caption{Message agent}
707707+\label{fig:message_agent}
708708+\end{figure}
694709695710\subsection{Deliberation Cycle} %%%%%%% FABRIZIO HERE
696711