Profile

Download (4.61 KB) Statistics
| Branch: | Tag: | Revision:
 1 ```node Sofar( X : bool ) returns ( Sofar : bool ); ``` ```let ``` ``` Sofar = X -> X and pre Sofar; ``` ```tel ``` ```node excludes12( X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12 : bool ) returns ( excludes : bool ); ``` ```let ``` ``` excludes = not X1 and not X2 and not X3 and not X4 and not X5 and not X6 and not X7 and not X8 and not X9 and not X10 and not X11 and not X12 or ``` ``` X1 and not X2 and not X3 and not X4 and not X5 and not X6 and not X7 and not X8 and not X9 and not X10 and not X11 and not X12 or ``` ``` not X1 and X2 and not X3 and not X4 and not X5 and not X6 and not X7 and not X8 and not X9 and not X10 and not X11 and not X12 or ``` ``` not X1 and not X2 and X3 and not X4 and not X5 and not X6 and not X7 and not X8 and not X9 and not X10 and not X11 and not X12 or ``` ``` not X1 and not X2 and not X3 and X4 and not X5 and not X6 and not X7 and not X8 and not X9 and not X10 and not X11 and not X12 or ``` ``` not X1 and not X2 and not X3 and not X4 and X5 and not X6 and not X7 and not X8 and not X9 and not X10 and not X11 and not X12 or ``` ``` not X1 and not X2 and not X3 and not X4 and not X5 and X6 and not X7 and not X8 and not X9 and not X10 and not X11 and not X12 or ``` ``` not X1 and not X2 and not X3 and not X4 and not X5 and not X6 and X7 and not X8 and not X9 and not X10 and not X11 and not X12 or ``` ``` not X1 and not X2 and not X3 and not X4 and not X5 and not X6 and not X7 and X8 and not X9 and not X10 and not X11 and not X12 or ``` ``` not X1 and not X2 and not X3 and not X4 and not X5 and not X6 and not X7 and not X8 and X9 and not X10 and not X11 and not X12 or ``` ``` not X1 and not X2 and not X3 and not X4 and not X5 and not X6 and not X7 and not X8 and not X9 and X10 and not X11 and not X12 or ``` ``` not X1 and not X2 and not X3 and not X4 and not X5 and not X6 and not X7 and not X8 and not X9 and not X10 and X11 and not X12 or ``` ``` not X1 and not X2 and not X3 and not X4 and not X5 and not X6 and not X7 and not X8 and not X9 and not X10 and not X11 and X12; ``` ```tel ``` ```node rtp(e01, e02, e03, e04, e05, e06, e07, e08, e09, e10, e11, e12 : bool) ``` ```returns(X1, X2, X3, X4, X5, X6, X7, X8, X9 : int; erreur : bool); ``` ```var ``` ``` g01, g02, g03, g04, g05, g06, g07, g08, g09, g10, g11, g12 : bool; ``` ```let ``` ``` g01 = pre X1>=1; ``` ``` g02 = pre X2>=1; ``` ``` g03 = pre X3>=1; ``` ``` g04 = pre X4>=1; ``` ``` g05 = pre X4>=1; ``` ``` g06 = pre X5>=1; ``` ``` g07 = pre X6>=1; ``` ``` g08 = pre X6>=1; ``` ``` g09 = pre X6>=1; ``` ``` g10 = pre X7>=1; ``` ``` g11 = pre X8>=1; ``` ``` g12 = pre X9>=1; ``` ``` erreur = if(X1>=2) then true else false; ``` ``` X1 = 1 -> ``` ``` if(e01) then if(g01) then pre X1-1 else pre X1 else ``` ``` pre X1; ``` ``` X2 = 0 -> ``` ``` if(e01) then if(g01) then pre X2+1 else pre X2 else ``` ``` if(e02) then if(g02) then pre X2-1 else pre X2 else ``` ``` if(e12) then if(g12) then pre X2+1 else pre X2 else ``` ``` pre X2; ``` ``` X3 = 0 -> ``` ``` if(e02) then if(g02) then pre X3+1 else pre X3 else ``` ``` if(e03) then if(g03) then pre X3-1 else pre X3 else ``` ``` pre X3; ``` ``` X4 = 0 -> ``` ``` if(e03) then if(g03) then pre X4+1 else pre X4 else ``` ``` if(e04) then if(g04) then pre X4-1 else pre X4 else ``` ``` if(e05) then if(g05) then pre X4-1 else pre X4 else ``` ``` pre X4; ``` ``` X5 = 0 -> ``` ``` if(e04) then if(g04) then pre X5+1 else pre X5 else ``` ``` if(e06) then if(g06) then pre X5-1 else pre X5 else ``` ``` pre X5; ``` ``` X6 = 0 -> ``` ``` if(e06) then if(g06) then pre X6+1 else pre X6 else ``` ``` if(e07) then if(g07) then pre X6-1 else pre X6 else ``` ``` if(e08) then if(g08) then pre X6-1 else pre X6 else ``` ``` if(e09) then if(g09) then pre X6-1 else pre X6 else ``` ``` pre X6; ``` ``` X7 = 0 -> ``` ``` if(e08) then if(g08) then pre X7+1 else pre X7 else ``` ``` if(e10) then if(g10) then pre X7-1 else pre X7 else ``` ``` pre X7; ``` ``` X8 = 0 -> ``` ``` if(e09) then if(g09) then pre X8+1 else pre X8 else ``` ``` if(e11) then if(g11) then pre X8-1 else pre X8 else ``` ``` pre X8; ``` ``` X9 = 0 -> ``` ``` if(e05) then if(g05) then pre X9+1 else pre X9 else ``` ``` if(e07) then if(g07) then pre X9+1 else pre X9 else ``` ``` if(e10) then if(g10) then pre X9+1 else pre X9 else ``` ``` if(e11) then if(g11) then pre X9+1 else pre X9 else ``` ``` if(e12) then if(g12) then pre X9-1 else pre X9 else ``` ``` pre X9; ``` ```tel ``` ```--@ ensures OK; ``` ```node top( e01, e02, e03, e04, e05, e06, e07, e08, e09, e10, e11, e12 : bool ) ``` ```returns ( OK : bool ); ``` ``` var X1, X2, X3, X4, X5, X6, X7, X8, X9 : int; ``` ``` erreur : bool; ``` ```let ``` ``` ( X1, X2, X3, X4, X5, X6, X7, X8, X9, erreur ) = ``` ``` rtp( e01, e02, e03, e04, e05, e06, e07, e08, e09, e10, e11, e12 ); ``` ``` OK = Sofar( excludes12( e01, e02, e03, e04, e05, e06, e07, e08, e09, e10, ``` ``` e11, e12 ) ) ``` ``` => not erreur; ``` ```--!k:2; ``` ```--!PROPERTY: OK=true; ``` ``` --%MAIN; ``` ```tel ```
(7-7/17)