Abstract
Planning agents evolving in dynamic and complex environments need to continually plan their tasks and to monitor the evolution of its execution in order to deal with unexpected situations. To face this challenge, we proposed, in previous works, HPINet (Hierarchical-Task-Petri-Net) and SHPINet (HPINet with synchronization), models that can be used to represent plans less sensitive to execution contexts, and that support automatic verification. In this paper, we aim to propose computational techniques to verify some keys properties, such as soundness, of executing partial plans by analyzing their abstract level of representation. We especially focus on the some theorems and their corresponding proofs about the soundness of plan.
Keywords
Introduction
In this paper, we are interested in the continual multi-agent planning and coordination where the planning, coordination and execution processes have to be interleaved and carried out in continual fashion in order to solve complex tasks in unpredictable and dynamic environments. These environments could be subject to occurrence of unexpected events related to the failure of actions, the failure of required resources, the fault in execution platform, or the errors of the designer or programmer. The occurrence of unexpected events during plans execution can alter the conditions under which these plans are generated and coordinated, which can lead to their failure. On the other hand, the execution of plans in dynamic environments might provide opportunities for the agents to accomplish their goals more efficiently or effectively [9]. In this context, to protect plans from adverse effects and to profit from the new opportunity, interacting agents have to continue planning and coordination during plans execution in order to adjust their planned tasks with new contexts. To have this capability, the agents must be able to continually verify the soundness of their plans, monitor the evolution of their execution and environment, and better switch between local planning, coordination, and execution.
Whatever the continual planning and coordination approach is attractive to cope with complex and dynamic environments issues, it faces a key challenge related to the higher computational and communication cost that compromise the agents to react adequately to eventual exceptions (which is not preferable in highly dynamic environment) [7]. Computation complexity refers firstly to the monitoring of environment and execution evolution, and secondly to the local plans refinement, adaptation and repairing. However, communication complexity refers to the coordination of local adjustments to manage commitments with each other [5].
To deal with this challenge, we provided in previous works [2, 3], a formalism called SHPlNet (Hierarchical-Task-Petri-Net with synchronization) that allows to represent hierarchical plans (that is used by most preferred continual planning techniques [9]) with multiple abstraction levels, by extending the Petri net (as in [15]) and by taking advantage of HTN (Hierarchical Tasks Network) planning [10, 11], CHiP [6], and the modular analysis of Petri nets idea [4]. Overall, the SHPlNet formalism is featured with the following characteristics that are very advocated by continual multi-agent planning. Firstly, it can take into account the representation of flexible plans with implicitly representing many execution alternatives. These one enable the plans to be less sensitive to the execution context and reducing dynamic adjustment complexity. Secondly, by using Petri net, the execution context is explicitly represented by the marking concept. In this fashion, SHPlNet formalism offers the necessary features that allow interacting agents to monitor plans evolution, to handle plans interaction and interdependency, and to control resources evolution at run time. By using so called summary information [6], the plans might be verified and adjusted by only analyzing its abstract level. Thirdly, SHPlNet formalism can enable modular representation of plans: there is a clear distinction between the abstraction levels of hierarchical plan, and also there is clear separation between tasks and synchronization constraints. Within this aspect, the analysis of plans can be done in a modular way, and therefore, their updating may be simplified. Note that the modular representation of the plan can facilitate the revision of some decisions of planning and coordination, and therefore best meet the evolutionary aspect of the system.
This paper aims to complement our previous work with a theoretical framework to use for dynamic verification and validation of agent and multi-agent plans, and to present how this framework is used by interaction agents to switch between planning/coordination and execution. We proceed to specify the conditions in which a partial plan (partially refined and executed) represented by SHPlNet will be accomplished in some way, will be accomplished in any way, or will not be accomplished in any way, these all by analyzing only the representation of their abstract level. We call respectively these properties feasibility, soundness, and invalidity. We provide also the underlying computational techniques to verify and validate these properties. We especially focus on the some lemmas, theorems, and their corresponding proofs about the soundness of plans represented by a SHPINet. Indeed, we present some algorithms for computing and updating summary information, which is the basis of abstract reasoning on plans.
The rest of this paper is structured as follows. In Section 2, we provide an overview on the paper context and the assumptions this work is based on. We outline also the intuition behind the model used to represent plans and the key properties related to. To master the complexity of the work, we follow a progressive approach. Throughout the paper, we specify the conditions that must be hold for a partial plan represented by SHPlNet to be feasible, sound, or invalid. We insist on proposing a verification technique that exploits as much as possible the high abstraction levels of the hierarchical plans and limits the use of the accessible graph. As the formalism of SHPlNet is incrementally formed from simple feathers (as it will be presented throughout paper sections), from HTPN to HPlNet1 to SHPlNet, the conditions to be hold for each property will also be built progressively according to. In Section 3, we specify the conditions to verify in order to decide whether the execution of a plan represented as HTPN is feasible, sound, or invalid. For this end, we proceed to make the first abstraction of SHPlNet representation by ignoring the Summary information and Synchronization constraints. In this level we are only focused on the control flow between tasks and the impact of organizational structure of tasks on their accomplishment. In Section 4, we present HPlNet and outline the impact of resources constraints related to the tasks in plans on feasibility, soundness, and invalidity properties verification process. We clear in this section the reachability graph analysis based verification and the summary information based verification. Section 5 focuses on tasks synchronization and how to verify the plans represented by SHPlNet by considering this synchronization. We extend the conditions so that the plans represented by SHPlNet are feasible, sound, or invalid according to the corresponding conditions in the case of HPLNet. Section 6 outlines relevant related works. Finally, we conclude our paper.
Background and overview
We advocate an approach where a team of deliberative agents has to continually elaborate and execute a set of concurrent partial plans in order to accomplish a set of goals. As tasks in local or global plan may be interrelated due to the functional relationships or due to the sharing of common resources required for its accomplishment, agents’ plans must be coordinated in order to avoid harmful situations and to benefit from the synergy of their tasks.
In order to ensure a safe behavior during plans execution in the entire system, plans of all agents must be benefic and conflict free. The verification of plans validity must be accomplished before its execution is started and while they are being executed.
In this section, we provide an overview on the paper context and the assumptions this work is based on. We outline also the intuition behind the model used to represent plans and the key properties to be verified.
Partial hierarchical plan
In this paper we are based on hierarchical plans where a set of tasks are organized in tree-like structure. The top level includes the root of the tree that is the abstract (compound) task and the lowest level includes the leaves that are elementary (ground, or primitive) tasks, which may be accomplished directly by execution of actions. Several decomposition methods may be related to an abstract (sub) task. The middle levels include less abstract subtasks and decomposition methods. The hierarchical representation is a natural approach for representing practical activities and goals. It gives also a clear idea on how the accomplishing of complex tasks may be simplified.
Decomposition of the manufacturing task.
Figure 1 shows an example of hierarchical plan describing the decomposition of a complex task, noted
We note that hierarchical plans represented in this way are considered as partial plans because the order of execution between parallel tasks and the choice of decomposition methods for decomposing abstract tasks are not entirely specified. Therefore, one hierarchical plan can be refined to a set of total ordered ground (executable) plans. In the latter case, the plan is said to be flexible.
In this subsection, we present an overview of the formalism, that we called SHPlNet (Hierarchical-Plan-Net with Synchronization), proposed to represent hierarchical plans with synchronization. The foundation of this formalism is based on three concepts, hierarchy, abstraction, and synchronization. These concepts are featured in two components: Hierarchical-Plan-Net (HPlNet) and synchronization net (S). Graphically, HPlNet and S are separated by a vertical line, HPlNet component is upper the line and S component is under the line. Figure 2 shows an instance of SHPlNet in which HPlNet component represents the hierarchical task tree of Fig. 1.
Graphical representation of an SHPlNet instance.
The keys properties of the formalism SHPlNet can be summarized in four points:
Hierarchical tasks representation, where we distinguished between abstract and elementary transitions to be able to represent the tasks in different levels of abstraction. In Fig. 2
Summary information computing and using, where we proceed to associate supplementary information to transitions, using a function
Explicit separation between tasks and synchronization constraints. The Petri net S in Fig. 2 represents a constraint that enforce a sequential execution of concurrent tasks (transitions)
Explicit execution state representation, where we exploit the marking concept to provide an explicit representation of plans execution states. This can enable agents to dynamically reason on the evolution of plans.
The representation of hierarchical tasks, which we call HTPN (Hierarchical-Task-Petri-Net), is considered as an abstraction of HPlNet by ignoring the Summary information. On other hand, HPlNet is considered as an abstraction of SHPlNet by ignoring the Synchronization constraints.
In this paper, we are interested in the verification of plans’ validity before and during their execution. On the basis of verification result, interacting agents might take appropriate decisions. During their elaboration, the plans must be verified to ensure that are valid and conflict free. During their execution, they must be verified to ensure that the outcome of executed actions is as expected during planning and required conditions for continuing the remained actions yet satisfied.
Definition of plan verification technique depends on the semantic that one can associate to plan execution. In this paper we are based on operational semantics to describe the plans’ execution and its interfering with its execution context. The execution is hence described in terms of sequence of successive (execution) states. Initial state is that where no action of the plans has been executed and final state is the state where the plan is fully executed. Steps between states refer to the execution of actions (elementary tasks) or the selection of decomposition methods for abstract tasks. So, verification process try to decide whether the execution of plan leads always, sometime (under certain conditions), or never to a safe final state. These properties are summarized as follows:
The use of feasibility, invalidity, and soundness properties in planning/execution phases.
The agents in the system try to verify these properties in order to behave in an appropriate manner and to take suitable decisions. Figure 3 illustrates how these properties are verified through the planning/execution phases. Before the execution is started, the plan must be progressively refined by reorganizing its tasks and by selecting a refinement rules for decomposition of abstract tasks. The progress of plan elaboration will continue as long as possible. If the planning/coordination process reaches a state where the plan is invalid it will backtrack in order to examine other planning alternative. A plan passes to execution phase if it is sound and will return to planning/coordination phase if it will be invalid (because it will not success to reach goal state). When a plan is being executed its verification go on. If its state is yet sound then the execution can be go on. However, if the state becomes feasible (resp. invalid) the plan must be adapted (resp. suspended). The adaptation of plan consists of blocks the choices that can lead to unsafe states and imposes synchronization constraints between concurrent tasks.
Throughout the paper, we specify the conditions that must be hold for a partial plan represented by SHPlNet to be feasible, sound, or invalid. We insist on proposing a verification technique that exploits as much as possible the high abstraction levels of the hierarchical plans and limits the use of the accessible graph. As the formalism of SHPlNet is incrementally formed from simple feathers (as it will be presented throughout paper sections), from HTPN (Hierarchical Task Petri Net) to HPlNet (Hierarchical Plan Net) to SHPlNet, the conditions to be hold for each property will also be built progressively according to.
In the previous section, we present the key properties that have to verify during planning/coordination and execution phases. If the verification of local plans is easy, the verification of multi-agents plan is difficult, firstly, due to the absence of global vision on all agents’ plans. Second difficulty concerns the private nature of these plans, when the agents are self-interested, the information must remain private. In this paper, we are not interested in the distributed algorithm to use for verifying multi-agents plan. We especially deal with centralized technique for analyze local or multi-agent plans. The centralized analysis is used in many planning approach even if coordination is not totally centralized. In [16, 1, 8] for example the agent that want elaborate or validate its plan in multi-agent context, forms a global plan by merging its local plans with those of all others agents. To allow an agent to have a (partial) global view, it must exchange with others agents its plan or only information on its plan.
In the system where the agents are self-interested and when information on plans must remain private, these agents do not communicate their plans with each other. In this paper, we cope with this issue by presenting a verification technique that allows an agent to analyze abstract level of hierarchical plans without having to analyze their entirety detail. The technique to propose is not based on the analysis of the entire reachability graph. However, it is based on the summary information associated with abstract tasks. Hence, the detailed plans are only exchanged with tightly coupled agents.
Simple hierarchical tasks
In this section, we start with, HTPN (Hierarchical-Task-Petri-Net), the first abstraction of SHPlNet by ignoring the summary information and the synchronization constraints. We present how to formalize the representation of hierarchical task networks based on Petri net. We are focused on the control flow between tasks, how abstract tasks can be decomposed, and the representation of their evolution states. The key idea consists of defining a tree-based structure of macro-nodes. Each macro-node is tasks network that implement decomposition method for abstract task. Through this section; we explain how to verify the key property argued in the Section 2.3.
Tasks network
We start by explain how we use Petri net to represent a tasks network. We adopt two patterns of control flow, one to represent parallel (or partially ordered) tasks and the other to represent the sequential (or totally ordered) tasks. Secondly, we use a special end-transition. We called the resulting formalism Task Petri net (or TaskPN). Figure 4 illustrates two instances of TaskPN: Sequential-TaskPN (Fig. 4a), and Parallel-TaskPN (Fig. 4b).
Examples of (a) Sequential-TaskPN, and (b) Parallel-TaskPN.
Formally, we define Task Petri Net (TaskPN) as follows (Definition 1):
.
Task Petri NetWe define a Task Petri Net (TaskPN) by the tuple
All transitions and places belong to one single path from All (tasks) transitions belong to parallel paths from the fork-transition
Places in TaskPN represent execution states. A task,
To represent hierarchical tasks we firstly proceed to distinguish between abstract (compound) and elementary (ground) tasks representation. secondly, we proceed make mapping between abstract transitions (representing compound tasks) and Task-PN nodes to represent decomposition methods. Resulting formalism is called Hierarchical-TaskPN (HTPN) [2].
An instance of HTPN for building the part P.
An instance of HTPN has tree-like structure. Each node in this tree is a TaskPN. Figure 5 illustrates an instance of HTPN representing the component task
.
Hierarchical Task Petri NetA Hierarchical Task Petri Net (HTPN) is defined by the tuple:
A HTPN
A HTPN is used to represent a space of all tasks an agent or a team of agents may accomplish to reach a global system goal (represented by the highest-level task). We note that HTPN is proposed to emphasize only on the subtask and control flow relationship between tasks. HTPN allows also the agents to have explicit states (indicating enabled, executed, and executing tasks) and to reason on their tasks evolution. This is by the marking concept of places and transitions. To specify the execution evolution, we are focused on the operational semantic. The states are represented in terms of places and abstract transitions marking. Each place may be marked at most by one token and the abstract transition by one node selected to refine him. Steps between states denote execution of elementary transitions or selection of refinement rules. We describe respectively, by Definitions 3 and 4, the state of HTPN and the condition and rules for their execution.
.
State of HTPN
A state of a HTPN The initial state The final state A marked HTPN of
The state of HTPN is considered as an extended marking that indicates the activated nodes and the marked place and (abstract) transitions in these nodes. The initial state is generated when the execution of the task, at the top level,
.
Execution condition and execution rules of HTPNLet
the execution (or firing) of
One can note that the selection of a refinement rule leads to activation of a new node and the execution of end-transition to its deactivation. The execution of an abstract task is composed of a sequence of steps, starts by the selection of refining node and finishes by firing the end-transition of this node. Note that if an abstract task (transition) is enabled, all the refinement rules associated to are candidates and the firing of one leads to exclude the others.
In Definition 5 we formalize the soundness property of an HTPN.
.
Soundness of an HTPNAn HTPN is sound if and only if:
All transitions must be quasi-lives; no transition that can never be fired; Each step must not be fired more than once; and Final state must always be
.
Each HTPN is sound.
Proof..
Pursuant to finite (the finite number of nodes component) property of the tree representing the HTPN, the absence of recursion, and soundness of nodes (because they have a TaskPN structure, which is acyclic and its source nodes are places), for demonstrating the three conditions cited in Definition 5 (about the soundness of a HTPN) it suffices to prove that: a) the firing of each transition in each node is always possible; and b) each transition in each node must not be fired more than once. By its simplified structure, it is very easy to prove that TaskPN is sound. So is the case for nodes of a HTPN, because each node has a control structure of a TaskPN. On the other hand, the choice of the refinement-rule to use did not depend on the marking; it just depends on whether the transition to refine is enabled. The firing condition of this transition depends only on the marking of active node marking where this transition is located. ∎
The soundness property implies that the number of accessible states of a HTPN is bounded. Therefore, the reachable graph is also bounded. It indicates also that all paths in the reachable graph lead to a single final state. Each path contains the refinement rules and elementary transitions (including end and fork transitions) to select in order to perform the highest level task
.
Necessary and eventual transitionLet
Necessary transition iff Eventual transition, iff
Necessary (respectively Eventual) transitions correspond to the tasks that must (respectively may) be performed to accomplish the task
Hierarchical-Plan-Net
HTPN is simple formalism for representing compound tasks. In this section, we extend the HTPN with information concerning the resources to consume and to produce by different tasks. The resulting model is called Hierarchical-Plan-Net (HPlNet) [2]. For this end, we make to annotate the transitions with information about the resources related to the tasks modelled by these transitions. For elementary transitions this information are specified by the designer; however, for abstract transition, it is computed and summarized (according to some computation logic) from the potential resources to consume and to produce related to the transitions of lower levels. We give below the formal definition of HPlNet (Definition 7).
.
Hierarchical-Plan-NetA Hierarchical-Plan-Net (HPlNet) is defined by the tuple:
We denote by
Figure 6 shows an instance of HPlNet representing a plan for the task
An instance of HPlNet for building the part P.
Comparing with HTPN, the concept of resource introduced in HPlNet can limit the behavior space of plans and can lead to have dead states (that cannot lead to a final state). In this context, we assume that the agents are aware of the available resources before and when the plan execution evolves. Hence, we proceed to extend the execution state to include the availability of each resource (that we call execution context). In Definition 8 we formalize the state representation.
.
State of a HPlNet
A state of a HPlNet The initial state is The final state is The tuple
As the case of HTPN, a step in HPlNet concerns the execution of an elementary-transition, end-transition, or a refinement-rule. However, the execution of an elementary-transition in HPlNet must take into account the information about the resources associated to. Definition 9 summarizes the formalization of steps in HPlNet.
.
Execution conditions and execution rules in HPlNetGiven a state
the execution of sp leads to the state
We note that the only difference between the firing condition and firing rules in HTPN and HPlNet is the execution of elementary transitions. The supplementary condition for the elementary transition to be enabled concerns the availability of the amount of required resources in the current execution context. Therefore, the execution of elementary transition leads to change the marking of places in
The execution of an HPlNet instance can succeed if it reaches a final state; we call the steps sequence, a run. In the execution phase, agents can check if an execution state can or cannot lead to a final state. If this state can lead to final state, we call that it is a safe state. The execution an HPlNet instance can fail if the amount of available resources is not sufficient for the execution of any transition. Hence, the current state is blocking (deadlock state). In some not-blocking state, an elementary transition can be enabled vis-a-vis
We define below (Definition 10) the concepts of blocking state, safe state, postponed transition, and run.
.
Blocking state, safe state, postponed transition, and runLet
A state A state A transition A run for
A run is a safe execution (correct execution) of a HPlNet. We note that the execution of a HPlNet instance may be performed according a set of possible runs. This is justified by the presence of several refinement rules (for abstract transitions) and/or by the presence of concurrent tasks that can be executed in a different orders. The set of possible runs corresponds to all possible paths between the initial state and final state.
In the plan execution phase, some internal or external events can occur and can lead the execution context to be changed in unpredictable manner. In multi-agent systems when the execution failure can lead to critic situation, the agents should be able to continually verify if the plan execution is still in safe state. In this context of analysis, the agents should be interested in the proper termination of plans evolution from the current execution state (even if it is not reachable from the initial state). Therefore, we define the properties of sure, possible, and impossible proper termination. We define formally these properties as follows (Definition 11).
.
Sure, possible, and impossible proper terminationLet
Sure, iff Impossible, iff Possible, iff
The soundness property as it is defined for HTPN do not take into account the concurrent task dependency because in HTPN the concurrent task are totally independent and can be executed in parallel way. In the case of HPlNet the tasks are related to shared resources, the execution on one task can postpone (when the required resources become available) or exclude the execution of another. To reflect this feature, we distinguish between two variants of soundness property: weak soundness and strong soundness. Weak soundness property is such as defined in the case of HTPN. Strong soundness is weak soundness to which add the following condition: “there will no postponed transitions”.
.
Soundness of an HPlNet A marked HPlNet
Weakly sound iff:
All steps must be quasi-lives. Formally: Each step must not be fired more than once. Formally: Proper termination: each state Strongly sound iff:
It is weakly sound No transition may be postponed in any evolution state.
We note that the soundness of an HPlNet relaxes the criterion of the uniqueness of the final state in terms of the context
Unlike the case of HTPN, the (weak or strong) soundness property of HPlNet is not guaranteed. The soundness of a plan represented by HPlNet depends exactly on the availability of resources in the initial state. the property related to the absence of a multiplicity of firing step is inherited from HTPN.
.
In each marked HPlNet
Proof..
By contradiction, we assume that there is (at least) a step that can be fired more than once. Let sp be a step such that:
.
A marked HPlNet
Proof..
Direct consequence of Lemma 1 and the fact that the number of steps is bounded. ∎
The boundedness of a marked HPlNet means that the number of nodes in the marking tree is limited, the places and abstract transitions in each node are bounded, and the amount of each resource in the context is limited. Boundedness of HPlNet can help to analyze the plans represented by HPlNet by exploiting their Reachability Graph.
Pursuant to Lemma 1, we may decide that a marked HPlNet is sound if it is quasi-live and its termination is proper. In fact, there is dependence between these two conditions. If there is a dead step in a marked HPlNet then the evolution of execution can lead to blocking state.
.
All transitions of a marked HPlNet
Proof. To demonstrate Lemma 2, we proceed to assume that there is a dead transition and to demonstrate that the proper termination criterion of marked HPlNet
there is a state there is no a state
.
A marked HPlNet
Proof..
Pursuant to Lemma 1, in each marked
The most simple and intuitive method to verify that a marked HPlNet
The analysis of the plans by exploiting their reachability graph is inappropriate because it can cost the complexity of calculation. In addition, it does not properly exploit the multiple levels of abstraction characterizing HPlNet. The analysis can be improved by using summary information associated with abstract transitions. With this information, the verification of Soundness, Feasibility, and Invalidity properties is possible by analyzing highest level of abstraction of plans only. Pursuant to Lemma 2, we deduce that the source of dead state is the lack of required resources. Hence, de soundness property is sensitive to the initial execution context and/or and how a transition can produce resources required for the performance of others. In the next, we present some idea on how analyzing the resources requirement of a plan represented by HPlNet in order to analyze its relationship with the initial state.
The simple and direct method consists in finding, in a first step, the set of run without taking into account the resources manipulation. In a second step, the amount of resources to consume and to produce by the set of elementary transitions is computed. Finally, the amounts of resources consumption (respectively produced) by the plan is summarized in intervals, the lower bound of each interval represents the minimum consumption (respectively production) and the upper bound represents the maximum consumption (respectively production) of all obtained runs. However, this method is not suitable and has the drawbacks of reachability graph analysis.
Summarizing resources consumption and production
In order to have information summarizing the conception and the production associated to a plan represented by HPlNet, we use a bottom-up method.
This one is used to compute and to use the summary information about resources to consume and to produce of elementary or abstract tasks and plan according the following semantic:
Regardless of the sequence of elementary tasks that may be carried out for performing an abstract task, the amount of each resource really consumed or produced should be comprised in the interval specified in summary information associated to this abstract task.
The following procedures (Algorithm 1) are used to compute (or deduce) the summary information of each abstract task. The procedure
Computation of summary information
procedure ComputeSN(
)
;
repeat
if
then
ComputeAbsT(
) ;
end
if
;
prev(
);
until
null
while
is not an end-transition do
;
next(
);
end
while
Return(
) ;
end
procedure
procedure ComputePN(
)
;
for each
do
if
then
ComputeAbsT(
) ;
end
if
end
for
Return
end
procedure
procedure ComputeAbsT(
)
;
for each
do
if
is parallel-TaskPN then
ComputePN(
);
end
if
if
is sequential-TaskPN then
ComputeSN(
);
end
if
;
;
end
for
end
procedure
Computation of summary information
ComputeAbsT(
Return(
ComputeAbsT(
Return
Figure 7 shows calculus tree summarizing the computation of the resources to consume and to produce by the task
Calculus tree of summary information related to the transition Prepare-q (Fig. 6).
During the execution of the plans, some tasks in the plans are already executed and others not yet. In this case the potential consumption and production of resources related to an hierarchical plan must only take into account the tasks that are not yet executed. For this purpose, the summary information related to the task
We provide in Algorithm 2 the procedures to use for updating the resources’ requirement. The procedure
Updating summary of information
UpdateAbsT(
Return
UpdateAbsT(
Return
Return
One can note that the specification of resources related to tasks can implicitly characterize situations of tasks and plans interaction. Indeed, summarizing of resources information in the highest level of abstraction can lead to distinguish situations in which an agent or a multi-agent plan is conflict free, feasible, or invalid.
As all information related to the potential resources consumption of all tasks represented in HPlNet is summarized in the transition
.
Sound feasible and invalid planLet
Strongly sound in Invalid in Feasible in
During the execution phase, the execution of some tasks may be failed and therefore their resources to produce may not be carrying out. Yet the resources are produced correctly by tasks, their availability may be altered due to an unpredictable events. To cope with this issue, the plans must be verified in order to know if their executing is stills safe or not. The property to verify is proper termination. As the verification is also based on the summary information, the proper termination may be qualified as sure, possible, and impossible. Definition 14 formalize the condition of sure, possible, and impossible proper Termination.
.
Sure, possible, and impossible proper terminationLet
Sure, iff the state Impossible, iff the available resources in Possible, iff the reachability of a final state is uncertain. According to a particular order of steps firing, a final state may be reached. Formally:
HPlNet with synchronization (SHPlNet)
In this section, we present SHPlNet (Hierarchical Plan Net with Synchronization), an extension of HPlNet [3] that deals with the interaction between tasks and plans.
One can note that the execution of plans may lead to critical situations due to the potential conflict between the tasks sharing critical resources. The conflict may occur between tasks in an individual agent plan or between tasks belonging to different agents’ plans. To address these conflicting situations, the planning and coordination process has to synchronize the tasks and to promote certain decomposition methods in plans. To be able to represent plans taking into account the synchronization between tasks, we extend HPlNet by adding features allowing to impose an execution order between parallel tasks, and to avoid the activation of some refinement rules.
The idea behind SHPlNet is to add a separate module grouping synchronization and inhibition constraints. We use an ordinary Petri net, that we call synchronization net, to represent this module. The formal definition of SHPlNet is as follows (Definition 15).
.
SHPlNetHierarchical-Plan-Net with Synchronization (SHPlNet) is defined by the tuple:
Each transition defined in
The Petri net S defined in Definition 15 constitutes a coordination module including synchronization constraints that enforce an execution order and ensure the exchange of some quantities of resources between concurrent tasks (explicit positive interaction). It includes also constraints that enforce the selection of one refinement rule.
One can note that several causal relationships can be related to the same resource that is represented by a unique place. In order to protect the amounts of resources to be exchanged between different peers of transitions (producers and consumers), we propose to add, for each causal relationship, a second temporal constraint between the same transitions (using another place). This additional constraint allows the producer task to notify the availability of expected amount of resource to the consumer task.
Note also, that synchronization constraints concern only the necessary tasks (or transitions). This is motivated by the fact that these constraints are handled at run time in the planning or coordination phases where the agents should take some decisions regarding the selection of a particular refinement rule or serialization of concurrent tasks. For adding a synchronization constraint between tasks, agent (s) must firstly commit to ensure that these tasks must be executed to carry out the global task
The particularity of HPlNet semantic is related to the manipulation of the resources by tasks. The particularity of SHPlNet semantic is related to the manner the tasks in agent or multi-agent plans can be positively or negatively interfered. As the case of HPlNet, the execution semantic of SHPlNet is described in terms of the states and transition between states. However, the state representation of a SHPlNet takes into account the state of the synchronization net, which allows to exchange control information between concurrent tasks and to impose an additional constraint on refinement rules selection.
Therefore, the state a SHPlNet is represented by the extended marking (Definition 16) that deals with state of hierarchical tasks, state of available resources, and state of synchronization net.
.
State of a SHPlNetA state of SHPlNet
The initial state is The final state is
The steps of SHPlNet are firing of an elementary-transition, end-transition, or refinement-rule. Definition 17 below states respectively the execution condition and execution rules.
.
Execution condition and execution rules in SHPlNetGiven a state
The execution of a step
In Definition 17, the condition (ii) states that all possible steps appearing in
The properties of blocking state, safe state, postponed transition, run, sure, possible, and impossible proper Termination are refined in Definitions 18 and 19.
.
Blocking state, safe state, postponed transition, and runLet
A state A state A transition A run for
.
Sure, possible, and impossible proper terminationLet
Sure, iff Impossible, iff Possible, iff
If there are no constraints between concurrent tasks, the used technique for computing summary information in an HPlNet may be applied in case of a SHPlNet. For example, the task
Influence of synchronization net on the computation of the summary information.
In fact, the synchronization net in SHPlNet is considered as a set of rewriting rules that rewrite the control flow structure of the nodes. The application semantic of these rules is equivalent to the imbrications of parallel and sequential-TaskPN. The propagation of summary information to higher levels tasks should take into account the fact that the quantity to be produced (resp. consumed) is not cumulative because it is intended to (resp. provided by) another non-local tasks (do not belong to the same node). Thus, for a producer (resp. consumer) task
Finally, the inhibitions constraints allow simply to ignore the blocked refinement rules when calculating summary information for an abstract task. The calculation procedure addresses this refinement rule as if it no longer exists.
The consideration of concurrent tasks synchronization leads to the redefinition of the conditions under which a hierarchical plan is sound. Establishing temporal order relationships and exchange of resources between parallel tasks can lead to reduced consumption of resources, which can lead therefore to obtain a sound plan. However, it may also be a source of the occurrence of cycles, which lead always to blocking states.
In the same way as a plan represented by HPlNet, a plan represented by SHPlNet can be analyzed from an abstract level. Based on the summary information associated to transitions, agents can decide that the proper termination of their plan execution is sure, possible, or impossible, provided that this plan is cycles free. As synchronization constraints are applied only on necessary tasks, the cycles lead always to deadlock state that prevents the execution of any task in plans. Before defining the cycle concept, we define the execution order relationship between two steps
.
Execution order(
We define formally a cycle and acyclic plan property as follows.
.
Cycle in SHPlNet and acyclic planLet
The list
For example if the synchronisation net in Fig. 2 is replaced by that in Fig. 9 results an instance of cyclic SHPlNet. In this case, the cycle is:
Instance of a synchronisation net.
We note that soundness of a SHPlNet is relaxed as far as the absence of dead steps. Precisely, the blocked refinement rules and the transitions belonging to the nodes related to are excluded from the condition of “no dead steps”. This relaxation is benefit in the agent and multi-agent planning context. If in some situations some execution alternatives are not suitable, the agent (s) can commit to block these alternatives. In this case, all tasks related to are considered non-existent. Therefore, we mean by "all transitions should be quasi-live" the transitions that are not excluded.
The verification of soundness property of an acyclic SHPlNet is only limited to the verification of quasi-liveness property of all steps (that are not excluded) and proper termination property, because the property relative to the absence of multiple firing of steps is inherited directly from HPlNet model.
.
A marked SHPlNet
Proof..
By contradiction, we assume that there is (at least) a step that can be fired more than once. Let sp be a step such that
.
A marked SHPlNet
Proof..
Direct consequence of Lemma 3 and the fact that the number of steps is bounded. ∎
Pursuant to Lemma 3, we can decide that an acyclic SHPlNet is (weakly or strongly) sound if it is quasi-live and proper termination property is verified. As the case of a marked HPlNet, in fact, there is a dependency between these two properties. If there is a dead step in a marked SHPlNet than the evolution of marking can lead to not proper termination state (or blocking state).
.
All transitions of a marked acyclic SHPlNet
Proof. To demonstrate Lemma 4, we proceed to assume that there is a dead transition and to demonstrate that the proper termination condition of marked SHPlNet
there is a state there is no a state
.
A marked SHPlNet
Proof..
Pursuant to Lemma 3, in each marked
In the previous section, we showed how to verify the soundness of a plan represented by HPlNet by only analyzing the summary information associated with the task of highest abstraction level. The condition used for this is not sufficient for the case of SHPlNet due to the possible occurrence of the cycles causing deadlock situations. Therefore, the absence of cycles in a plan represented by SHPlNet is a necessary condition to be sound.
In Definition 22, we formulate conditions in which the proper termination of plan execution is sure, possible, or impossible
.
Sure, possible and impossible for proper terminationLet
Sure, iff Impossible, iff is Possible, iff
A plan whose execution is impossible is a plan that has no way to ensure the success of its execution. A plan whose the safe execution is sure is a flexible plan. It can be executed correctly regardless of the choice to be taken to refine abstract transitions and the execution order of concurrent tasks. Between these two cases, the success of execution may be possible in an uncertainty case. To address this incertitude, the plan must be reorganized by updating the synchronization net (block some refinement rules and/or add some constraints on the execution of tasks).
In this paper, we are not interested in the multi-agent systems verification. My work here concerns a new idea for verifying and validating an agent and multi-agent plans that are executed in complex and dynamic environment. We are exactly interested in dynamic verification of flexible plans when a team of interacting agents has to automatically and continually plan, execute, and monitor their actions.
In the most classical multi agents planning, the verification is inherently accomplished during the elaborating of plans, planning, and coordination. The used planning and coordination algorithms try to, a priori, find (making a means-end analysis) plan that will be valid. These approaches can be considered as generative verification. However, the proposed works to deal with verification as a problem are not much. In the following, we present those that are closely related to the work presented in this paper.
In [14] Gordon proposed an framework for dynamic plans adaptation where the (re)verification is required in order to ensure that critical behavioral constraints are always satisfied after every adaptation. The verification of plan, which is represented as finite-state automaton, is required after adaptation operation not when executing plan become infeasible. The proposed (re) verification algorithm, which is based on model-checking approach, is incremental and it is called after the application of each updating operator. The idea of incremental (re) verification and the idea introduced to localize the (re) verification to gain speed are beneficial. Although the model of the plan used in this work does not manipulate metric resources, its verification localization idea can complement our work. We can propose to analyze in a preliminary step the tasks defined in an abstract level and separate them into subsets of tasks, which can be verified independently. If the work of Gordon aims to improve the efficiency of reverication after learning, so that agents have a sufficiently rapid response time, our verification approach is proposed to be used to improve the efficiency of (re) planning, (re) coordination, and execution monitoring. In contrast to Gordon, we have used hierarchical plans and exploited the abstraction in the verification process to challenge the dynamic verification problem during planning and execution phase.
Recursive Petri net proposed by Seghrouchni and Haddad in [18] is a more expressive formalism to represent hierarchical plans. The distinction between abstract and primitive transitions and the firing rules principles are all features enabling to verify the feasibility of hierarchical plan. While its power to express a wide range of agent plans, the recursive Petri net suffers from the inability to explicitly represent the interaction and interdependence of concurrent tasks and its inability to reason on abstract tasks. The verification of plan, that is required during the coordination phase, can be used during the execution. The proposed verification or validation process is based on the analysis of the reachability tree that must enumerate all possible execution instances. Unlike Seghrouchni and Haddad, we proposed to better exploit the abstraction in the verification of hierarchical plans that manipulate metric resources. We proposed combining the verification based on the analysis of the summary information with one based on the analysis of the reachability graph. We note that the verification based on the analysis of reachability graph suffer from high complexity, especially when the plans are partially refined. To deal with this problem, many work proposed to enrich the plans representation models or to use control structure for enhance the verification process.
Fallah-Seghrouchni and Degirmenciyan-Cartault have proposed in [12] a framework for controlling the execution of the multi-agent plan and its validation. They propose mechanism for extract the pertinent constraints for the execution of the plans in order to control their execution and finally to dynamically validate it. These pertinent constraints are considered as information summarizing the conditions related to resources required for plan execution. Similar to our framework, this information is used to verify some properties about the validity and the quality of plan and to control its execution ability in the current execution context. Fallah-Seghrouchni and Degirmenciyan-Cartault have adopted the formalism of Hybrid Automata (formalism based on the extension of timed automata) to model the different variables of agents’ plans. This formalism allows model-checking of important properties like reachability, security, liveness, deadlock absence,
In [17] Muise et al. have proposed an execution monitoring (EM) technique that enables to monitor, as a plan is being executed, the action execution and the world state in order to identify the discrepancy between the predicted and observed execution outcome. A central task of EM system is to verify whether a partial plan being executed remains valid (feasible in the case of our framework) with respect to certain state. This work was especially dealing with the problem of partial-order plans (POP) execution monitoring. Partial-order plans are considered as a compact representation for multiple linearizations of actions. The authors exploit the notion of regression, defined in [13] for total ordered plan, to identify the conditions that ensure the validity of a POP. The overal idea is similar to the work proposed in [12], but without enumerating all linearization of actions. The regression concept is used to summarize, for each action, the condition in which it is executable. The dynamic verification is only accomplished by comparing the condition associated to action with execution state. The idea of associating with each action the summary information on the rest of the actions that are not yet executed is beneficial, it may reduce the complexity of the verification and may gain speed the reaction of agents. However, incorporate into plans a large amount of information can make its size large and its elaboration becomes therefore complex. In our approach, we are insisting on the minimization of summary information so that the adaptation of the plans is fast. In our work, for computing the required resources for parallel or sequential tasks, we used two concepts regression, and progression. The regression concept is used for computing the set of resources to consume and the progression concepts is used for computing the set of resources to produce. As we used in our framework hierarchical plans, we proceed to compute the summary conditions horizontally and vertically according to hierarchical plan structure. We used a computing technique that enables interacting agents to cope with the interference of their plans without having to analyze all plans actions.
To enable interacting agents to verify the hierarchical plans (that are considered as a compact representation for multiple linearization of actions) by analysis as much theirs abstract levels, we proceed to propagate the information about the conditions and the resources, related to elementary tasks, towards the abstract tasks. This idea is closely related to the those introduced by Clement et al. [6]. Clement et al. proposed the model CHiPs (for concurrent hierarchical plans) by annotating each task in hierarchical plans with summary information specifying the conditions in which these tasks can be accomplished. By comparing this information with an execution context, the agents can verify the viability of their plans. Based on the same idea, Thangarajah et al. have introduced [19] Goal-Plan-Tree. While it is proposed as an agent-based model, it is closely similar to Clement and Durfee approach, concerning the use of summary information to handle interaction between concurrent goals. However, the proposed models in all these works are not appropriate to address the evolution aspect of plans, especially in a dynamic environment. Our inspiration by Petri net allows us to remedy this deficiency and to have a formal framework for analyzing the plans evolution. The verification technique proposed in this paper can combine the analysis based on summary information and those based on reachability graph analysis.
Conclusion
The work presented in this paper concerns the verification of agent and multi-agents hierarchical plans. We have interested in how to enable interacting agents to be able to continually verify the soundness of their plans, monitor the evolution of their execution and environment, and better switch between local planning, coordination, and execution. For this end, we presented new computational techniques to verify soundness, feasibility, and invalidity properties of executing partial plans (represented by SHPlNet) by analyzing their abstract level of representation. We proofed that to verify that a plan (multi-agent) is sound or invalid, it is enough to compare the whole requirement of the plan (summary at the abstract level) with all available resources. However, the use of the same technique for the feasibility property is not decisive. A feasible plan may be invalid because the technique to use to summary its consumption and production is not safeguarding some crucial information. To avoid any ambiguity about feasible property, the reachability technique can be (partially) used. In fact, the use our technique to reason about hierarchical plans is proposed to be used in conjunction with reachability graph based analysis technique, that is a central in the field of Petri net. This approach of verification enables interacting agents to make progressive verification. In a first step, the extremes properties, soundness and invalidity are verified, if these properties are not holding, the agents analyze the reachability graph in a second step.
Verification based on the analysis of information summarizing the consumption and production of tasks in terms of resources gives an idea of the impact of context (resources available) on the successful completion of the plans execution. Moreover, verification based on the analysis of abstract level of plan is much preferred in the multi-agent systems in the sense that it enable to make it possible to preserve the private nature of the individual agents’ plans. An agent unveils the details on his plans with only those with plans in strong correlation (determined based on the summary information) to his.
Yet I am part of the observations indicating the contribution of abstraction (as mentioned in the related works section), there are some questions that were not addressed in this paper and that we will focus on in the near future work. Firstly, the analysis of the computational complexity is not argued here. We will show how the summary information based analysis can reduce the computational complexity compared to the reachability graph. We will especially concentrate on the impact of summary information updating on the rapidly responsive of agents to handle unpredictable events. Moreover, the modular verification will be investigated in the future works. The summary information available in the abstract levels can be used to identify tasks interaction and therefore the set of tasks the agent can local verify without taking into account the others. We can also investigate the use summary information in definition of abstract reachability graph, those including abstract states produced when the execution of an abstracts tasks is abstracted. This idea could be widely exploited in the multi-agent coordination and monitoring.
Footnotes
HTPN: Hierarchical Task Petri Net; HPlNet: Hierarchical Plan Net.
Authors’ Bios
