-- Processing Resources

Processing_Resource (
	Type 			=> Fixed_Priority_Processor,
	Name 			=> CPU_1);

-- Scheduling Servers

Scheduling_Server (
	Type				=> Fixed_Priority,
	Name 				=> Task_1,
	Server_Sched_Parameters		=> (
		Type		=> Fixed_Priority_policy,
		The_Priority		=> 90,
                Preassigned             => No),
	Server_Processing_Resource	=> CPU_1);

Scheduling_Server (
	Type				=> Fixed_Priority,
	Name 				=> Task_2,
	Server_Sched_Parameters		=> (
		Type		=> Fixed_Priority_policy,
		The_Priority		=> 92,
                Preassigned             => No),
	Server_Processing_Resource	=> CPU_1);

Scheduling_Server (
	Type				=> Fixed_Priority,
	Name 				=> Task_3,
	Server_Sched_Parameters		=> (
		Type		=> Fixed_Priority_policy,
		The_Priority		=> 100,
                Preassigned             => No),
	Server_Processing_Resource	=> CPU_1);

Scheduling_Server (
	Type				=> Fixed_Priority,
	Name 				=> Task_4,
	Server_Sched_Parameters		=> (
		Type		=> Fixed_Priority_policy,
		The_Priority		=> 102,
                Preassigned             => No),
	Server_Processing_Resource	=> CPU_1);

Scheduling_Server (
	Type				=> Fixed_Priority,
	Name 				=> Task_5,
	Server_Sched_Parameters		=> (
		Type		=> Fixed_Priority_policy,
		The_Priority		=> 95,
                Preassigned             => No),
	Server_Processing_Resource	=> CPU_1);

Scheduling_Server (
	Type				=> Fixed_Priority,
	Name 				=> Task_6,
	Server_Sched_Parameters		=> (
		Type		=> Fixed_Priority_policy,
		The_Priority		=> 85,
                Preassigned             => No),
	Server_Processing_Resource	=> CPU_1);

Scheduling_Server (
	Type				=> Fixed_Priority,
	Name 				=> Task_7,
	Server_Sched_Parameters		=> (
		Type		=> Fixed_Priority_policy,
		The_Priority		=> 110,
                Preassigned             => No),
	Server_Processing_Resource	=> CPU_1);

Scheduling_Server (
	Type				=> Fixed_Priority,
	Name 				=> Task_8,
	Server_Sched_Parameters		=> (
		Type		=> Fixed_Priority_policy,
		The_Priority		=> 112,
                Preassigned             => No),
	Server_Processing_Resource	=> CPU_1);

-- Resources

Shared_Resource (
	Type 	=> Immediate_Ceiling_Resource,
	Name 	=> SD);

-- Operations

Operation (
	Type 				=> Simple,
	Name 				=> tc1,
	Worst_Case_Execution_Time 	=> 60);

Operation (
	Type 				=> Simple,
	Name 				=> tc2,
	Worst_Case_Execution_Time 	=> 37);

Operation (
	Type 				=> Simple,
	Name 				=> tt1,
	Worst_Case_Execution_Time 	=> 2);

Operation (
	Type 				=> Simple,
	Name 				=> tt2,
	Worst_Case_Execution_Time 	=> 0.4);

Operation (
	Type 				=> Simple,
	Name 				=> om1,
	Worst_Case_Execution_Time 	=> 16);

Operation (
	Type 				=> Simple,
	Name 				=> om2,
	Worst_Case_Execution_Time 	=> 2,
       	Shared_Resources_List		=> (SD));

Operation (
	Type 				=> Simple,
	Name 				=> om3,
	Worst_Case_Execution_Time 	=> 2);

Operation (
	Type 				=> Simple,
	Name 				=> sp1,
	Worst_Case_Execution_Time 	=> 400);

Operation (
	Type 				=> Simple,
	Name 				=> s1,
	Worst_Case_Execution_Time 	=> 0.2);

Operation (
	Type 				=> Simple,
	Name 				=> s2,
	Worst_Case_Execution_Time 	=> 0.2);

Operation (
	Type 				=> Simple,
	Name 				=> pdc1,
	Worst_Case_Execution_Time 	=> 01);

Operation (
	Type 				=> Simple,
	Name 				=> pdc2,
	Worst_Case_Execution_Time 	=> 4,
       	Shared_Resources_List		=> (SD));

Operation (
	Type 				=> Simple,
	Name 				=> pdc3,
	Worst_Case_Execution_Time 	=> 395);

-- Composite operations

Operation (
	Type 	=> Composite,
	Name 	=> om,
	Composite_Operation_List 	=> 
		(om1,om2,om3));

Operation (
	Type 	=> Composite,
	Name 	=> pdc,
	Composite_Operation_List 	=> 
		(pdc1,pdc2,pdc3));

-- Transactions

Transaction (
	Type	=> Regular,
	Name	=> Tc1,
	External_Events => (
		(Type 		=> Periodic,
		 Name 		=> E1,
		 Period 	=> 75)),
	Internal_Events => (
		(Type 	=> regular,
		 name 	=> O1,
                 Timing_Requirements => (
			 Type 		  => Hard_Global_Deadline,
			 Deadline 	  => 576,
			 referenced_event => E1))),
	Event_Handlers => (
		(Type 			=> Activity,
		 Input_Event 		=> E1,
		 Output_Event 		=> O1,
		 Activity_Operation 	=> tc1,
		 Activity_Server	=> Task_1)));

Transaction (
	Type	=> Regular,
	Name	=> Tc2,
	External_Events => (
		(Type 		=> Periodic,
		 Name 		=> E2,
		 Period 	=> 75)),
	Internal_Events => (
		(Type 	=> regular,
		 name 	=> O2,
                 Timing_Requirements => (
			 Type 		  => Hard_Global_Deadline,
			 Deadline 	  => 576,
			 referenced_event => E2))),
	Event_Handlers => (
		(Type 			=> Activity,
		 Input_Event 		=> E2,
		 Output_Event 		=> O2,
		 Activity_Operation 	=> tc2,
		 Activity_Server	=> Task_2)));

Transaction (
	Type	=> Regular,
	Name	=> Tt1,
	External_Events => (
		(Type 		=> Periodic,
		 Name 		=> E3,
		 Period 	=> 75)),
	Internal_Events => (
		(Type 	=> regular,
		 name 	=> O3,
                 Timing_Requirements => (
			 Type 		  => Hard_Global_Deadline,
			 Deadline 	  => 580,
			 referenced_event => E3))),
	Event_Handlers => (
		(Type 			=> Activity,
		 Input_Event 		=> E3,
		 Output_Event 		=> O3,
		 Activity_Operation 	=> tt1,
		 Activity_Server	=> Task_3)));

Transaction (
	Type	=> Regular,
	Name	=> Tt2,
	External_Events => (
		(Type 		=> Periodic,
		 Name 		=> E4,
		 Period 	=> 75)),
	Internal_Events => (
		(Type 	=> regular,
		 name 	=> O4,
                 Timing_Requirements => (
			 Type 		  => Hard_Global_Deadline,
			 Deadline 	  => 580,
			 referenced_event => E4))),
	Event_Handlers => (
		(Type 			=> Activity,
		 Input_Event 		=> E4,
		 Output_Event 		=> O4,
		 Activity_Operation 	=> tt2,
		 Activity_Server	=> Task_4)));

Transaction (
	Type	=> Regular,
	Name	=> OM,
	External_Events => (
		(Type 		=> Sporadic,
		 Name 		=> E5,
		 Min_Interarrival => 1000)),
	Internal_Events => (
		(Type 	=> regular,
		 name 	=> O5,
                 Timing_Requirements => (
			 Type 		  => Hard_Global_Deadline,
			 Deadline 	  => 1000,
			 referenced_event => E5))),
	Event_Handlers => (
		(Type 			=> Activity,
		 Input_Event 		=> E5,
		 Output_Event 		=> O5,
		 Activity_Operation 	=> om,
		 Activity_Server	=> Task_5)));

Transaction (
	Type	=> Regular,
	Name	=> sp,
	External_Events => (
		(Type 		=> Sporadic,
		 Name 		=> E6,
		 Min_Interarrival 	=> 5000)),
	Internal_Events => (
		(Type 	=> regular,
		 name 	=> O6,
                 Timing_Requirements => (
			 Type 		  => Hard_Global_Deadline,
			 Deadline 	  => 1000,
			 referenced_event => E6))),
	Event_Handlers => (
		(Type 			=> Activity,
		 Input_Event 		=> E6,
		 Output_Event 		=> O6,
		 Activity_Operation 	=> sp1,
		 Activity_Server	=> Task_6)));


Transaction (
	Type	=> Regular,
	Name	=> s1,
	External_Events => (
		(Type 		=> Bursty,
		 Name 		=> E6,
		 Bound_Interval	=> 75,
	         Max_Arrivals	=> 2)),
	Internal_Events => (
		(Type 	=> regular,
		 name 	=> O6,
                 Timing_Requirements => (
			 Type 		  => Hard_Global_Deadline,
			 Deadline 	  => 75,
			 referenced_event => E6))),
	Event_Handlers => (
		(Type 			=> Activity,
		 Input_Event 		=> E6,
		 Output_Event 		=> O6,
		 Activity_Operation 	=> s1,
		 Activity_Server	=> Task_7)));

Transaction (
	Type	=> Regular,
	Name	=> s2,
	External_Events => (
		(Type 		=> Bursty,
		 Name 		=> E6,
		 Bound_Interval	=> 75,
	         Max_Arrivals	=> 2)),
	Internal_Events => (
		(Type 	=> regular,
		 name 	=> O6,
                 Timing_Requirements => (
			 Type 		  => Hard_Global_Deadline,
			 Deadline 	  => 75,
			 referenced_event => E6))),
	Event_Handlers => (
		(Type 			=> Activity,
		 Input_Event 		=> E6,
		 Output_Event 		=> O6,
		 Activity_Operation 	=> s2,
		 Activity_Server	=> Task_8)));


Transaction (
	Type	=> Regular,
	Name	=> pcd,
	External_Events => (
		(Type 		=> Sporadic,
		 Name 		=> E6,
		 Min_Interarrival 	=> 5000)),
	Internal_Events => (
		(Type 	=> regular,
		 name 	=> O6,
                 Timing_Requirements => (
			 Type 		  => Hard_Global_Deadline,
			 Deadline 	  => 1000,
			 referenced_event => E6))),
	Event_Handlers => (
		(Type 			=> Activity,
		 Input_Event 		=> E6,
		 Output_Event 		=> O6,
		 Activity_Operation 	=> pdc,
		 Activity_Server	=> Task_6)));


