1.27k likes | 1.84k Views
Wave Technology. Table of Contents. Introduction Getting Started with WAVE Programming The WAVE Language Rules Basic Space Navigation Mechanisms in WAVE Graphical representation of wave: SPREAD DIAGRAMS Wave and sequential programming Modeling inter-process communications.
E N D
Table of Contents • Introduction • Getting Started with WAVE Programming • The WAVE Language • Rules • Basic Space Navigation Mechanisms in WAVE • Graphical representation of wave: SPREAD DIAGRAMS • Wave and sequential programming • Modeling inter-process communications
Table of Contents • Introduction • Getting Started with WAVE Programming • The WAVE Language • Rules • Basic Space Navigation Mechanisms in WAVE • Graphical representation of wave: SPREAD DIAGRAMS • Wave and sequential programming • Modeling inter-process communications
Introduction • Wave is a special model, language and technology for highly parallel, distributed and cooperative systems. • Originally designed for dealing with virtual worlds represented as dynamical Knowledge Networks. • Based on recursive programs (waves) spreading, replicating, and splitting in active dynamic knowledge networks.
Wave Technology • Wave Language • Wave Interpreter • Interface to the Internet (UDP/IP) • Interface to Unix (Solaris/Linux) • A good collection of applications
WAVE Interpreter (NI) WAVE Kernel NI WAVE Protocol UDP/IP UNIX OS NI Network WAVE Architecture in Networks
WAVE Applications WAVE Knowledge Network Physical Network (Internet) Wave Technology • Maps the Internet into a simple, seamless, productive global info infrastructure (middleware) • Allows rapid development of cooperative, distributed applications over the info infrastructure
Layered Organization of WAVE WAVE Application Layer Dynamic Track Layer Knowledge Network Layer Network (Internet) Layer
Wave Salient Features • Cooperative, distributed activities (programming) • Spatial navigation with high parallelism • Dynamic distributed control • High-level abstraction (Free from implementation details) • Operating with information and physical systems
Applications Computing grid Traffic management (Data, Road and Air) Intelligent networks Distributed gaming Applications Distributed robotics Service & security management Distributed simulation (e.g. battle-field)
Table of Contents • Introduction • Getting Started with WAVE Programming • The WAVE Language • Rules • Basic Space Navigation Mechanisms in WAVE • Graphical representation of wave: SPREAD DIAGRAMS • Wave and sequential programming • Modeling inter-process communications
Creation of elementary networks • Creating a single node:CREATE ( DIRECT # a ) Short: CR (@#a) CR(@#a) a
Creation of elementary networks • Adding node b connected to node a by an unoriented link p:DIRECT # a. CREATE ( p # b ) Short: @#a.CR(p#b) b CR(p#b) p @#a.CR(p#b) a
Creation of elementary networks • Adding node c connected to node a by an oriented link p:DIRECT # a. CREATE ( +q # c ) Short: @#a.CR(+q#c) c CR(+q#c) q @#a.CR(+q#c) a
Creation of elementary networks • Incremental creation of the entire network by an integral templateCREATE ( DIRECT # a. p # b, + q # c ) Short: CR ( @#a. p#b, +q#c ) CR ( @#a. p#b, +q#c ) a CR (+q#c) b c CR (p#b) q p
Elementary data retrieval from a network • Printing neighbors of node a in parallel on different terminals DIRECT #a. ANY # ANY. TERMINAL = CONTENT Short: @#a. #. T = C @#a. #, T=C a #.T=C b c #.T=C q p T=C T=C c b Terminal 1 Terminal 2
Elementary data retrieval from a network • Returning results to node a before printing DIRECT #a. ANY # ANY. Ftransit = CONTENT. LINK # PREDECESSOR. TERMINAL = Ftransit Short: @#a. #.F=C.L#P.T=F T=F T=F @#a. #.F=C.L#P.T=F a #.F=C.L#P.T=F #.F=C.L#P.T=F c b c b q Terminal p L#P.T=F F=c L#P.T=F F=b T=C T=C
Collecting distributed data in one list • Collecting neighbors into a single list with its subsequent printing DIRECT # a. SEQUENCE ( ( ANY # ANY. Ftransit = CONTENT. Link # PREDECESSOR. Nlist & Ftransit ), TERMINAL = Nlist ) Short: @#a. SQ( (#. F=C. L#P. N&F), T=N )
@#a. SQ( (#. F=C. #P. N&F), T=N ) Terminal T = N T= N 2 SQ b, c 1 N&F N&F SQ((#.F=C.#P.N&F), T=N #.F=C.#P.N&F #.F=C.#P.N&F a #P.N&F #P.N&F c F=C.#P.N&F b F=C.#P.N&F F=C F=C F = c @#a.SQ((#.F=C.#P.N&F), T=N F = b
Procedures as network nodes • Fprocedure = { DIRECT # a. ANY # ANY. TERMINAL = CONTENT}. CREATE ( DIRECT # Fprocedure ). DIRECT # b;c. CREATE ( f # PREDECESSOR ) Short: Fp = {@#a. #. T=C}. CR(@#Fp). @#b;c. CR(f#P) CR(@#{@#a. #. T=C}). @#b;c. CR(f#P)
Procedures as network nodes • CR(@#{@#a. #. T=C}). @#b;c. CR(f#P) • Activating the procedure: DIRECT # c. f # ANY. ^CONTENT Short: @#c. f#. ^C @#c.f#.^C a #.T=C #.T=C c T=C b @a.#.T=C T=C f#. ^C ^C f b f c @#a.#.T=C Teminal 2 Teminal 1
Creating arbitrary networks CREATE ( DIRECT # b. Freturn = ADDESS. s # d. ( r # a. P # Freturn), ( t # c. q # Freturn ) ) CR(@#b. F=A.s#d. (r#a.p#F), (t#c.q#F)) b p q a s c t r d
Creating arbitrary networks CR(@#b. F=A.s#d. (r#a.p#F), (t#c.q#F)) CR(@#b. F=A.s#d. (r#a.p#F), (t#c.q#F)) F = A CR(s#d. (r#a.p#F), (t#c.q#F)) F = [b] b p q CR(p#F)F = [b] CR(p#F)F = [b] a s c t r d CR(r#a.p#F)F = [b] CR(r#a.p#F)F = [b]
Following a path in a network • Following an explicit path in the network DIRECT # a. P # ANY. q # ANY. S # ANY. TERMINAL = CONTENT Short: @#a. p#. q#. s#. T =C b q#.s#.T=C p q p#.q#.s#.T=C a s c @#a.p#.q#.s#.T=C s#.T=C t r d T=C Terminal
Table of Contents • Introduction • Getting Started with WAVE Programming • The WAVE Language • Rules • Basic Space Navigation Mechanisms in WAVE • Graphical representation of wave: SPREAD DIAGRAMS • Wave and sequential programming • Modeling inter-process communications
Main knowledge network components Individual node & link names (contents) Node a1 loves age a1 Peter Mary 18 a1 friends Absolute node addresses Oriented links John a1 Nonoriented links
Syntax • WAVE {{Move,}.} • Move Dat Op Dat | [Rule] (WAVE) • Rule SQ | OS | OP | AS | AP | RP | WT | ID |CR | RL • Dat {string;} | N {L_D} | f {L_D} | C | A | P | S | T • Op # | ## | ~ | /~ | == | /= | < | <= | > | >= | ! | ^ | = | + | - | * | / | & | : | :: | | | % | ?
Table of Contents • Introduction • Getting Started with WAVE Programming • The WAVE Language • Rules • Basic Space Navigation Mechanisms in WAVE • Graphical representation of wave: SPREAD DIAGRAMS • Wave and sequential programming • Modeling inter-process communications
Rules • Branching Rules • Repetition • Wait • Protecting Shared Resources • Create • Release • Synchronized Versus Nonsynchronized Rules
Rules • Branching Rules • Repetition • Wait • Protecting Shared Resources • Create • Release • Synchronized Versus Nonsynchronized Rules
Branching Rules • SEQUENCE (SQ) • OR_SEQUENTIAL (OS) • AND_SEQUENTIAL (AS) • OR_PARALLEL (OP) • AND_PARALLEL (AP) • RANDOM (RD)
SEQUENCE (SQ) SN R3 SN R2 SN R1 w3 w2 w1 Start Sequential:SQ(w1. w2. w3 )
SEQUENCE (SQ) F = 3. SQ ( F – 5, F + 2. T = F ) F = 3 SQ ( F – 5, F + 2. T = F ) SQ ( ( F – 5. T = F ), ( F + 2, T = F ) ) F – 5. T = F F = 3 – 5 = -2 PRINT: -2 F + 2. T = F PRINT: 5 F = 3 + 2 = 5
SEQUENCE (SQ) F = 3. SQ ( F – 5, F + 2). T = F F = 3 SQ ( F – 5, F + 2). T = F SQ ( F – 5, F + 2 ) F – 5 F = 3 – 5 = -2 F + 2. T = F F = 3 + 2 = 5 PRINT: -2 PRINT: 5 PRINT: 5 PRINT: -2
OR_SEQUENTIAL (OS) w1 SN R4 SN R2 w4 w2 Start w3 SN R3 OR_SEQUENTIAL(w1, w2, w3); w4
OR_SEQUENTIAL (OS) OR_SEQUENTIAL ( ( N == 1. p # b ), STAY ). N + 5
AND_SEQUENTIAL (AS) w1 Start FALSE AND_SEQUENTIAL(w1, w2, w3)
AND_SEQUENTIAL (AS) N = { + #. Nn > 0 }; { #. T = C } AND_SEQUENTIAL ( ^N )
OR_PARALLEL (OP) w1 SN R4 TRUE TRUE SN R2 w4 w2 Start w3 SN R3 OR_PARALLEL(w1, w2, w3); w4
OR_PARALLEL (OP) FALSE w1 FALSE FALSE w2 Start w3 FALSE OR_PARALLEL(w1, w2, w3); w4
AND_PARALLEL (OP) w1 SN R4 FALSE SN R2 w4 w2 Start w3 SN R3 AND_PARALLEL(w1, w2, w3); w4
AND_PARALLEL (AP) TRUE SN R1 SN R4 w4 w1 TRUE SN R2 SN R4 w4 w2 Start TRUE w3 SN R3 SN R4 TRUE w4 AND_PARALLEL(w1, w2, w3); w4
AND_PARALLEL (AP) AND_PARALLEL ( ANY # ANY. Ntest == None ). ^Ftail
RANDOM (RN) RN ( @ #. N12 + 100 )
Rules • Branching Rules • Repetition • Wait • Protecting Shared Resources • Create • Release • Synchronized Versus Nonsynchronized Rules
Repetition REPEAT ( + ANY # ANY ). TERMINAL = CONTENT N = 2. REPEAT ( N /= 5 )