Download presentation
Presentation is loading. Please wait.
1
Faculty Of Computer Science Simon Fraser University Cmpt 880 presentation An Abstract Communication Model Uwe Glasser, Yuri Gurevich and Margus Veanes Presented by: Xianghua Jiang
2
Agenda Origin of the Abstract Communication Model (ACM) Basic Abstract State Machine (ASM) Parallel ASM Distributed ASM ASML Simulation of Agents ACM Reuse of ACM Summary
3
ORIGIN OF ACM The model was developed in the process of specifying UPnP architecture. UPnP is an industrial standard for dynamic peer to peer networking. The model is based on distributed abstract state machine (DASM). The model is implemented in the specification language Asml.
4
BASIC ASMs A basic ASM consists of a basic ASM program together with a collection states (the legal states of the ASM) and subcollection of initial states. Basic ASMs are sequential algorithm.
5
ASM STATES States of ASM are first-order structures. Syntax of the state Semantic of the state
6
SYNTAX OF THE STATE Vocabulary is a collection of function symbols and relation symbols (or predicates). Every vocabulary contains: Equality Sign “=“; Logic symbols true, false, undef; Standard propositional connetives.
7
SEMANTICS OF STATE A state X of a given vocabulary Y is a nonempty set S (base set of X), together with interpretations of the function symbols and relation symbols in Y over S.
8
SEMANTICS OF STATE A state X of a given vocabulary Y is a nonempty set S (base set of X), together with interpretations of the function symbols and relation symbols in Y over S. Function: f(x1, ……, xn) Function F: Sx…xS S Relation: p(x1, ……, xn) Relation P Sx…xS
9
ASM STATES UPDATE State is a kind of memory. A location of a state A is a pair (f, a) The content of the location is y = f(a). An update of state A is a pair (l, y’) To fire the update (l, y’), replace the old value y at location l with the new value y’.
10
SEQUENCIAL ALGORITHM Let A be a sequential algorithm A set S(A) whose elements will be called states of A A subset L(A) of S(A) whose elements will be called initial states of A A Map TA: S(A) -> S(A) that will be called the one-step transformation of A
11
SEQUENCIAL ALGORITHM Let A be a sequential algorithm A set S(A) whose elements will be called states of A A subset L(A) of S(A) whose elements will be called initial states of A A Map TA: S(A) -> S(A) that will be called the one-step transformation of A A run (or computation) of A is a sequence X0, X1, X2,……. Where X0 is an initial state and every Xi+1 = TA (Xi)
12
SEQUENCIAL ALGORITHM IN BASIC ASM The run of a machine is a series of states and state transitions that results from applying operations to each state in succession.
13
THE RUN OF ASM Vocabulary: mode, orders, balance 3 states: S1, S2, S3 2 transitions: Initialize,Process All Orders
14
THE RUN OF ASM
15
BASIC ASM PROGRAMS An ASM program: entire definition of a machine, including the names of its state variables. Control logic is the portion of program made up of the rules governing the state transitions. A update rule R: f(e1,….ej) := e0 A conditional rule R: if e then R1 else R2 A do-in-parallel rule R: do in – parallel R1 R2
16
PARALLEL ASMS Parallel ASMs are parallel algorithms. Example: the ages of Alice, Bob and Ted are incremented on a yearly basis from the year 2000 to 2009.
17
DISTRIBUTED ASMS A distributed ASM (DASM) involves a collection of agents. Global states Move A single computation step of an individual agent Partially ordered runs
18
FROM ASM TO ASML Block structure Type Class Structure Method Variable
19
FROM ASM TO ASML Block structure indentation to indicate block structure Type Class, structure, etc. Class Inheritance, Overloading Method name( parameter1 as Type,...parametern as Type ) as Type Variable Set and Map
20
SET AND MAP VARIABLE Set A set is an unordered collection of distinct values that are of the same type Map Like arrays, maps have a set of unique keys and a set of values associated with those keys
21
SET AND MAP VARIABLE Set A set is an unordered collection of distinct values that are of the same type Set with enumerated elements var s = {1, 2, 3, 4} Map Like arrays, maps have a set of unique keys and a set of values associated with those keys Map declaration var phoneNumber as Map of String to Integer
22
SIMULATION OF AGENTS Agents declaration Class Agent Var Agents as Set of Agent = {}
23
SIMULATION OF AGENTS Agents declaration Class Agent Var Agents as Set of Agent = {} Mailbox and InsertMessage Method type Message Class Agent program () Var mailbox as Set of Message = {} InsertMessage( m as Message) mailbox(m) := true
24
SIMULATION OF AGENTS Agents declaration Class Agent Var Agents as Set of Agent = {} Mailbox and InsertMessage Method type Message Class Agent program () Var mailbox as Set of Message = {} InsertMessage( m as Message) mailbox(m) := true RunAgents forall a in chooseSubset(Agents) program(a)
25
ABSTRACT COMMUNICATION MODEL Class COMMUNICATOR extends Agent Class APPLICATION extends Agent
26
ABSTRACT COMMUNICATION MODEL Message Transformation Message Routing Delivery Condition Message Delivery
27
MESSAGE TRANSFORMATION Method: ResolveMessage Variable: addressTable
28
MESSAGE TRANSFORMATION Method: ResolveMessage type Message Class COMMUNICATOR ResoveMessage (m as MESSAGE) as Set of MESSAGE Variable: addressTable type Address Class COMMUNICATOR Var addressTable as Map of ADDRESS to Set of Address
29
MESSAGE TRANSFORMATION Message transformation destination (m as MESSAGE) as ADDRESS Class COMMUNICATOR Transform (m as MESSAGE, dest as ADDRESS) as MESSAGE ResolveMessage (m as MESSAGE) as Set of MESSAGE Return {Transform(m, a) | a in addressTable(destination(m))}
30
MESSAGE ROUTING Recipient method routingTable variable
31
MESSAGE ROUTING Recipient method Class COMMUNICATOR Recipient (m as MESSAGE) as Agent? routingTable variable Class COMMUNICATOR var routingTable as Map of Address to Agent
32
MESSAGE ROUTING Recipient method Class COMMUNICATOR Recipient (m as MESSAGE) as Agent? return routingTable (destination(m)) routingTable variable Class COMMUNICATOR var routingTable as Map of Address to Agent
33
DELIVER CONDITIONS Predicate ReadyToDeliver Network latency, security parameters and resource limitations, etc. Class COMMUNICATOR external ReadyToDeliver(m as MESSAGE) as Boolean
34
MESSAGE DELIVERY Class COMMUNICATOR Program() = Let availableMsgs = { m | m in me.mailbox where ReadyToDeliver(m)} Let selectedMsgs = chooseSubset (availableMsgs) forall msg in selectedMsgs me.mailbox(msg) := false//delete the message //resolve the message let resolvedMesgs = ResolveMessage (msg) forall m in resolveMesgs let a = Recipient(m) if a <> undef then//if recipient found InsertMessage(a, m)//forward the message else skip. In order to minimize the number of colors needed for a coloring of paths for pairs of vertices in,we can divide the path-types in groups such that the total length of the paths for path-types in a group is at most 2D and we have as few groups as possible. Here we only deal with path-types (h, v) with h > v. This implies that for any path-length L there are (L-1)/2 items to pack.
35
REUSE OF THE ACM Reuse of the ACM XLANG is a real-life application of distributed abstract machines XLANG is an XML based formal language that can be used to define the data and networking protocols of automated business process.
36
SUMMARY ASM are able to simulate every sequential algorithms in the step for step manner. DASM involves a collection of agents. Agents may perform their computation steps concurrently with the partially ordered runs. ASML is an industrial strength language to represent ASMs in industrial environment. Abstract communication model is based on DASM, implemented in ASML. The generality of the model has been confirmed by its reuse for different architectures.
37
Thank You!
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.