• Tidak ada hasil yang ditemukan

Applying Formal Methods to Distributed Algorithms Using Local-Global Relations

N/A
N/A
Protected

Academic year: 2023

Membagikan "Applying Formal Methods to Distributed Algorithms Using Local-Global Relations"

Copied!
175
0
0

Teks penuh

A local interaction is an interaction between subgroups of agents, while a global interaction is one of all agents in the system. The local-global framework addresses this challenge by describing each local interaction as if it were a global one, including all agents within the system.

Motivation

Therefore, we consider algorithms in which each subset of interacting agents performs the same computation independently of the size and composition of the subset. Many articles deal with distributed algorithms in which the input to the algorithm is fixed.

A Detailed Example

The consensus state is the convex hull of the initial point sets of all agents. One can reason, somewhat informally, about the correctness of the program in the following way.

Local-Global Algorithms

An agent that can see only part of the graph solves the shortest path problem for the subgraph it can see. If an agent can modify only part of the array, then it sets the values ​​it has.

Figure 1.1: An example of distributed consensus, which fits a local-global relation. See Section 3.1 for details.
Figure 1.1: An example of distributed consensus, which fits a local-global relation. See Section 3.1 for details.

Contribution and Scope

Systems in which agents can perfectly orchestrate interactions will perform better than systems in which agent interactions are determined by an external mechanism. We study termination detection algorithms for systems in which agent interactions are determined by external agencies.

Related Work

Likewise, systems where agents can send messages to any other agent without message loss will have better performance than systems where messages are lost. Many of the termination detection algorithms in the literature assume that agent interactions are specified by static graphs, where vertices represent agents and edges represent shared variables or channels that send messages.

Organization of the Thesis

2 A set of labels is associated with the “actions” of agents in a distributed system; for example, an action may be to send a message containing the current state of the agent. A distributed system is a fixed finite set A of agents and a labeled transitive system that has the following properties.

Figure 2.1: A graphical representation of a labeled transitions system. Darkened agents denote possible start states.
Figure 2.1: A graphical representation of a labeled transitions system. Darkened agents denote possible start states.

Local-Global Relations

The minimum of the values ​​of the agents in K – the value 5 – is not changed by the action. Furthermore, the minimum of the values ​​of all agents in the system – the value 4 – is also not changed by the action.

Correctness

If all actions of the transitive system satisfy , then the invariant of the system is an invariant: f(S0) =f(S). If all actions of a transitive system satisfy , then the invariant of the system is an invariant: f(S0)≥f(S).

Related Work

In the case of the example of calculating the minimum, the desired consensus agent state is the minimum of the values ​​of the initial agent states. This chapter restricts attention to functions f which are a fold [43, 44] of the initial values ​​of the agents with an operator⊕; for example, if the agents are indexed = 0,.

Figure 3.1: An example of monoid composition. Consider a system transition, S _ K S 0 , where the K is the set of blue agents
Figure 3.1: An example of monoid composition. Consider a system transition, S _ K S 0 , where the K is the set of blue agents

System Correctness

Recall that the theorem requires an invariant of the system G, together with a predicate Q and a distance function in the state space. An invariant of the system is that for all k agents the state S(k) is the operator ⊕ applied to all elements of some set of K agents; let g(S, k) be the largest such set.

Figure 3.2: Evolution of the variant function g during an execution. Darkened nodes repre- repre-sent the range of g when applied to agent b in a given state; agent interactions are  under-scored
Figure 3.2: Evolution of the variant function g during an execution. Darkened nodes repre- repre-sent the range of g when applied to agent b in a given state; agent interactions are under-scored

Instantiations of Monoids

They retain their current position, as well as set points representing the convex hull. Denote by Ch: P →P the convex hull of a set of points that produces another set of points.

Message Passing

Consider a distributed computation of shortest paths in a directed graph in which there is an agent at each vertex. This problem occurs in Internet protocols in which each router defines minimal congestion paths for other routers.

Central Idea

Progress We prove progress using a variant function in the usual way: we show that (i) for all actions, executing the action does not increase the value of the variant function and (ii) if the desired predicate is not reached then there exists an action that is executed infinitely often which reduces the variant function. We first show that the variational function does not increase in value as the computation proceeds. We then show that if the desired predicate (for all k, w[k] =D[k]) does not hold, then there is an operation, which is executed infinitely often, that reduces the count.

Semirings

The use of abstract algebra reduces the amount of work required to prove the correctness of distributed algorithms for similar types of problems. The arguments for the correctness of the algorithm given above cannot be verified by a mechanical proof tester. Much effort is required to develop evidence that can be verified by a program; this effort is amortized over several problems by presenting and proving an algorithm using data structures from abstract algebra.

System Specification

In this way, the state of the system is a distributed representation of a directed, weighted graph: the function o is the set of outgoing vertices of an agent, and i its incoming edges (see Figure 4.1). Given an agentj containing a directed edge to agentk, the weight of the edge from j to k is denoted by So(j)(k). Typically in the literature, local state transitions are expressed using both operations of the semiring.

Figure 4.1: Components of agent state as it relates to an arbitrary graph.
Figure 4.1: Components of agent state as it relates to an arbitrary graph.

System Correctness

The advantage of expressing the system transition as we have in Definition 18, as opposed to the traditional way (Lemma 3), is that there is a cleaner separation of the updated optimal node and the value of the path to that node. Predicate G holds if the path maintained by all agents to the root in state S is "better than" the optimal path in the initial state. The predicate Q holds if the path maintained by all agents to the root in state S is globally optimal.

Examples

4.2) Let FK be the family of edge sets such that the agents in each edge are valid instantiations of k and j in Equation 4.2. We define the semiring used in each algorithm, and prove that the elements of the semiring satisfy the requirements assumed in Section 4.2. Example 9 (Reachability) The goal of the graph reachability problem is to determine which vertices have a path from a given root angle.

Related Work

Actions are performed by subgroups of agents; a subgroup action can change the states of agents in the subgroup, leaving the states of agents outside the subgroup unchanged. As in the entire thesis, the system consists of a non-empty finite set of agents. We use the following notation to represent the extraction of elements from a range ⊗ in particular and a pair of agents in general.

System Correctness

Distributed averaging is in fact a consensus problem - the goal of each process is to agree on the average of agents' values ​​within the system. The goal of the system is that each agent contains AM(S0,A); in this context, S. A simple specification could be that when agents interact, they update their state with the average of the group.

Figure 6.1: An example execution fragment of the distributed average consensus algorithm.
Figure 6.1: An example execution fragment of the distributed average consensus algorithm.

System Specification

Interactions occur between pairwise agents and “move” the agents toward each other, reducing their distance by an amount r, where r ∈ [L,1−L] and L is a constant such that L ∈ (0,0.5 ]. This ensures that eventually an action is executed between the agents in each nonempty subset K and its complement ¯K (see Figure For the remainder of the chapter, we restrict attention to interactions that follow the semantics of ⊗ (Example 14).

System Correctness

An example of the system described in the previous chapter is a system that calculates the average of sensor values, such as temperature, when these values ​​do not change during the calculation. In this chapter, we consider a generalization of the algorithm reviewed in the previous chapter that is applicable to dynamical systems in which the values ​​to be averaged change during the course of the computation. Each step t consists of (1) increasing the environment Ct by an amount It and (2) agents performing an action.

Figure 7.1: An execution fragment denoting the separation between external inputs and system actions.
Figure 7.1: An execution fragment denoting the separation between external inputs and system actions.

Theory

For example, consider the case where f(H) is the minimum value in the multisetH, and where the system has two agents, indexed 0 and 1. If the agent input values ​​yt[k] are constant for all agents k, then within an epoch the value xt [j] of agent j, for all j, is the minimum value. It follows that the system error Dt at the end of an epoch amounts to a maximum of ∆·T.

Termination Detection

The straightforward algorithm is that each agent keeps track of all the agents with which it has interacted directly or indirectly. The computation ends when each agent determines that all agents have obtained their final values. The core idea is that each agent j collects the values ​​x[k] for each agent k and thus obtains the multiset H, and then computes f(H).

Limits of the Local-Global Framework

Each agent sends the y-values ​​of all agents it has until each agent has the y-values ​​of all agents in the system, and then they compute the desired result. These problems are consensus problems where the goal is to agree on the k-th smallest value in a set where k is neither the minimum nor the maximum element.1 To compute the second smallest element, e.g. k = 2, is an example of this problem. Consider a set of agents K in state S; {S|K}1 denotes the set of first-elements inS restricted to the agents K, while S(k)1 denotes the first element in agent k's state.

Bounds on Information Exchange

In this way, the chapter presents the practical side of the local-global theory presented so far. The local-global assumption, lg base, is actually an assumption of the PVS assumptions in Theorem 1. The final act of fold theory is to import the local-global theory (line 26).

Figure 9.1: Local-global theory represented in PVS.
Figure 9.1: Local-global theory represented in PVS.

Model Checker

In this way, it verifies that the local-global relationship in practice corresponds to the theory. If the channel is not counted, the global version used three, the hybrid model kept two, and the local-global model required none. We also used a model checker to verify the local-global theory using a specific example; in this case Boolean consensus.

Figure 9.8: Promela “global model.” Consensus is verified globally, across all agent states.
Figure 9.8: Promela “global model.” Consensus is verified globally, across all agent states.

Implementation

In the case of little consensus, for example, the returned value was a less than ratio between states. Each time this value was set (lines 6 and 12), the invariant inLocalGlobal(line 22) was evaluated.4 The variable begin ensured that the invariant was only fully evaluated after the after condition was set. This walk relation, which ensures that all edges in the after state are less than or equal to their corresponding edges in the before state.

Figure 9.14: Operator component diagram.
Figure 9.14: Operator component diagram.

Future Work

Depending on how the problem is modeled, the agent holding the resource is at the infimum or supremum of the grid. When the resource is exchanged, the edges of the agent that previously held the resource are swapped, effectively placing it at the opposite extreme of the grid. An evaluation of the trade-off between robustness and efficiency should examine a range of designs, from extremely fragile and extremely efficient at one extreme, to extremely robust and possibly very inefficient at the other extreme.

The Applicability of Local-Global Relations

The system is robust because even if the environment changes – for example if communication channels fail – the system continues to function correctly, although possibly with reduced efficiency. This thesis provided examples of the usefulness of the framework by applying it to established algorithms within the field, such as consensus and graph problems. Local-global relations promoted an algebraic representation of the system, which then simplified their representation within a theorem prover.

Monoids

Inductive step Let us denote an element raised to n a bounded or scolemmized instance of its corresponding type, where n ∈ N0. However, as was the case in the proof of Theorem 27, exhaustive analysis shows their equivalence. Inherent in their definition is the concept of divisibility: we say that a number i "divides" another number j. where i,j and k are all positive natural numbers.1 2. 1In the case of lcm, it is imperative that neither i nor j be zero.

Mean Square Error

Permutations

In International Joint Conference on Autonomous Agents and Multiagent Systems, pages 183–190, New York, NY, USA, 2005. In International Joint Conference on Autonomous Agents and Multiagent Systems, pages 191–198, New York, NY, USA, 2005. InInternational Conference on Computer Safety, Reliability and Security, volume 5219 of Lecture Notes in Computer Science, pages 332–345.

Gambar

Figure 1.1: An example of distributed consensus, which fits a local-global relation. See Section 3.1 for details.
Figure 1.2: An example of distributed path analysis, which fits a local-global relation
Figure 1.3: An example of distributed sorting, which fits a local-global relation. See Chap- Chap-ter 5 for details.
Figure 1.4: An example of distributed average consensus, which fits a local-global relation.
+7

Referensi

Dokumen terkait

2.3 Research hypotheses Starting from the specialized literature regarding the influence of the financial distress risk emergence on the capital market investors’ reaction, reflected