Category Archives: ADA

Timing Specifications Needed for a Real Time Language

A Good Real time Programming language should specify various timing specifications for the entities in the System. But none of the languages does this. Following are some of the specifications needed for a good real time programming language Specify the … Continue reading

Posted in ADA, RealTimeSystems | Tagged , | Leave a comment

How Priority is Assigned to Tasks in ADA

procedure PRIORITY is task A task body A is pragma PRIORITY(5); begin end A; task B task body B is pragma PRIORITY(2); begin end B; task C task body C is pragma PRIORITY(1); begin end C; begin –Procedure body end … Continue reading

Posted in ADA, RealTimeSystems | Tagged , | Leave a comment

Example 2 – Tasking in ADA

task ALARM is entry AWAKE; task body ALARM is begin loop select accept AWAKE; or delay 50.0; SIGNAL_ALARM; end select; end loop; end ALARM;   The above code shows that whether an operator is awake or not. If the operator … Continue reading

Posted in ADA, RealTimeSystems | Tagged , | Leave a comment

Example 1 – Tasking in ADA

task SERVER is entry TASK_A(A,B:float); entry TASK_B(A,B:float); task body SERVER is begin loop select accept TASK_A(A,B:float); or accept TASK_B(A,B:float); or terminate; end select; end loop; end SERVER;   The above program implements a server which serves the two Queues TASK_A … Continue reading

Posted in ADA, RealTimeSystems | Tagged , | Leave a comment

Multitasking in ADA

How multitasking is achieved in ADA. Please look at the following pseudo code   Procedure ABC task A   task body A is ——- End A task B task body B is ——- End A task C   task body … Continue reading

Posted in ADA, RealTimeSystems | Tagged , | Leave a comment

Runtime Error (Exception) Handling

ADA handles programmer defined exceptions and system defined exceptions Some of the system defined exceptions are like  NUMERIC_ERROR – raised whenever the abnormal precision in the program like divide by zero  STORAGE-ERROR – raised whenever the program runs out of … Continue reading

Posted in ADA, RealTimeSystems | Tagged , | Leave a comment

Packages in ADA

Benefits of Packages Packages can be compiled, debugged independently software maintenance is very easier Once package is developed, they can be made accessible to everyone who has access to it. packages provide more security             … Continue reading

Posted in ADA, RealTimeSystems | Tagged , | Leave a comment

Blocks and Procedures in ADA

Blocks A Block in ADA contains two parts specification and a body. The specification specifies the variable used inside the block and the body executes the statement for the block syntax block begin — — end The main purpose of blocks are … Continue reading

Posted in ADA, RealTimeSystems | Tagged , | Leave a comment

ADA – Control Structures

if-then-else if yx:=4;elseif a=0 thenx:=6;elsed:=9;end if for …. do for i in 0..10 loopx(i) := i * j;end loop; while while x x:=x+i;end loop;case case x is when 1 => y:=x;when 2 => y:=0;when others => y:=-1;end case

Posted in ADA, RealTimeSystems | Tagged , | Leave a comment

ADA – Data types

Simple Data types//creates three variables for TEMPERATURE which is of type floattype TEMPERATURE is new float; ta, tb, tc: TEMPERATURE; //creates three variables for PRESSURE which is of type floattype PRESSURE is new float; pa, pb, pc: PRESSURE;ta=pa is illegal … Continue reading

Posted in ADA, RealTimeSystems | Tagged , | Leave a comment