//---------- VARIABLES DECLARATION --------- decl track_0_Patient; decl track_0_PrimaryDoctor; decl track_0_target; decl track_0_SUPER_ROLE; decl track_1_Patient; decl track_1_PrimaryDoctor; decl track_1_target; decl track_1_SUPER_ROLE; decl b_0; decl b_1; //---------- BEGIN MAIN PROGRAM --------- void main() begin //---------- INITIALIZE VARIABLES --------- b_0 := 0; b_1 := 0; track_0_Patient := 0; track_0_PrimaryDoctor := 0; track_0_target := 0; track_0_SUPER_ROLE := 0; track_1_Patient := 0; track_1_PrimaryDoctor := 0; track_1_target := 0; track_1_SUPER_ROLE := 0; //---------- CONFIGURATION_USERS --------- //Configuration of user0 if (*) then if (!b_0) then b_0 := 1; elsif (!b_1) then b_1 := 1; fi fi //Configuration of user1 if (*) then if (!b_0) then b_0 := 1; elsif (!b_1) then b_1 := 1; fi fi //Configuration of SUPER_USER if (*) then if (!b_0) then b_0 := 1; track_0_SUPER_ROLE := 1; elsif (!b_1) then b_1 := 1; track_1_SUPER_ROLE := 1; fi fi //Configuration of user101 if (*) then if (!b_0) then b_0 := 1; track_0_PrimaryDoctor := 1; elsif (!b_1) then b_1 := 1; track_1_PrimaryDoctor := 1; fi fi //Configuration of user102 if (*) then if (!b_0) then b_0 := 1; track_0_PrimaryDoctor := 1; elsif (!b_1) then b_1 := 1; track_1_PrimaryDoctor := 1; fi fi //Configuration of user331 if (*) then if (!b_0) then b_0 := 1; track_0_Patient := 1; elsif (!b_1) then b_1 := 1; track_1_Patient := 1; fi fi //Configuration of user332 if (*) then if (!b_0) then b_0 := 1; track_0_Patient := 1; elsif (!b_1) then b_1 := 1; track_1_Patient := 1; fi fi //---------- SIMULATION OF RULES --------- while ( 1 ) do //------------------ CAN_ASSIGN RULE NUMBER 0 ----------------- // //------------------------------------------------------------------ if (track_0_SUPER_ROLE | track_1_SUPER_ROLE) then if (*) then if (b_0 & track_0_PrimaryDoctor & track_0_Patient) then track_0_target := 1; fi fi if (*) then if (b_1 & track_1_PrimaryDoctor & track_1_Patient) then track_1_target := 1; fi fi fi //------------------ CAN_ASSIGN RULE NUMBER 1 ----------------- // //------------------------------------------------------------------ if (track_0_SUPER_ROLE | track_1_SUPER_ROLE) then if (*) then if (b_0 & !track_0_Patient) then track_0_PrimaryDoctor := 1; fi fi if (*) then if (b_1 & !track_1_Patient) then track_1_PrimaryDoctor := 1; fi fi fi //------------------ CAN_ASSIGN RULE NUMBER 2 ----------------- // //------------------------------------------------------------------ if (track_0_SUPER_ROLE | track_1_SUPER_ROLE) then if (*) then if (b_0 & !track_0_PrimaryDoctor) then track_0_Patient := 1; fi fi if (*) then if (b_1 & !track_1_PrimaryDoctor) then track_1_Patient := 1; fi fi fi //------------------- CAN_REVOKE RULE NUMBER 0 --------------------- // //------------------------------------------------------------------ if (track_0_SUPER_ROLE | track_1_SUPER_ROLE) then if (*) then track_0_PrimaryDoctor := 0; fi if (*) then track_1_PrimaryDoctor := 0; fi fi //------------------- CAN_REVOKE RULE NUMBER 1 --------------------- // //------------------------------------------------------------------ if (track_0_SUPER_ROLE | track_1_SUPER_ROLE) then if (*) then track_0_Patient := 0; fi if (*) then track_1_Patient := 0; fi fi //---------------Error------------ if (track_0_target | track_1_target) then SLIC_ERROR: skip; fi od end