wave technology. table of contents a.introduction b.getting started with wave programming c.the wave...
TRANSCRIPT
![Page 1: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/1.jpg)
Wave Technology
![Page 2: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/2.jpg)
2
Table of Contents
A. IntroductionB. Getting Started with WAVE ProgrammingC. The WAVE LanguageD. RulesE. Basic Space Navigation Mechanisms in WAVEF. Graphical representation of wave: SPREAD
DIAGRAMSG. Wave and sequential programmingH. Modeling inter-process communications
![Page 3: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/3.jpg)
3
Table of Contents
A. IntroductionB. Getting Started with WAVE ProgrammingC. The WAVE LanguageD. RulesE. Basic Space Navigation Mechanisms in WAVEF. Graphical representation of wave: SPREAD
DIAGRAMSG. Wave and sequential programmingH. Modeling inter-process communications
![Page 4: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/4.jpg)
Session 1: Introduction
![Page 5: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/5.jpg)
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.
![Page 6: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/6.jpg)
Wave Technology
• Wave Language• Wave Interpreter• Interface to the Internet (UDP/IP)• Interface to Unix (Solaris/Linux)• A good collection of applications
![Page 7: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/7.jpg)
WAVE Architecture in Networks
WAVE Kernel
UDP/IP
WAVE Protocol
UNIX OS
WAVE Interpreter (NI)
NI
NI
Network
![Page 8: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/8.jpg)
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
WAVE Knowledge Network
Physical Network (Internet)
WAVE Applications
![Page 9: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/9.jpg)
Layered Organization of WAVE
WAVE Application Layer
Dynamic Track Layer
Knowledge Network Layer
Network (Internet) Layer
![Page 10: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/10.jpg)
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
![Page 11: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/11.jpg)
ApplicationsComputing grid
Intelligent networks
Service & security management
Traffic management (Data, Road and Air)
Distributed gaming
Distributed robotics
Distributed simulation (e.g. battle-field)
Applications
![Page 12: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/12.jpg)
12
Table of Contents
A. IntroductionB. Getting Started with WAVE ProgrammingC. The WAVE LanguageD. RulesE. Basic Space Navigation Mechanisms in WAVEF. Graphical representation of wave: SPREAD
DIAGRAMSG. Wave and sequential programmingH. Modeling inter-process communications
![Page 13: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/13.jpg)
Session 2: Getting Started with WAVE Programming
![Page 14: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/14.jpg)
Creation of elementary networks
• Creating a single node:CREATE ( DIRECT # a )
Short: CR (@#a)
a
CR(@#a)
![Page 15: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/15.jpg)
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)
CR(p#b)
p
b
@#a.CR(p#b)a
![Page 16: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/16.jpg)
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)
CR(+q#c)
q
c
@#a.CR(+q#c)a
![Page 17: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/17.jpg)
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 )
aCR ( @#a. p#b, +q#c )
p
b
CR (p#b)
c
CR (+q#c)
q
![Page 18: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/18.jpg)
Elementary data retrieval from a network
• Printing neighbors of node a in parallel on different terminalsDIRECT #a. ANY # ANY. TERMINAL = CONTENT
Short: @#a. #. T = C
a @#a. #, T=C
p
b
#.T=C
c
#.T=C
q
T=CT=C
b c
Terminal 1 Terminal 2
![Page 19: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/19.jpg)
• Returning results to node a before printingDIRECT #a. ANY # ANY. Ftransit = CONTENT. LINK #
PREDECESSOR. TERMINAL = FtransitShort: @#a. #.F=C.L#P.T=F
a@#a. #.F=C.L#P.T=F
p
b
#.F=C.L#
P.T=F
c
#.F=C.L#P.T=F
q
T=CT=C
L#P.T=FF=b
L#P.T=FF=c
T=FT=F
bc
Terminal
Elementary data retrieval from a network
![Page 20: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/20.jpg)
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 )
![Page 21: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/21.jpg)
@#a. SQ( (#. F=C. #P. N&F), T=N )
a
c
2
1
b
SQ
F=CF=C @#a.SQ((#.F=C.#P.N&F), T=N
SQ((#.F=C.#P.N&F), T=N#.F=C.#P.N&F #.F=C.#P.N&F
F=C.#P.N&FF=C.#P.N&F
F = cF = b
#P.N&F#P.N&F
N&FN&F
T= NT = N
Terminal
b, c
![Page 22: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/22.jpg)
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)
![Page 23: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/23.jpg)
Procedures as network nodes• CR(@#{@#a. #. T=C}). @#b;c. CR(f#P)• Activating the procedure:
DIRECT # c. f # ANY. ^CONTENTShort: @#c. f#. ^C
a
b c
@#a.#.T=C
@#c.f#.^C
f#. ^C
^Cf
f
@a.#.T=C
#.T=C #.T=C
T=CT=C
Teminal 1Teminal 2
b c
![Page 24: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/24.jpg)
Creating arbitrary networksCREATE (
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))
a
b
c
p
s
q
tr
d
![Page 25: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/25.jpg)
Creating arbitrary networksCR(@#b. F=A.s#d. (r#a.p#F), (t#c.q#F))
d
a
b
c
p
s
q
tr
CR(@#b. F=A.s#d. (r#a.p#F), (t#c.q#F))
CR(s#d. (r#a.p#F), (t#c.q#F))F = [b]
F = A
CR(r#a.p#F)F = [b]
CR(r#a.p#F)F = [b]
CR(p#F)F = [b]
CR(p#F)F = [b]
![Page 26: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/26.jpg)
Following a path in a network
• Following an explicit path in the networkDIRECT # a.P # ANY. q # ANY. S # ANY.TERMINAL = CONTENT
Short: @#a. p#. q#. s#. T =C
d
a
b
c
p
s
q
tr
@#a.p#.q#.s#.T=Cp#.q#.s#.T=C
q#.s#.T=C
s#.T=C
T=C
Terminal
![Page 27: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/27.jpg)
27
Table of Contents
A. IntroductionB. Getting Started with WAVE ProgrammingC. The WAVE LanguageD. RulesE. Basic Space Navigation Mechanisms in WAVEF. Graphical representation of wave: SPREAD
DIAGRAMSG. Wave and sequential programmingH. Modeling inter-process communications
![Page 28: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/28.jpg)
Session 3: The WAVE Language
![Page 29: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/29.jpg)
Main knowledge network components
18Peter Mary
John
loves agea1a1
a1
a1
Node
Absolute node addresses
friends
Nonoriented links
Oriented links
Individual node & link names (contents)
![Page 30: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/30.jpg)
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 # | ## | ~ | /~ | == | /= | < | <= | > |
>= | ! | ^ | = | + | - | * | / | & | : | :: | | | % | ?
![Page 31: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/31.jpg)
31
Table of Contents
A. IntroductionB. Getting Started with WAVE ProgrammingC. The WAVE LanguageD. RulesE. Basic Space Navigation Mechanisms in WAVEF. Graphical representation of wave: SPREAD
DIAGRAMSG. Wave and sequential programmingH. Modeling inter-process communications
![Page 32: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/32.jpg)
Session 4: Rules
![Page 33: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/33.jpg)
33
Rules
• Branching Rules• Repetition• Wait• Protecting Shared Resources• Create• Release• Synchronized Versus Nonsynchronized Rules
![Page 34: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/34.jpg)
34
Rules
• BRANCHING RULES• Repetition• Wait• Protecting Shared Resources• Create• Release• Synchronized Versus Nonsynchronized Rules
![Page 35: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/35.jpg)
Branching Rules
• SEQUENCE (SQ)• OR_SEQUENTIAL (OS)• AND_SEQUENTIAL (AS)• OR_PARALLEL (OP)• AND_PARALLEL (AP)• RANDOM (RD)
![Page 36: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/36.jpg)
SEQUENCE (SQ)
SN R1
SN R2
SN R3
Start
w1w2 w3
Sequential: SQ( w1. w2. w3 )
![Page 37: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/37.jpg)
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: -2F + 2. T = F
F = 3 + 2 = 5 PRINT: 5
![Page 38: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/38.jpg)
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
PRINT: -2
F + 2. T = F
F = 3 + 2 = 5
PRINT: 5
PRINT: 5
PRINT: -2
![Page 39: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/39.jpg)
OR_SEQUENTIAL (OS)
SN R2
SN R4
Start
w2w4
OR_SEQUENTIAL(w1, w2, w3); w4
w1
w3
SN R3
![Page 40: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/40.jpg)
OR_SEQUENTIAL (OS)
OR_SEQUENTIAL ( ( N == 1. p # b ), STAY ). N + 5
![Page 41: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/41.jpg)
AND_SEQUENTIAL (AS)
Start
AND_SEQUENTIAL(w1, w2, w3)
w1
FALSE
![Page 42: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/42.jpg)
AND_SEQUENTIAL (AS)N = { + #. Nn > 0 }; { #. T = C }
AND_SEQUENTIAL ( ^N )
![Page 43: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/43.jpg)
OR_PARALLEL (OP)
SN R2
SN R4
Start
w2w4
OR_PARALLEL(w1, w2, w3); w4
w1
w3
SN R3
TRUETRUE
![Page 44: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/44.jpg)
OR_PARALLEL (OP)
Start
w2
OR_PARALLEL(w1, w2, w3); w4
w1
w3
FALSEFALSE
FALSE
FALSE
![Page 45: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/45.jpg)
AND_PARALLEL (OP)
SN R2
SN R4
Start
w2w4
AND_PARALLEL(w1, w2, w3); w4
w1
w3
SN R3
FALSE
![Page 46: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/46.jpg)
AND_PARALLEL (AP)
SN R2
SN R4Start
w2w4
AND_PARALLEL(w1, w2, w3); w4
w1
w3
SN R3 TRUE
TRUE
SN R1
TRUE
TRUE
SN R4
SN R4
w4
w4
![Page 47: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/47.jpg)
AND_PARALLEL (AP)
AND_PARALLEL ( ANY # ANY. Ntest == None ). ^Ftail
![Page 48: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/48.jpg)
RANDOM (RN)RN ( @ #. N12 + 100 )
![Page 49: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/49.jpg)
49
Rules
• Branching Rules• REPETITION• Wait• Protecting Shared Resources• Create• Release• Synchronized Versus Nonsynchronized Rules
![Page 50: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/50.jpg)
RepetitionREPEAT ( + ANY # ANY ). TERMINAL = CONTENT
N = 2. REPEAT ( N /= 5 )
![Page 51: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/51.jpg)
51
Rules
• Branching Rules• Repetition• WAIT• Protecting Shared Resources• Create• Release• Synchronized Versus Nonsynchronized Rules
![Page 52: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/52.jpg)
Wait
WAIT ( DIRECT # ANY. NN = 1. F = 2 ). wave_re
![Page 53: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/53.jpg)
53
Rules
• Branching Rules• Repetition• Wait• PROTECTING SHARED RESOURCES• Create• Release• Synchronized Versus Nonsynchronized Rules
![Page 54: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/54.jpg)
54
Rules
• Branching Rules• Repetition• Wait• Protecting Shared Resources• CREATE• Release• Synchronized Versus Nonsynchronized Rules
![Page 55: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/55.jpg)
55
Rules
• Branching Rules• Repetition• Wait• Protecting Shared Resources• Create• RELEASE• Synchronized Versus Nonsynchronized Rules
![Page 56: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/56.jpg)
56
Rules
• Branching Rules• Repetition• Wait• Protecting Shared Resources• Create• Release• Synchronized Versus Nonsynchronized Rules
![Page 57: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/57.jpg)
RulesSummary:• Rules are important in WAVE• Branching Rules: SQ, OS, AS, OP, AP, RN• Repetition, Wait, Protecting Shared
Resources (INDIVISIBLE), Create, Release are usually used in WAVE and Synchronized Versus Nonsynchonized help us more understand about rules.
![Page 58: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/58.jpg)
58
Table of Contents
A. IntroductionB. Getting Started with WAVE ProgrammingC. The WAVE LanguageD. RulesE. Basic Space Navigation Mechanisms in WAVEF. Graphical representation of wave: SPREAD
DIAGRAMSG. Wave and sequential programmingH. Modeling inter-process communications
![Page 59: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/59.jpg)
Session 5: Basic Space Navigation Mechanisms in WAVE
![Page 60: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/60.jpg)
Breath-First Parallel Spread
• Start in some node as a current node• Repeat from all current nodes:
– If the current node is not marked, mark it• Otherwise, halt this branch
– Hop through all links (broadcast) to neighboring nodes (excluding the predecessor node from which the current node has been reached)
– Every node reached becomes a current node
![Page 61: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/61.jpg)
Exemplary network topology
c
b
a t
e
g
c
b
d
a t
e
gr
p q
t
s
s
u
q
p
![Page 62: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/62.jpg)
Repetitive SpreadDIRECT # c.REPEAT (
INDIVISIBLE (Node_mark == NONE. Node_mark =1).TERMINAL = CONTENT.ANY ## ANY
) c
bd
a t
e
g
rt s
qp
q
![Page 63: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/63.jpg)
Recursive Spread
Fbreadth_spread = { INDIVISIBLE ( Node_mark==NONE. Node_mark =
1) .TERMINAL = CONTENT .ANY # ANY .^ Fbreadth_spread}.DIRECT # c.^ Fbreadth_spread
![Page 64: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/64.jpg)
Limited Depth SpreadDIRECT # a . Fdepth_limit = 2 .REPEAT (
Fcurrent_depth + 1 .Fcurrent_depth <= Fdepth_limit .INDIVISIBLE ( Node_mark == NONE. Node_mark
= 1) .TERMINAL = CONTENT .ANY # ANY
)
c
e
t s
d d
q
![Page 65: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/65.jpg)
Spread Through All LinksDIRECT # c.REPEAT (
OR_SEQUENTIAL (INDIVISIBLE (
Node_mark == NONE. Node_mark = 1 .TERMINAL = LINK) ,( PREDECESSOR > ADDRESS . TERMINAL = LINK. DONE !)
) .ANY ## ANY
)
![Page 66: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/66.jpg)
Evolent Spread
o Start in some node as a current nodeo Repeat from all current nodes:
– If the current node is not in the mobile list–Append the node's name to the mobile list
• Otherwise, halt this branch– Broadcast to all neighboring nodes (excluding
the predecessor node)– Every node reached becomes a current node
![Page 67: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/67.jpg)
Repeatitive spread
DIRECT # c .REPEAT (
CONTENT /~ Fpassed_nodes .Fpassed_nodes & CONTENT .TERMINAL = CONTENT .ANY ## ANY
)
![Page 68: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/68.jpg)
Evolvent tree
c
d b e
b a d a g t
a b a d f g
t sq
s r s p p q
p p r ru u
![Page 69: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/69.jpg)
Parallel Breadth First Synchronous Spread
• Start in some node as a current node• Repeat from all current nodes
– Wait for full completion of the following processes• If the current node is not marked, mark it
–Otherwise, halt this branch• Hop through all links (broadcast) to
neighboring nodes (excluding the predecessor node)
• Every node reached become a current node
![Page 70: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/70.jpg)
Using Nested Rules
Fnext = { TERMINAL = CONTENT . ANY ## ANY . INDIVISIBLE ( Node_mark == NONE. Node_mark = 1 )} .DIRECT # c. Node_mark = 1 .WAIT (
...WAIT ( ^Fnext). ^Fnext...
). ^Fnext). ^Fnext
![Page 71: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/71.jpg)
Breadth-first synchronous spread
Step 1
Step2
c
d b e
a g t
t q s
p p q
![Page 72: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/72.jpg)
Sequential breadth-first, or spiral, spread
spiral
c
d b e
a g f
t q s
p p q
![Page 73: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/73.jpg)
Depth-First Sequential Spread
• Define the depth-first spread procedure as:– If current node is not marked, mark it, otherwise halt– Do the following sequentially for all links in the current node:
• Hop through a new link to a new current node• Activate the depth-first spread procedure
– Start in node c– Activate the depth-first spread procedure
![Page 74: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/74.jpg)
Fdepth_first_spread ={ INDIVISIBLE ( Node_mark == NONE.
Node_mark = 1 ) . TERMINAL = CONTENT . SEQUENCE (ANY # ANY. ^Fdepth_first_spread
)} .DIRECT # c. ^Fdepth_first_spread
![Page 75: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/75.jpg)
c
d e
a
b
g
t
SQ
SQ
SQ
SQ
SQ
SQ
SQ
t
r
p
s q
q s
pu
q
qs
Fig. 4.8. Depth-first sequential spread
![Page 76: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/76.jpg)
CONTINUOUS SPREAD
LOOPING MODE• Start in some node and set up a marking color• Repeat from the starting node• Do the two steps sequentially from the starting node, which
is also a current node:1. Repeat from all current nodes
If the current node is not marked with the color, mark it with the colorHop through all links (broadcast) to neighboring nodes (excluding the predecessor node)Every node reached becomes a current node
2. Make a delay in the starting node and change the color
![Page 77: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/77.jpg)
c
d e
a g t
t …
r …n ... … q
q
… s
b
Continuous spread
![Page 78: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/78.jpg)
Pipeline Mode
• Define the pipeline spread procedure as:– Set up a new, stronger, spread color– Do the following two parts independently and in
parallel1. Repeat from the current node
– If the current node’s mark is weaker than the spead color, mark the current node with the spread color, otherwise halt
– Broadcast though all links to neighboring nodes (except the predecessor node), each becoming current node
2. Activate the pipeline spread procedure after a delay
– Start in node c as a current node– Activate the pipeline spread procedure
![Page 79: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/79.jpg)
79
Table of Contents
A. IntroductionB. Getting Started with WAVE ProgrammingC. The WAVE LanguageD. RulesE. Basic Space Navigation Mechanisms in WAVEF. Graphical representation of wave: SPREAD
DIAGRAMSG. Wave and sequential programmingH. Modeling inter-process communications
![Page 80: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/80.jpg)
Session 6: Graphical representation of wave: SPREAD DIAGRAMS
![Page 81: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/81.jpg)
Spread diagram
1. Basic Components:
SNR m Arbitrary move
AS
…
Rules and rule –
controller moves
1.1 Halts
Link Ni Fj Spatial variable
![Page 82: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/82.jpg)
Spread diagram
2. Structuring:m1.m2,(m3.m4).m5
m1
m2 m3
m4
m1.(m2,(m3.m4)).m5
SNR1
SNR3
SNR2
m5
m1
SNR1m234
m2 m3
m4
SNR1*
SNR3*
SNR2*
SNR3m5
![Page 83: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/83.jpg)
Spread diagram
3. More details:
F=N1
a#
N2=F
SNR0 N1
F
N1
F
N2
F
m1
SNR1
m2
SNR2
m3
F=N1.a#.N2=F(a)
m1
m2
SNR1
SNR2
m1..m2
(c)
m1
m2
m3
SNR1
SNR2
m1.m2,.m3
(d)
F>0
F=1
m4
SNR1
F
F
m2
SNR2
m3
SNR3
F=1.F>0.F!.=m4(b)
F!
m1
F
![Page 84: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/84.jpg)
Spread diagram
4. Parallel processes in Distributed data:
m1 m3m2
SNR1
SNR3
SNR2
m4 m5
m1, m2,m3. m4, m5
m1 m3m2
SNR1
SNR3
(m1.m4, m5),(m2.m4,m5) , (m3.m4,m5)
m5 m4 m5 m4 m5m4
SNR21 SNR22 SNR23
![Page 85: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/85.jpg)
m1
m2
m3
SNR0
SNR1
SNR2
SNR3
m1.m2.m3
m1
m2 m2 m2
m3SNR2
SNR3
m1.m2, m2,m2.m3
m1
m2 m2 m2
SNR3m1.(m2(m3,m3,m3)), (m2.(m3,m3,m3)), (m2.(m3,m3,m3))
m3 m3 m3 m3 m3 m3 m3 m3 m3
![Page 86: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/86.jpg)
m1
OP
m1.OP(m2,m3.m4).m5
m2 m3
m4SNR2
SNR3
SNR4
SNR1
m5
m1
OP
m1.OP((m2.m4),(m3.m4)).m5
m2
m4
SNR21
SNR31
SNR4m5
m3
m4
SNR22
SNR32branch1 branch2
OP
m1
m4
m2
m4 m4
SNR31
m3
m4 m4 m4
SNR32
SNR4
m5
m1.OP((m2.m4,m4,m4), (m3.m4,m4,m4)).m5
![Page 87: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/87.jpg)
Spread diagram
5. Example:
Knowledge Network
a
bc
p q
a a a …
b b b… c c c …
ENTRY
AS
AS
@#a
p#b q#c
m1
T=C.5?sleepm2
SNR1
CREATE(DIRECT#a.p#b,q#c,STAY).REPEAT(TERMINAL=CONTENT.5?sleep)
![Page 88: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/88.jpg)
88
Table of Contents
A. IntroductionB. Getting Started with WAVE ProgrammingC. The WAVE LanguageD. RulesE. Basic Space Navigation Mechanisms in WAVEF. Graphical representation of wave: SPREAD
DIAGRAMSG. Wave and sequential programmingH. Modeling inter-process communications
![Page 89: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/89.jpg)
Session 7: Wave and sequential programming
![Page 90: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/90.jpg)
90
Wave and sequential programming
• Expressing a sequence of Statements• If-else Statements• Multiway Decisions• Loops
![Page 91: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/91.jpg)
91
Wave and sequential programming
• EXPRESSING A SEQUENCE OF STATEMENTS• If-else Statements• Multiway Decisions• Loops
![Page 92: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/92.jpg)
92
Expressing a sequence of Statements
• C languages1 ; s2 ; s3 ; s4
• Wave– Depth mode: period operator
s1 . s2 . s3 . s4
– Breadth mode: using SQ rule with comma seperator
SQ(s1, s2, s3, s4)
– Combination of the two
![Page 93: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/93.jpg)
93
Expressing a sequence of Statements (2)
s1
s2
s3
s4s1 s2 s3 s4
SQ
s1.s2.s3.s4SQ(s1,s2,s3,s4)
![Page 94: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/94.jpg)
94
Expressing a sequence of Statements (3)
s1
s2
s3
s4
SQ s1 s2
s3 s4
SQ
SQ
s1.SQ((s2.s3),s4) SQ(s1,(s2.SQ(s3,s4)))
![Page 95: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/95.jpg)
95
Expressing a sequence of Statements (4)
s1 s2
s3
s4
SQ
1!s12 s1 s2 s3
s4
SQ
RN
(SQ(s1,(s2. 1!)).s3.s4)RN(SQ(s1, s2, s3)).s4
![Page 96: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/96.jpg)
96
Wave and sequential programming
• Expressing a sequence of Statements• IF-ELSE STATEMENTS• Multiway Decisions• Loops
![Page 97: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/97.jpg)
97
If-else Statements
e
s1
s2
OS
e
s2
s1
AS
OS
1!
OS(e . s1,s2 )OS(AS(e . 1! , s1),s2)
![Page 98: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/98.jpg)
98
If-else Statements (2)
e
s1
OS
e
s1
WT
1!
e s1
SQ
1!
AS
SQ(AS(e , s1 . 1!), )WT(e . s1 . 1! , )OS(e . s1 , )
![Page 99: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/99.jpg)
99
Wave and sequential programming
• Expressing a sequence of Statements• If-else Statements• MULTIWAY DECISIONS• Loops
![Page 100: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/100.jpg)
100
Multiway Decisions
• else-if with filters
OS((e1 . s1) , (e2 . s2) , … , (em . sm) , sd )
e1 em
s1
OS
sm sd
……
![Page 101: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/101.jpg)
101
Multiway Decisions (2)
• Else-if parallel version
e1 em
S1
OS
sm sd
……
RN
RN(OS(((e1 . s1) , (e2 . s2) , … , (em . sm)) , sd ))
![Page 102: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/102.jpg)
102
Multiway Decisions (3)
• Else-if with AS rule
RN(OS(AS(e1 , s1) , … , AS(em , sm) , sd))
e1 sms1
RN
em
sd
OS
ASAS
……
![Page 103: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/103.jpg)
103
Multiway Decisions (4)
• switch
N==c1 N==cm
s1
OS
sm sd
e
e . OS((N==c1 , s1) , … , (N==cm , sm) , sd)
![Page 104: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/104.jpg)
104
Wave and sequential programming
• Expressing a sequence of Statements• If-else Statements• Multiway Decisions• LOOPS
![Page 105: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/105.jpg)
105
Loops
• Most traditional types– while ( e ) s– do s while ( e )
• ‘For’ Statement– For (e1 ; e2 ; e3) s e1; while (e2) { s; e3 }
Repetition Expressing loops by
Recursion
![Page 106: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/106.jpg)
106
Loops (2)
• Express using Repetition
p
RP
q
RP(p.q)
p
RP
q
AS
1!
RP(AS(p, (q . 1!))
p
RP
q
RN
AS
RP(RN(AS(p , q)))
![Page 107: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/107.jpg)
107
Loops (3)
• Express using Recursion
q
^Nl
p
{ }Nl=
SQ
^Nl
Nl = {p . q . ^Nl} . SQ(^Nl , )
q
^Nl
p{ }Nl=
SQ
^Nl
AS
Nl = {AS(p , (q . ^Nl))} . SQ(^Nl , )
q
^Nl
p
{ }Nl=
^Nl
Nl = {p . q . ^Nl} .^ Nl
![Page 108: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/108.jpg)
108
Loops (4)
‘For’ statement examples• C style: for (i = 0; i < n; i++) s += a[i]
• Ni = 1 . REPEAT (Ni <= Nn . Ns + Na : Ni . Ni + 1)• REPEAT ( Ni < Nn . Ni + 1 . Ns + Na : Ni)• Sequential programming in Wave: Nodal and
Frontal variables are the same!
![Page 109: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/109.jpg)
109
Table of Contents
A. IntroductionB. Getting Started with WAVE ProgrammingC. The WAVE LanguageD. RulesE. Basic Space Navigation Mechanisms in WAVEF. Graphical representation of wave: SPREAD
DIAGRAMSG. Wave and sequential programmingH. Modeling inter-process communications
![Page 110: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/110.jpg)
Session 8: Modeling inter-process communications
![Page 111: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/111.jpg)
Modeling inter process communication
• Asynchronous data transfer• One-way synchronization• Bilateral rendezvous (two-way)• Sharing common resources
![Page 112: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/112.jpg)
Modeling inter process communication
1. Asynchronous data transfer• Sender:head producing Nsender( Ftransit = Nsender.link # receiver.Nreceiver = Ftransit
)tail
• Receiver: any process using Nreceiver
![Page 113: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/113.jpg)
Modeling inter process communication
1. Asynchronous data transfer
head
head.(Ft=Ns.l#r.Nr=Ft),tail
tail
Ft = Ns.l#r
Nr
Nr = Ft
any process using Nr
process
Ns
![Page 114: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/114.jpg)
Modeling inter process communication
2. One-way synchronization• Sender:head producing Nsender( Ftransit = Nsender.
link # receiver.Nreceiver = Ftransit)tail
• Receiver: HeadREPEAT( Nreceiver == NONE).Tail consuming Nreceiver
![Page 115: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/115.jpg)
Modeling inter process communication
2. One-way synchronization
head
tail
Ft = Ns.l#r
Nr
Nr = Ft
head
RP
tail
Nr ==
Ns Nr
Same location
head.(Ft=Ns.l#r.Nr=Ft),tail head.RP(Nr==).tail
![Page 116: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/116.jpg)
Modeling inter process communication3. Bilateral rendezvous (two-way)• Sender:head producing NsenderREPEAT(Nbegin == NONE).( Ftransit = Nsender.link # receiver.Nreceiver = Ftransit
)tail• Receiver: Head(link # sender.Nbegin = 1),(REPEAT( Nreceiver == NONE).Tail consuming Nreceiver)
![Page 117: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/117.jpg)
Modeling inter process communication
3. Bilateral rendezvous (two-way)head
tail
Ft = Ns.l#r
Nr
Nr = Ft
head
RP
tail
Nr ==Nr
Same location
RP
Nb ==
Ns
NbNs l#s
Nb
Nb = 1
Same location
head.RP(Nb==).(Ft=Ns.l#r.Nr=Ft),tail
head.(l#s.Nb=1),RP(Nr==).tail
![Page 118: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/118.jpg)
Modeling inter process communication3. Sharing common resouces(head_1.INDIVISIBLE( working_with_a_common_resouce).tail_1),(head_2.INDIVISIBLE( working_with_a_common_resouce).tail_2),……(head_m.INDIVISIBLE( working_with_a_common_resouce).tail_m)
![Page 119: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/119.jpg)
Modeling inter process communication
3. Sharing common resources
head 1
tail 1
ID
Working with a common resource
process 1
head m
tail m
ID
Working with a common resource
…
process m
Same location
![Page 120: Wave Technology. Table of Contents A.Introduction B.Getting Started with WAVE Programming C.The WAVE Language D.Rules E.Basic Space Navigation Mechanisms](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cb95503460f94981336/html5/thumbnails/120.jpg)
120
THANKS FOR YOUR ATTENTION!