The Synchronous Model of Computaon
Transcript of The Synchronous Model of Computaon
![Page 1: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/1.jpg)
TheSynchronousModelofComputa6on
StavrosTripakisUCBerkeley
EE249Lecture–Sep15,2009
1
![Page 2: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/2.jpg)
Fundamentalcharacteris6csofthesynchronousMoC
• No6onofsynchronous round (orcycle)• Concurrency• Determinism(mostofthe6me)
– Same(sequenceof)inputs=>same(sequenceof)outputs
• Contrastthisto:– Concurrencywiththreads:
• Non‐determinis6c:resultsdependoninterleaving– ConcurrencyinKahnProcessNetworks:
• Asynchronous(interleaving),buts6lldeterminis6c• Needsunboundedbuffersingeneral,forcommunica6on
2
![Page 3: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/3.jpg)
Thesynchronousround
3
inputs
outputs
inputs
outputs
…
rounds
round1 round2
![Page 4: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/4.jpg)
4
Example:synchronousblockdiagram
A
C
rounds
A, B, C A, C, B …
B
![Page 5: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/5.jpg)
5
Example:synchronousblockdiagram
A
C
rounds
A, …
B
B C
A, B C
determinis6cconcurrency
![Page 6: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/6.jpg)
Example:FIRfilter
6
Whereisthesynchronousroundhere?
![Page 7: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/7.jpg)
Example:sequen6allogicdiagram
7
Whereisthesynchronousroundhere?
![Page 8: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/8.jpg)
Example:controlloop
8
initialize state; while (true) do read inputs; compute outputs; update state; write outputs; end while;
Whereisthesynchronousroundhere?
![Page 9: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/9.jpg)
Example:controlloop(v2)
9
initialize state; while (true) do await clock tick; read inputs; compute outputs; update state; write outputs; end while;
![Page 10: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/10.jpg)
Isthisanimportantmodelofcomputa6on?
• Yes!– Extremelywidespread,bothintermsofmodels/languages,andintermsofapplica6ons
• Examplesofapplica6ons:– Synchronousdigitalcircuits– 99%(?)ofcontrolsoeware
• Read‐compute‐writecontrolloops
• Nuclear,avionics,automo6ve,…
– Mul6media,…
10
![Page 11: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/11.jpg)
Isthisanimportantmodelofcomputa6on?
11
CopyrightTheMathworks
EnginecontrolmodelinSimulink
HW SW++c.f.SimulinktoFPGA,
ortoHDL
![Page 12: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/12.jpg)
Isthisanimportantmodelofcomputa6on?
• Yes!– Extremelywidespread,bothintermsofmodels/languages,andintermsofapplica6ons
• Examplesofmodelsandlanguages:– Mealy/Mooremachines– Verilog,VHDL,…– (discrete‐6me)Simulink– Synchronouslanguages– (Synchronous)Statecharts– Thesynchronous‐reac6ve(SR)domaininPtolemyII– …
12
![Page 13: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/13.jpg)
Mythsaboutsynchronousmodels
• Synchronousmodelshavezero‐1meseman6cs– Synchronousseman6csareessen6allyun0med:theydonothaveaquan6ta6veno6onof6me.
– FamousEsterelstatements[Berry‐Gonthier‘92]:• every 1000 MILLISEC do emit SEC end • every 1000 MILLIMETER do emit METER end
– Synchronousmodelscancaptureboth0me‐triggeredandevent‐triggeredsystems.E.g.:
• Dosomethingevery20ms• Dosomethingwheneveryoureceiveaninterruptfromtheengine
13
![Page 14: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/14.jpg)
Example:controlloop(v3)
14
initialize state; while (true) do await clock tick
or any other interrupt; read inputs; compute outputs; update state; write outputs; end while;
![Page 15: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/15.jpg)
Mythsaboutsynchronousmodels
• But:– Thesynchronouscyclescouldbeinterpretedasdiscrete6me:0,1,2,3,…,inwhichcasewehaveadiscrete‐6meseman6cs…
– …andthiscanalsobeseenasanabstrac6onofreal‐6me:
– C.f.6minganalysisofdigitalcircuits
– C.f.WCETanalysisofsynchronouscontrolloops
15
![Page 16: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/16.jpg)
Mythsaboutsynchronousmodels
• Synchronousmodelsarenon‐implementable(becausezero‐6meisimpossibletoachieve)– Hein?
16
Real‐TimeWorkshop
![Page 17: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/17.jpg)
Benefitsofsynchronousmodels
• Oeenmorelight‐weightthanasynchronous– Nointerleaving=>lessstateexplosion
• Oeendeterminis6c– Easiertounderstand,easiertoverify
• SWimplementa6ons:– Noopera6ngsystemrequired– Sta6cscheduling,nomemoryalloca6ons,nodynamiccrea6onofprocesses,…
• Simple6ming/schedulabilityanalysis– OeensimpleWCETanalysisalso:noloops
17
![Page 18: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/18.jpg)
Asynchronousvs.SynchronousProduct
18
![Page 19: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/19.jpg)
Lectureplan
• Part1:Single‐ratesynchronousmodels
• Part2:Mul6‐ratesynchronousmodels
• Part3:FeedbackandCausality
19
![Page 20: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/20.jpg)
Part1:Single‐ratesynchronousmodels
• Moore/Mealymachines• Synchronousblockdiagrams
– Inspiredbydiscrete‐6meSimulink,andSCADE
• Lustre• Esterel
20
![Page 21: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/21.jpg)
MooreMachines
21
• States:{q0,q1,q2,q3}• Ini6alstate:q0• Inputsymbols:{x,y,z}• Outputsymbols:{a,b,c}• Outputfunc6on:
– Out:States‐>Outputs• Transi6onfunc6on:
– Next:StatesxInputs‐>States
Whereisthesynchronousroundhere?
determinis0c
![Page 22: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/22.jpg)
Mooremachine:acircuitview
22
Next Out
clock
x(n)
y(n)
s(n)
![Page 23: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/23.jpg)
MealyMachines
23
• States:{S0,S1,S2}• Ini6alstate:S0• Inputsymbols:{0,1}• Outputsymbols:{0,1}• Outputfunc6on:
– Out:StatesxInputs‐>Outputs• Transi6onfunc6on:
– Next:StatesxInputs‐>States
Whereisthesynchronousroundhere?
![Page 24: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/24.jpg)
Mealymachine:acircuitview
24
Next Out
clock
x(n)
y(n)
s(n)
Isthisa“purelysynchronous”model?
![Page 25: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/25.jpg)
Moorevs.Mealymachines
25
MooreorMealy?
MooreorMealy?
![Page 26: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/26.jpg)
Moorevs.Mealymachines
• EveryMooremachineisalsoaMealymachine– Why?
• IsitpossibletotransformaMealymachinetoaMooremachine?
26
![Page 27: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/27.jpg)
27
Synchronousblockdiagrams
• Physicalmodelsoeendescribedincon6nuous‐6me
• Controllerpart(e.g.,TransmissionControlUnit)isdiscrete‐6me
![Page 28: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/28.jpg)
28
Synchronousblockdiagrams
![Page 29: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/29.jpg)
Example:FIRfilter
29
WhatistheMealymachineforthisdiagram?
![Page 30: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/30.jpg)
30
Hierarchyinsynchronousblockdiagrams
A B
P
![Page 31: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/31.jpg)
31
Hierarchyinsynchronousblockdiagrams
Fundamentalmodularityconcept
P
![Page 32: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/32.jpg)
Seman6csofhierarchicalSBDs
• Canwedefinetheseman6csofacompositeSBDasaMealymachine?– Inpar6cular,withapairof(Out,Next)func6ons?
32
![Page 33: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/33.jpg)
33
Problemwith“monolithic”seman6cs
A
B
P
P.out(x1, x2) returns (y1, y2) { y1 := A.out( x1 ); y2 := B.out( x2 );
return (y1, y2); }
x1
x2y2
y1
FalseI/Odependencies=>
Modelnotusableinsomecontexts
![Page 34: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/34.jpg)
34
Solu6on
• Generalizefromasingle,toMANYoutputfunc6ons
P.out1( in1 ) returns out1 { return A.out( in1 ); }
P.out2( in2 ) returns out2 { return B.out( in2 ); }
A
B
P
[DATE’08,RTAS’08,POPL’09]
![Page 35: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/35.jpg)
Lustre
• TheFIRfilterinLustre:
35
node fir (x : real) returns (y : real); var s1, s2 : real; let s1 = 0 -> pre x; s2 = 0 -> pre s1; y = x/3 + s1/3 + s2/3; tel
![Page 36: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/36.jpg)
Lustre
• TheFIRfilterinLustre:
36
node fir (x : real) returns (y : real); var s1, s2 : real; let s1 = 0 -> pre x; s2 = 0 -> pre s1; y = x/3 + s1/3 + s2/3; tel
![Page 37: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/37.jpg)
Lustre
• TheFIRfilterinLustre:
37
node fir (x : real) returns (y : real); var s1, s2 : real; let y = x/3 + s1/3 + s2/3; s2 = 0 -> pre s1; s1 = 0 -> pre x; tel
Whathaschanged?Isthiscorrect?
![Page 38: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/38.jpg)
Lustre
• TheFIRfilterinLustre(noexplicitstatevars):
38
node fir (x : real) returns (y : real); let y = x/3 + (0 -> pre x)/3 + (0 -> (0 -> pre pre x))/3; tel
![Page 39: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/39.jpg)
Esterel• TheFIRfilterinEsterel:
39
module FIR: input x : double; output y : double;
var s1 := 0 : double, s2 := 0 : double in loop await x ; emit y(x/3 + s1/3 + s2/3) ; s2 := s1 ; s1 := x ; end loop end var.
![Page 40: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/40.jpg)
Esterel• TheFIRfilterinEsterel:
40
module FIR: input x : double; output y : double;
var s1 := 0 : double, s2 := 0 : double in loop await x ; emit y(x/3 + s1/3 + s2/3) ; s1 := x ; s2 := s1 ; end loop end var.
Whathaschanged?Isthiscorrect?
![Page 41: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/41.jpg)
Esterel• AspeedometerinEsterel:
41
module SPEEDOMETER: input sec, cm; % pure signals output speed : double; % valued signal loop var cpt := 0 : double in abort loop await cm ; cpt := cpt + 1.0 end loop when sec do emit speed(cpt) end abort end var end loop.
![Page 42: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/42.jpg)
Lustre
• ThespeedometerinLustre:
42
node speedometer(sec, cm: bool) returns (speed: real); var cpt1, cpt2 : int; sp1, sp2 : real; let cpt1 = counter(cm, sec); sp1 = if sec then real(cpt1) else 0.0; cpt2 = counter(sec, cm); sp2 = if (cm and (cpt2 > 0)) then 1.0/(real(cpt2)) else 0.0; speed = max(sp1, sp2); tel
![Page 43: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/43.jpg)
Part2:Mul6‐ratesynchronousmodels
• Synchronousblockdiagramswithtriggers– Inspiredbydiscrete‐6meSimulink,andSCADE
• Lustrewithwhen/current• WhataboutEsterel?
43
![Page 44: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/44.jpg)
44
Triggeredand6medsynchronousblockdiagrams
• Mo6vatedbySimulink,SCADE
Triggeredblock
Simulink/Stateflowdiagram Sample6me
![Page 45: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/45.jpg)
45
Triggeredsynchronousblockdiagrams
A
B C
P
TRIGGEREDBLOCK
TRIGGER
mul0‐ratemodels:
• B executed only when trigger = true
• All signals “present” always • But not all updated at the
same time • E.g., output of B updated only
when trigger is true need initial value in case trigger = false at n = 0 (initial round)
v
Ques6on:dotriggersincreaseexpressiveness?
![Page 46: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/46.jpg)
46
Triggerelimina6on
![Page 47: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/47.jpg)
47
Triggerelimina6on:atomicblocks
![Page 48: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/48.jpg)
48
Timeddiagrams
A
(3,1)
BC
P
“TIMED”BLOCKS
“sta0c”mul0‐ratemodels (2,0)
(period,phase)specifica6ons
![Page 49: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/49.jpg)
49
Timeddiagrams=sta0callytriggereddiagrams
A
(3,1)
BC
P
(2,0)A B C
P
(3,1) (2,0)
=
(2,0)where
produces: true, false, true, false, …
![Page 50: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/50.jpg)
Mul6‐clocksynchronousprogramsinLustre
• Thenwhenandcurrentoperators:
50
node A(x: int, b: bool) returns (y: int); let y = current (x when b); tel
0 1 2 3 4 5 ... T F T F F T ... 0 2 5 ... 0 0 2 2 2 5 ...
x: b:
x when b: y:
![Page 51: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/51.jpg)
Mul6‐clocksynchronousprogramsinLustre
51
node A(x1,x2: int, b: bool) returns (y: int); let y = x1 + (x2 when b); tel
Whatisthemeaningofthisprogram?
ForbiddeninLustre
![Page 52: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/52.jpg)
Mul6‐clocksynchronousprogramsinLustre
• InLustre,everysignalhasaclock=“temporal”type
• Theclock‐calculus:asortoftypechecking– Onlysignalswithsameclockcanbeadded,mul6plied,…
– Howtocheckwhethertwoclocks(i.e.,booleansignals)arethesame?• Problemundecidableingeneral• InLustre,checkissyntac6c
52
![Page 53: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/53.jpg)
Mul6‐rateinEsterel
53
every 1000 MILLISEC do emit SEC end || every 1000 MILLIMETER do emit METER end
MILLISEC
MILLIMETER
SEC
METER
![Page 54: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/54.jpg)
Part3:FeedbackandCausality
• Vanillafeedback:– Cyclicdependencies“broken”byregisters,delays,…
• Unbrokencyclicdependencies:– Lustre/SBDsolu6on:forbidden– Esterel/HWsolu6on:forbiddenunlessifitmakessense
• Malik’sexample
• Construc6veseman6cs
54
![Page 55: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/55.jpg)
FeedbackinLustre
55
node counter() returns (c : int); let c = 0 -> (pre c) + 1; tel
node counter() returns (c : int); let c = 0 -> c + 1; tel
OK
Rejected
![Page 56: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/56.jpg)
FeedbackinSynchronousBlockDiagrams
• SameasLustre:
56
A B
Rejected,unlessAorBisMooremachine
![Page 57: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/57.jpg)
Whataboutthis?
57
Cycliccombina0onalcircuit.Useful:equivalentacycliccircuitisalmost2xlarger
[Malik’94]
z = if c then F(G(x)) else G(F(x))
![Page 58: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/58.jpg)
Canwegivemeaningtocyclicsynchronousmodels?
• Thinkofthemasfix‐pointequa6ons:– x = F(x)
• Whatisthemeaningofthese:– x = not x – x = x
• Isuniquesolu6onenough?– x = x or not x
58
![Page 59: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/59.jpg)
Construc6veseman6cs
• Reasoninconstruc6velogicinsteadofclassicallogic
• “xornotx”notanaxiom
• Thenwecannotprovex=1from:– x = x or not x
59
![Page 60: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/60.jpg)
Construc6veseman6cs
• Fix‐pointanalysisinaflatCPO:– Startwith“boxom”(undefined),iterateun6lfix‐pointisreached:
• Guaranteedinfinitenumberofitera6ons,becauseno.signalsandno.valuesarebothfinite
– Ifsolu6oncontainsnoundefinedvalues,thencircuitisconstruc6ve
• Inourexample:– x = x or not x – Boxomisthefix‐point– Circuitnotconstruc6ve
60
True
Т
False
Т
Т
![Page 61: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/61.jpg)
Construc6veseman6cs:theore6calbasis
• Kleenefixedpointtheorem:– Let L be a CPO and f : L → L be a con5nuous (and therefore monotone) func5on. Then f has a least fixed point equal to sup{bot,f(bot),f(f(bot)),…}
• InourflatCPO,con6nuous=monotone:– Non‐monotone:f(bot) > f(a), whereaisnotbot – Notarealis6cfunc6on
• InoutflatCPO,termina6onisguaranteed.
61
![Page 62: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/62.jpg)
Construc6veseman6cs
• Anotherexample:– x = a and not y – y = b and not x
• Herewehaveexternalinputs,musttryforallpossibleinputcombina6ons
• Exercise!
62
![Page 63: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/63.jpg)
Summary
• Synchronousmodelofcomputa6on:– Widespread,manylanguages,manyapplica6ons– Easiertounderstand,easiertoverify(thanasynchronousinterleaving)
– Interes6ngseman6cally
• Togofurther:– Interes6ngimplementa6onproblems:howtopreservetheproper6esthatthesynchronousabstrac6onprovides(determinism,values,…)duringimplementa6on?
63
![Page 64: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/64.jpg)
Ques6ons?
64
![Page 65: The Synchronous Model of Computaon](https://reader031.fdocuments.us/reader031/viewer/2022012501/617aea735a347c73a31f51b8/html5/thumbnails/65.jpg)
References• Statemachines(Moore,Mealy,…):
– SwitchingandFiniteAutomataTheory.ZviKohavi,McGraw‐Hill,1978.• Synchronousblockdiagrams:
– LublinermanandTripakispapersonmodularcodegenera6on:availablefromhxp://www‐verimag.imag.fr/~tripakis/publis.html
• Synchronouslanguages:– “Thesynchronouslanguages12yearslater”,Proc.IEEE,Jan2003,and
referencestherein.• Construc6veseman6cs:
– SharadMalik.Analysisofcycliccombina0onalcircuits.ICCAD1993.– GerardBerry.TheConstruc0veSeman0csofPureEsterel.Draebook,1996,
downloadable,googleit.• General,overview:
– P.Caspi,P.RaymondandS.Tripakis.SynchronousProgramming.InI.Lee,J.Leung,andS.Son,editors,Handbook of Real‐Time and Embedded Systems.Chapman&Hall,2007.Availablefromsiteabove.
65