Particle Swarm Optimization Algorithm for Detecting Distributed Predicates

Metaheuristic algorithms are widely used to solve NP-complete problems in several domains. Distributed predicates detection is a fundamental distributed systems problem that has many useful applications. The problem of distributed predicates detection, in general, is known to be an NP-complete problem. In this paper, we developed a detection algorithm inspired by the particle swarm optimization algorithm, one of the well-known metaheuristic algorithms applied to solve problems in several domains. The proposed detection algorithm deal with distributed predicates under the possibly modality. We compared the performance of the proposed distributed predicates detection algorithm with several other detection algorithms. The experimental results reveal the effectiveness of the suggested distributed predicates detection algorithm.


I. INTRODUCTION
Distributed predicates detection (DPD) is a fundamental distributed systems problem. Several researchers have developed distributed predicates detection algorithms that can be exploited for several purposes [1]- [6], [6]- [12]. For example, to implement the following basic command in debugging, ''stop the program when condition C is true,'' in a distributed environment, you can represent condition C as a distributed predicate, and then you can use a distributed predicates detection algorithm to detect its satisfaction [13].
Sensors can provide rich context information for pervasive applications that are typically designed to be contextaware. Context-awareness allows applications to adapt to the dynamic pervasive computing environments in an intelligent manner [14], [15]. Detecting distributed predicates over asynchronous computations can be exploited to achieve context-awareness in pervasive environments [6], [11], [14], [16].
The associate editor coordinating the review of this manuscript and approving it for publication was Ziyan Wu .
Owing to concurrency in distributed systems, in which many processes are running simultaneously, it is generally challenging to detect a distributed predicate. Concurrency results in an exponentially large search space for the DPD problem. In fact, this problem has been already proved to be NP-complete [13]. The algorithms existing in the literature for DPD work efficiently for some types of distributed predicates [13], [17].
Several meta-heuristic based algorithms have been proposed to tackle NP-complete problems. Particle swarm optimization (PSO) is a well-known meta-heuristic algorithm that has been exploited widely to solve optimization problems [18]- [24]. In this paper, we will develop a DPD algorithm inspired by the PSO algorithm. In [25], the authors claim that PSO has the same effectiveness (finding the true global optimal solution) as Genetic algorithms but with significantly better computational efficiency (less function evaluations). Compared with other metaheuristic algorithms like Genetic algorithms, PSO works on two populations. This allows greater diversity and exploration over a single population. For these reasons, we have considered the use of the PSO algorithm in this research paper.
The remaining part of this paper involves the following sections. Section II formally defines the principal terms to be used during the presentation of this paper. Section III presents some of the main contributions in the domain of DPD. An overview of the PSO algorithm is given in Section IV. After that, the proposed DPD algorithm exploiting the PSO algorithm will be detailed in Section V. Section VI presents the results of the experiments accomplished to evaluate the proposed DPD algorithm. Finally, conclusions and future works are presented in Section VII.

II. A FORMAL MODEL
We have dedicated this section to describe the formal model used to precisely represent a distributed program run. We will also formally define the terms we are going to use in describing the proposed distributed predicates detection (DPD) algorithm.
An asynchronous message-passing distributed program involves n concurrent processes (P 0 , P 1 , . . . , P n−1 ) connected through a set of channels. These processes do not share a memory or a clock.
Each process P i executes a sequence of events (e i0 , e i1 , . . . ) and generates a sequence of local states (s i0 , s i1 , . . . ). An event is a result of executing some statement in the corresponding distributed program. An event moves a process from one local state to another. A given local state s ij involves the values of process P i variables, including program counter (PC), immediately after executing the event that moves process P i to local state s ij . Figure 1 is a graphical depiction of a simple distributed program's execution consisting of three processes (P 0 , P 1 , and P 2 ). For example, process P 1 has executed events (e 10 , e 11 , e 12 , e 13 ) and generates the following sequence of local states (s 10 , s 11 , s 12 , s 13 ). In Figure 1, small filled circles are used to depict events and circles are used to depict local states. s 10 is the initial local state of P 1 . The execution of event e 11 moves process P 1 from local state s 10 to local state s 11 . In the context of our problem, we need only to keep a record of the variables used in expressing the predicates to be detected. Consequently, we are not showing all of the details involved in a local state in general.
A message is depicted as a directed edge connecting the send and receive events. In Figure 1, the directed edge between e 01 and e 11 means that process P 0 has sent a message to process P 1 . An event e ij is said to have happened-before event e kl (e ij → e kl ) if the corresponding run contains a directed path going from e ij to e kl [26]. In Figure 1, e 00 → e 11 . e 10 does not happen before e 20 , and e 20 does not happen before e 10 . e 10 and e 20 are called concurrent events.
A cut (subset) of a given run is called consistent if and only if the following requirement is fulfilled: For any two events e ij and e kl , if e kl is in the cut and e ij → e kl , then e ij is also in the cut.
For example, the dashed line drawn in Figure 1 is used to display a consistent cut involving the set of events {e 00 , e 01 , e 02 , e 10 , e 11 , e 20 }.
A global state comprises one local state from each process. Namely, it involves the local states reached by executing the events of a given consistent cut. The consistent cut rendered using a dashed line in Figure 1 is mapped to a global state G 1 of the run. The global state G 1 involves the following local states {s 02 , s 11 , s 20 }. G 0 = {s 00 , s 10 , s 20 } is the initial global state, and G f = {s 02 , s 13 , s 22 } is the final global state of the run in Figure 1. The global states of a run produce a structure recognized as the state lattice [27].
A distributed predicate is a Boolean expression expressed using the variables of two or more processes. To check whether a distributed predicate has been satisfied at some point in a distributed programs run, we need to keep evaluating the predicate until we find a global state satisfying the predicate. Figure 2 portrays the DPD environment [17].
The number of possible global states in a given run is usually huge. For a run with n processes, where each process has gone through m local states, we will have O(m n ) global states. Consequently, DPD is a difficult time-consuming task in general. In [13], the authors proved that DPD is an NP-complete problem in general.
Some researchers have succeeded in developing efficient detection algorithms for certain types of distributed predicates. More details about these algorithms will be given in the following section.

III. RELATED WORK
There is no efficient general algorithm to detect any distributed predicate. Researchers have developed several algorithms for detecting certain types of distributed predicates. A well-known type of distributed predicates that are easy to detect is called stable predicates. When a stable predicate becomes true, it will remain true. This property of stable predicates facilitates the development of detection algorithms for such a kind of predicates. The global snapshot algorithm presented in [28], [29] can be easily used to detect stable predicates. Termination and deadlock detection are two well-known scenarios where we can use stable predicates.
Other researchers exploit the structure of some distributed predicates in developing efficient algorithms for detecting certain types of distributed predicates. For example, in [30] the authors developed an efficient algorithm for detecting conjunctive predicates. The time complexity of their algorithm is O(n 2 m) (assuming we have n processes and m local states in any process).
In [3], [31]- [33], the authors have applied genetic algorithms, harmony search, artificial bee colony, and simulated annealing to develop DPD algorithms that can be used for DPD under the possibly modality. The experimental results demonstrate that these algorithms are more powerful than classical algorithms based on state enumeration.
In [34]- [36], the concept of computation slicing has been utilized to reduce the size of the search space to be considered by the DPD algorithms. A slice of a distributed run concerning a specific predicate is the subset of the global states of the run that contains the global states in which the desired predicates might be true. Consequently, only the global states of the slice have to be examined throughout the detection process. As a result, the detection time will be significantly reduced [34]- [36].
In [37]- [39], the authors have succeeded in exploiting the concept of atomicity in reducing the size of the search space to be examined during the process of detecting distributed predicates. According to their work, there is no need to consider the local state generated after the execution of every single event. At an abstract level, a distributed program executes a number of high-level atomic actions. Each atomic action involves a set of events. In general, we need to consider local states generated after executing atomic actions. This results in a significant reduction in the size of the search space to be processed by the DPD algorithms.
In this paper, we exploited the well-known particle swarm optimization (PSO) algorithm in designing an efficient DPD algorithm. An overview of the basic PSO algorithm and more details about the proposed PSO-based DPD algorithm will be addressed in subsequent sections.

IV. OVERVIEW OF THE PARTICLE SWARM OPTIMIZATION (PSO) ALGORITHM
The particle swarm optimization (PSO) algorithm is a population-based meta-heuristic algorithm developed by Kennedy and Eberhart [40]. The PSO algorithm is inspired by the behavior of the groups of some animals like birds flocks or fish schools. Each member of the population is referred to as a particle. Each particle is characterized by its velocity and position. Algorithm 1 abstractly describes the basic PSO algorithm which consists of the following steps: Step 1: The velocity v i , and the position x i of each particle p i are randomly initialized. The best local position p l i reached by particle p i is initialized to x i (See step 1 of Algorithm 1). The position of each particle encodes a possible solution to the problem under consideration.
Step 2: Compute the best position globally reached by the swarm p g (See the for loop shown in step 2 of Algorithm 1). G() is a function that evaluates the goodness of each particle (How close it is to the optimal solution).
Step 3: The velocity of each particle is updated by (1): where: t +1 means the current time step, t means the previous time step.
x i,t the previous position of particle p i . v i,t is the previous velocity of particle p i . v i,t+1 the new velocity of particle p i . p l i,t is the best position reached by particle p i in the previous time step.

Algorithm 1 Particle Swarm Optimization Algorithm
Step 1: (Initialization) Randomly initialize v i and x i for each particle p i for i = 1 to Size of Swarm do p l i = x i end for Step 2: (Compute p g ) Step 3: Step 4: (Update position) Step 5: (Compute p l i for each particle p i ) Step 6: (Repeat Steps 2 to 5 until the satisfaction of the termination criteria) p g,t is the best position reached by the entire swarm in the previous time step.
C 1 and C 2 are the cognitive and the social parameters (usually C 1 = C 2 = 2). r 1 and r 2 are two random numbers between 0 and 1.
Step 4: The position of each particle is updated by (2): where x i,t+1 is the new position of particle p i Step 5: Update p l i for each particle p i (See the for loop used for this purpose in step 5 of Algorithm 1).
Step 6: Repeat steps 2 to 5 until the satisfaction of the stopping criteria In the next section, we will show in detail how we can exploit the PSO algorithm to design an algorithm for detecting distributed predicates.

V. PSO ALGORITHM FOR DETECTING DISTRIBUTED PREDICATES
In this paper, we will exploit the particle swarm optimization (PSO) algorithm in developing a distributed predicates detection (DPD) algorithm for predicates under the possibly modality. A distributed predicate under the possibly modality is said to be detected if there is at least one global state of the run in which the predicate is satisfied [13]. Its is not easy to adapt the PSO algorithm so that it can be used for solving the DPD problem. This is the main contribution of this research work.
Initially, we need to describe the input of the suggested detection algorithm. The DPD algorithm developed in this paper works on data collected at runtime. The collected data are stored in history files.
The distributed program will be instrumented so that processes will save in a history file the data necessary to detect the desired distributed predicate. As we have described in Section II, each process P i executes a sequence of events (e i0 , e i1 , . . . ), and generates a sequence of local states (s i0 , s i1 , . . . ). The history file of a process contains several lines. Each line contains information about one local state. This information includes the values of the variables used in the predicate at the given local state and the vector clock timestamp of the event resulting in generating this local state. The general format of the history file is depicted in Figure 3. There are m lines in the file indicating that the process has generated m local states during the run under consideration. Each line has the form (k. <timestamp-k>, {(variable-1, value),. . . }). Where k is the local state serial number, timestamp-k is the vector clock timestamp, and  {(variable-1, value),. . . } is the set of the variables used in the desired predicate, along with its values at local state number k. The following example demonstrates the above concepts. Given the run in Figure 1, and assuming that our goal is to detect the predicate x + y + z = 9. Each process must generate a history file at runtime containing the necessary information needed by the detection algorithm. For example, process P 1 should record, in the history file, information about the local states that could be part of a global state satisfying the predicate under consideration. Figure 4 shows the history files of the processes of the run. These files are the input to our detection algorithm. For example, the second line in the history file of process P 1 is ( 2. <2,2,0>, {(y,10)} ). This line corresponds to the second local state of P 1 , namely local state s 11 in Figure 1. The vector clock timestamp of this local state is <2,2,0>, and the value of variable y of process P 1 at this local state is 10.  In the following subsection, we will start with the detailed design of the proposed PSO-based distributed predicates detection algorithm.

A. THE DESIGN OF THE PSO-BASED DETECTION ALGORITHM
The first task in the design of the PSO-based DPD algorithm is to define the precise representation of a particle in our context. In general, a particle encodes a possible solution to the problem under consideration. In our PSO-based detection algorithm, a particle encodes a global state in which the predicate of interest may be evaluated to true. Because each local state has a serial number in the corresponding history file, we will use these numbers to represent each global state encoded by some particle. For example, Figure 5 shows a particle encoding the global state associated with the consistent cut depicted as a dashed line in the distributed run shown in Figure 1. A particle p k is an object involving two vectors of length equals to the number of processes involved in the predicate under consideration (3 processes in our simple example). The first vector x k encodes the position of the particle and the second vector v k encodes the velocity of the particle. The first element of the position of the particle p k shown in Figure 5 (x k [0] = 3) means that the third local state of P 0 is part of the global state encoded by this particle.
Assuming that the size of the swarm is s, the PSO-based DPD algorithm will initially generate s particles of the form shown in Figure 5. The position of each particle will be randomly initialized. After that, the algorithm needs to figure out the position of the particle that represents the best solution reached so far by the particles in the swarm (the global best position p g ). To accomplish this task, we need to precisely define the function G() that will evaluate the goodness of a given particle p k . The design of this function will be the next step in the design of our PSO-based detection algorithm.
Function G() will mainly assign a value to a particle p k indicating whether the global state encoded by this particle satisfies the intended predicate or not. If the particle satisfies the predicate, the goodness value assigned to it by the G() function will be equal to 1. Otherwise, the particle goodness will be a value greater than or equal to 0 and less than 1 reflecting how close it is to a particle satisfying the predicate to be detected. A larger fitness value is better than a smaller one, because it indicates that the particle is closer to some global state satisfying the intended predicate.
To illustrate the G() function, we will assume that our goal is to detect predicates of the form (var 0 + · · · + var n−1 = C) in a run of a program involving n processes. var i is a variable of P i , and C is an integer constant. The G() function will be as shown in equation (3). It will take the position of the particle to be evaluated as its input.
G(x k ) is the goodness of particle p k . x k [i] is the serial number of the local state of P i involved in the global state encoded by particle p k (See Figure 5). The function value(i, x k [i], var i ) returns the value of var i of P i in local state x k [i]. This value can be found in the history file generated by process P i .
For example, suppose we are going to check if the run in Figure 1 satisfies the distributed predicate x+y+z = 9. The goodness of the particle shown in Figure 5 will be evaluated according to equation (3) as follows: ,y)+value(2,x k [2],z))−9|+1 Using the particle shown in Figure 5, we can get the values of x k [0], x k [1], and x k [2].  value(0, 3, x), value(1, 2, y), and value(2, 1, z).
For example, to get the value of value (1, 2, y), we need to access the history file of process P 1 (see Figure 4), then we read local state number 2 to get the value of variable y at this local state. In our example, the value of y at local state 2 of process P 1 is 10. Similarly, the value of x at local state 3 of process P 0 is 3, and the value of z at local state 1 of process P 2 is 5.
Consequently, the goodness value of particle p k shown in Figure 5 is (0.1).
One strong point of our PSO-based DPD algorithm is the fact that we do not need to develop an entire algorithm for different distributed predicates. If we have another distributed predicate to be detected, we just need few modifications on the G() function. Other parts of the PSO-based detection algorithm will remain untouched.
The cut associated with a global state must be a consistent (see Section II). Hence, not any set of local states form a legitimate global state. However, since the particles are initialized randomly, some particles may not encode valid global states. To deal with this problem, there are several possible solutions. For example, we can initialize incorrect particles again randomly until we find a correct initialization. Another possible solution is to direct the G() function to assign particles with invalid solutions a very low goodness value. This will result in ignoring their effect in subsequent iterations of the algorithm. We will adopt the second solution in our PSO-based detection algorithm. If the particle encodes an invalid global state, then the value assigned to it by the G() function will be −1.
After describing the design of the G() function, we can now describe the PSO-based detection algorithm in more details. The PSO-based detection algorithm will start by randomly initializing the particles in the swarm. The position of each particle will have a dimension equals to the number of processes in the run under consideration. Element i in the position of a particle corresponds to process P i and will be randomly initialized with an integer number representing the serial number of one of P i 's local states.
In the next step, the PSO-based detection algorithm will initialize the local best position p l k for each particle p k with an identical copy of the position of the same particle. The PSO-based detection algorithm will repeat the following steps until it finds a global state that satisfies the intended predicate or reaches the maximum number of iterations.
1) The detection algorithm uses the G() function described above to evaluate the goodness of each particle in order to find the global best position p g . The global best position is the position of the particle whose encoded global state is the nearest one in the swarm to some global state satisfying the predicate under consideration. (See step 2 of Algorithm 1) 2) Calculate the new velocity of each particle. We will use the equation shown in step 3 of Algorithm 1.
3) Update the position of each particle. We will use the equation shown in step 4 of Algorithm 1. Since the position of the particle in the context of our PSO-based detection algorithm consists of integer numbers only (representing local states numbers), we will round the value of the velocity before updating the position of the particle. Moreover, the new position may involve local states numbers outside the range of the local states of a given process. In this case, the new local state number is ignored and replaced with a randomly selected valid local state number. 4) Update the local best position for each particle (See step 5 of Algorithm 1) An algorithm is sound if, anytime it returns an answer, the answer is true. Looking at the G() function that evaluates the goodness of a given particle, we can easily show that the algorithm is sound. The algorithm returns a solution (a global state where the value of the distributed predicate of interest is equal to true) if it found a global state whose goodness is 1. We are dealing with predicates of the form (var 0 + · · · + var n−1 = C). The goodness function G() returns a goodness value of 1 only and only if (var 0 + · · · + var n−1 − C) equals to zero. And it will be equal to zero only if the intended predicate (var 0 + · · · + var n−1 = C) is true. As a result, if the algorithm reports that the value of a predicate is true (G() returns 1), its answer will be true and hence the algorithm is sound.
In the next section, we will present and describe the experiments' results to evaluate the performance of the PSO-based DPD algorithm.

VI. IMPLEMENTATION AND EXPERIMENTAL RESULTS
We have used the Java programming language to implement the proposed PSO-based distributed predicates detection (DPD) algorithm. To evaluate its performance we used the PSO-based DPD algorithm to detect several distributed predicates of the form (var 0 +· · ·+var n−1 = C) where n is the number of processes, var i is an integer variable of P i , and C is a constant. We have set the swarm size to 50, C 1 = C 2 = 2, and we have set that max number of iterations to 10 6 .
We have conducted our experiments on a computer with Intel(R) Core(TM) i7-3770QM CPU, 3.4GHz with 8GB RAM. We have considered in our experiments different runs with different number of processes (50, 75, 100, 125,  150, 175, 200, 225, 250, 275 and 300 processes), and different number of events per process (5000, 10000, and 15000 events). In each scenario, we have executed the program implementing our PSO-based detection algorithm 200 times. We recorded the average execution time and the average number of iterations needed to detect a predicate of the form (var 0 + · · · + var n−1 = C). Table 1 summaries the experimental results. For example, given a run with 200 processes and 15000 events executed by each process, the PSO-based detection algorithm successfully detects the predicate (var 0 + var 1 + · · · + var 199 = 2000) in 6845ms (on average). The detection of the predicate (var 0 + · · · + var n−1 = C) is an NP-complete problem in general [36]. Consequently, there is no polynomial time algorithm for detecting predicates of this form. The only way to detect it is to go through the global states of the run until we find a global state satisfying the predicate. This detection process will be time-consuming and requires exploring up to O(m n ) global states in the worst case, where n is the number of processes, and m is the number of local states at any process (See Section II). For example, in a run with five processes and 400 local states for each process, we need more than 2.8 hours to detect the predicate in the worst case, assuming that we can check 10 9 global states every second. Consequently, the developed PSO-based DPD algorithm has a better performance.
In [36], the authors have developed efficient algorithm to detect distributed predicates of the form (var 0 + · · · + var n−1 = C) under some restricted conditions. Specifically, their algorithm works efficiently assuming that the predicates variables are incremented or decremented by at most one at each step. We have extended our experiments to evaluate the performance of the PSO-Based DPD algorithm in detecting distributed predicates under the specified restrictions. We have updated our programs to meet the restrictions imposed on the predicate variables and we have performed several experiments to compare the results. In fact, the G() function is the only part of the PSO-Based DPD algorithm that has to be modified, the remaining parts need not be changed. This reflects the flexibility of the proposed DPD algorithm.
The results shown in Table 2 demonstrate that the performance of our PSO-Based detection algorithm in detecting distributed predicates with some restriction has been significantly improved. We have considered in our experiments different runs involving (50, 100, 150, 200, 250, 300, 350, and 400 processes). In each scenario, we have executed the program implementing our PSO-based detection algorithm 200 times, and we have calculated the average execution time and the average number of iterations needed to detect a predicate. For example, given a run with 300 processes and 15000 events executed by each process, the PSO-based detection algorithm successfully detects the predicate (var 0 + var 1 + · · · + var 299 = 300) in 84ms (on average) assuming  The performance of the PSO-based DPD algorithm in detecting distributed predicates of the form (var 0 + · · · + var n−1 = c) assuming that the predicates variables are incremented or decremented by at most one at each step.
that the predicates variables are incremented or decremented by at most one at each step.
We have extended our experiments to evaluate the performance of the proposed PSO-based DPD algorithm on detecting conjunctive distributed predicates of the form (t 0 ∧ t 1 ∧ · · · ∧ t n−1 ) where term t i is a local predicate of process P i (involves only variables of process P i ).
To enable the PSO-based DPD algorithm to deal with such kinds of predicates, the only thing that we need to modify is the G() function, other parts of the algorithm will remain untouched. This is one of the advantages of the proposed PSO-based DPD algorithm compared with other detection algorithms that work efficiently for specific kinds of predicates only. We have modified the G() function so that it will return the number of terms (local predicates) in the conjunctive predicate that evaluates to false. A conjunctive predicate is evaluated to true in a given global state if the G() function returns zero, which means that all of the terms t 0 , t 1 , . . . , t n−1 in the conjunctive predicate are true, and hence, t 0 ∧ t 1 ∧ · · · ∧ t n−1 is also true.
We have tested our algorithm in detecting conjunctive predicates of the form (x 0 > c 0 ∧ · · · ∧ x n−1 > c n−1 ) where x i is a variable of process P i and c 0 , . . . , c n−1 are constants. Table 3 demonstrates the results of the experiments performed to evaluate the PSO-based DPD algorithms on several conjunctive predicates. We have considered in our TABLE 3. The performance of the PSO-based DPD algorithm in detecting distributed predicates of the form (x 0 > c 0 ∧ x 1 > c 1 ∧ · · · ∧ x n−1 > c n−1 ) where x i is a variable of process P i and c 0 , . . . , c n−1 are constants. experiments different runs with different number of processes (200, 300, 400, 500, and 600 processes). In each scenario, we have executed the program implementing our PSO-based detection algorithm 200 times, and we have recorded the average execution time and the average number of iterations needed to detect a predicate. It is clear from the results that the proposed algorithm can efficiently detect conjunctive predicates for distributed programs runs with several hundreds of processes. For example, the PSO-based DPD algorithm detects the predicate (x 0 > 10 ∧ x 1 > 10 ∧ · · · ∧ x 499 > 10) in 2469 ms.
We have implemented the genetic algorithms detection approach presented in [33], and we have conducted several experiments to compare its performance with the performance of the PSO-based detection algorithm presented in this paper. Figure 6 shows that the PSO-based distributed predicates detection algorithm clearly outperforms the performance of the genetic algorithms detection approach [33]. The results in [32], [33] demonstrate that the genetic algorithms detection approach outperforms the harmony algorithm detection approach. Consequently, our proposed PSO-based detection algorithm also outperforms the harmony algorithm distributed predicates detection approach.
The branch and bound (BδB) and the A * search algorithms are two well-known algorithms that could be exploited in solving the DPD algorithm. However, the biggest drawback of the BδB and the A * search algorithms is the exponential space complexity. The A * algorithm keeps all generated nodes in memory (to avoid visiting the same node multiple times) and the BδB algorithm keeps the branch tree in memory. Consequently, when solving problems with exponential search space size, like the DPD problem, you can run out of RAM before finding the optimal solution. In future research papers, we will consider developing a hybrid detection approach in which metaheuristic algorithms are combined with A * and BδB.

VII. CONCLUSION AND FUTURE WORK
The detection of distributed predicates is a highly challenging problem with practical applications, including context change detection in pervasive environments, testing, debugging, and monitoring distributed programs. This paper presents a distributed predicates detection (DPD) algorithm inspired by the particle swarm optimization (PSO) algorithm to detect distributed predicates under the possibly modality efficiently. The experimental results confirm that the proposed PSO-based DPD algorithm outperforms the traditional enumerated based DPD algorithm.
In our experiments, we have studied distributed predicates of the form (var 0 + · · · + var n−1 = C). The current work can be extended by considering the design and the implementation of the G() function for other forms of distributed predicates. Several other experiments can be conducted, and some parameter tuning techniques can be exploited to find the best value for each parameter of the PSO-based detection algorithm to improve its performance. We can also consider solving the DPD problem using other known metaheuristic algorithms like monarch butterfly optimization (MBO) [41], earthworm optimization algorithm (EWA) [42], elephant herding optimization (EHO) [43], moth search (MS) algorithm [44], slime mould algorithm (SMA) [45], and harris hawks optimization (HHO) [46]. Moreover, we can consider the development of detection algorithms for distributed predicates under fine-grained modalities [47], [48].