Chateau L'Esterel | Luxury 15 bedroom villa for rent in Esterel
Syntax-driven partitioning for model-checking of Esterel programs
description
Transcript of Syntax-driven partitioning for model-checking of Esterel programs
![Page 1: Syntax-driven partitioning for model-checking of Esterel programs](https://reader035.fdocuments.us/reader035/viewer/2022062809/56815987550346895dc6c7d3/html5/thumbnails/1.jpg)
Syntax-driven partitioning for model-checking of Esterel
programs
Eric Vecchié - INRIA Aoste
![Page 2: Syntax-driven partitioning for model-checking of Esterel programs](https://reader035.fdocuments.us/reader035/viewer/2022062809/56815987550346895dc6c7d3/html5/thumbnails/2.jpg)
Motivation
• Build the Reachable State Space…
• …following the syntaxabort P when S;Q
• Reachable State Space allows– Model-checking– Code optimization– Test sequence generation– …
![Page 3: Syntax-driven partitioning for model-checking of Esterel programs](https://reader035.fdocuments.us/reader035/viewer/2022062809/56815987550346895dc6c7d3/html5/thumbnails/3.jpg)
R ← INITnew ← Rwhile ( new ≠ ø ) do new ← Image(new) \ R R ← R U newend while
Reachable State Space
• Breadth First Search algorithm
• Symbolic methods (BDDs)
![Page 4: Syntax-driven partitioning for model-checking of Esterel programs](https://reader035.fdocuments.us/reader035/viewer/2022062809/56815987550346895dc6c7d3/html5/thumbnails/4.jpg)
What is done
![Page 5: Syntax-driven partitioning for model-checking of Esterel programs](https://reader035.fdocuments.us/reader035/viewer/2022062809/56815987550346895dc6c7d3/html5/thumbnails/5.jpg)
Size of Computations
Solution : Rely on program structural syntax
BDDsize
states reached
non-saturatedstates set
![Page 6: Syntax-driven partitioning for model-checking of Esterel programs](https://reader035.fdocuments.us/reader035/viewer/2022062809/56815987550346895dc6c7d3/html5/thumbnails/6.jpg)
What we do
![Page 7: Syntax-driven partitioning for model-checking of Esterel programs](https://reader035.fdocuments.us/reader035/viewer/2022062809/56815987550346895dc6c7d3/html5/thumbnails/7.jpg)
Example : Wristwatch
display
watch
time_setalarm_set
stopwatch
![Page 8: Syntax-driven partitioning for model-checking of Esterel programs](https://reader035.fdocuments.us/reader035/viewer/2022062809/56815987550346895dc6c7d3/html5/thumbnails/8.jpg)
Example : Wristwatch
![Page 9: Syntax-driven partitioning for model-checking of Esterel programs](https://reader035.fdocuments.us/reader035/viewer/2022062809/56815987550346895dc6c7d3/html5/thumbnails/9.jpg)
Example : Wristwatch
![Page 10: Syntax-driven partitioning for model-checking of Esterel programs](https://reader035.fdocuments.us/reader035/viewer/2022062809/56815987550346895dc6c7d3/html5/thumbnails/10.jpg)
How to partition ?
• According to program blocks
– Separated by frontiers– Synthesized from signal receptions
• Build a control flow graph
– Encoding frontiers– Guiding the RSS computation
![Page 11: Syntax-driven partitioning for model-checking of Esterel programs](https://reader035.fdocuments.us/reader035/viewer/2022062809/56815987550346895dc6c7d3/html5/thumbnails/11.jpg)
Preemption / if-then-else
P
Q
P1 P2
Q
S
S
![Page 12: Syntax-driven partitioning for model-checking of Esterel programs](https://reader035.fdocuments.us/reader035/viewer/2022062809/56815987550346895dc6c7d3/html5/thumbnails/12.jpg)
abort
Pwhen S;present T then
Q1else
Q2end;
R
P
Q2
R
Q1
Partitioning Example
![Page 13: Syntax-driven partitioning for model-checking of Esterel programs](https://reader035.fdocuments.us/reader035/viewer/2022062809/56815987550346895dc6c7d3/html5/thumbnails/13.jpg)
Parallel Constructs
• Avoid cartesian product
– {P1, P2} {Q1, Q2}
• Use signal information
||
P1 Q1
P2 Q2
![Page 14: Syntax-driven partitioning for model-checking of Esterel programs](https://reader035.fdocuments.us/reader035/viewer/2022062809/56815987550346895dc6c7d3/html5/thumbnails/14.jpg)
Parallel and signals||
P1 Q1
R1
P2
Q2
Q3 R2
S1
S2
![Page 15: Syntax-driven partitioning for model-checking of Esterel programs](https://reader035.fdocuments.us/reader035/viewer/2022062809/56815987550346895dc6c7d3/html5/thumbnails/15.jpg)
• Only increasing
Avoid the cross product
• Can be not satisfying on loops– …but on rare cases
Parallel and signals
![Page 16: Syntax-driven partitioning for model-checking of Esterel programs](https://reader035.fdocuments.us/reader035/viewer/2022062809/56815987550346895dc6c7d3/html5/thumbnails/16.jpg)
Loops
PQ
![Page 17: Syntax-driven partitioning for model-checking of Esterel programs](https://reader035.fdocuments.us/reader035/viewer/2022062809/56815987550346895dc6c7d3/html5/thumbnails/17.jpg)
pause
pause
loop end||
abort
when S
present T then
else
end
;
Control Flow Graph construction
|| pausepausepause pause;
![Page 18: Syntax-driven partitioning for model-checking of Esterel programs](https://reader035.fdocuments.us/reader035/viewer/2022062809/56815987550346895dc6c7d3/html5/thumbnails/18.jpg)
Symbolic methods
• Boolean functions
• Sets (in a finite universe)
• Partitioned Transition Relations
Binary Decision Diagrams (BDDs) allow to represent :
![Page 19: Syntax-driven partitioning for model-checking of Esterel programs](https://reader035.fdocuments.us/reader035/viewer/2022062809/56815987550346895dc6c7d3/html5/thumbnails/19.jpg)
Cofactoring
Given a domain D, reduce the BDD of a function f :f↑D(x) = f(x) if x belongs to D
• Cofactoring is used 2 ways
– Reduce the domain according to our frontiers
– Transition function applied on new states
![Page 20: Syntax-driven partitioning for model-checking of Esterel programs](https://reader035.fdocuments.us/reader035/viewer/2022062809/56815987550346895dc6c7d3/html5/thumbnails/20.jpg)
Experiments
• A medium-sized design : sequencer
• A big design : cabin
![Page 21: Syntax-driven partitioning for model-checking of Esterel programs](https://reader035.fdocuments.us/reader035/viewer/2022062809/56815987550346895dc6c7d3/html5/thumbnails/21.jpg)
BDD sizes in “sequencer”
![Page 22: Syntax-driven partitioning for model-checking of Esterel programs](https://reader035.fdocuments.us/reader035/viewer/2022062809/56815987550346895dc6c7d3/html5/thumbnails/22.jpg)
A big design : “cabin”
Default method Partitioning
534 states 135 441 875 states
3 steps (11.85s) 123 steps (35h40)
![Page 23: Syntax-driven partitioning for model-checking of Esterel programs](https://reader035.fdocuments.us/reader035/viewer/2022062809/56815987550346895dc6c7d3/html5/thumbnails/23.jpg)
Conclusion
Program verification following program syntax
• Preemptions, if-then-else
• Signals in parallels
Smaller intermediate BDDs
• Lighter transition functions
• Lighter image computations
Less memory required
![Page 24: Syntax-driven partitioning for model-checking of Esterel programs](https://reader035.fdocuments.us/reader035/viewer/2022062809/56815987550346895dc6c7d3/html5/thumbnails/24.jpg)
The End
![Page 25: Syntax-driven partitioning for model-checking of Esterel programs](https://reader035.fdocuments.us/reader035/viewer/2022062809/56815987550346895dc6c7d3/html5/thumbnails/25.jpg)
Motivation
• Model-checking
• Code optimization
• Test sequence generation
• …
Reachable State Space (RSS)
![Page 26: Syntax-driven partitioning for model-checking of Esterel programs](https://reader035.fdocuments.us/reader035/viewer/2022062809/56815987550346895dc6c7d3/html5/thumbnails/26.jpg)
R ← INITnew ← Rwhile ( new ≠ ø ) do new ← Image(new) \ R R ← R U newend while
Reachable State Space (RSS)
• Breadth First Search algorithm
• Symbolic methods (BDDs)
![Page 27: Syntax-driven partitioning for model-checking of Esterel programs](https://reader035.fdocuments.us/reader035/viewer/2022062809/56815987550346895dc6c7d3/html5/thumbnails/27.jpg)
Introduction
• Esterel
• Synchronous reactive structural
programming– sequence, if-then-else
– Parallelism, preemption
• Circuit translation (model-checking level)
![Page 28: Syntax-driven partitioning for model-checking of Esterel programs](https://reader035.fdocuments.us/reader035/viewer/2022062809/56815987550346895dc6c7d3/html5/thumbnails/28.jpg)
![Page 29: Syntax-driven partitioning for model-checking of Esterel programs](https://reader035.fdocuments.us/reader035/viewer/2022062809/56815987550346895dc6c7d3/html5/thumbnails/29.jpg)
![Page 30: Syntax-driven partitioning for model-checking of Esterel programs](https://reader035.fdocuments.us/reader035/viewer/2022062809/56815987550346895dc6c7d3/html5/thumbnails/30.jpg)
Partitioning - detail