Elaboration order issues in Ada 9X
Mats Weber · ACM SIGAda Ada Letters · 1993
In Ada 80, the rules governing the order of elaboration of library units left everything up to th e language translator.This would be fine if it were feasible, but it isn't : during the review of the Ada 80 document, it was discovered that deciding whether or not an Ada program wa s elaboratable led to solving undecidable problems .As a consequence, the approach adopted in Ada 83 left nearly all the work to the programme r (introducing pragma Elaborate) .It will be shown here that an approach somewhere betwee n Ada 80 and Ada 83 is feasible at reasonable cost, easing the maintenance and development o f large programs in a substantial way . L Why pragma Elaborate Messes Up Program sThe following example shows why the use of pragma Elaborate is "contagious", that is, if it i s needed for one library unit, then it must be added to many others in order to achieve th e desired effect .This is obviously a problem in large programs, especially when generic component libraries are used .