Next Article in Journal
Dual Mobility Arthroplasty Versus Suspension Tenoplasty for Treatment of Trapezio–Metacarpal Joint Arthritis: A Clinical Trial
Previous Article in Journal
Long-Term Anti-Corrosion Performance of Ultra-High Content Inhibitor Loaded Gel-Epoxy Solid Inhibitor with Temperature-Responisve Effect
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Multi-Agent Systems with Information Sharing: Strategies and Model Checking

by
Bogdan Aman
1,2,* and
Gabriel Ciobanu
1
1
Institute of Computer Science, Romanian Academy, Iaşi Branch, 700505 Iaşi, Romania
2
Faculty of Computer Science, Alexandru Ioan Cuza University, 700506 Iaşi, Romania
*
Author to whom correspondence should be addressed.
Appl. Sci. 2025, 15(7), 3966; https://doi.org/10.3390/app15073966
Submission received: 29 October 2024 / Revised: 27 March 2025 / Accepted: 1 April 2025 / Published: 3 April 2025

Abstract

:
We introduce a prototyping language for multi-agent systems with information sharing, allowing agents to act in parallel and to migrate between distributed locations according to explicit timers. While all agents have access to public information, each agent also has access to private information to decide its next actions. The formal semantics of this language is provided, and an example is used to illustrate multi-agent systems with information sharing. An implementation in the rewriting engine Maude provides the possibility to describe and analyze the evolution of some multi-agent systems. Using the advantage of a strategy module in Maude, we can guide the application of rules, substantially reducing the state space in multi-agent systems with non-deterministic behavior. Given the executable specifications of a multi-agent system, we use the model checking tools of Maude to check various behavioral properties and to detect some behavioral problems.

1. Introduction

The ability of process calculi to create large systems by putting in parallel smaller ones using a parallel composition operator distinguishes them from other models of computation. In order to understand and rigorously reason about complex concurrent systems, several approaches were developed in (theoretical) computer science, e.g., process calculi [1], Petri nets [2], actor model [3], and membrane computing [4,5]. Process calculi provide a way to define multi-agent systems such that (i) agents are able to communicate messages in order to instantiate variables, (ii) a small number of primitives and operators are needed for describing large systems, and (iii) behavioral equivalences and equational reasoning are used to manipulate agents. Over the years, several (families of) process calculi have emerged: CSP [6], ACP [7], CCS [8], and π -calculus [9], just to name some of the most known ones. One drawback of all these approaches in modeling multi-agent systems is the lack of explicit capabilities for reasoning about information sharing; usually, the information is stored in an implicit manner.
In this article, we present a prototyping language for describing and reasoning about multi-agent systems using timers for mobility and communication in a network given by explicit locations, an environment in which the agents act in parallel. The agents can migrate to new locations, and are able to communicate messages in order to instantiate variables; in the early defined process calculi, message passing and local variables were used instead of global variables [10]. Recently, there have been some efforts to reintroduce globally available data [11], while in the current approach, we use a combination of both local and global variables. In our approach, while all agents have access to public information, each agent also has access to private information to decide its next actions. The flexibility of this language is given by the parallel composition of the agents (together with their information); this compositionality provides an easy way of describing large systems starting from small ones and organizing the information of the network better. To capture the system’s complex evolution (involving exchange of information between agents), we use labeled transition systems; this allows a rigorous presentation of the behavior of a multi-agent system and a useful way to prove properties about agents.
While the introduction of private and public information adds expressiveness, it also increases the complexity of the language. However, this is somehow unavoidable, as we consider a combination that we did not find before in formalisms defined for modeling multi-agent systems: communication, migration, time, and private/public information that can be accessed to perform tests. In order to illustrate the syntax and semantics of our language, and also motivate the multi-agent systems with information sharing, we consider an example in which agents communicate and share information, but also migrate between distributed locations according to explicit timers. A scenario is assumed in which a student finished their lectures at the university and searches for available transportation in order to go home. In front of the university, there are two stations: one for buses and the other for taxis; thus, in order to reach their home location, the student can choose between a bus and a cab. The student has to take into account some information to decide their means of transportation: the costs, the duration of migration, the availability, and the established priority between the transportation choices. The difference between the buses and the cabs is that the buses use a predetermined known scheduler to move between locations, while the cabs move only on demands by clients; note that the bus schedule is available as public information at each location and is updated at each tick.
Several tools for performing simulations and model checking for real-time systems are available, e.g., Uppaal [12], PRISM [13], and MCMAS [14]. However, none of these tools are able to model every feature of our approach. For this reason, we provide an implementation in the rewriting engine Maude 3 to observe that the multi-agent systems evolve as desired. As expected, increasing the number of agents, their delays, and the amount of stored information, the size of the system state space grows exponentially. Using this implementation, we emphasize how various strategies can significantly decrease the state space of the systems by controlling the application of the rules and the evolution of information in such highly nondeterministic and concurrent systems. This is possible due to the new strategy module and language included in the Maude 3 software platform. We are thus able to use the model checking tools in Maude 3 to verify several properties of our executable specification of multi-agent systems. Note that, due to the provided implementation, the decidability of the model checking for our prototyping language reduces to the decidability of the model checking of Maude 3 with strategies [15].
This article is organized as follows: In Section 2, we define the syntax and semantics of our prototyping language named iMAS (where ’i’ represents ’information’ and ’MAS’ represents ’multi-agent system’), while in Section 3, we illustrate them with a running example. In Section 4, we show how iMAS is implemented in Maude 3. In Section 5, we use various strategies in Maude 3 to guide the evolution of agents described in iMAS, while in Section 6, we use the model checking tools in Maude 3 to verify several properties of our executable specification of multi-agent systems. The conclusion and related work together with the references end the article.

2. Syntax and Semantics of iMAS

Inspired by process calculi, we introduce a prototyping language named iMASfor multi-agent systems with information sharing that allows agents to act in parallel and to migrate between distributed locations according to explicit timers. We give the syntax of iMAS in Table 1, where we assume the following:
Four sets, Loc  = { l , l , } , Chan =  { a , b , } , Id  = { i d , } , and N = { N , N , } , containing names for location variables or locations, communication channels, recursive definitions, and networks, respectively;
For each id Id , a unique process definition id ( u 1 , , u m id ) = def P id exists;
Natural number t is a timeout of actions, integer number k is a threshold appearing in tests, u is a variable, v is a value (integer, string, Boolean), f is an information field, and p is either private (to indicate the information accessed only by the agent to which it belongs) or public (to indicate that the information can be accessed by any agent located where the information is available). For example, if, for Q Id , its process definition is Q ( u 1 , , u n ) = P , and for the values v 1 , , v n , v 1 , , v n , there exists 1 i n such that v i v i , then the agent instances Q ( v 1 , , v n ) and Q ( v 1 , , v n ) are different.
An agent A is given as a pair P I , where P describes how the agent should behave, while I describes the private information of the agent to which P has access. An agent go t l then P I stays at its current location for t units of time, consumes the action go t l after the t units of time have passed, and changes its location by migrating to location l, where it will behave according to P. Since the name l appearing in migration actions can be a location variable, it can be instantiated during the execution with a location name, thus allowing agents to have a dynamic evolution, as they adapt their behaviors depending on the interactions they have with other agents.
An agent A = a Δ t ! v then P else Q I is able to send a value v on channel a for at most t units of time, while an agent A = a Δ t ? ( u ) then P else Q I is able to receive a value on channel a for at most t units of time, and to use that value to instantiate the variable u. The agents A and A can communicate on channel a only if they are at the same location. If the agents A and A communicate, then the variable u is instantiated by the value v, the two agents remain at the current location, and they will behave according to P and P afterwards. If the agents A and A cannot communicate in the time interval given by their timers (e.g., because they are at different locations), then the two agents remain at their current locations, and they will behave according to Q and Q afterwards.
An agent if test then P else Q I checks the truth value of test by making use of the public information available at the current location and of the private information I. Regardless of the truth value of test , the agent will remain at the current location; it will behave as P if test = true or as Q if test = false .
The agent upd ( p , f , v ) then P I , regardless of whether p is private or public , updates the information I, and remains at the current location, where it will behave according to P. The update of I depends on whether or not the field f already exists in I: if f does not exist, then the information f ; v is created near I, while if f exists, then the value stored in f is updated to v. The agent 0 I stays at the current location doing nothing regardless of its private information I.
The information consists of pairs f ; v , where f is a field and v is the value assigned to f. When we have the public information f ; v and the private information f ; v , they are treated as different pieces of information (even if they have the same field f). The stored information, either private (accessed only by the agent to which it belongs) or public (accessed by any agent located where the information is available), is used by agents to perform tests in order to decide how to behave afterwards. For example, the agent if get ( private , f ) > k then P else Q I checks if the private information associated with the field f is strictly greater than k, before continuing its execution as P or Q at the current location, depending on the returned value. For checking the public information, the agent is only slightly different from the one checking private information, namely, if get ( public , f ) > k then P else Q I . Note that the tests can only  get information from the private and public information, while the update of information is performed only by the upd  action.
In Table 1, all variables are free, except for the variable u appearing in the agent a Δ t ? ( u ) then P else Q I that is bound within P, but not in Q. The sets of free variables appearing in P and N are denoted by fv ( P ) and fv ( N ) . For Q Id such that its process definition is Q ( u 1 , , u n ) = P , we have that fv ( P ) { u 1 , , u m id } . An agent { v / u } P I behaves according to P in which v replaces all the free occurrences of the variable u; in order to avoid name clashes due to the initialization of u by v, some α -conversion might be used beforehand.
A network is constructed as a set of parallel distributed locations l [ [ I A ˜ ] ] , where each location l contains the public information I together with the agents from the set A ˜ . If the information is empty and there are no agents, a location l is denoted by l [ [ 0 ] ] , while a network without any locations is denoted by void .
In order to allow migration, we define the structural equivalence ≡ relation, over the set  N of networks, as the smallest congruence in which the next equalities are satisfied, as follows:
l [ [ I A ˜ 0 ] ] l [ [ I A ˜ ] ] ,   N N ,   N void N , N N N N , ( N N ) N N ( N N ) . l [ [ I A ˜ ] ] l [ [ I B ˜ ] ] , if   I k I and   A ˜ a B ˜ ,
where I k I , I k I , I I k I I , ( I I ) I k I ( I I ) .
A a A , A 0 a A , A A a A A , ( A A ) A a A ( A A ) .
The operational semantics of iMAS is split in two (for ease of presentation): the part for actions is given in Table 2, while the part for time passing is given in Table 3. In Table 2, we use the relation N Λ N to denote the execution of the multiset of actions Λ by the agents of the network N in order to transform it into the network N . If Λ = { λ } , then instead of N { λ } N , we write N λ N .
In rule (Stop), a network consisting of only a location l with public information I and no agents will not perform any action λ (denoted by  ). Rule (Com) allows two agents A 1 = a Δ t 1 ! v then P 1 else Q 1 I 1 and A 2 = a Δ t 2 ? ( u ) then P 2 else Q 2 I 2 from location l to use the channel a to communicate the value v in order to instantiate the variable u. After communication, the two agents remain at the current location l, and they will behave according to P 1 and P 2 afterwards. The label a ! ? @ l is used to mark the successful communication on the channel a.
If the timer of the active action of an agent a Δ 0 then P else Q   I (with { ! v , ? ( u ) } ) is 0, then this action is removed by using the rules (Put0) or (Get0). This does not lead in a change of the current location of the agent or in its information I, but it leads to the change in the behavior of the agent that will behave according to Q from this point forward. Note that, when the timer of the active action of an agent a Δ 0 then P else Q   I (with { ! v , ? ( u ) } ) is 0, the agent can be involved in any of the rules (Com), (Put0), or (Get0); since only one of the rules can be applied on this agent, the rule to be applied on it is nondeterministically chosen.
If an agent go 0 l then P I is at the location l, by using the rule (Move0), it is moving at the location l , where it will behave according to P. An agent if test then P else Q I checks the truth value of test by making use of the public information available at the current location and of the private information I. Regardless of the truth value of test , the agent will remain at the current location; if test = true , then by applying the rule (IfT), the agent will behave according to P from this point forward, while if test = false , then by applying the rule (IfF), the agent will behave as Q from this point forward.
Depending on the value of p, one of the rules (CrtPr), (CrtPu), (UpdPr), and (UpdPu) will be used by an agent upd ( p , f , v ) then   P I . If the field f does not exist in the p = private information, then the rule (CrtPr) is used to extend the private information with f ; v ; otherwise, if the field f does exist in the private information, then the rule (UpdPr) is used to update the private information by replacing the value of the existing field f by v. If the field f does not exist in the p = public information, then the rule (CrtPu) is used to extend the public information with f ; v ; otherwise, if the field f does exist in the public information, then the rule (UpdPu) is used to update the public information by replacing the value of the existing field f by v. This does not lead in a change of the current location of the agent that will behave according to P from this point forward.
An agent id ( v ) I can use the rule (Call) to unfold the recursive definition i d ( v ) . This does not lead in a change of the current location of the agent that will behave according to { v / u } P id from this point forward.
The rule (Par) is applied to obtain the behavior of large systems by putting in parallel the behavior of smaller ones, while the rule (Equiv) is used to re-arrange networks by means of the structural equivalence relation ≡.
In Table 3, we use the relation N t N to denote the passing of t units of time in the network N in order to transform it into the network N .
In the rule (DStop), a network consisting of only a location l with public information  I l and no agents will not be affected by the passage of time. If the timer of the active action of an agent a Δ t then P else Q I (with { ! v , ? ( u ) } ) is greater than 0, then the timer is decreased by using the rules (DPut) and (DGet). Similarly, if the timer of the active action of an agent go t l then P I is greater than 0, then the timer is decreased by using the rule (DMove). This does not lead in a change of the current location of the agent or in its information I.
The rule (DPar) is applied to obtain the behavior of large systems by putting in parallel the behavior of smaller ones, while the rule (DEquiv) is used to re-arrange networks by means of the structural equivalence relation ≡. In the rule (DPar), a network N 1 N 2 that cannot execute any rule of Table 2 is denoted by N 1 N 2 ; the use of negative premises is possible as they do not lead to inconsistencies.
A derivation N Λ , t N , with Λ = { λ 1 , , λ k } and t N + , denotes a complete computational step, that is, executing a multiset of actions  Λ followed by the advance of time for t time units; formally, it can be written as
N Λ N 1 t N .
If in a system N we perform a complete computational step leading to the system  N , we say that N is directly reachable from N. In case none of the rules of Table 2 can be applied in the system N (namely, Λ = ), then we have only time passing, and thus, we write N t N instead of N Λ N 1 t N .
In the next result, we illustrate that if a network allows for applying the rules of Table 3, this does not lead to nondeterministic behaviors (the obtained system is unique).
Theorem 1.
For all the networks N, N , and  N , the following hold:
1. 
If N 0 N , then N = N ;
2. 
If N t N and N t N , then N = N .
Proof. 
Employing structural induction on the network N, as outlined in [16].    □
In the next result, we illustrate that if a network allows for applying the rules of Table 3, the advance of time is continuous (we do not skip time instances to execute migration and communication actions).
Theorem 2.
   If N t N t N , then N t + t N .
Proof. 
Employing structural induction on the network N, as outlined in [16].    □

3. The Running Example Modeled by Using iMAS

To illustrate the syntax and semantics of iMAS, let us describe in more detail the example mentioned in the introduction. A student can use either a bus or a cab to move to a location (both bus and cab are encoded as agents). Additionally, the student has to take into account a priority relation established between the transportation means: cab is given a lower priority than bus . To make it easier to read the definitions of agents, we use the following notations: WT (waiting time), BAT (bus arrival time), TT (travel time),  BC (bus capacity), MBC (maximum bus capacity), onB (get on the bus),  offB (get off the bus), schd (waiting according to the schedule), wait (student is waiting), and STT (student travel time). Similar notations are used for bus and student when they are in home .
The bus at location l having the destination l can be described as
bus ( l , l )  =  offB Δ 0 ? ( x 1 ) then upd ( private , BC , get ( private , BC ) 1 ) then bus ( l , l )
                                                  else if get ( private , BC ) < get ( private , MBC )
                                                       then onB Δ 0 ! get ( private , TT ( l , l ) )
                                                            then upd ( private , BC , get ( private , BC ) + 1 )
                                                                  then bus ( l , l )
                                                            else go get ( private , TT ( l , l ) ) l then bus ( l , l )
                                                       else go get ( private , TT ( l , l ) ) home then bus ( l , l ) .
The passengers are allowed to go off the bus by using a channel offB , and this is followed by a decrease in the number of passengers in the  bus . Afterwards, any passengers willing to travel by bus communicate on the channel onB to receive the travel time from the field TT ( l , l ) of the private information of the bus , and this is followed by an increase in the number of passengers in the bus . Once the bus took all the passengers, it moves to the location  l . Similarly, a cab at the location l can be described as
cab ( l )  =  onC ? ( x 2 ) then onC Δ 0 ! get ( private , TT ( l , x 2 ) )
                                               then go get ( private , TT ( l , x 2 ) ) x 2   then offC ? ( x 3 )   then cab ( x 2 )
                                                                                            else stop
                                               else cab ( l )
                                    else stop .
The cab awaits for a location to be communicated by the student on the channel onC ; once it receives this location, it sends back the travel time between the current location and the desired one. Afterwards, the cab moves to the l location, where the student can exit the  cab .
The description of the student at the location l having the destination l is as follows:
student ( l , l ) =   if get ( public , BAT ) < get ( private , WT ( l ) )
                                          then onB Δ get ( private , WT ( l ) ) ? ( x 4 )
                                                then upd ( private , STT , x 4 )   then go get ( private , STT ) l
                                                     then offB Δ 0 ! x 4
                                                          then wait Δ get ( private , WT ( l ) ) ! x 4
                                                               then stop else student ( l , l )
                                                          else stop
                                                else student ( l , l )
                                          else onC Δ get ( private , WT ( l ) ) ! l
                                                then onC Δ get ( private , WT ( l ) ) ? ( x 4 )   then go get ( private , STT ) l
                                                     then offC Δ 0 ! x 4
                                                          then wait Δ get ( private , WT ( l ) ) ! x 4
                                                               then stop else student ( l , l )
                                                          else stop
                                                     else student ( l , l ) .
                                                else student ( l , l ) .
If the bus and the student are in the same time at the same location, then they can communicate using the channel onB . If however, the bus and the student are not in the same time at the same location, and it takes longer for the bus to arrive than the student is willing to wait, then the student will try to find a cab to reach their destination. If the student and the cab are at the same location, then they can communicate using the channel onC . If the student is unable to communicate with either the bus or the cab , then the passage of time is performed, and the above conditions are re-checked. Once the student communicates with the bus on the channel offB or with the cab on channel offC , the student will wait for a communication on the channel wait for several time units before continuing at the current location; this continuation is placed on the else branch as there is no one to communicate on this channel, and always the agent will behave according to this branch.
In order to keep up-to-date the information BAT ; v , it is required to have an agent schedule I at each location, as follows:
schedule =   if get ( public , BAT ) > 0
                              then schd Δ 1 ? ( x 5 )
                                        then stop
                                        else upd ( public , BAT , get ( public , BAT ) 1 )   then schedule
                              else upd ( public , BAT , get ( public , BTT ) )   then schedule .
The network composed of the previous agents and locations is
TravelSystem =
     univ [ [ BAT ; 0
         bus ( univ , home ) B C ; 5 MBC ; 10 TT ( univ , home ) ; 4 TT ( home , univ ) ; 4
         | | cab ( univ ) TT ( univ , home ) ; 3 TT ( home , univ ) ; 3
         | | student ( univ , home ) WT ( univ ) ; 2 WT ( home ) ; 2 STT ; 0
         | | schedule BTT ; 8 ] ]
     | home [ [ BAT ; 4
         schedule BTT ; 8 ] ]
Here we describe how  TravelSystem evolves according to the rules of Table 2 and Table 3. To avoid wasting space, for each unfolded recursive definition, we indicate only the active action, and in each of its possible continuations, we replace the process definition by its first action followed by dots.
Since the TravelSystem contains several recursive definitions, we have to use several times the rules (Call) and (Par) to unfold them in order to be able to execute their actions, namely, four times the rule (Call) with the label call @ univ and once with the label call @ home . Note that, due to the nondeterminism of applying the five instances of the rule (Call), several ways of unfolding are possible, as follows:
{ call @ univ , call @ univ , call @ univ , call @ univ , call @ home }                                                        (Call), (Par)
   univ [ [ < BAT ; 0
           offB Δ 0 ? ( x 1 ) then upd ( private , BC , get ( private , BC ) 1 )
                                  else if get ( private , BC ) < get ( private , MBC )
                                           then onB Δ 0 ! get ( private , TT ( univ , home ) )
                                           else go get ( private , TT ( univ , home ) ) home
           B C ; 5 MBC ; 10 TT ( univ , home ) ; 4 TT ( home , univ ) ; 4
           | | onC ? ( x 2 ) then onC Δ 0 ! get ( private , TT ( univ , x 2 ) )
                                else stop
           TT ( univ , home ) ; 3 TT ( home , univ ) ; 3
           | | if get ( public , BAT ) < get ( private , WT ( univ ) )
                        then onB Δ get ( private , WT ( univ ) ) ? ( x 4 )
                        else onC Δ get ( private , WT ( univ ) ) ! home
           WT ( univ ) ; 2 WT ( home ) ; 2 STT ; 0
           | | if get ( public , BAT ) > 0   then schd Δ 1 ? ( x 5 )
                                                        else upd ( public , BAT , get ( public , BAT ) 1 )
           BTT ; 8 ] ]
   | home [ [ BAT ; 4
           | | if get ( public , BAT ) > 0   then schd Δ 1 ? ( x 5 )
                                                        else upd ( public , BAT , get ( public , BAT ) 1 )
           BTT ; 8 ] ]
In the above evolution, as the bus cannot communicate with any other agent on the channel offB (namely, no one is willing to get off the bus ), the rule (Get0) with the label offB ? Δ 0 @ univ can be applied, leading to a test between two private information values: the bus capacity BC and the maximum bus capacity MBC . The rule (IfT) with the label true @ univ can be applied, and the bus can now use the channel onB to communicate with potential passengers. Since the cab has, as the first action, an input with an infinite timer, then it can evolve only by communicating on the channel  onC , which is not the case at this point. By performing a test between the public information value of BAT ( bus arrival time) and the private information of WT ( univ ) (the waiting time of the student at univ ), it is the rule (IfT) with the label true @ univ that can be applied, and the student can now use the channel onB to interact with the bus . Since the test performed by the schedule returns false at univ and true at home , the rule (IfF) with the label false @ univ and the rule (IfT) with the label true @ home can be applied. Thus, the evolution leads to the network as follows:
{ offB ? Δ 0 @ univ , true @ univ , true @ univ , false @ univ , true @ home }                            (Get0), (IfT), (IfF), (Par)
   univ [ [ < BAT ; 0
           onB Δ 0 ! get ( private , TT ( univ , home ) )
                       then upd ( private , BC , get ( private , BC ) + 1 )
                       else go get ( private , TT ( univ , home ) ) home
           B C ; 5 MBC ; 10 TT ( univ , home ) ; 4 TT ( home , univ ) ; 4
           | | onC ? ( x 2 ) then onC Δ 0 ! get ( private , TT ( univ , x 2 ) )
                                  else stop
           TT ( univ , home ) ; 3 TT ( home , univ ) ; 3
           | | onB Δ get ( private , WT ( univ ) ) ? ( x 4 )   then upd ( private , STT , x 4 )
                                                           else student ( univ , home )
           WT ( univ ) ; 2 WT ( home ) ; 2 STT ; 0
           | | upd ( public , BAT , get ( public , BTT ) )   then schedule
           BTT ; 8 ] ]
   | home [ [ BAT ; 4
           | | schd Δ 1 ? ( x 5 )   then stop   else upd ( public , BAT , get ( public , BAT ) 1 )
           BTT ; 8 ] ]
Since the cab located at univ and the schedule located at home have, as the first action, an input with a timer strictly higher than zero, then they can evolve only by communicating on the channels onC and schd , respectively; it is not the case at this point. On the other hand, the schedule located at univ updates the public information by applying the rule (UpdPu) with the label upd g f @ univ . Afterwards, the schedule located at univ can apply the rule (Call) with the label call @ univ to unfold, followed by the rule (IfT) with the label true @ univ to pass the test and then be able to communicate on the channel  schd .
Until this point, all the agents evolved in parallel by interacting only with the public and private information; this changes now, as the student the and bus are able to communicate on the channel onB by using the rule (Com) with the label onB ! ? @ univ , such that the student receives the value 4 from the field TT ( univ , home ) of the bus private information, a value representing the travel time between the locations univ and home . This is followed by two private updates performed using twice the rule (UpdPr) with the label upd l f @ univ : one by the bus to increase the number of its passengers (field BC ) from 5 to 6, and another by the student to store the travel time 4 between locations in the field STT . Afterwards, the bus can apply the rule (Call) with the label call @ univ to unfold; since the bus cannot communicate with any other agent on the channel offB (namely, no passenger is willing to get off the bus ), the rule (Get0) with the label offB ? Δ 0 @ univ is applied, leading to a test between two private information values: the bus capacity  BC and the maximum bus capacity MBC . The rule (IfT) with the label true @ univ can be applied, and the bus can now use the channel onB to communicate with potential passengers. However, since the bus cannot communicate with any other agent on the channel onB (namely, no passenger is willing to get on the bus ), the rule (Put0) with the label onB ! Δ 0 @ univ can be applied. After these steps, the resulting network is
{ upd g f @ univ , call @ univ , true @ univ , onB ! ? @ univ , upd l f @ univ , upd l f @ univ , call @ univ }
{ offB ? Δ 0 @ univ , true @ univ , onB ! Δ 0 @ univ }   (UpdPu), (Call), (IfT), (Comm), (UpdPr), (Get0), (Put0), (Par)
   univ [ [ < BAT ; 8
           go 4 home then bus ( home , univ )
           B C ; 6 MBC ; 10 TT ( univ , home ) ; 4 TT ( home , univ ) ; 4
           | | onC ? ( x 2 ) then onC Δ 0 ! get ( private , TT ( univ , x 2 ) )
                                  else stop
           TT ( univ , home ) ; 3 TT ( home , univ ) ; 3
           | | go 4 home then offB Δ 0 ! get ( private , TT ( univ , home ) )
           WT ( univ ) ; 2 WT ( home ) ; 2 STT ; 4
           | | schd Δ 1 ? ( x 5 )   then stop   else upd ( public , BAT , get ( public , BAT ) 1 )
           BTT ; 8 ] ]
   | home [ [ BAT ; 4
           | | schd Δ 1 ? ( x 5 )   then stop   else upd ( public , BAT , get ( public , BAT ) 1 )
           BTT ; 8 ] ]
Only time passing rules are applicable now: all the timers of the active actions are decreased by one (e.g., the timer of the input action of the schedule from the univ ). Thus, after a complete computational step, we obtain the following network:
1                                                                                                     (DMove), (DGet), (DPar)
   univ [ [ < BAT ; 8
           go 3 home then bus ( home , univ )
           B C ; 6 MBC ; 10 TT ( univ , home ) ; 4 TT ( home , univ ) ; 4
           | | onC ? ( x 2 ) then onC Δ 0 ! get ( private , TT ( univ , x 2 ) )
                                   else stop
           TT ( univ , home ) ; 3 TT ( home , univ ) ; 3
           | | go 3 home then offB Δ 0 ! get ( private , TT ( univ , home ) )
           WT ( univ ) ; 2 WT ( home ) ; 2 STT ; 4
           | | schd Δ 0 ? ( x 5 )   then stop   else upd ( public , BAT , get ( public , BAT ) 1 )
           BTT ; 8 ] ]
   | home [ [ BAT ; 4
           | | schd Δ 0 ? ( x 5 )   then stop   else upd ( public , BAT , get ( public , BAT ) 1 )
           BTT ; 8 ] ]
During the next three time units, only the agents’ schedule of each location can evolve. First, since the schedule of both locations cannot communicate with any other agent on the channel schd , only two rules (Get0) with the labels schd ? Δ 0 @ univ and schd ? Δ 0 @ home can be applied. Next, the schedule of both locations updates the public information by applying two rules (UpdPu) with the labels upd g f @ univ and upd g f @ home . Afterwards, the schedule of both locations can apply two rules (Call) with the labels call @ univ and call @ home to unfold, followed by two rules (IfT) with the labels true @ univ and true @ home to pass the test and then be able to communicate on the channel schd . Thus, before applying the next time step, the reached network is
{ schd ? Δ 0 @ univ , schd ? Δ 0 @ home , upd g f @ univ , upd g f @ home , true @ univ , true @ home }
                                                                                             (Get0), (UpdPu), (IfT), (Par)
   univ [ [ < BAT ; 7
           go 3 home then bus ( home , univ )
           B C ; 6 MBC ; 10 TT ( univ , home ) ; 4 TT ( home , univ ) ; 4
           | | onC ? ( x 2 ) then onC Δ 0 ! get ( private , TT ( univ , x 2 ) )
                                   else stop
           TT ( univ , home ) ; 3 TT ( home , univ ) ; 3
           | | go 3 home then offB Δ 0 ! get ( private , TT ( univ , home ) )
           WT ( univ ) ; 2 WT ( home ) ; 2 STT ; 4
           | | schd Δ 1 ? ( x 5 )   then stop   else upd ( public , BAT , get ( public , BAT ) 1 )
           BTT ; 8 ] ]
   | home [ [ BAT ; 3
           | | schd Δ 1 ? ( x 5 )   then stop   else upd ( public , BAT , get ( public , BAT ) 1 )
           BTT ; 8 ] ]
Note that the evolution is nondeterministic; this means that there are several ways of applying the evolution rules.

4. Implementing Multi-Agent Systems with Information Sharing

We supply an implementation to check that the evolutions of the systems described by our prototyping language iMASare performed correctly. Moreover, we emphasize the use of strategies to control the rule application in order to guide the evolution of such a highly nondeterministic and concurrent system. This control is achievable due to the new strategy language of the rewriting engine Maude 3.
Maude 3 is a robust software system that supports the efficient execution of specifications based on rewriting logic. Rewriting logic [17] is a computational logic combining term rewriting and equational logic. Starting from the semantic of our language iMAS, we define a rewriting theory. Note that the syntax of the rewriting theory is that of Maude [18] for the untimed aspects, and also that of Real-Time Maude [19] for the time aspects. Just like in [20], we use a typed setting that includes sorts, together with the subsort inclusion relationship among types. Considering a given rewrite theory R , we use R t t to indicate that t t is derivable in R by using its rewrite rules.
To implement the multi-agent systems defined by iMAS, we utilize sorts that correspond to the sets in our language. For example, the set Chan of channels is represented by the sort Channel, while the sort MValue is utilized to handle multisets of values within the system. For convenience, the iMASterms are decomposed in parts using the sorts AGuard, MGuard, and IGuard. The sort AGuard consists of the prefixes a Δ t ! v and a Δ t ? ( u ) of all agents a Δ t ! v then P else Q I and a Δ t ? ( u ) then P else Q I , the sort MGuard consists of the prefix go t l of all agents go t l then P I , while the sort IGuard consists of the prefix upd ( p , f , v ) of all agents upd ( p , f , v ) then P I . The prefixes contained in the sorts AGuard, MGuard, and IGuard are crucial for defining the behavior of agents in a sequential manner.
The subsort declaration subsorts Var < Location Channel Nat demonstrates that variables can be instantiated using location names, channel names, or natural numbers. This relationship is part of the broader subsorting hierarchy defined within the system.
    sorts PId Agent Inf Field MField Test Location Channel Value
        VarL VarC VarN Var MValue Process
        AGuard MGuard IGuard Guard System GlobalSystem.
    subsorts Var < Location Channel Nat < Value < MValue.
For each operator in the iMA syntax (as shown in Table 1), we assign two attributes: the ctor attribute, which designates the operator as a data constructor, and the prec attribute, followed by a numerical value, which establishes the operator’s precedence in relation to other operators. To accurately represent the parallel operators ∣ and  in (Real-Time) Maude, we include the attributes comm and assoc. These attributes signify that the operators are commutative and associative constructors, respectively. This encoding reflects the structural congruence rules of the system. In fact, the majority of the structural rules are implemented through the use of these comm and assoc attributes.
    op empty : -> Inf [ctor].
    ops private public : -> PId [ctor].
    op __ : Inf Inf -> Inf [ctor comm assoc id: empty].
    op < _ ; _ > : Field Nat -> Inf.
    op  _^_! <_>  :  Channel TimeInf Value -> AGuard [ctor prec 2].
    op  _^_? (_) : Channel TimeInf Var -> AGuard [ctor prec 2].
    op  go ^__ : Time Location -> MGuard [ctor prec 2].
    ops update : PId Field Nat -> IGuard [ctor].
    op _then _ else _ : AGuard Process Process -> Process [ctor prec 1].
    op _then _ : MGuard Process -> Process [ctor prec 1].
    op _ then _ : IGuard Process -> Process [ctor prec 1].
    op if _ then _ else _ : Test Process Process -> Process [ctor prec 1].
    op stop : -> Process [ctor].
    op _ |> _ : Process Inf -> Agent [ctor].
    op Zero : -> Agent [ctor].
    op _||_ : Agent Agent -> Agent [ctor prec 5 comm assoc id: Zero].
    op _ [[_<|_]] : Location Inf Agent -> System [ctor prec 1].
    op void : -> System [ctor].
    op  _|_  :  System System -> System [ctor prec 5 comm assoc id: void].
    op {_} : System -> GlobalSystem [ctor].
The remaining rules are implemented as equations in the following manner:
    eq stop |> empty = Zero.
The majority of the rules presented in Table 2 include hypotheses. To accurately translate these rules into Maude, we employ conditional rewrite rules. In these conditional rules, the hypotheses from the semantic rules are represented as conditions.
Note that the rules (Par), (DEquiv), and (Equiv) are not implemented as rewrite rules in Maude. This is because the rewrite theory of Maude incorporates the commutativity, associativity, and congruence properties of the ∣ and operators through the use of the comm and assoc annotations.
To determine the specific rule in Table 2, we use clear and concise labels for each of the rewrite rules listed below.
    crl [Comm] :
        k[[I <| (((c ^ t ! < val >) then (P) else (Q)) |> I’)
        || (((c ^ t’ ? ( X )) then (P’) else (Q’)) |> I’’) || A]]
     => k [[ I <| (P |> I’) || ((P’ {val / X}) |> I’’)  || A]]
        if notin(val , bnP(P’)).
    rl [UpdatePrivate] :
        k[[I <| ((update(private,f,v) then (P)) |> (I’ < f ; v’ >)) || A]]
    => k[[I <| (P |> (I’ < f ; v >)) || A]].
    crl [CreatePrivate] :
        k[[I <| ((update(private,f,v) then (P)) |> (I’)) || A]]
    => k[[I <| (P |> (I’ < f ; v >)) || A]] if notinF(f,I’).
    crl [Move] :
        k[[I <| (((go ^ t l) then (P)) |> I’) || A]] | l[[I’’ <| B]]
    => k[[I <| A]] | l[[I’’ <| (P |> I’) || B]] if t == 0.
    crl [Input0] :
        (k[[I <| (((c ^ t ! < val >) then (P) else (Q)) |> I’)  || A]])
    => k[[I <| (Q |> I’) || A]] if t == 0.
The recursive definition of iMAS, the strategy we employ to address infinite expansions, is not directly encodable into Maude because Maude does not prevent infinite unfolding of recursive definitions into infinite sequences of actions. To unfold only when the recursive definition is at the top level, we extend the i d ( v ) construction with a Boolean flag b to control unfolding; the obtained construction i d ( v , b ) uses the first occurrence of n o t b to perform this. Note that by transforming n o t b into b, the unfolding can be again performed. Using such a solution, the definition for bus appearing in Section 3 becomes
    op bus : Location Location Bool -> Process [ctor].
    ceq bus(l,l’,b) =
      ((db ^ 0 ? (x1))
         then (update(private, BC, sd(get(private,BC),1))
             then bus(l,l’,not b))
         else (if get(private,BC) < get(private,BMC)
             then ((ub ^ 0 ! < get(private,TT(l , l’)) >)
                 then (update(private, BC, get(private,BC) + 1)
                     then bus(l,l’,not b))
                 else ((go ^ (get(loprivate,TT(l , l’))) l’)
                     then bus(l’,l,not b)))
             else ((go ^ (get(private,TT(l,l’))) l’) then bus(l’,l,not b)))
    ) if b.
    crl [UnfoldBus] :
        k[[I1 <| ((bus(l,l’,b)) |> I2 ) || B]]
    => k[[I1 <| ((bus(l,l’,not b)) |> I2 ) || B]]  if not b.
The definitions for cab , student , and schedule are defined in a similar way.
The passage of time can be performed in two ways. On the one hand, the rule tick models the advancing time in the encoded system by the maximum possible value. On another hand, the rule tickt models the advancing time in the encoded system by a fixed value t that is not greater than the maximum possible value. The rule tickt is not executable (indicated by nonexec) because the variable t (denoting how much time is consumed) occurs only in the right-hand side of the rule; thus, t needs to be instantiated once the rule tickt is applied.
    crl [tick] : {M} => {delta(M, mte(M))} if mte(M) =/= INF and mte(M) =/= 0.
    crl [tickt] : {M} => {delta(M, t)} if t <= mte(M) [nonexec].
The tick and tickt rules apply the delta function to decrement the time constraints of all agents in a network by an identical positive value.
    op delta : System TimeInf -> System.
    eq delta(k[[I <| A]] , t’) = k[[I <| deltaA (A, t’)]].
    ceq delta(M | N , t’) = delta(M , t’) | delta(N , t’)
        if M =/= void and N =/= void.
    eq delta(M , t’) = M [owise].
where the function deltaA is used to decrease time constraints in agents, as follows:
    op deltaA : Agent TimeInf -> Agent.
    eq deltaA((((c ^ t ! < val >) then (P) else (Q)) |> I’) , t’)
        = (((c ^ (t monus t’) ! < val >) then (P) else (Q)) |> I’).
    eq deltaA((((c ^ t ? ( X ) ) then (P) else (Q)) |> I’) , t’)
        = (((c ^ (t monus t’) ? ( X )) then (P) else (Q)) |> I’).
    eq deltaA( (((go ^ t l) then (P)) |> I’) , t’)
        = (((go ^ (t monus t’) l) then (P)) |> I’).
    ceq deltaA( A || B , t’) = deltaA(A , t’) || deltaA(B , t’)
        if A =/= Zero and B =/= Zero.
    eq deltaA(A , t’) = A [owise]
The mte function computes the maximum possible time advancement that can be applied without violating its constraints, as follows:
    op mte : System -> TimeInf.
    eq mte(k[[I <| (stop |> I’) ]] ) = INF.
    eq mte(k[[I <| (((c ^ t ! < val >) then (P) else (Q)) |> I’) ]]) = t.
    eq mte(k[[I <| (((c ^ t ? ( X ) ) then (P) else (Q)) |> I’) ]]) = t.
    eq mte(k[[I <| (((go ^ t l) then (P)) |> I’)]]) = t.
    eq mte(k[[I <| (((c ^ t ! < val >) then (P) else (Q)) |> I’) 
       || (((c ^ (t’) ? ( X )) then (P’) else (Q’)) |> I’’) || A]] | N) = INF.
    ceq mte(k[[I <| A || B ]]) = min(mte (k[[I <| A ]]) , mte (k[[I <| B ]])) 
       if A =/= Zero /\ B =/= Zero.
    ceq mte(M | N) = min(mte(M), mte(N)) if M =/= void /\ N =/= void.
    eq mte(M) = 0 [owise].
For the complete Real-Time Maude translation, see https://profs.info.uaic.ro/bogdan.aman/iMAS/iMASSpecStrat.maude.zip (pwd: iMASStrat)
We prove the equivalence between the transition system generated by our Maude specification and the reduction semantics of iMAS. Given a system M, ψ ( M ) denotes its Maude encoding, while R D represents the rewrite theory previously introduced and consisting of the rewrite rules Comm, IfT, IfF, CreatePrivate, CreatePublic, UpdatePrivate, UpdatePublic, UnfoldScheduleBus, UnfoldStudent, UnfoldBus, UnfoldCab, Input0, Output0, Move, and tick, together with additional defined equations.
We establish a relationship between the structural equivalence of terms in iMASand the equality of terms under the rewrite rules.
Lemma 1.
M N iff R D ψ ( M ) = ψ ( N ) .
Proof. 
⇒: Using induction on the congruence rules of iMAS.
    ⇐: Using induction on the equations of R D .    □
The following result demonstrates the operational congruence between iMASnetworks and their rewrite theory translations. In what follows, M N denotes an arbitrary rule from Table 2 and Table 3.
Theorem 3.
M N iff R D ψ ( M ) ψ ( N ) .
Proof. 
⇒: Using induction on the derivation M N .
  • Case M a ! Δ 0 @ l N . This transition arises from a network M = l [ [ I l a Δ 0 ! v then P else Q I A ˜ ] ] . Applying the (Put0) rule from Table 2, we obtain that N = l [ [ I l Q I A ˜ ] ] . Since ψ ( M ) is
        l[[I_l <| (((a ^ 0 ! < v >) then (P) else (Q)) |> I)  || A]]
    applying the Input0 rule from R D , ψ ( M ) is rewritten into
        l[[I_l <| (Q) |> I)  || A]]
    that is equal to ψ ( N ) . Thus, R D ψ ( M ) ψ ( N ) as desired.
  • The remaining cases can be handled analogously.
⇐: Using induction on the derivation R D ψ ( M ) ψ ( N ) .
Input0: This transition arises when ψ ( M ) is
    l[[I_l <| (((a ^ 0 ! < v >) then (P) else (Q)) |> I)  || A]]
while ψ ( N ) is
    l[[I_l <| (Q) |> I)  || A]]
In accordance with the definition of ψ , M = l [ [ I l a Δ 0 ! v then P else Q I A ˜ ] ] , where P = ψ ( P ) , Q = ψ ( Q ) , I _ l = ψ ( I l ) , I = ψ ( I ) , and A = ψ ( A ˜ ) . By applying the (Put0) rule from Table 2, we obtain that M a ! Δ 0 @ l l [ [ I l Q I A ˜ ] ] = N . Based on the definition of  ψ , we have N = N .
The remaining cases can be handled analogously.
   □

5. Controlling Multi-Agent Systems by Strategies

In programming, strategies have been used to evaluate expressions (according to certain rules); we know several evaluation strategies: call by value, call by name, call by need, etc. In rewriting systems, strategies establish the sequence of rewrite rules to be applied, and outline the available choices for making decisions. The outcome of implementing a strategy is the subset of computations produced according to the strategy. In what follows, we emphasize the use of strategies to significantly decrease the possible evolutions of multi-agent systems with information sharing.
The precise control over the application of rules in Maude 3 was possible after the inclusion of a strategy language [21]. The Maude 3 command srew explores all possible execution paths starting from a given term and produces a set of solutions.
The command for rewriting a system t using the strategy alpha is
                           srew t using alpha,
and the output presents the solutions generated; several solutions can be generated because the nondeterminism is not always eliminated by using strategies.
The fundamental component of the strategy language is the application of a rule, with the simplest form being the strategy all, which applies the rules without any restrictions. The strategy (all)* repeats the strategy all any positive number of times, including zero times. For example, running the system TravelSystem using the strategy (all)* is performed by using the following command:
    srew {TravelSystem} using (all)*.
Since there is no restriction on applying the rules, the number of reachable networks is 56,400 . In the remainder of this section, we will also examine several other strategies in addition to the iteration strategy α * , as follows:
(i)
The strategy idle outputs the input system.
(ii)
The disjunction strategy α β performs either the strategy α or the strategy β .
(iii)
The conditional strategy α ? β : γ executes first the strategy α and then uses its output as input for the strategy β ; if the strategy α yields no output, it instead executes the strategy γ on the initial input system (if the strategy β is defined as idle, then the strategy α ? β : γ is the same as the strategy α  or-else γ ).
Note that, in the definitions of the mte function and tick rule, we enforce the passage of time to take place only when no communication, unfolding, updating, or testing can be performed, namely, when the value returned by the mte function is not 0. This means that the strategy (all)* is in fact equivalent to the next strategy called mtestep, which formally describes the order in which the iMASrules from Table 2 and Table 3 are applied, as follows:
    sd step := ( IfT | IfF |  Move | Comm | Input0 | Output0
        | UnfoldBus | UnfoldCab | UnfoldStudent | UnfoldScheduleBus
        | UpdatePrivate | UpdatePublic | CreatePrivate | CreatePublic ).
    sd mtestep := (step or-else tick )*. 
However, the number of solutions can be decreased by establishing a priority among the rules. Since in iMAS the unfolds, tests, creations, updates, and moves could be performed in parallel, one strategy to consider is to keep one of the sequences out of all possible sequences, to apply the Comm, Input0, and Output0 rules afterwards, and the time rule tick last. Formally, this can be described in Maude 3 by the following two strategies:
       sd step1 := UnfoldBus or-else (UnfoldCab or-else (UnfoldStudent 
           or-else (UnfoldScheduleBus or-else (IfT or-else (IfF or-else 
           (CreatePublic or-else (CreatePrivate or-else
           (UpdatePublic or-else (UpdatePrivate or-else
           (Move or-else (Comm  | Output0 | Input0)))))))))))).
       sd mtestep1 := (step1 or-else tick )*.
In this instance, applying the strategy mtestep1 to run the system TravelSystem is performed using the following command:
    srew {TravelSystem} using mstep1.
Using mtestep1, the number of reachable networks is decreasing to 13424. This number of reachable networks can be further reduced by considering a more restraining way of applying the rules, namely, by using an approach similar to the one in [22] that forces the rule (Com) to always be applied before the rules (Put0) and (Get0), as follows:
       sd step2 := UnfoldBus or-else (UnfoldCab or-else (UnfoldStudent 
           or-else (UnfoldScheduleBus or-else (IfT or-else (IfF or-else 
           (CreatePublic or-else (CreatePrivate or-else
           (UpdatePublic or-else (UpdatePrivate or-else
           (Move or-else (Comm  or-else (Output0 | Input0))))))))))))).
       sd mtestep2 := (step2 or-else tick )*.
This application of rules leads to another reduction in the number of reachable networks, more exactly to 372. Note that all the defined strategies are not specific to the running example, but can be used with any iMAS system.
The behavior of two parallel agents is typically understood to encompass all possible interleavings of their steps. The actions of both agents can be mixed together in any random sequence such that the order of actions is preserved for each agent. Just like in [23], we consider interleaving based on a specific strategy, as this more accurately reflects how multi-threading operates in modern programming languages.
The above strategies show that reducing the quantity of disjunction strategies structured as α | β results in a significant reduction in the state space due to the decrease in the number of applicable rules at any step of any evolution. For any given network N, if we denote by # ( N , s t r a t ) = | { M | N s t r a t * M } | the number of networks reached starting from N by applying the rules according of the strategy s t r a t , then the following result holds for the mentioned strategies:
Proposition 1.
# ( N , a l l * ) = # ( N , m s t e p ) # ( N , m s t e p 1 ) # ( N , m s t e p 2 ) .
Proof. 
The motivation for the equality # ( N , a l l * ) = # ( N , m s t e p ) was provided previously before defining the mtestep strategy.
For the inequality # ( N , m s t e p ) # ( N , m s t e p 1 ) , we use structural induction on N to prove our claim as follows:
  • N contains only one agent. This means that, at each step, at most one rule of iMASis applicable, and so # ( N , m s t e p ) = # ( N , m s t e p 1 ) regardless of which rule is applicable.
  • N contains at least two agents. Depending on the structure of the agents, there exist several cases. Assume that one agent can perform a movement between locations l and  l , and the other can perform an update. In this case, there exist two networks,  N and  N , with N l l N and N upd l f @ l N . Since these two rules can be applied in parallel, it means that there also exists N 1 with N upd l f @ l N 1 and N l l N 1 . This means that N , N , N 1 { M | N m t e s t e p * M } , and N , N 1 { M | N m t e s t e p 1 * M } , while N { M | N m t e s t e p 1 * M } , and thus, it holds that # ( N , m s t e p ) > # ( N , m s t e p 1 ) . The remaining cases can be handled analogously.
   □

6. Model Checking Multi-Agent Systems with Information Sharing

Since the temporal aspects of iMASsystems together with the private and public information lead to a large number of possible interactions, the verification should be much easier by using software tools. For the iMASnetworks controlled by strategies, we can examine and validate multiple properties by employing the model-checking tool umaudemc of the unified Maude 3 [24].
The command-line syntax for invoking the umaudemc tool is as follows:
    umaudemc check <file name> <initial term> <formula> [ <strategy> ]
The umaudemc tool analyzes the input formula, determines the most general logic that the formula fits into, and subsequently invokes corresponding model checkers like NuSMV [25] and Spot [26].
To show how it works, we verify a few CTL* properties of the multi-agent system presented in Section 3. The branching-time logic CTL* [27] is an extension of both the LTL [28] and CTL [29] logics. Formulas in CTL* are formulated using the atomic propositions of a Kripke structure, along with a set of temporal operators and path quantifiers
     Φ : : = p ¬ Φ Φ Φ Φ Φ A ϕ E ϕ
     ϕ : : = Φ ¬ ϕ ϕ ϕ ϕ ϕ ϕ ϕ ϕ ϕ U ϕ
Path formulas ϕ describe properties of execution paths. The operators ϕ , ϕ , and ϕ indicate that the property ϕ holds in the next state, in some states, or in all states, respectively; ϕ 1 U ϕ 2 claims that ϕ 1 is satisfied in all states preceding a state in which ϕ 2 is satisfied.
State formulas Φ describe properties of states within a system. They indicate whether an atomic property p holds in a state and specifies how paths originating from that state are quantified, either universally ( A ϕ ) or existentially ( E ϕ ).
To follow the movement of an agent in our running example, we add in the private information of each agent a pair AID ; id , where id is a unique number identifying each agent.
TravelSystem =
  univ [ [ BAT ; 0
     bus ( univ , home ) AID ; 101 BC ; 5 MBC ; 10   TT ( univ , home ) ; 4 TT ( home , univ ) ; 4
     | | cab ( univ ) AID ; 201 TT ( univ , home ) ; 3 TT ( home , univ ) ; 3
     | | student ( univ , home ) AID ; 301 WT ( univ ) ; 2 WT ( home ) ; 2 STT ; 0
     | | schedule AID ; 401 BTT ; 8 ] ]
  | home [ [ BAT ; 4   schedule AID ; 402 BTT ; 8 ] ]
The CTL* formula A E AIDInLocation ( AID ; 201 , univ ) in which the expression AIDInLocation ( AID ; id , loc ) checks if an agent with id is in location loc describes that every state of TravelSystem can be continued to one where the cab is located at the location univ . Interestingly, this formula is not satisfied under the mtestep strategy, but it is satisfied under the mtestep2 strategy.
    $ umaudemc check iMASSpecStrat.maude {TravelSystem}
       ’A [] E <> AIDInLocation( < AID ; 201 >, univ)’ mtestep
       The property is not satisfied in the initial state (112800 system 
           states, 1097608 rewrites, holds in 34565/112800 states)
    $ umaudemc check iMASSpecStrat.maude {TravelSystem}
       ’A [] E <> AIDInLocation( < AID ; 201 >, univ)’ mtestep2
       The property is satisfied in the initial state (744 system states, 
           3719 rewrites, holds in 744/744 states)
The reason is that, in the mtestep2 strategy, we enforce communication to happen before communication capabilities expire (if this is possible).
We can also verify the next LTL formula that checks if always both the bus and the student are infinitely often located at univ . This is not satisfied because the bus always moves between locations, regardless if anyone boards it or not, while the student gets stuck at home after the first trip with the bus . The fact that the student remains stuck at the location home once it reaches it is because there is no cab available at home and the timeouts assigned to the bus and student prevent them from interacting in the future.
    $ umaudemc check iMASSpecStrat.maude {TravelSystem}
    ’ [] <> ((AIDInLocation( < AID ; 101 >, univ)
    /\symbol{92} AIDInLocation( < AID ; 301 >, univ))) ’ mtestep1
    The property is not satisfied in the initial state (90 system states,
    623 rewrites, 2 Buchi states)
We can also easily consider other variants of the initial systems. For example, consider a system in which the bus is not initially in the same location as the student , namely,
TravelSystem 1 = univ [ [ BAT ; 4
     cab ( univ ) AID ; 201 TT ( univ , home ) ; 3 TT ( home , univ ) ; 3
     | | student ( univ , home ) AID ; 301 WT ( univ ) ; 2 WT ( home ) ; 2 STT ; 0
     | | schedule AID ; 401 BTT ; 8 ] ]
  | home [ [ BAT ; 0
     bus ( univ , home ) AID ; 101 B C ; 5 MBC ; 10   TT ( univ , home ) ; 4 TT ( home , univ ) ; 4
     | | schedule AID ; 402 BTT ; 8 ] ]
One can check that, regardless of where a student resides, the student eventually moves.
    $ umaudemc check iMASSpecStrat.maude {TravelSystem}
    ’ A [] (AIDInLocation( < AID ; 301 > , univ)
    -> E <> AIDInLocation( < AID ; 301 > , home)
    /\ (AIDInLocation( < AID ; 301 > , home)
    -> E <> AIDInLocation( < AID ; 301 > , univ))) ’ mtestep1
    The property is not satisfied in the initial state (26848 system states, 
        151931 rewrites, holds in 7585/26848 states)
Note that, just like for the previous property, this property is not satisfied because the bus always moves between locations, regardless if anyone boards it or not, while the student gets stuck at home after the first trip with the bus . The fact that the student remains stuck at the location home once it reaches it is because there is no cab available at home and the timeouts assigned to the bus and student prevent them from interacting in the future.
However, by only slightly modifying TravelSystem to TravelSystem2 in which the student initially resides in home instead of univ, namely,
TravelSystem 2 =
  univ [ [ BAT ; 0
     bus ( univ , home ) AID ; 101 BC ; 5 MBC ; 10   TT ( univ , home ) ; 4 TT ( home , univ ) ; 4
     | | cab ( univ ) AID ; 201 TT ( univ , home ) ; 3 TT ( home , univ ) ; 3
     | | student ( univ , home ) AID ; 301 WT ( univ ) ; 2 WT ( home ) ; 2 STT ; 0
     | | schedule AID ; 401 BTT ; 8 ] ]
  | home [ [ BAT ; 4
     schedule AID ; 402 BTT ; 8 ] ]
the property becomes satisfied since the timeouts assigned to the bus and student and their initial positioning in the system allow them to interact:
    $ umaudemc check iMASSpecStrat.maude {TravelSystem}
’ A [] (AIDInLocation( < AID ; 301 > , univ)
    -> E <> AIDInLocation( < AID ; 301 > , home)
    /\ (AIDInLocation( < AID ; 301 > , home) 
    -> E <> AIDInLocation( < AID ; 301 > , univ))) ’ mtestep1
   The property is satisfied in the initial state (1476 system states, 8228 rewrites, holds in 1476/1476 states)
Besides the above (qualitative) formulae, one can also check quantitative formulae (related to stored information values, for instance). Simulating and verifying complex systems that involve timed migration and communication in distributed environments necessitates the ability to easily describe the key entities and actions of these systems (such as mobility, message exchange, time constraints, and both private and public information) using iMASsystems. Subsequently, it requires the automated verification of both qualitative aspects (like reachability, safety, and liveness) and quantitative aspects using Maude 3 and its strategies.

7. Conclusions and Related Work

In multi-agent systems, information is commonly handled using epistemic logics [30], specifically the multi-agent epistemic logic. These epistemic logics are modal logics that characterize various types of information. They differ not only in syntax but also in their expressiveness and complexity. Essentially, they rely on two key concepts: Kripke structures for modeling their semantics and logic formulas for representing the information of the agents.
In this article, the public and private information appear as information structures, each agent having a private information store used to decide its next actions, and public information being available for all the agents. More importantly, the agents with information sharing are described by a prototyping programming language inspired by process calculi, allowing a compositional construction of large systems by using a parallel composition of the agents (together with their information). The agents are coordinated in space and time by migration in a distributed environment of explicit locations and by explicit timeouts for interactions among agents. It is worth mentioning that the timeouts can define a non-monotonic behavior of the system (e.g., a timeout may trigger a recovery action whenever a timer expires). The nondeterministic and concurrent evolution of such a system (updating the information) is given by formal operational semantics; this allows for describing rigorously the complex behavior of the entire system. In order to illustrate the syntax and semantics of our language and also motivate the multi-agent systems with information sharing, we consider an example in which agents communicate and share information, but also migrate between distributed locations according to explicit timers.
We implemented the prototyping language iMAS in the rewriting engine Maude 3 and emphasized how the strategies are used to significantly decrease the possible evolutions of the multi-agent systems with information sharing. The entire approach could be used to verify various properties in a strategy-controlled system having a restricted behavior and to describe and analyze context-sensitive rewriting [31]. For each verified property, the Maude 3 tool indicates the performance evaluation by providing the number of reached states and of the preformed rewrites.
The way the agents migrate between specific locations to engage in local communications with other agents is similar to the one presented in TiMo, a process calculus introduced initially in [32] and then followed by several extensions. Regarding of the implementation, a Java-based software facilitating timed migration for TiMois described in [33]. Additionally, [34] provides a translation of TiMointo the Real-Time Maude language. It is worth mentioning [35], which models agents with reputation in repuTiMo, and [16], which explores agents’ knowledge through sets of trees with information-bearing nodes in knowTiMo. In [36], the safety in medical systems is improved by using multi-agent systems with synchronous and asynchronous information sharing.

Author Contributions

Conceptualization, B.A. and G.C.; Formal analysis, B.A. and G.C.; Investigation, B.A. and G.C.; Writing—original draft, B.A. and G.C.; Writing—review & editing, B.A. and G.C. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data presented in this study is available at https://profs.info.uaic.ro/bogdan.aman/iMAS/iMASSpecStrat.maude.zip (accessed on 26 March 2025) (pwd: iMASStrat).

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Nicola, R.D. Process Algebras. In Encyclopedia of Parallel Computing; Padua, D.A., Ed.; Springer: Berlin/Heidelberg, Germany, 2011; pp. 1624–1636. [Google Scholar] [CrossRef]
  2. van der Aalst, W.M.P. Petri Nets. In Encyclopedia of Database Systems, 2nd ed.; Liu, L., Özsu, M.T., Eds.; Springer: Berlin/Heidelberg, Germany, 2018. [Google Scholar] [CrossRef]
  3. Koster, J.D.; Cutsem, T.V.; Meuter, W.D. 43 years of actors: A taxonomy of actor models and their key properties. In AGERE 2016: Proceedings of the 6th International Workshop on Programming Based on Actors, Agents, and Decentralized Control, Amsterdam, The Netherlands, 30 October 2016; Clebsch, S., Desell, T., Haller, P., Ricci, A., Eds.; ACM: New York, NY, USA, 2016; pp. 31–40. [Google Scholar] [CrossRef]
  4. Aman, B.; Ciobanu, G. Membrane Computing after 25 Years. Mathematics 2022, 10, 1992. [Google Scholar] [CrossRef]
  5. Song, B.; Li, K.; Orellana-Martín, D.; Pérez-Jiménez, M.J.; Pérez-Hurtado, I. A Survey of Nature-Inspired Computing: Membrane Computing. ACM Comput. Surv. 2022, 54, 22:1–22:31. [Google Scholar] [CrossRef]
  6. Abdallah, A.E.; Jones, C.B.; Sanders, J.W. (Eds.) Communicating Sequential Processes: The First 25 Years, Symposium on the Occasion of 25 Years of CSP. In Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 2005; Volume 3525. [Google Scholar] [CrossRef]
  7. Bergstra, J.A. On the Design Rationale of ACP Style Process Algebras. In Proceedings of the Workshop “Essays on Algebraic Process Calculi” (APC 25). Electron. Notes Theor. Comput. Sci. 2005, 162, 79–85. [Google Scholar] [CrossRef]
  8. Milner, R. Elements of Interaction-Turing Award Lecture. Commun. ACM 1993, 36, 78–89. [Google Scholar] [CrossRef]
  9. Milner, R. Communicating and Mobile Systems—The Pi-Calculus; Cambridge University Press: Cambridge, UK, 1999. [Google Scholar]
  10. Baeten, J.C.M. A brief history of process algebra. Theor. Comput. Sci. 2005, 335, 131–146. [Google Scholar] [CrossRef]
  11. Roscoe, A.W. Understanding Concurrent Systems; Texts in Computer Science; Springer: London, UK, 2010. [Google Scholar] [CrossRef]
  12. Larsen, K.G.; Lorber, F.; Nielsen, B. 20 Years of UPPAAL Enabled Industrial Model-Based Validation and Beyond. In ISoLA 2018: Proceedings of the 8th International Symposium on Leveraging Applications of Formal Methods, Verification and Validation. Industrial Practice; Lecture Notes in Computer Science; Margaria, T., Steffen, B., Eds.; Springer: Berlin/Heidelberg, Germany, 2018; Volume 11247, pp. 212–229. [Google Scholar] [CrossRef]
  13. Kwiatkowska, M.Z.; Norman, G.; Parker, D. PRISM 4.0: Verification of Probabilistic Real-Time Systems. In CAV 2011: Proceedings of the 23rd International Conference on Computer Aided Verification; Lecture Notes in Computer Science; Gopalakrishnan, G., Qadeer, S., Eds.; Springer: Berlin/Heidelberg, Germany, 2011; Volume 6806, pp. 585–591. [Google Scholar] [CrossRef]
  14. Lomuscio, A.; Qu, H.; Raimondi, F. MCMAS: An open-source model checker for the verification of multi-agent systems. Int. J. Softw. Tools Technol. Transf. 2017, 19, 9–30. [Google Scholar] [CrossRef]
  15. Rubio, R.; Martí-Oliet, N.; Pita, I.; Verdejo, A. Strategies, model checking and branching-time properties in Maude. J. Log. Algebr. Methods Program. 2021, 123, 100700. [Google Scholar] [CrossRef]
  16. Aman, B.; Ciobanu, G. Knowledge Dynamics and Behavioural Equivalences in Multi-Agent Systems. Mathematics 2021, 9, 2869. [Google Scholar] [CrossRef]
  17. Meseguer, J. Twenty years of rewriting logic. J. Log. Algebr. Program. 2012, 81, 721–781. [Google Scholar] [CrossRef]
  18. Clavel, M.; Durán, F.; Eker, S.; Escobar, S.; Lincoln, P.; Martí-Oliet, N.; Talcott, C.L. Two Decades of Maude. In Logic, Rewriting, and Concurrency—Essays dedicated to José Meseguer on the Occasion of His 65th Birthday; Lecture Notes in Computer Science; Martí-Oliet, N., Ölveczky, P.C., Talcott, C.L., Eds.; Springer: Berlin/Heidelberg, Germany, 2015; Volume 9200, pp. 232–254. [Google Scholar] [CrossRef]
  19. Ölveczky, P.C. Real-Time Maude and Its Applications. In WRLA 2014: Proceedings of the 10th International Workshop on Rewriting Logic and Its Applications, Held as a Satellite Event of ETAPS, Revised Selected Papers; Lecture Notes in Computer Science; Escobar, S., Ed.; Springer: Berlin/Heidelberg, Germany, 2014; Volume 8663, pp. 42–79. [Google Scholar] [CrossRef]
  20. Goguen, J.A.; Meseguer, J. Order-Sorted Algebra I: Equational Deduction for Multiple Inheritance, Overloading, Exceptions and Partial Operations. Theor. Comput. Sci. 1992, 105, 217–273. [Google Scholar] [CrossRef]
  21. Durán, F.; Eker, S.; Escobar, S.; Martí-Oliet, N.; Meseguer, J.; Rubio, R.; Talcott, C.L. Programming and symbolic computation in Maude. J. Log. Algebr. Methods Program. 2020, 110, 100497. [Google Scholar] [CrossRef]
  22. Berger, M.F. Towards Abstractions for Distributed Systems. Ph.D. Thesis, Imperial College London, London, UK, 2003. [Google Scholar]
  23. Bergstra, J.A.; Middelburg, C.A. Process Algebra with Strategic Interleaving. Theory Comput. Syst. 2019, 63, 488–505. [Google Scholar] [CrossRef]
  24. Rubio, R.; Martí-Oliet, N.; Pita, I.; Verdejo, A. Model checking strategy-controlled systems in rewriting logic. Autom. Softw. Eng. 2022, 29, 7. [Google Scholar] [CrossRef]
  25. Cimatti, A.; Clarke, E.M.; Giunchiglia, E.; Giunchiglia, F.; Pistore, M.; Roveri, M.; Sebastiani, R.; Tacchella, A. NuSMV 2: An OpenSource Tool for Symbolic Model Checking. In CAV 2002: Proceedings of the 14th International Conference on Computer Aided Verification; Lecture Notes in Computer Science; Brinksma, E., Larsen, K.G., Eds.; Springer: Berlin/Heidelberg, Germany, 2002; Volume 2404, pp. 359–364. [Google Scholar] [CrossRef]
  26. Duret-Lutz, A.; Renault, E.; Colange, M.; Renkin, F.; Aisse, A.G.; Schlehuber-Caissier, P.; Medioni, T.; Martin, A.; Dubois, J.; Gillard, C.; et al. From Spot 2.0 to Spot 2.10: What’s New? In CAV 2022: Proceedings of the 34th International Conference on Computer Aided Verification; Lecture Notes in Computer Science; Shoham, S., Vizel, Y., Eds.; Springer: Berlin/Heidelberg, Germany, 2022; Volume 13372, pp. 174–187. [Google Scholar] [CrossRef]
  27. Emerson, E.A.; Halpern, J.Y. “Sometimes” and “Not Never” revisited: On branching versus linear time temporal logic. J. ACM 1986, 33, 151–178. [Google Scholar] [CrossRef]
  28. Pnueli, A. The temporal logic of programs. In Proceedings of the 18th Annual Symposium on Foundations of Computer Science (SFCS 1977), Providence, RI, USA, 31 October–2 November 1977; pp. 46–57. [Google Scholar] [CrossRef]
  29. Clarke, E.M.; Emerson, E.A. Design and Synthesis of Synchronization Skeletons Using Branching-Time Temporal Logic. In Proceedings of the Workshop on Logics of Programs; Lecture Notes in Computer Science; Kozen, D., Ed.; Springer: Berlin/Heidelberg, Germany, 1981; Volume 131, pp. 52–71. [Google Scholar] [CrossRef]
  30. Gochet, P.; Gribomont, E.P. Epistemic logic. In Logic and the Modalities in the Twentieth Century; Handbook of the History of Logic; Gabbay, D.M., Woods, J., Eds.; Elsevier: Amsterdam, The Netherlands, 2006; Volume 7, pp. 99–195. [Google Scholar] [CrossRef]
  31. Lucas, S. Context-sensitive Rewriting. ACM Comput. Surv. 2021, 53, 78:1–78:36. [Google Scholar] [CrossRef]
  32. Ciobanu, G.; Koutny, M. Timed Mobility in process algebra and Petri nets. J. Log. Algebr. Program. 2011, 80, 377–391. [Google Scholar] [CrossRef]
  33. Ciobanu, G.; Juravle, C. Flexible software architecture and language for mobile agents. Concurr. Comput. Pract. Exp. 2012, 24, 559–571. [Google Scholar] [CrossRef]
  34. Aman, B.; Ciobanu, G. Verification of Multi-agent Systems with Timeouts for Migration and Communication. In ICTAC 2019: Proceedings of the 16th International Colloquium on Theoretical Aspects of Computing; Lecture Notes in Computer Science; Hierons, R.M., Mosbah, M., Eds.; Springer: Berlin/Heidelberg, Germany, 2019; Volume 11884, pp. 134–151. [Google Scholar] [CrossRef]
  35. Aman, B.; Ciobanu, G. Dynamics of reputation in mobile agents systems and weighted timed automata. Inf. Comput. 2022, 282, 104653. [Google Scholar] [CrossRef]
  36. Aman, B.; Ciobanu, G. Formal Analysis of Medical Systems using Multi-Agent Systems with Information Sharing. Comput. Sci. J. Mold. 2024, 32, 3–18. [Google Scholar] [CrossRef]
Table 1. Syntax of our multi-agent systems.
Table 1. Syntax of our multi-agent systems.
Processes P , Q : : = go t l then P (move)
| a Δ t ! v then P else Q (output)
| a Δ t ? ( u ) then P else Q (input)
| if test then P else Q (branch)
| stop (termination)
| id ( v ) (recursive definition)
| upd ( p , f , v ) then P (update)
InformationI : : = ∅ |   f ; v | I I
Tests test : : = true   |   ¬ test   |   test test
| get ( p , f ) > k   |   get ( p , f ) = k
| get ( p , f ) > get ( p , f )
| get ( p , f ) = get ( p , f )    |  p , p { private , public }
Agents A , B : : = P I
Set of Agents A ˜ : : = 0   |   A ˜ A
NetworksN : : = void | l [ [ I A ˜ ] ] | N N
Table 2. Operational semantics for our multi-agent systems.
Table 2. Operational semantics for our multi-agent systems.
(Stop)   l [ [ I 0 ] ]
(Com)   l [ [ I l a Δ t 1 ! v then P 1 else Q 1 I 1 a Δ t 2 ? ( u ) then P 2 else Q 2 I 2 A ˜ ] ] a ! ? @ l l [ [ I l P 1 I 1 { v / u } P 2 I 2 A ˜ ] ]
(Put0)   l [ [ I l a Δ 0 ! v then P else Q I A ˜ ] ] a ! Δ 0 @ l l [ [ I l Q I A ˜ ] ]
(Get0)   l [ [ I l a Δ 0 ? ( u ) then P else Q I A ˜ ] ] a ? Δ 0 @ l l [ [ I l Q I A ˜ ] ]
(Move0)   l [ [ I l go 0 l then P I A ˜ ] ] l [ [ I l B ˜ ] ] l l l [ [ I l A ˜ ] ] l [ [ I l P I B ˜ ] ]
(IfT) test @ ( I I l ) = true l [ [ I l if test then P else Q I A ˜ ] ] true @ l l [ [ I l P I A ˜ ] ]
(IfF) test @ ( I I l ) = false l [ [ I l if test then P else Q I A ˜ ] ] false @ l l [ [ I l Q I A ˜ ] ]
(CrtPu) f ; v I l l [ [ I l upd ( public , f , v ) then P I A ˜ ] ] create gf @ l l [ [ I l f ; v P I A ˜ ] ]
(CrtPr) f ; v I l [ [ I l upd ( private , f , v ) then P I A ˜ ] ] create lf @ l l [ [ I l P I f ; v A ˜ ] ]
(UpdPu)   l [ [ I l f ; v upd ( public , f , v ) then P I A ˜ ] ] upd gf @ l l [ [ I l f ; v P I A ˜ ] ]
(UpdPr)   l [ [ I l upd ( private , f , v ) then P I f ; v A ˜ ] ] upd lf @ l l [ [ I l P I f ; v A ˜ ] ]
(Call) i d ( u ) = def P id l [ [ I l id ( v ) I A ˜ ] ] call @ l l [ [ I l { v / u } P id I A ˜ ] ]
(Par) N 1 Λ 1 N 1 N 2 Λ 2 N 2 N 1 N 2 Λ 1 | Λ 2 N 1 N 2    (Equiv) N N N Λ N N N N Λ N
Table 3. Operational semantics of iMAS: time passing.
Table 3. Operational semantics of iMAS: time passing.
(DStop)   l [ [ I l 0 ] ] t l [ [ I l 0 ] ]
(DPut) t t 0 l [ [ I l a Δ t ! v then P else Q I ] ] t l [ [ I l a Δ t t ! v then P else Q I ] ]
(DGet) t t 0 l [ [ I l a Δ t ? ( u ) then P else Q I ] ] t l [ [ I l a Δ t t ? ( u ) then P else Q I ] ]
(DMove) t t 0 l [ [ I l go t l then P I ] ] t l [ [ I l go t t l then P I ] ]
(DPar) N 1 t N 1 N 2 t N 2 N 1 N 2 N 1 N 2 t N 1 N 2
(DEquiv) N N N t N N N N t N
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Aman, B.; Ciobanu, G. Multi-Agent Systems with Information Sharing: Strategies and Model Checking. Appl. Sci. 2025, 15, 3966. https://doi.org/10.3390/app15073966

AMA Style

Aman B, Ciobanu G. Multi-Agent Systems with Information Sharing: Strategies and Model Checking. Applied Sciences. 2025; 15(7):3966. https://doi.org/10.3390/app15073966

Chicago/Turabian Style

Aman, Bogdan, and Gabriel Ciobanu. 2025. "Multi-Agent Systems with Information Sharing: Strategies and Model Checking" Applied Sciences 15, no. 7: 3966. https://doi.org/10.3390/app15073966

APA Style

Aman, B., & Ciobanu, G. (2025). Multi-Agent Systems with Information Sharing: Strategies and Model Checking. Applied Sciences, 15(7), 3966. https://doi.org/10.3390/app15073966

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop