Le tampon à deux places Une idée de Steve Dunne, University of Teesside Présentée dans cet amphi en 2002
Le tampon à deux places inout [in, in, out, in, out, in, out, out, in, in] [in, in, out, out, out], [in, out, out], [in, in, in],… non possibles
Diagramme de transitions out in Événements modélisés comme des opérations gardées Opérations qui NE SONT pas appelées, contrairement aux Opérations préconditionnées du B classique
Automate/ Arbre Jackson M1 * outin * out in out in M = (in. (in. Out) * out) *
Le tampon à 2 places MACHINE M1 VARIABLES state INVARIANT state : 0..2 INITIALISATION state := 0
Le tampon à 2 places, en B OPERATIONS in = SELECT state = 0 THEN state := 1 WHEN state = 1 THEN state := 2 END; out = SELECT state = 1 THEN state := 0 WHEN state = 2 THEN state := 1 END; move = skip END
Zoom inout inout move
2 automates communicants inout move producteurconsommateur
Producteur et Consommateur in move out PROD * inmove PRODCONS * moveout
Lautomate du système in move out PROD CONS 0,0 1,0 0,1 1,1 in move in out
Produit dautomate 0,0 1,0 0, 1 1, 1 in move in out
Machine B Producteur MACHINE PROD VARIABLES pstate INVARIANT pstate : 0..1 INITIALISATION pstate := 0 OPERATIONS in = SELECT pstate = 0 THEN pstate := 1 END; pmove = SELECT pstate = 1 THEN pstate := 0 END 0 1 inmove PROD
Machine B Consommateur MACHINE CONS VARIABLES cstate INVARIANT cstate : 0..1 INITIALISATION cstate := 0 OPERATIONS out= SELECT cstate = 1 THEN cstate := 0 END; cmove = SELECT cstate = 0 THEN cstate := 1 END 0 1 move out CONS
La machine Système MACHINE M2 INCLUDES PROD, CONS PROMOTES in, out OPERATIONS move = pmove || cmove END PROD in pmove M2 INCLUDES move CONS cmove out
Implantation IMPLEMENTATION M1_I /* machine to prove that M2 simulates M1, with the technique of Ken Robinson */ REFINES M1 IMPORTS M2 PROMOTES in, out, move END