//---------- VARIABLES DECLARATION --------- decl track_0_PatientWithTPC; decl track_0_ThirdParty; decl track_0_target; decl track_0_SUPER_ROLE; decl track_1_PatientWithTPC; decl track_1_ThirdParty; decl track_1_target; decl track_1_SUPER_ROLE; decl track_2_PatientWithTPC; decl track_2_ThirdParty; decl track_2_target; decl track_2_SUPER_ROLE; decl b_0; decl b_1; decl b_2; //---------- BEGIN MAIN PROGRAM --------- void main() begin //---------- INITIALIZE VARIABLES --------- b_0 := 0; b_1 := 0; b_2 := 0; track_0_PatientWithTPC := 0; track_0_ThirdParty := 0; track_0_target := 0; track_0_SUPER_ROLE := 0; track_1_PatientWithTPC := 0; track_1_ThirdParty := 0; track_1_target := 0; track_1_SUPER_ROLE := 0; track_2_PatientWithTPC := 0; track_2_ThirdParty := 0; track_2_target := 0; track_2_SUPER_ROLE := 0; //---------- CONFIGURATION_USERS --------- //Configuration of user0 if (*) then if (!b_0) then b_0 := 1; elsif (!b_1) then b_1 := 1; elsif (!b_2) then b_2 := 1; fi fi //Configuration of user1 if (*) then if (!b_0) then b_0 := 1; elsif (!b_1) then b_1 := 1; elsif (!b_2) then b_2 := 1; fi fi //Configuration of user2 if (*) then if (!b_0) then b_0 := 1; elsif (!b_1) then b_1 := 1; elsif (!b_2) then b_2 := 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; elsif (!b_2) then b_2 := 1; track_2_SUPER_ROLE := 1; fi fi //---------- SIMULATION OF RULES --------- while ( 1 ) do //------------------ CAN_ASSIGN RULE NUMBER 0 ----------------- // //------------------------------------------------------------------ if (track_0_SUPER_ROLE | track_1_SUPER_ROLE | track_2_SUPER_ROLE) then if (*) then if (b_0 & track_0_PatientWithTPC) then track_0_target := 1; fi fi if (*) then if (b_1 & track_1_PatientWithTPC) then track_1_target := 1; fi fi if (*) then if (b_2 & track_2_PatientWithTPC) then track_2_target := 1; fi fi fi //------------------ CAN_ASSIGN RULE NUMBER 1 ----------------- // //------------------------------------------------------------------ if (track_0_SUPER_ROLE | track_1_SUPER_ROLE | track_2_SUPER_ROLE) then if (*) then if (b_0) then track_0_ThirdParty := 1; fi fi if (*) then if (b_1) then track_1_ThirdParty := 1; fi fi if (*) then if (b_2) then track_2_ThirdParty := 1; fi fi fi //------------------ CAN_ASSIGN RULE NUMBER 2 ----------------- // //------------------------------------------------------------------ if (track_0_ThirdParty | track_1_ThirdParty | track_2_ThirdParty) then if (*) then if (b_0) then track_0_PatientWithTPC := 1; fi fi if (*) then if (b_1) then track_1_PatientWithTPC := 1; fi fi if (*) then if (b_2) then track_2_PatientWithTPC := 1; fi fi fi //------------------- CAN_REVOKE RULE NUMBER 0 --------------------- // //------------------------------------------------------------------ if (track_0_ThirdParty | track_1_ThirdParty | track_2_ThirdParty) then if (*) then track_0_PatientWithTPC := 0; fi if (*) then track_1_PatientWithTPC := 0; fi if (*) then track_2_PatientWithTPC := 0; fi fi //---------------Error------------ if (track_0_target | track_1_target | track_2_target) then SLIC_ERROR: skip; fi od end