300 likes | 399 Views
Syntax-driven partitioning for model-checking of Esterel programs. Eric Vecchié - INRIA Aoste. Motivation. Build the Reachable State Space… …following the syntax abort P when S ; Q Reachable State Space allows Model-checking Code optimization Test sequence generation ….
E N D
Syntax-driven partitioning for model-checking of Esterel programs Eric Vecchié - INRIA Aoste
Motivation • Build the Reachable State Space… • …following thesyntax abort P when S; Q • Reachable State Space allows • Model-checking • Code optimization • Test sequence generation • …
Reachable State Space • Breadth First Search algorithm R← INIT new←R while ( new ≠ ø ) do new←Image(new) \ R R←RUnew end while • Symbolic methods (BDDs)
Size of Computations BDD size Solution : Rely on program structural syntax non-saturated states set states reached
Example : Wristwatch stopwatch watch display alarm_set time_set
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
Preemption / if-then-else S P S P1 P2 Q Q
Partitioning Example P abort P when S; present T then Q1 else Q2 end; R Q2 Q1 R
Parallel Constructs • Avoid cartesian product • {P1, P2} {Q1, Q2} • Use signal information || P1 Q1 P2 Q2
Parallel and signals || P1 Q1 R1 S1 P2 Q2 S2 Q3 R2
Parallel and signals • Only increasing Avoid the cross product • Can be not satisfying on loops • …but on rare cases
Loops P Q
Control Flow Graph construction abort loop pause end ; present T then pause ; pause pause pause || || when S else pause end
Symbolic methods Binary Decision Diagrams (BDDs) allow to represent : • Boolean functions • Sets (in a finite universe) • PartitionedTransition Relations
Cofactoring • Cofactoring is used 2 ways • Reduce the domain according to our frontiers • Transition function applied on new states Given a domain D, reduce the BDD of a function f: f↑D(x) = f(x) if x belongs to D
Experiments • A medium-sized design : sequencer • A big design : cabin
Conclusion • Program verification following program syntax • Preemptions, if-then-else • Signals in parallels • Smallerintermediate BDDs • Lighter transitionfunctions • Lighter imagecomputations • Less memory required
Motivation • Model-checking • Code optimization • Test sequence generation • … Reachable State Space (RSS)
Breadth First Search algorithm R← INIT new←R while ( new ≠ ø ) do new←Image(new) \ R R←RUnew end while • Symbolic methods (BDDs) Reachable State Space (RSS)
Introduction • Esterel • Synchronous reactivestructural programming • sequence, if-then-else • Parallelism, preemption • Circuit translation (model-checking level)