ientation page ad-a276 243 the b~ alww~ to~ orn &v aw mes … · 2011. 5. 14. · under ibm...

58
IENTATION PAGE __ __ft. "0"'Imaw 80"d immnls4 10981"n the b~ alww~ to~ orn &V aw mes o 0- Ia 01 mblima.W. """ AD-A276 243 a i w- vA-. t -. + , :- 243~~~n of him su'o$u Oro Wwm..wwf . wwoureim a 1*1 m .fbi0 m 1 4*.S Dh V IlillII II ii 111111 111 t lt REPORT 3.REPORT TY'PE-AND DATES 4. TITLE AND 5. FUN•ING AlsyCOMP_32, 5.5, Host: CompuAdd 433- under IBM OS/2, Versi n 2.1 + Threads, Target: Same As Host, 931208W1. 11333 6. Authors: Wright-Patterson AFB 7. PERFORMING ORGANIZATION NAME(S) AND 8. PERFORMING Ada Validating Facility. Language Control Facility ASD/SCEL ORANMTION Bldg. 676, Room 135 Wright Patterson AFB, Dayton OH 45433 9. SPONSORING/MONITORING AGENCY NAME(S) AND 10. SPONSORINQ'MONITORING Ada Joint Program Office O T C The Pentagon. Rmn 3E1I1I S EB2394_ _________ Washington, DO 20301-3080 FEB 2 3 1994 11. SUPPLEMENTARY 12a. DISTRIBUTIONýAVAILABILITY 12b. DISTRIBUTION Approved for public release; distribution unlimited 13. (Marimm 200 AlsyCOMP_32, 5.5, Host: CompuAdd 433 under IBM OS/2, Version 2.1 + Threads, Target: Same As Host 931208 WI .11333 94-05675 MC UALM i UI ii ll llll I l'"1 l"I"" --- -+ DTCQ A IY T E T 14. SUBJECT IS. NUMER OF Ada programming language, Ada Compiler Val. Summary Report, Ada Comp i5.PRNME OF / _•t ITesting, Ada Val. Office, Ada Val. Faclli y 17. SECURITY 18. SECURITY 1i. SECURITY 20. LIMITATION OF CLASSIFICATION CLASSIFICATION UNCLASSIFIED UNCLASSIFIED UNCLASSIFIED UNCLASSIFIED stariaaw Frm 296, (Rev. 2-9) N prnsabod by ANSI Si.

Upload: others

Post on 09-Sep-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

IENTATION PAGE __ __ft.

"0"'Imaw 80"d immnls4 10981"n the b~ alww~ to~ orn &V aw mes o 0- Ia 01 mblima.W. """AD-A276 243 a i w- vA-. t -. + , :-243~~~n of him su'o$u Oro Wwm..wwf . wwoureim a 1*1 m .fbi0 m 1 4*.S Dh V

IlillII II ii 111111 111 t lt REPORT 3.REPORT TY'PE-AND DATES

4. TITLE AND 5. FUN•ING

AlsyCOMP_32, 5.5, Host: CompuAdd 433- under IBM OS/2, Versi n2.1 + Threads, Target: Same As Host,931208W1. 11333

6.

Authors:

Wright-Patterson AFB7. PERFORMING ORGANIZATION NAME(S) AND 8. PERFORMING

Ada Validating Facility. Language Control Facility ASD/SCEL ORANMTIONBldg. 676, Room 135Wright Patterson AFB, Dayton OH 45433

9. SPONSORING/MONITORING AGENCY NAME(S) AND 10. SPONSORINQ'MONITORINGAda Joint Program Office O T CThe Pentagon. Rmn 3E1I1I S EB2394_ _________

Washington, DO 20301-3080 FEB 2 3 1994

11. SUPPLEMENTARY

12a. DISTRIBUTIONýAVAILABILITY 12b. DISTRIBUTIONApproved for public release; distribution unlimited

13. (Marimm 200

AlsyCOMP_32, 5.5, Host: CompuAdd 433 under IBM OS/2, Version2.1 + Threads, Target: Same As Host931208 WI .11333

94-05675 MC UALM

i UI ii ll llll I l'"1 l"I"" --- -+ DTCQ A IY T E T

14. SUBJECT IS. NUMER OF

Ada programming language, Ada Compiler Val. Summary Report, Ada Comp i5.PRNME OF

/ _•t ITesting, Ada Val. Office, Ada Val. Faclli y17. SECURITY 18. SECURITY 1i. SECURITY 20. LIMITATION OFCLASSIFICATION CLASSIFICATIONUNCLASSIFIED UNCLASSIFIED UNCLASSIFIED UNCLASSIFIED

stariaaw Frm 296, (Rev. 2-9)N prnsabod by ANSI Si.

Page 2: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

BestAvailable

Copy

Page 3: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

DISCLAIMER NOTICE

THIS REPORT IS INCOMPLETE BUT IS

THE BEST AVAILABLE COPY

FURNISHED TO THE CENTER. THERE

ARE MULTIPLE MISSING PAGES. ALL

ATTEMPTS TO DATE TO OBTAIN THE

MISSING PAGES HAVE BEEN

UNSUCCESSFUL.

Page 4: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

AVF Control Number: AVF-VSR-576.1093Date VSR Completed: 21 December 1993

93-05-25-ALS

Ada COMPILERVALIDATION SUMMARY REPORT:

Certificate Number: 931208W1.11333Alsys, Inc.

AlsyCOMP 032, 5.5CompuAdd 433 under IBM 0672, Version 2.1 + Threads

(Final)

Prepared By:Ada Validation Facility

645 CCSG/SCSLWright-Patterson AFB OH 45433-5707

Page 5: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

Certificate Information

The following Ada implementation was tested and determined to pass ACm 1.11.Testing was completed on 8 December 1993.

Compiler Name and Version: AlsyCCPO032, 5.5

Host Computer System: CopupAd 433under IBM 06/2, Version 2.1 + Threads

Target Computer System: Same as host

Customer Agreement Number: 93-05-25-ALS

See section 3.1 for any additional information about the testing environment.

As a result of this validation effort, Validation Certificate 931208w1.11333is awarded to Alsys, Inc. This certificate expires two years afterMIL-STM-18158 is approved by ANSI.

This report has been reviewed and is approved.

Ada Validation FacilityDale E. LangeTechnical Director645 CCSG/SCSLWright-Patterson API OH 45433-5707

MA H6,Alition Organization 'Acso o

ra_7Accesion For-SDire~tor,_•omputer and Software Engineering Divisionu Institute for Defense Analyses NTIS CRA&.l

Alexandria VA 22311 DTIC TA6 .iUnannou, ;ej

•; • Justlfic.•t~or,, , ...................

/.da Joint Program Office . -

Dirk Rogers, Major, USAF Dit•ribi.t.on I

Acting DirectorDepartment of Defense Avazlblity CodesWashington DC 20301 Avdil •indior

Dist Special

0-1ij--

Page 6: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

DECLARATION OF CONFORMANCE

Customer: Alsys Inc.

Ada Validation Facility: Wright-Patterson Air Force BaseOhio, 45433-6503

ACVC Version: 1.11

Ada Implementation:

Ada Compiler Name: AlsyCOMP._032

Version: 5.5

Host Computer System: CompuAdd 433under IBM OS/2Version 2.1 + Threads

Target Computer System: CompuAdd 433under IBM OS/2Version 2.1 + Threads

Customer's Declaration1, the undersigned, representing Alsys Inc, declare that Alsys Inc has no knowledge ofdeliberate deviations from the Ada Language Standard ANSI/MIL-STD-18 I15A in theimplementation listed in this declaration.

Pascal Cleve,Vice President, EngineeringAlsys, Inc.67 South Bedford StreetBurlington, MA 01803-5 152

Alsys. ,rc. 67 South Bedford Street. Burlington. MA 01803-5152Tel: 617-270-0030 Fax: 617-270-6882

Page 7: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

TALE OF CONTETS

CHAPTER 1 INTRODUCTION

1.1 USE OF THIS VALIDATIcON SUMIARY REPORT ........ .. 1-11.2 PEFDIcES .. .. .................. . . . . . 1-21.3 ACVC TEST CLASSES . ..... ................. 1-21.4 DEFINITIO OFT TEMS . ..... ................ 1-3

CHAPTER 2 IMPLEMIEATICON DEPENDENCIES

2.1 WITHDRAWN TESTS .............. ............. .. 2-12.2 INAPPLICABLE UESTS . . . . . . . . . . ...... 2-12.3 TEST MODIFICATIONS ...... ................. .. 2-4

CHAPTER 3 PROCESSING INFO•MATION

3.1 TESTING ENVIRONMENT . .............. .3-13.2 SUMMARY OF T RESULTS ............ ............ 3-13.3 TEST EXECUTICI4ON .......... ................... ..3-2

APPENDIX A MACRO PARAMETERS

APPENDIX B COMPILATION SYSTEM OPTIONS

APPENDIX C APPENDIX F OF THE Ada STANDARD

Page 8: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

CHA.PTER 1

INTRODUCTION

The Ada implementation described above was tested according to the AdaValidation Procedures (Pro92] against the Ada Standard (Ada83) using thecurrent Ada Compiler Validation Capability (ACVC). This Validation SummaryReport (VSR) gives an account of the testing of this Ada implementation. Forany technical terms used in this report, the reader is referred to (Pro92].A detailed description of the ACVC may be found in the current ACVC User'sGuide [tX389].

1.1 USE OF THIS VALIDATICN SUMMARY REPORT

Consistent with the national laws of the originating country, the AdaCertification Body may make full and free public disclosure of this report.In the United States, this is provided in accordance with the "Freedom ofInformation Act" (5 U.S.C. #552). The results of this validation apply onlyto the computers, operating systems, and compiler versions identified in thisreport.

The organizations represented on the signature page of this report do notrepresent or warrant that all statements set forth in this report areaccurate and complete, or that the subject implementation has nononconformities to the Ada Standard other than those presented. Copies ofthis report are available to the public from the AVF which performed thisvalidation or from:

National Technical Information Service5285 Port Royal RoadSpringfield VA 22161

Questions regarding this report or the validation test results should bedirected to the AVF which performed this validation or to:

Ada Validation OrganizationComputer and Software Engineering DivisionInstitute for Defense Analyses1801 North Beauregard StreetAlexandria VA 22311-1772

1-1

Page 9: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

IWTROUCTION

1.2 REFERENCES

[Ada83] Reference Manual for the Ada Programuing Language,ANSI/MIL-STD-1815A, February 1983 and ISO 8652-1987.

[Pro92] Ada Compiler Validation Procedures, Version 3.1, Ada JointProgram Office, August 1992.

([G89] Ada Compiler Validation Capability User's Guide, 21 June 1989.

1.3 ACVC TEST CLASSES

Compliance of Ada implementations is tested by means of the ACVC. The ACVCcontains a collection of test programs structured into six test classes: A,B, C, D, E, and L. The first letter of a test name identifies the class towhich it belongs. Class A, C, D, and E tests are executable. Class B andclass L tests are expected to produce errors at compile time and link time,respectively.

The executable tests are written in a self-checking manner and produce aPASSED, FAILED, or NOT APPLICABLE message indicating the result when they areexecuted. Three Ada library units, the packages REPORT and SPPRTl3, and theprocedure CHECK FILE are used for this purpose. The package REPORT alsoprovides a set of identity functions used to defeat some compileroptimizations allowed by the Ada Standard that would circumvent a testobjective. The package SPPRT13 is used by many tests for Chapter 13 of theAda Standard. The procedure CHECK FILE is used to check the contents of textfiles written by some of the -Class C tests for Chapter 14 of the AdaStandard. The operation of REPORT and CHECK FILE is checked by a set ofexecutable tests. If these units are not operating correctly, validationtesting is discontinued.

Class B tests check that a compiler detects illegal language usage. Class Btests are not executable. Each test in this class is compiled and theresulting compilation listing is examined to verify that all violations ofthe Ada Standard are detected. Somw of the class B tests contain legal Adaco,'e which must not be flagged illegal by the compiler. This behavior isalso verified.

Class L tests check that an Ada implementation correctly detects violation ofthe Ada Standard involving multiple, separately compiled units. Errors areexpected at link time, and execution is attempted.

In some tests of the ACVC, certain macro strings have to be replaced byimplementation-specific values - for example, the largest integer. A listof the values used for this implementation is provided in Appendix A. Inaddition to these anticipated test modifications, additional changes may berequired to remove unforeseen conflicts between the tests andimplementation-dependent characteristics. The modifications required forthis implementation are described in section 2.3.

1-2

Page 10: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

INTRODUCTICN

For each Ada implementation, a customized test suite is produced by the AVF.This customization consists of making the modifications described in thepreceding paragraph, removing withdrawn tests (see section 2.1), and possiblyremoving some inapplicable tests (see section 2.2 and JUG89]).

In order to pass an ACVC an Ada implementation must process each test of thecustomized test suite according to the Ada Standard.

1. 4 DEFINITION OF TERMS

Ada Compiler The software and any needed hardware that have to be added toa given host and target computer system to allowtransformation of Ada programs into executable form andexecution thereof.

Ada Compiler The means for testing compliance of Ada implementations,Validation consisting of the test suite, the support programs, the ACVCCapability user's guide and the template for the validation summary(ACVC) report.

Ada An Ada compiler with its host computer system and itsImplementation target computer system.

Ada Joint The part of the certification body which provides policy andProgram guidance for the Ada certification system.Office (AJPO)

Ada The part of the certification body which carries out theValidation procedures required to establish the compliance of an AdaFacility (AVF) implementation.

Ada The part of the certification body that provides technicalValidation guidance for operations of the Ada certification system.Organization(AVO)

Compliance of The ability of the implementation to pass an ACVC version.an AdaImplementation

Computer A functional unit, consisting of one or more computers andSystem associated software, that uses common storage for all or part

of a program and also for all or part of the data necessaryfor the execution of the program; executes user-written oruser-designated programs; performs user-designated datamanipulation, including arithmetic operations and logicoperations; and that can execute programs that modifythemselves during execution. A computer system may be astand-alone unit or may consist of several inter-connectedunits.

1-3

Page 11: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

INTROU•CTI

Conformity Fulfillment by a product, process, or service of allrequirements specified.

Customer An individual or corporate entity who enters into an agreementwith an AVF which specifies the terms and conditions for AVWservices (of any kind) to be performed.

Declaration of A formal statement from a customer assuring that conformityConformance is realized or attainable on the Ada implementation for which

validation status is realized.

Host Computer A computer system where Ada source programs are transformedSystem into executable form.

Inapplicable A test that contains one or more test objectives found to be

test irrelevant for the given Ada implementation.

ISO International Organization for Standardization.

LAM The Ada standard, or Language Reference Manual, published asANSI/MIL-STD-1815A-1983 and ISO 8652-1987. Citations from theLMn take the form "<section>. <subsection>:<paragraph>."

Operating Software that controls the execution of programs and thatSystem provides services such as resource allocation, scheduling,

input/output control, and data management. usually, operatingsystems are predominantly software, but partial or completehardware implementations are possible.

Target A computer system where the executable form of Ada programsComputer are executed.System

Validated Ada The compiler of a validated Ada implementation.Compiler

Validated Ada An Ada implementation that has been validated successfullyImplementation either by AVF testing or by registration [Pro92J.

Validation The process of checking the conformity of an Ada compiler tothe Ada programming language and of issuing a certificate forthis implementation.

Withdrawn A test found to be incorrect and not used in conformitytest testing. A test may be incorrect because it has an invalid

test objective, fails to meet its test objective, or containserroneous or illegal use of the Ada programming language.

1-4

Page 12: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

APTER 2

IMPLD--TATION DEPENDENCIES

2.1 WITHDRAN TESTS

The following tests have been withdrawn by the AVO. The rationale forwithdrawing each test is available from either the AVO or the AVF. Thepublication date for this list of withdrawn tests is 22 November 1993.

B27005A E28005C B28006C C32203A C34006D C35507KC35507L C35507N C355070 C35507P C355081 C355083C35508M C35508N C35702A C35702B C37310A B41308BC43004A C45114A C45346A C45612A C45612B C45612CC45651A C46022A B49008A B49008B A54B02A C55B06AA74006A C74308A B83022B B83022H B83025B B83025DC83026A B83026B C83041A B85001L C86001F C94021AC97116A C98003B BA2011A C87001A CB7001B CB7004ACC1223A BC1226A CC1226B BC3009B BD1B02B BD1BO6AADIBO8A BD2AO2A CD2A2lE CD2A23E CD2A32A CD2A4IACD2A41E CD2A87A CD2B15C BD3006A BD4008A CD4022ACD4022D CD4024B CD4024C CD4024D CD4031A CD4051DCD5111A CD7004C ED7005D CD7005E AD7006A CD7006EAD7201A AD7201E CD7204B AD7206A BD8002A BD8004CCD9005A CD9005B CDA201E CE21071 CE2117A CE2117BCE2119B CE2205B CE2405A CE3111C CE3116A CE3118ACE3411B CE3412B CE3607B CE3607C CE3607D CE3812ACE3814A CE3902B

2.2 INAPPLICABLE TESTS

A test is inapplicable if it contains test objectives which are irrelevantfor a given Ada implementation. Reasons for a test's inapplicability may besupported by documents issued by the ISO and the AJPO known as AdaCommentaries and commonly referenced in the format AI-ddddd. For thisimplementation, the following tests were determined to be inapplicable forthe reasons indicated; references to Ada Commentaries are included asappropriate.

2-1

Page 13: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

IMPLDEITATION DEPENDENCIES

The following 201 tests have floating-point type declarations requiringmore digits than SYSTEM.MAX DIGITS:

C24113L..Y (14 tests) C35705L..Y (14 tests)C35706L..Y (14 tests) C35707L..Y (14 tests)C35708L..Y (14 tests) C35802L..Z (15 tests)C45241L..Y (14 tests) C45321L..Y (14 tests)C454ZlL..Y (14 tests) C45521L..Z (15 tests)C45524L..Z (15 tests) C45621L..Z (15 tests)C45641L..Y (14 tests) C46012L..Z (15 tests)

The following 20 tests check for the predefined type WONGINTEGER; forthis implementation, there is no such type:

C35404C C45231C C45304C C45411C C45412CC45502C C45503C C45504C C45504F C45611CC45613C C45614C C45631C C45632C B52004DC55B07A B53B09C 886001W C86006C CD7101F

C35713D and B86001Z check for a predefined floating-point type with aname other than FLOAT, LQNG FLOAT, or SHORT_FLOAT; for thisimplementation, there is no such type.

C45531M..P and C45532M..P (8 tests) check fixed-point operations fortypes that require a SYSTEM.MAX MANTISSA of 47 or greater; for thisimplementation, MAXMANTISSA is lesi than 47.

C45536A, C46013B, C46031B, C46033B, and C46034B contain length clausesthat specify values for 'SMALL that are not powers of two or ten; thisimplementation does not support such values for 'SMALL.

C45624A..B (2 tests) check that the proper exception is raised ifMACHINE OVERFLOWS is FALSE for floating point types and the results ofvarious- floating-point operations lie outside the range of the basetype; for this implementation, MACHINE OVERFL0WS is TRUE.

B86001Y uses the name of a predefined fixed-point type other than typeDURATION; for this implementation, there is no such type.

C96005B uses values of type DURATION's base type that are outside therange of type DURATION; for this implementation, the ranges are thesame.

CD1009C checks whether a length clause can specify a non-default sizefor a floating-point type; this implementation does not support suchsizes.

CD2A53A checks operations of a fixed-point type for which a lengthclause specifies a power-of-ten TYPE'SMALL; this implementation does notsupport decimal 'SMALLs. (See section 2.3.)

2-2

Page 14: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

IM1LDMNTTICN DEPENDENCIES

CD2A84A, CD2A84E, CD2AB4I..j (2 tests), and CD2A840 use length clausesto specify non-default sizes for access types; this implementation doesnot support such sizes.

BD8001A, BD8003A, BD8004A..B (2 tests), and AD801lA use machine codeinsertions; this implementation provides no package MACHINE CODE.

The tests listed in the following table check that USE ERROR is raisedif the given file operations are not supported for the gTven combinationof mode and access method; this implementation supports theseoperations.

Test File Operation Mode File Access Method

CE2102E CREATE OUT FILE SEQUIETIAL 10CE2102F CREATE INOUT FILE DIRECT 10CE2102J CREATE OUT FILE DIRECT-10CE2102N OPEN IN FILE SEQUEOTIAL 10CE21020 RESET IN-FILE SEQUENTIALIOCE2102P OPEN E_ FILE SEVUENTIAL-I0CE2102Q RESET OUT-FILE SEQUNTIAL_0IOCE2102R OPEN INCr FILE DIRECT 10CE2102S RESET INOUT-FILE DIRECT-I0CE2102T OPEN IN FILE DIRECT--IOCE2102U RESET IN -FILE DIRECT-10CE2102V OPEN WE FILE DIRECT--IOCE2102W RESET JTT-FILE DIRECT-IOCE3102F RESET Any-Mode TEXT IOCE3102G DELETE TEXT_10CE3102I CREATE OUT FILE TEXT_10CE3102J OPEN IN FILE TET--IOCE3102K OPEN W_ FILE TXT--IO.

The tests listed in the following table check the given file operationsfor the given combination of mode and access method; this implementationdoes not support these operations.

Test File Operation Mode File Access Method

CE2105A CREATE IN FILE SEUN TIAL_10CE2105B CREATE IN"FILE DIRECT 10CE3109A CREATE IN-FILE TEXT 10

The following 16 tests check operations on sequential, direct, and textfiles when multiple internal files are associated with the same externalfile and one or more are open for writing; USEERROR is raised when thisassociation is attempted.

CE2107B..E CE2107G..H CE2107L CE2110B CE2110DCE2111D CE2111H CE3111B CE3111D..E CE3114BCE3115A

2-3

Page 15: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

IMPLEMENIATION DEPENDENCIES

CE2111C checks the reset operations on a file of SEQJUETIALIO type.This implementation raises USEERROR on any attempt to reset fromINFILE to OUTFILE mo:de.

CE2203A checks that WRITE raises USE ERROR if the capacity of anexternal sequential file is exceeded; this implementation cannotrestrict file capacity.

EE2401D and EE2401G use instantiations of DIRECT I0 with unconstrainedarray and record types; this implementation riises USEERROR on theattempt to create a file of such types.

CE2401H uses instantiations of DIRECT 10 with unconstrained recordtypes; this implementation raises USEIfRMR on the attempt to create afile of such types.

CE2403A checks that WRITE raises USE ERROR if the capacity of anexternal direct file is exceeded; this-implementation cannot restrictfile capacity.

CE3304A checks that SET LINE LENGTH and SET PAGE _LETH raise USE ERRORif they specify an inapproprTate value for the external file; there areno inappropriate values for this implementation.

CE3413B checks that PAGE raises LAYOTJ ERROR when the value of the pagenumber exceeds COUNT'LAST; for this- implementation, the value ofCOUNTILAST is greater than 150000, making the checking of this objectiveimpractical.

2.3 TEST MODIFICATIONS

Modifications (see section 1.3) were required for 19 tests.

The following tests were split into two or more tests because thisimplementation did not report the violations of the Ada Standard in the wayexpected by the original tests.

B23004A B23007A B23009A B25002A B26005A B28003AB32202A B32202B B32202C B37004A B61012A B95069AB95069B BA1101B BC2001D BC3009A BC3009C

BA2001E was graded passed by Evaluation Modification as directed by the AVO.The test expects that duplicate names of subunits with a common ancestor willbe detected as compilation errors; this implementation detects the errors atlink time, and the AVO ruled that this behavior is acceptable.

CD2A53A was graded inapplicable by Evaluation Modification as directed by theAVO. The test contains a specification of a power-of-10 value as 'SMALL fora fixed-point type. The AVO ruled that, under ACVC 1.11, support of decimal'SMALLs may be omitted.

2-4

Page 16: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

CMUTM 3

PROCESSING INFOMATION

3.1 TESTING NVIRCONENT

The Ada implementation tested in this validation effort is describedadequately by the information given in the initial pages of this report.

For technical and sales information about this Ada implementation, contact:

Pascal Cleve67 South Bedford StreetBurlington, MR 01803(617) 270-0030

Testing of this Ada implementation was conducted at the customer's site by avalidation team from the AVF.

3.2 SUMMARY OF TEST RESULTS

An Ada Implementation passes a given ACVC version if it processes each testof the customized test suite in accordance with the Ada Programming LanguageStandard, whether the test is applicable or inapplicable; otherwise, the AdaImplementation fails the ACVC [Pro92].

For all processed tests (inapplicable and applicable), a result was obtainedthat conforms to the Ada Programming Language Standard.

The list of items below gives the number of ACVC tests in various categories.All tests were processed, except those that were withdrawn because of testerrors (item b; see section 2.1), those that require a floating-pointprecision that exceeds the implementation's maximum precision (item e; seesection 2.2), and those that depend on the support of a file system - ifnone is supported (item d). All tests passed, except those that are listedin sections 2.1 and 2.2 (counted in items b and f, below).

3-1

Page 17: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

a) Total Number of Applicable Tests 3769b) Total Number of Withdrawn Tests 104c) Processed Inapplicable Tests 96d) Non-Processed I/o Tests 0e) Non-Processed Floating-Point

Precision Tests 201

f) Total Number of Inapplicable Tests 297 (c+d+e)

g) Total Number of Tests for ACVC 1.11 4170 (a+b+f)

3.3 TEST EXECUTrIoN

A magnetic tape containing the customized test suite (see section 1.3) wastaken on-site by the validation team for processing. The contents of themagnetic tape were loaded directly onto the host computer.

After the test files were loaded onto the host computer, the full set oftests was processed by the Ada implementation.

The tests were compiled, linked and executed on the host computer system.The results were captured on the computer system.

Testing was performed using ccmmand scripts provided by the customer andreviewed by the validation team. See Appendix B for a complete listing ofthe processing options for this implementation. It also indicates thedefault options.

COMPILER OPTIONS EFFECT

CHECKS -> ALL Generate all execution checks.GENERICS => STUBS Do not inline generics.TASKING -> YES Allow tasking.MEDORY -> 500 Amount of internal buffers shared by

compile virtual memory.STACK -> 20480 Boundary size determining whether an

dynamic object is allocated on the stackor in the map.

INLINE => PRAG(A Inlining of subprograms by pragma INLINE.REDUCTION -> NONE No optimization of checks or loops.EXPRESSIONS -> NONE No lowlevel optimization.

BINDER OPTIONS EFFECT

LEVEL -> LINK Bind and link.OBJECT -> AUZ TIC Object name is same as main procedure

(truncated to 8 characters).U!NCLLE => REMOVE Remove uncalled subprograms.

3-2

Page 18: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

! , l ! I I I I I I

MAIN -> 100 Size of main program stack.TASK => 40 Size of explicit Ada task stacks.

HISTORY -> YES Allow for stack traceback.SIZE -> 1024 Size (in K bytes) of initial heap.

INCRET -> 0 Size (in K bytes) of increment to heap.

Test output, compiler and linker listings, and job logs were captured on

magnetic tape and archived at the AVF. The listings examined on-site by the

validation team were also archived.

3-3

Page 19: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

APPENDIX A

MAO PARAMETERS

This appendix contains the macro parameters used for customizing the ACVC.The meaning and purpose of these parameters are explained in (UG89]. Theparameter values are presented in two tables. The first table lists thevalues that are defined in terms of the maximum input-line length, which isthe value for SMAX IN _LEN-also listed here. These values are expressed hereas Ada string aggriegates, where "V" represents the maximum input-line length.

Macro Parameter Macro Value

$W XINLEN 255 - Value of V

S$IG IDI (l..V-1 => 'A', V 1> '1')

$BIGID2 (l..V-1 -> 'A', V -> '2')

$BIG ID3 (l..V/2 -> 'A') & '3' &(l..V-l-V/2 -> 'A')

$BIG ID4 (l..V/2 -> 'A') & '4' &(l..V-l-V/2-> 'A')

$BIG INTLIT (l..V-3-> '0') & "298"

$BIGREALLIT (l..V-5-> '0') & "690.0"

$BIGSTRING1 '' & (l..V/2 -> 'A') & ''

$BIG STRING2 '"' & (I..V-1-V/2 -> 'A') & '1' & Flo

$BLANKS (l..V-20 -> '

$MAX LEN INT BASED LITERAL"2:" & (l..V-5-> '0') £ "11:"

$MAXLENI REALBASEDLITERAL"16:" & (l..V-7 -> '0') & "F.E:"

A-1

Page 20: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

ACO PARAMETERS

$MAX STRINGLITERAL "' a (l..V-2 -> 'A'W) ""

The following table lists all of the other macro parameters and their

respective values.

Macro Parameter Macro Value

SACCSIZE 32

$ALIGNMENT 4

$CONTLAST 2147483647

$DEFAULTMEMSIZE 2**32

$DEFAULT_STOR_UNIT 8

SDEFAULTSYS_NAME 180386

$DELTA DOC 2#1.0#E-31

$ENTRY_ADDRESS FCNDECL. ENTRY ADDRESS

$ENTRYADDRESS1 FCNDECL. ENTRY ADDRESS1

$ENTRYADDRESS2 FCNDECL. ENTRY ADDRESS2

$FIELDLAST 255

$FILETERMINATOR '

$FIXEDNAME NO SUCH_FIXEDTYPE

$FLOATNAM NOSUCHFLOAT_TYPE

$FORM _STRING

$FORM._STRING2 "CANOT RESTRICT FILE CAhACITY"

$GREATERTHAN DURATION75000.0

$GREATERTHAN DURATION BASE LASTT31011.0

$GREATERTHAN FLOAT BASE LAST-- 1.•0141E+38

$GRE.ATER THAN FLOAT SAFE LARGES- - 1.UE308

A-2

Page 21: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

RAM PARAMETERS

SUREATER THAN SHORT FL•AT SAFE LARGE1.01308 -

$HIGH_PRIORITY 96

$ILLEGALXTERL FILE NAM M1",,NOIRECTORBYFILEDNE•

$ILLEGAL EXTERNAL FILE NME2T7l S-FILE-NANE-IS-¶VOO-LQNG-FOK-MY-SYS1TE

$INAPPROPRIATE LINE LENGTH-1

$INAPPROPRIATE PAGE-LENGTH-1

$INCLUDEPRAG4NA PRAGM INCLUDE ("A28006D1.TST")

$INCLUDEFRAGIA2 PRAGMA INCLUDE ("B28006DI.TST")

$INTEGER FIRST -2147483648

$INTEGERLAST 2147483647

$INTEGER LAST PLUS 1 2147483648

$ INTERFACE LANUAGE C

$LESS_THANDURATION -75000.0

SLESSTHAN DURATION BASE FIRST-111073.0

SLINETERMINATOR ASCII.CR & ASCII.Lr

$LWPRIORITY 1

SMACHINE CODESTALTEMNTNULL;

$MACHINECODETYPE NOSUCHTYPE

$MANTISSA DOC 31

SMAX DIGITS 15

$MAX INT 2147483647

$MAX_INTPLUS_1 2147483648

$SININT -2147483648

$NAME SHORTSHORT INTEGER

A-3

Page 22: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

MACRO PAAMETERS

$NAME LIST 180X86,I80386,MC680X0,S370,TRANSPUTER,VAX,RS_6000,MIPS,SPARC

$NAWESPECIFICATICN1 C :\ACVCNQ2120A

$NAME.SPECI FICATICN2 C:\,ACVC\X2"120B

SNAME SPECIFICATICN3 C:\ACVC\X3119A

SNEGBASED INT 16tF0000000E

$NEW _MI_S IZE 2**32

$NEW_STOR_UNIT 16

$NEWSYSNAME 180386

SPAGE_TERMINATOR ASCII.CR & ASCII.LF ASCII.FF

$RECORD DEFINITION NEW INTEGER;

$RECORDNAME NOSUCH MACHINECODE_TYPE

$TASKSIZE 32

STASK STORAGE SIZE 1024

STICK 0.01

•VARIABLEADDRESS FCNDECL.VARIABLEADDRESS

$VARIABLE_ADORESSi FCNDECL.VARIABLEADDRESS1

$VARIABLEADDRESS2 FCNDECL.VAIABLEADORESS2

$YOUR PRAGIA. INTERFACE

A-4

Page 23: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

APPENDIX B

COMPILATION SYSTE OPTIONS

The compiler options of this Ada implementation, as described in thisAppendix, are provided by the customer. Unless specifically noted otherwise,references in this appendix are to compiler documentation and not to thisreport.

COMPILE (SOURCE -> source name I INSTANTIATION,LIBRARY => librar3;_paw,OPTIONS =>

(ANNOTATE -> character string,ERRORS > positive Tnteger,LEVEL -> PARSE I DM4ANt7C I CODE I UPDATE,CHECKS -> ALL I STACK I NONE,GENERICS -> STBSM INLINE,TASKING -> YES I NO,MEMORY => numberof_kbytes),

DISPLAY ->(OUTPUT -> SCREE4 I NONE I AmTWATIC I

file name,WARNING >YES I NO,TEXT >YES I NO,

sH > BANNER I RECAP I ALL I NONE,DETA•L > YES j NO,ASSEMBLY > CODE I MAP I ALL I NONE),

ALLOCATION ->(STACK > positive-integer),

IMPROVE ->(CALLS -> SUPPRESS I PRAGM I AUTOMATIC,REUCTION -> NONE I PARTIAL I XTEN4SIVE,EXPRESSIONS -> NONE I PARTIAL I EXEN1SIVE,

KEEP =>(COPY -> YES I NO,DEUG ->YES I NO,TREE =>YES NOEIT N> ONE I AUTOMTIC i file name,OTI ,> YES I NO));

B-1

Page 24: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

COMPILATION SYSTEM OPTIONS

LINKER OPTIONS

The linker options of this Ada implementation, as described in this Appendix,are provided by the customer. Unless specifically noted otherwise,references in this appendix are to linker documentation and not to thisreport.

BIND (PROG RAM> unit name,LIBRARY => libr&ryname,OPTIONS ->

(LEVEL -> CHECK I BIND I LINK,EXECUTION-> PROTECTED I ERTNDDED,OBJECT -> AUTMATIC J file-name,UNCALLED -> REOVE I KEEP,APPTYPE -> WINDAPI I WINDCqCOMPAT

NOTWINCOMPAT),STACK =>

(MAIN -> positive integer,TASK => positive-integer,HISTORY -> YES I NOT,

HEAP =>(SIZE -> positive integer,INCREN T> naturalnumber),

INTERFACE ->(DIRECTIVES -> optionsforlinker,MODULES -> file names,SEARCH -> library names),

DISPLAY ->(O UT -> SCREE I NONE I ALUT0MATIC file-name,DATA -> BIND I LINK I ALL I NONE,$RNING -> YES I NO),

KEEP =>(DEBUG -> YES I NO,OTI => YES I NO));

B-2

Page 25: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

APPEDIX C

APPENDIX F OF THE Ada STAND M

The only allowed implementation dependencies correspond toimplementation-dependent pragmas, to certain machine-dependent conventions asmntioned in Chapter 13 of the Ada Standard, and to certain allowedrestrictions on representation clauses. The implementation-dependentcharacteristics of this Ada implementation, as described in this Appendix,are provided by the customer. Unless specifically noted otherwise,references in this Appendix are to compiler documentation and not to thisreport. Implementation-specific portions of the package STANDARD, which arenot a part of Appendix F, are:

package STANDARD is

type INTEGER is range -2147483648 .. 2147483647;type SHORT INTEGER is range -32768 .. 32767;type SHORTSHORTINTEGER is range -128 .. 127;

type SHORT FLOAT is digits 6 range -2#1.111 1111 1111 _1111 1111_ l11E+127.. 2#1.111-1111-111171111-1111-1111#E+127;

type FLOAT is digits 6 range -2#1.111 1111 Tlll 1111 T111 111101+127.. 2#1.111-111171111-1111-1111-11114E+127;

type LONG FLOAT is digits 15 range-2#1.1111 11 11111_1111 1111 1111 1111 1111 1111 1111 1111 1111 1111E#E023

2*1.1111_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111*E1023;

type DURATION is delta 2#0.000 000 000 000 01*range -1310727000l0 .7 13T071.99994;

end STANDRD;

C-i

Page 26: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

APPENDIX F OF THE Ada STANDARD

APPENDIX F

Version 5.5

Copyright 1993 by Alsys

All rights reserved. No part of this document may be reproduced in any formor by any means without permission in writing from Alsys.

Alsys reserves the right to make changes in specifications and otherinformation contained in this publication without prior notice. ConsultAlsys to determine whether such changes have been made.

Alsys, AdaWorld AdaProbe, AdaXref, AdaReformat, and AdaMake are registeredtrademarks of Alsys.

ABOUT THIS DOCUMET

This document, Appendix F, summarizes the implementation-dependentcharacteristics of the Alsys Ada Compilation System. Appendix F is arequired part of the Reference Manual for the Ada Programming Language(called the RN in this document).

Structure of this document

Section 1 (Implementation-Dependent Pragmas) Specifies the form ofeach implementation-dependent pragma and explains the useand effect of each.

Section 2 (Implementation-Dependent Attributes) Specifies the nameand the type of each implementation-dependent attribute.

Section 3 (Specification of the package SYSTDE) Contains thespecification of package SYSTEM for this implementation.

Section 4 (Support for Representation Clauses) Describes how objectsare represented and allocated by the compiler and describesapplicable restrictions.

Section 5 (Conventions for Implementation-Generated Names) Lists allimplementation-generated names.

Section 6 (Address Clauses) Interprets expressions that appear inaddress clauses, including those for interrupts.

Section 7 (Unchecked Conversions) Explains the restrictions onunchecked conversions in this implementation.

Section 8 (Input-Output Packages) Specifies the implementation-dependent characteristics of input-output packages.

C-2

Page 27: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

APPENDIX F OF THE Ada STANDARD

Section 9 (Characteristics of Numeric Types) Defines the ranges andattributes of numeric types in this implementation.

Section 10 (Other Implementation-Dependent Characteristics) Describesimplementation-dependent characteristics not covered in theother chapters (such as that of the heap, tasks, and mainsubprograms).

Section 11 (Limitations) Describes compiler- and hardware-relatedlimitations of this implementation.

Document conventions

The following list describes the tyl:graphical notations used in this

document.

Italics This font is used to designate:

File names; for example, MAIN.CUI

Prompts generated by a program; for example:

Library_Manager.NEW (LIBRARY -> "\GAMES");

(Library_Manager is the prompt.)

Full document titles; for example, ApplicationDeveloper' s Guide.

Generic commiand parameters in syntax diagrams (wherethe user must supply an actual value); for example,

DEFAULT. commandERASE (FAMILY -> familyname);

Bold This font is used within text to designate:

Conmmands that must be keyed in by the user; forexample:

Use the command COMPILE (BINGO.ADA); to ...

Typewriter This font is used for file listings.

The following list shows examples of actual notations used in this manualand explains how the format of the example is used to convey extrainformation about it.

KEEP The underscore here indicates that KEEP is a default option.

YES I NO A vertical bar indicates two or more alternatives. In this

C-3

Page 28: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

APPENDIX F OF THE Ada STkAARD

example, either YES or No may be selected.

ZONE.MARK This notation is used to designate commands within theworkbench set of tools. It may be used for either of thefollowing:

"A command that can be typed in: ZONE is the commandand MARK is an option.

"A menu item and its option: MARK is an option thatcan be selected from the ZCNE menu.

Section 1

Implementation-Dependent Pragmas

1.1 INLINE

Pragma INLINE is fully supported. The compiler option INLINE +provides additional control over the inlining of subprograms.

1.2 INTERFACE

Ada programs can interface with subprograms written in Assembler and otherlanguages through the use of the predefined pragma INTERFACE and theimplementation-defined pragma INTERFACE NAME.

Pragma INTERFACE specifies the name of an interfaced subprogram and thename of the programing language for which parameter passing conventionswill be generated. Pragma INTERFACE takes the form specified in the RM:

pragma INTERFACE (language_name, subprogramname);

where,

languagename is ASSEMBLER, ADA, or C.

subprogram name is the name used within the Ada program to refer to theinterfaced subprogram.

The only language names accepted by pragma INTERFACE are ASSEMBLER, ADA andC. The full implementation requirements for writing pragma INTERFACEsubprograms are described in the Application Developer's Guide.

The language name used in the pragma INTERFACE does not have to have anyrelationship to the language actually used to write the interfacedsubprogram. It is used only to tell the Compiler how to generatesubprogram calls; that is, what kind of parameter passing techniques touse. The programmer can interface Ada programs with subroutines written inany other (compiled) language by understanding the mechanisms used forparameter passing by the Alsys OS/2 Ada Compiler and the correspondingmechanisms of the chosen external language.

C-4

Page 29: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

APPEIX F OF THE Ada SrANDARD

1.3 INTERFACE NAME

Pragma INTERFACE NAME associates the name of the interfaced subprogram withthe external nami of the interfaced subprogram. If pragma INTERFACE NAMEis not used, .then the two names are assumed to be identical. This pragmatakes the form:

pragma INTERFACE NAME (subprogramname, stringliteral);

where,

subprogram name is the name used within the Ada program to refer to theinterfaced subprogram.

string literal is the name by which the interfaced subprogram isreferied to at link time.

The pragma INTERFACE NAME is used to identify routines in other languagesthat are not named wTth legal Ada identifiers. Ada identifiers can onlycontain letters, digits, or underscores, whereas the OS/2 Linker LINK386allows external names to contain other characters, for example, the dollarsign ($) or commercial at sign (M). These characters can be specified inthe string_literal argument of the pragma INTERFACENAME.

The pragma INTERFACE NAME is allowed at the same places of an Ada programas the pragma INTERFACE. (Location restrictions can be found in section13.9 of the RM.) However, the pragma INTERFACE NAME must always occurafter the pragma INTERFACE declaration for the Tnterfaced subprogram.

The string literal of the pragma INTERFACE NAME is passed throughunchanged ,-including case sensitivity, to The OS/2 object file. There isno limit to the length of the name.

If INTERFACE NAME is not used, the default link name for the subprogram isits Ada name-converted to all upper case characters.

The user must be aware however, that some tools from other vendors do notfully support the standard object file format and may restrict the lengthor names of symbols. For example, most OS/2 debuggers only work withalphanumeric identifier names.

The Runtime Executive contains several external identifiers. All suchidentifiers begin with either the string "ADA " or the string "ADAS ".Accordingly, names prefixed by "ADA " or "AD " should be avoided &y theuser.

Example

package SAMPLE DATA isfunction SAMPLE DEVICE (X: INTEGER) return INTEGER;function PROCESS SAMPLE (X: INTEGER) return INTEGER;

C-5

Page 30: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

APPEDIX F OF THE Ada STANDARD

privatepragma INTERFACE (ASSEMBLER, SAMPLE DEVICE);pragma INTERFACE (ADA, PROCESS SAMPLE);pragma INTERFACE_NAME (SAMPLEDEVICE, "DEVIO$GET SAMPLE");

end SAMPLEDATA;

1.4 INDENT

Pragma INDENT is only used with AdaReformat. AdaReformat is the Alsysreformatter which offers the functionalities of a pretty-printer in an Adaenvi ronment.

The pragma is placed in the source file and interpreted by the Reformatter.The line

pragma INDENT(OFF);

causes AdaReformat not to modify the source lines after this pragma, while

pragma INDET(ON);

causes AdaReformat to resume its action after this pragma.

1.5 Other Pragmas

Pragmas IMPROVE and PACK are discussed in detail in the section onrepresentation clauses and records (Chapter 4).

Pragma PRIORITY is accepted with the range of priorities running from 1 to96 (see the definition of the predefined package SYSTEM :.n Section 3 andChapter 7 of the Application Developer's Guide). Tasks with undefinedpriority (no pragma PRIORITY) are assigned priority by OS/2 since Ada tasksare OS/2 threads.

In addition to pragma SUPPRESS, it is possible to suppress all checks in agiven compilation by the use of the Compiler option CHECKS. (See Chapter 4of the User's Guide.)

Section 2

Implementation-Dependent Attributes

2.1 P'IS ARRAY

For a prefix P that denotes any type or subtype, this attribute yields thevalue TRUE if P is an array type or an array subtype; otherwise, it yieldsthe value FALSE.

C-6

Page 31: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

APPEDIX F OF THE Aa STANDARD

2.2 P'RECORD_ DESCRIPTOR, P'ARRAYDESCRIPTOR

These attributes are used to control the representation of implicitcomponents of a record. (See Section 4.8 for more details.)

2.3 E'EXCEPTI6N CODE

For a prefix E that denotes an exception name, this attribute yields avalue that represents the internal code of the exception. The value ofthis attribute is of the type INTEGER.

2.4 Other Attributes

'OFFSET, 'RECORD SIZE, 'VARIANT INDEX, 'ARRAY DESCRIPTOR, and'RECORD DESCRIPTOR are descibed-in detail in Section 4.

Section 3

Specification of the package SYSTEM

The implementation does not allow the recompilation of package SYSTEM.

3.1 Specification of the package SYSTDE

- This unpublished work is protected both as a proprietary work and under- the Universal Copyright Convention and the US Copyright Act of 1976. Its- distribution and access are limited only to authorized persons. Copyright- (C) Alsys. Created 1990, initially licenced 1990. All rights reserved.- Unauthorized use (including use to prepare other works), disclosure,- reproduction or distribution may violate national criminal law.

- Check that all CPUs are covered.

- Check that all operating systems are covered

package SYSTEI is

type NAME is (180X86,180386,MC680X0,S370,TRANSPUTER,VAX,RS 6000,MIPS,SPARC);

- The order of the elements of this type is not significant.

C-7

Page 32: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

APPEIDIX F OF THE Ada STANARD

SYSTEM NAME : constant NAM :- 180386;

STORAGE UNIT : constant :-8;

MAX INT - : constant :2**31 - 1;

NIN INT : constant :-- (2**31);

MAX MANTISSA : constant :- 31;

TINE DELTA : constant :- 2#1.0tE-31;

MAX DIGITS : constant :- 15;

MEMORY SIZE : constant :- 2**32;

TICK : constant :- 0.01;

subtype PRIORITY is INTEGER range 1..96;

- Ada9X and the runtime system define an extension to the range for- PRIORITY called- INTERRUPT PRIORITY. For the runtime system, this subtype defines the

- range of priorities to be used by deferred handlers (tasks) for- interrupts.

-Range of priority levels assigned to interrupts.

INTERRUPT LEVELS : constant :- 32;

subtype INTERRUPT PRIORITY is INTEGER rangePRIORITY'LAST + 1 .. PRIORITY'LAST + INTERRUPT LEVELS;

type ADDRESS is private;NULL ADDRESS : constant ADDRESS;

- This constant defines the size of an object of type ADDRESS in s.u.'s.ADDRESS SIZE : constant :- 4;

function VALUE (LEFT : in STRING) return ADDRESS;

- Converts a string to an address. The syntax of the string and its- meaning are target derpndent.

- For the 8086, 80186 ari 80286 the syntax is:"SSSS:0000" where SSSS and 0000 are a 4 digit or less hexadecimal

-- number representing a segment value and an offset.- The physical address corresponding to SSSS:0000 depends- on the execution mode. In real mode it is 16*SSSS+4000.-- In protected mode the value SSSS represents a segment-- descriptor.

- Example:

C-8

Page 33: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

APPENDIX F OF THE Ada STANDARD

- This type is used to designate the size of an object in storage units.

procedure MOVE (TO : in ADDRESS;FROM : in ADDRESS;LENG3TH : in OBJECTLENGTH);

- Copies LENGTH storage units starting at the address FRO to the address- TO. The source and destination may overlap.

private

pragma INLINE ("+", "-U)

type ADDRESS is access STRING;NULL ADDRESS : constant ADDRESS :- null;

end SYSTEM;

Section 4

Support for Representation Clauses

This section explains how objects are represented and allocated by theAlsys OS/2 Ada compiler and how it is possible to control this usingrepresentation clauses. Applicable restrictions on representation clausesare also described.

The representation of an object is closely connected with its type. Forthis reason this section addresses successively the representation ofenumeration, integer, floating point, fixed point, access, task, array andrecord types. For each class of type the representation of thecorresponding objects is described.

Except in the case of array and record types, the description for eachclass of type is independent of the others. To understand therepresentation of array and record types it is necessary to understandfirst the representation of their components.

Apart from implementation defined pragnas, Ada provides three means to

control the size of objects:

"a (predefined) pragma PACK, applicable to array types

"a record representation clause

"a size specification

For each class of types the effect of a size specification is described.Interactions among size specifications, packing and record representationclauses is described under the discussion of array and record types.

C-11

Page 34: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

APVIX F OF THE Ada STAM

Representation clauses on derived record types or derived tasks types arenot supported.

Size representation clauses on types derived from private types are notsupported when the derived type is declared outside the private part of thedefining package.

4.1 Enumeration Types

4.1.1 Enumeration Literal Encoding

When no enumeration representation clause applies to an enumeration type,the internal code associated with an enumeration literal is the positionnumber of the enumeration literal. Then, for an enumeration type with nelements, the internal codes are the integers 0, 1, 2, .. , n-1.

An enumeration representation clause can be provided to specify the valueof each internal code as described in RM 13.3. The Alsys compiler fullyimplements enumeration representation clauses.

As internal codes must be machine integers the internal codes provided byan enumeration representation clause must be in the range -231 .. 231 - 1.

An enumeration value is always represented by its internal code in theprogram generated by the compiler.

4.1.2 Enumeration Types and Object Sizes

Minim= size of an enumeration subtype

The minimum possible size of an enumeration subtype is the minimum numberof bits that is necessary for representing the internal codes of thesubtype values in normal binary form.

A static subtype, with a null range has a minimum size of 1. Otherwise, ifm and N are the values of the internal codes associated with the first andlast enumeration values of the subtype, then its minimum size L isdetermined as follows. For m >- 0, L is the smallest positive integer suchthat H <= 2L - 1. For m < 0, L is the smallest positive integer such that -2L-1 <- m and M <- 2L-1 - 1. For example:

type COLOR is (GREEN, BLACK, WHITE, RED, BLUE, YELLOW);- The minimum size of COLOR is 3 bits.

subtype BLACK AND WHITE is COLOR range BLACK .. WHITE;- The minimu' size of BLACK AND WHITE is 2 bits.

subtype BLACK OR WHITE is BLACK AND WHITE range X .. X;- Assuming t~at-X is not statiC, the minimum size of BLACK OR WHITE is- 2 bits (the same as the minimum size of its type mark BLACK-AND WHITE).

C-12

Page 35: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

APPEDIX F OF ThE Ada STADARD

Size of an enumeration subtype

When no size specification is applied to an enumeration type or first namedsubtype, the objects of that type or first named subtype are represented assigned machine integers. The machine provides 8, 16 and 32 bit integers,and the compiler selects automatically the smallest signed machine integerwhich can hold each of the internal codes of the enumeration type (orsubtype). The size of the entmeration type and of any of its subtypes isthus 8, 16 or 32 bits.

When a size specification is applied to an enumeration type, thisenumeration type and each of its subtypes has the size specified by thelength clause. The same rule applies to a first named subtype. The sizespecification must of course specify a value greater than or equal to theminimum size of the type or subtype to which it applies:

type EXTEDED is(- The usual ASCII character set.NUL, SOH, STX, ETX, EXDT, ENQ, ACK, BEL,

;x-;,F yf, `zt, fit, f1f, P]', 1-1, DEL,

- Extended charactersCCEDILLACAP, UU1WLAUT, EACUTE, .. )

for EXTENDED'SIZE use 8;- The size of type EXTENDED will be one byte. Its objects will be- represented as unsigned 8 bit integers.

The Alsys compiler fully implements size specifications. Nevertheless, asenumeration values are coded using integers, the specified length cannot begreater than 32 bits.

Size of the objects of an enumeration subtype

Provided its size is not constrained by a record component clause or apragma PACK, an object of an enumeration subtype has the same size as itssubtype.

4.2 Integer Types

There are three predefined integer types in the Alsys implementation for180386 machines:

type SHORT SHORT INTEGER is range -2**07 .. 2**07-1;type SHORT-INTER is range -2**15 .. 2**15-1;type INTEGER is range -2**31 .. 2**31-1;

C-13

Page 36: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

APPEIDIX F OF THE Ada STNDAP.D

4.2.1 Integer Type Representation

An integer type declared by a declaration of the form:

type T is range L .. R;

is implicitly, derived from a predefined integer type. The compilerautomatically selects the predefined integer type whose range is thesmallest that contains the values L to R inclusive.

Binary code is used to represent integer values. Negative numbers arerepresented using two's complement.

4.2.2 Integer Type and Object Size

The minimum possible size of an integer subtype is the minimu number ofbits that is necessary for representing the internal codes of the subtypevalues in normal binary form.

For a static subtype, if it has a null range its minimum size is 1.Otherwise, if m and M are the lower and upper bounds of the subtype, thenits minimum size L is determined as follows. For m >- 0, L is thesmallest positive integer such that M <- 2L-1. Form < 0, L is the smallest positive integer that -2L-1 <- m and M <- 2L-1 -

1. For example:

subtype S is INTEGER range 0 .. 7;- The minimum size of S is 3 bits.

subtype D is S range X .. Y;- Assuming that X and Y are not static, the minimum size of- D is 3 bits (the same as the minimun size of its type mark S).

Size of an integer subtype

The sizes of the predefined integer types SHORT SHORT INTEGER,SHORT INTEGER and INTEGER are respectively 8, 119 and 72 bits.

when no size specification is applied to an integer type or to its firstnamed subtype (if any), its size and the size of any of its subtypes is thesize of the predefined type from which it derives, directly or indirectly.For example:

type S is range 80 .. 100;- S is derived from SHORTSHORTINTEGER, its size is- 8 bits.

type J is range 0 .. 255;J- is derived from SHORT INTEGER, its size is 16 bits.

C-14

Page 37: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

APPENDIX F OF THE Ada STANDA

type N is new J range 80 .. 100;- N is indirectly derived from SHORT INTEM, its size is- 16 bits.

When a size specification is applied to an integer type, this integer typeand each of its subtypes has the size specified by the length clause. Thesame rule applies to a first named subtype. The size specification must ofcourse specify a value greater than or equal to the minimm size of thetype or subtype to which it applies:

type S is range 80 .. 100;for S'SIZE use 32;- S is derived from SHORT SHORT INTEGER, but its size is- 32 bits because of the iize specification.

type J is range 0 .. 255;for J'SIZE use 8;- J is derived from SHORT INTEGER, but its size is 8 bits- because of the size specification.

type N is new J range 80 .. 100;- N is indirectly derived from SHORT INTEGER, but its- size is 8 bits because N inherits Ehe size specification- of J.

Size of the objects of an integer subtype

Provided its size is not constrained by a record component clause or apragma PACK, an object of an integer subtype has the same size as itssubtype.

4.3 Floating Point Types

There are two predefined floating point types in the Alsys implementationfor I80x86 machines:

type FLOAT isdigits 6 range -(2.0 - 2.0**(-23))*2.0k*127 .. (2.0 - 2.0**(-23) )*2.0**127;

type LQNG FLOAT isdigits-15 range -(2.0 - 2.0**(-52))*2.0**1023 .. (2.0 - 2.0"*(-52) )*2.0**1023;

4.3.1 Floating Point Type Representation

A floating point type declared by a declaration of the form:

type T is digits D [range L .. RI;

C-15

Page 38: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

APPENDIX F OF THE Ada STMAND

is implicitly derived from a predefined floating point type. The compilerautomatically selects the smallest predefined floating point type whosenumber of digits is greater than or equal to D and which contains thevalues L to R inclusive.

In the program generated by the ccmpiler, floating point values arerepresented using the IEEE standard formats for single and double floats.

The values of the predefined type FL0AT are represented using the singlefloat format. The values of the predefined type LUG FLOAT are representedusing the double float format. The values of any othir floating point typeare represented in the same way as the values of the predefined type fromwhich it derives, directly or indirectly.

4.3.2 Floating Point Type and Object Size

The minimum possible size of a floating point subtype is 32 bits if itsbase type is FLOAT or a type derived from FLOAT; it is 64 bits if its basetype is U1NG FLOAT or a type derived from LCGMFLhT.

The sizes of the predefined floating point types FLOT and LONG FLOAT arerespectively 32 and 64 bits.

The size of a floating point type and the size of any of its subtypes isthe size of the predefined type from which it derives directly orindirectly.

The only size that can be specified for a floating point type or firstnamed subtype using a size specification is its usual size (32 or 64 bits).

An object of a floating point subtype has the same size as its subtype.

4.4 Fixed Point Types

4.4.1 Fixed Point Type Representation

If no specification of small applies to a fixed point type, then the valueof small is determined by the value of delta as defined by RM 3.5.9.

A specification of small can be used to impose a value of small. The valueof small is required to be a power of two.

To implement fixed point types, the Alsys compiler for I80x86 machines usesa set of anonymous predefined types of the form:

type SHORT FIXED is delta D range (-2.0**7-1)*S .. 2.0**7*S;for SHORT fIXED'SNALL use S;

type FIXED is delta D range (-2.0"*15-1)*S .. 2.0**15*S;for FIXED'SMALL use S;

C-16

Page 39: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

ApPVIX F OF THE Ada ShDARRD

type LONG FIXED is delta D range (-2.0**31-1)*S .. 2.0*,31"S;for LCNG_ IXED'SMALL use S;

where D is any real value and S any power of two less than or equal to D.

A fixed point type declared by a declaration of the form:

type T is delta D range L .. R;

possibly with a small specification:

for T'SMALL use S;

is implicitly derived from a predefined fixed point type. Th. compilerautomatically selects the predefined fixed point type whose small and deltaare the same as the small and delta of T and whose range is the shortestthat includes the values L to R inclusive.

In the program generated by the compiler, a safe value V of a fixed pointsubtype F is represented as the integer:

V / F'BASE'SMALL

4.4.2 Fixed Point Type and Object Size

Minimusm size of a fixed point subtype

The minimum possible size of a fixed point subtype is the minimum number ofbinary digits that is necessary for representing the values of the range ofthe subtype using the small of the base type.

Minimum size of an integer subtype

For a static subtype, if it has a null range its mininum, size is 1.Otherwise, s and S being the bounds of the subtype, if i and I are theinteger representations of m and M, the smallest and the greatest modelnumbers of the base type such that s < m and M < S, then the minimum size Lis determined as follows. For i >- 0, L is the smallest positive integersuch that I <- 21-1. For i < 0, L is the smallest positive integersuch that -21-1 <- i and I <- 2L-1-1.

type F is delta 2.0 range 0.0 .. 500.0;- The minimum size of F is 8 bits.

subtype S is F delta 16.0 range 0.0 .. 250.0;- The minimum size of S is 7 bits.

subtype D is S range X .. Y;- Assuming that X and Y are not static, the minimum size of D is 7 bits- (the same as the minimum size of its type mark S).

C-17

Page 40: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

APPEDIX F OF THE Ada STANDARD

Size of a fixed point subtype

The sizes of the predefined fixed point types SHORTFIXED, FIXED andLQ4 FIXED are respectively 8, 16 and 32 bits.

when no size specification is applied to a fixed point type or to its firstnamed subtype, its size and the size of any of its subtypes is the size ofthe predefined type from which it derives directly or indirectly. Forexample:

type S is delta 0.01 range 0.8 .. 1.0;- S is derived from an 8 bit predefined fixed type, its size is 8 bits.

type F is delta 0.01 range 0.0 .. 2.0;- F is derived from a 16 bit predefined fixed type, its size is 16 bits.

type N is new F range 0.8 .. 1.0;- N is indirectly derived from a 16 bit predefined fixed type, its size- is 16 bits.

When a size specification is applied to a fixed point type, this fixedpoint type and each of its subtypes has the size specified by the lengthclause. The same rule applies to a first named subtype. The sizespecification must of course specify a value greater than or equal to theminimum size of the type or subtype to which it applies:

type S is delta 0.01 range 0.8 .. 1.0;for S'SIZE use 32;- S is derived from an 8 bit predefined fixed type, but its size is 32- bits because of the size specification.

type F is delta 0.01 range 0.0 .. 2.0;for F'SIZE use 8;- F is derived from a 16 bit predefined fixed type, but its size is 8- bits because of the size specification.

type N is new F range 0.8 .. 1.0;- N is indirectly derived from a 16 bit predefined fixed type, but its- size is 8 bits because N inherits the size specification of F.

The Alsys compiler fully implements size specifications. Nevertheless, asfixed point objects are represented using machine integers, the specifiedlength cannot be greater than 32 bits.

Size of the objects of a fixed point subtype

Provided its size is not constrained by a record component clause or apragma PACK, an object of a fixed point type has the same size as itssubtype.

C-18

Page 41: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

APPENDIX F OF THE Ada STANDARD

4.5 Access Types and Collections

Access Types and Objects of Access Types

The only size. that can be specified for an access type using a sizespecification is its usual size (32 bits).

An object of an access subtype has the same size as its subtype, thus anobject of an access subtype is always 32 bits long.

Collection Size

As described in RM 13.2, a specification of collection size can be providedin order to reserve storage space for the collection of an access type.

When no STORAGE SIZE specification applies to an access type, no storagespace is reservid for its collection, and the value of the attributeSTORAGE SIZE is then 0.

The maximum size is limited by the amount of memory available.

4.6 Task Types

Storage for a task activation

As described in RM 13.2, a length clause can be used to specify the storagespace (that is, the stack size) for the activation of each of the tasks ofa given type. Alsys also allows the task stack size, for all tasks, to beestablished using a Binder option. If a length clause is given for a tasktype, the value indicated at bind time is ignored for this task type, andthe length clause is obeyed. When no length clause is used to specify thestorage space to be reserved for a task activation, the storage spaceindicated at bind time is used for this activation.

A length clause may not be applied to a derived task type. The same storagespace is reserved for the activation of a task of a derived type as for theactivation of a task of the parent type.

The minimwm size of a task subtype is 32 bits.

A size specification has no effect on a task type. The only size that canbe specified using such a length clause is its usual size (32 bits).

An object of a task subtype has the same size as its subtype. Thus anobject of a task subtype is always 32 bits long.

4.7 Array Types

Each array is allocated in a contiguous area of storage units. All the

C-19

Page 42: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

APPE14IX T OF 'IU A& 3WnQRD

components have the same size. A gap amy exist between two consecutivecomponents (and after the last one). All the gaps have the same size.

4.7.1 Array Layout and Structure and Pragma PACK

If pragma PACK is not specified for an array, the size of the components isthe size of the subtype of the compnents:

type A is array (1 .. 8) of BOOLEAN;- te size of the components of A is the size of the type BOOLEAN: 8- bits.

type DECIMAL DIGIT is range 0 .. 9;for DECIMAL DIGIT'SIZE use 4;type BINKRY"CODED DECIMAL is

array (INCTEGR--range o) of DECIMAL DIGIT;- The size of the type DECIMAL DIGIT Ts 4 bits. Thus in an array of- type BINARY COOED DECIMAL each component will be represented on- 4 bits as iii the usual BM, representation.

If prama PACK is specified for an array and its components are neitherrecords nor arrays, the size of the components is the minim= size of thesubtype of the components:

type A is array (1 .. 8) of BOOLEAN;pragm PACK(A);- The size of the components of A is the minimum size of the type- BOOLEAN:- 1 bit.

type DECIMAL DIGIT is range 0 .. 9;for DECIMAL DIGIT'SIZE use 32;type BINARY-CODED DECIMAL is

array (I-NTEGEArange <>) of DECIMALDIGIT;pragma PACK(BINARY CODED DECIMAL);- The size of the type DECIMAL DIGIT is 32 bits, but, as- BINARY CODED DECIMAL is packed, each component of an array of this- type will be-represented on 4 bits as in the usual BCD representation.

Packing the array has no effect on the size of the components when thecomponents are records or arrays, since records and arrays may be assignedaddresses consistent with the alignment of their subtypes.

Gaps

If the components are records or arrays, no size specification applies tothe subtype of the components and the array is not packed, then thecompiler may choose a representation with a gap after each component; theaim of the insertion of such gaps is to optimize access to the arraycomponents and to their subcomponents. The size of the gap is chosen sothat the relative displacement of consecutive components is a multiple of

C-20

Page 43: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

APPENDIX F OF THE Ada STAIMD

the alignment of the subtype of the components. This strategy allows eachcomponent and subcomponent to have an address consistent with the alignmentof its subtype:

type R isrecord

K :SHORTINTEGER;B : BCOOLEAI;

end record;for R use

recordK at 0 range 0 .. 31;B at 4 range 0 .. 0;

end record;- Record type R is byte aligned. Its size is 33 bits.

type A is array (1 .. 10) of R;- A gap of 7 bits is inserted after each component in order to respect the- alignment of type R. The size of an array of type A will be 400 bits.

Array of type A: each subcomponent K has an even offset.

If a size specification applies to the subtype of the components or if thearray is packed, no gaps are inserted:

type R isrecord

K : SHORT INTEGER;B : BOOLEAN;

end record;

type A is array (1 .. 10) of R;pragma PACK(A);- There is no gap in an array of type A because A is packed.- The size of an object of type A will be 330 bits.

type NR is new R;for NR'SIZE use 24;

type B is array (1 .. 10) of NR;- There is no gap in an array of type B because- NR has a size specification.- The size of an object of type B will be 240 bits.

4.7.2 Array Subtype and Object Size

Size of an array subtype

The size of an array subtype is obtained by multiplying the number of itscomponents by the sum of the size of the components and the size of the

C-21

Page 44: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

APPENDIX F OF THE Ada STAN MRD

gaps (if any). If the subtype is unconstrained, the maximum number ofcomponents is considered.

The size of an array subtype cannot be computed at compile time

if it has non-static constraints or is an unconstrained array type withnon-static index subtypes (because the number of components can thenonly be determined at run time).

if the co"ponents are records or arrays and their constraints or theconstraints of their subcomponents (if any) are not static (because thesize of the components and the size of the gaps can then only bedetermined at run time).

As has been indicated above, the effect of a pragma PACK on an array typeis to suppress the gaps. The consequence of packing an array type is thusto reduce its size.

If the components of an array are records or arrays and their constraintsor the constraints of their subcomponents (if any) are not static, thecompiler ignores any pragma PACK applied to the array type but issues awarning message. Apart from this limitation, array packing is fullyimplemented by the Alsys compiler.

A size specification applied to an array type or first named subtype has noeffect. The only size that can be specified using such a length clause isits usual size. Nevertheless, such a length clause can be useful to verifythat the layout of an array is as expected by the application.

Size of the objects of an array subtype

The size of an object of an array subtype is always equal to the size ofthe subtype of the object.

4.8 Record Types

4.8.1 Basic Record Structure

Layout of a record

Each record is allocated in a contiguous area of storage units. The size ofa record component depends on its type.

The positions and the sizes of the components of a record type object canbe controlled using a record representation clause as described in RM 13.4.In the Alsys implementation for I80x86 machines there is no restriction onthe position that can be specified for a component of a record. If acomponent is not a record or an array, its size can be any size from theminimum size to the size of its subtype. If a component is a record or anarray, its size must be the size of its subtype.

C-22

Page 45: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

APPENDIX F OF THE Ad& STANMRD

Pragma PACK has no effect on records. It is unnecessary because recordrepresentation clauses provide full control over record layout.

A record representation clause need not specify the position and the sizefor every component. If no component clause applies to a component of arecord, its size is the size of its subtype.

4.8.2 Indirect Components

If the offset of a component cannot be computed at compile time, thisoffset is stored in the record objects at run time and used to access thecomponent. Such a component is said to be indirect while other componentsare said to be direct.

A direct and an indire, '. component

If a record component is a record or an array, the size of its subtype maybe evaluated at run time and may even depend on the discriminants of therecord. We will call these components dynamic components:

type DEVICE is (SCREDE, PRINTER);

type COLOR is (GREDE, RED, BLUE);

type SERIES is array (POSITIVE range <>) of INTEGER;

type GRAPH (L : NATURAL) isrecord

X : SERIES(1 .. L); - The size of X depends on LY : SERIES(l .. L); - The size of Y depends on L

end record;

Q : POSITIVE;

type PICTURE (N : NATURAL; D : DEVICE) isrecord

F : GRAPH(N); - The size of F depends on NS : GRAPH(Q); - The size of S depends on Qcase D is

when SCREN ->C : COLOR;

when PRINTER ->null;

end case;end record;

Any component placed after a dynamic component has an offset which cannotbe evaluated at compile time and is thus indirect. In order to minimize thenumber of indirect components, the compiler groups the dynamic componentstogether and places them at the end of the record.

The record type PICTURE: F and S are placed at the end of the record

C-23

Page 46: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

APPENDIX F OF THE Ada STANDARD

Note that Ada does not allow representation clauses for record componentswith non-static bounds [RM 13.4.71, so the ccmpiler's grouping of dynamiccomponents does not conflict with the use of representation clauses.

Because of this approach, the only indirect components are dynamiccomponents. But not all dynamic components are necessarily indirect: ifthere are dynamic components in a component list which is not followed by avariant part, then exactly one dynamic component of this list is a directcomponent because its offset can be computed atcompilation time (the only dynamic components that are direct componentsare in this situation).

The record type GRAPH: the dynamic component X is a direct coonent.

The offset of an indirect component is always expressed in storage units.

The space reserved for the offset of an indirect component must be largeenough to store the size of any value of the record type (the maximumpotential offset). The compiler evaluates an upper bound MS of this sizeand treats an offset as a component having an anonymous integer type whoserange is 0 .. MS.

If C is the name of an indirect component, then the offset of thiscomponent can be denoted in a component clause by the implementationgenerated name C'OFFSET.

4.8.3 Implicit Components

In some circumstances, access to an object of a record type or to itscomponents involves computing information which only depends on thediscriminant values. To avoid recomputation (which would degradeperformance) the compiler stores this information in the record objects,updates it when the values of the discriminants are modified and uses itwhen the objects or its components are accessed. This information is storedin special components called implicit components.

An implicit component may contain information which is used when the recordobject or several of its components are accessed. In this case thecomponent will be included in any record object (the implicit component isconsidered to be declared before any variant part in the record typedeclaration). There can be two components of this kind; one is calledRECORD SIZE and the other VARIANT INDEX.

On the other hand an implicit component may be used to access a givenrecord component. In that case the implicit component exists whenever therecord component exists (the implicit component is considered to bedeclared at the same place as the record component). Components of thiskind are called ARRAY DESCRIPTORs or RECORD DESCRIPTORs.

RECORD SIZE

C-24

Page 47: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

APPE•2DIX F OF THE Ada STANDARD

This implicit component is created by the compiler when the record type hasa variant part and its discriminants are defaulted. It contains the size ofthe storage space necessary to store the current value of the record object(note that the storage effectively allocated for the record object may bemore than this).

The value of a RECORD SIZE component may denote a number of bits or anumber of storage units. In general it denotes a number of storage units,but if any component clause specifies that a component of the record typehas an offset or a size which cannot be expressed using storage units, thenthe value designates a number of bits.

The implicit component RECORD SIZE must be large enough to store themaximum size of any value of The record type. The compiler evaluates anupper bound MS of this size and then considers the implicit component ashaving an anonymous integer type whose range is 0 .. MS.

If R is the name of the record type, this implicit component can be denotedin a component clause by the implementation generated name R'RECORD SIZE.This allows user control over the position of the implicit component in therecord.

VARIANT INDEX

This implicit component is created by the compiler when the record type hasa variant part. It indicates the set of components that are present in arecord value. It is used when a discriminant check is to be done.

Component lists in variant parts that themselves do not contain a variantpart are numbered. These numbers are the possible values of the implicitcomponent VARIANTINDEX.

type VEHICLE is (AIRCRAFT, ROCKET, BOAT, CAR);

type DESCRIPTION (KIND : VEHICLE :- CAR) isrecord

SPEED : INTEGER;case KIND is

when AIRCRAFT I CAR ->WHEELS : INTEGER;case KIND is

when AIRCRAFT -> - 1WINGSPAN : INTEGER;

when others -> - 2null;

end case;when BOAT -> - 3

STEAM : BOOLEAN;when ROCKET -> - 4

STAGES : INTEGER;end case;

C-25

Page 48: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

APPENDIX F OF THE Ada STANDARD

end record;

The value of the variant index indicates the set of components that arepresent in a record value.

A comparison between the variant index of a record value and the bounds ofan interval i's enough to check that a given component is present in thevalue:

The implicit component VARIANT INDEX must be large enough to store thenumber V of component lists thit don't contain variant parts. The compilertreats this implicit component as having an anonymous integer type whoserange is 1 .. V.

If R is the name of the record type, this implicit component can be denotedin a component clause by the implementation generated name R'VARIANT INDEX.This allows user control over the position of the implicit component-in therecord.

ARRAYDESCRIPTOR

An implicit component of this kind is associated by the compiler with eachrecord component whose subtype is an anonymous array subtype that dependson a discriminant of the record. It contains information about thecomponent subtype.

The structure of an implicit comp.)nent of kind ARRAY DESCRIPTOR is notdescribed in this documentation. Nevertheless, if a programmier isinterested in specifying the location of a component of this kind using acomponent clause, size of the component may be obtained using the ASSEMBLYparameter in the COMPILE command.

The compiler treats an implicit component of the kind ARRAY DESCRIPTOR ashaving an anonymous array type. If C is the name of the record componentwhose subtype is described by the array descriptor, then this implicitcomponent can be denoted in a component clause by the implementationgenerated name C'ARRAY DESCRIPTOR. This allows user control over theposition of the implicTt component in the record.

RECORD DESCRIPTOR

An implicit component of this kind is associated by the compiler with eachrecord component whose subtype is an anonymous record subtype that dependson a discriminant of the record. It contains information about thecomponent subtype.

The structure of an implicit component of kind RECORD DESCRIPTOR is notdescribed in this documentation. Nevertheless, if a programmer isinterested in specifying the location of a component of this kind using acomponent clause, the size of the component may be obtained using theASSEMBLY parameter in the COMPILE command.

C-26

Page 49: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

APPENDIX F OF THE Ada STANARD

The compiler treats an implicit component of the kind RECORD DESCRIPTOR ashaving an anonymous array type. If C is the name of the record componentwhose subtype is described by the record descriptor, then this implicitcomponent can be denoted in a component clause by the implementationgenerated name C'RECORD DESCRIPTOR. This allows user control over theposition of the implicit component in the record.

Suppression of Implicit Components

The Alsys implementation provides the capability of suppressing theimplicit components RECORD SIZE and/orVARIANT INDEX from a record type.This can be done using an implementation defijned pragma called IMPROVE. Thesyntax of this pragma is as follows:

pragma IMPROVE ( TIME I SPACE [,CN ->] simplename );

The first argument specifies whether TIME or SPACE is the primary criterionfor the choice of the representation of the record type that is denoted bythe second argument.

If TIME is specified, the compiler inserts implicit components as describedabove. If on the other hand SPACE is specified, the compiler only insertsa VARIANT INDEX or a RECORD SIZE component if this component appears in arecord representation clause that applies to the record type. A recordrepresentation clause can thus be used to keep one implicit component whilesuppressing the other.

A pragma IMPROVE that applies to a given record type can occur anywherethat a representation clause is allowed for this type.

4.8.4 Size of Record Types and Objects

Size of a record subtype

Unless a component clause specifies that a component of a record type hasan offset or a size which cannot be expressed using storage units, the sizeof a record subtype is rounded up to a whole number of storage units.

The size of a constrained record subtype is obtained by adding the sizes ofits components and the sizes of its gaps (if any). This size is notcomputed at compile time

when the record subtype has non-static constraints,

when a component is an array or a record and its size is not computed atcompile time.

The size of an unconstrained record subtype is obtained by adding the sizesof the components and the sizes of the gaps (if any) of its largestvariant. If the size of a component or of a gap cannot be evaluated exactly

C-27

Page 50: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

APPENDIX F OF THE Ada STANDARD

at compile time an upper bound of this size is used by the compiler tocompute the subtype size.

A size specification applied to a record type or first named subtype has noeffect. The only size that can be specified using such a length clause isits usual size. Nevertheless, such a length clause can be useful to verifythat the layout of a record is as expected by the application.

Size of an object of a record subtype

An object of a constrained record subtype has the same size as its subtype.

An object of an unconstrained record subtype has the same size as itssubtype if this size is less than or equal to 8 kb. If the size of thesubtype is greater than this, the object has the size necessary to storeits current value; storage space is allocated and released as thediscriminants of the record change.

Section 5

Conventions for Implementation-Generated Names

The Alsys OS/2 Ada Compiler may add fields to record objects and havedescriptors in memory for record or array objects. These fields areaccessible to the user through implementation-generated attributes (SeeSection 2.3).

The following predefined packages are reserved to Alsys and cannot berecompiled in Version 5.5:

systemcalendarinternal typessystem environmentinterruptmanagerunix typesunsignedmachine operations_386get fili numberalsyjscocegen supportalsys_rts extendedasciialsystracesalsystarget integersalsys rt typesalsys-time typesalsys-mach~ne task typesalsys-stack extensional sys-tcb_ ickagealsys assertalsys task-listsalsys resource

C-28

Page 51: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

APPENDIX F OF THE Ada SUNDARD

alsys synchronizationalsys~ada runtimealsys error ioalsys-machinealsys-shared_messagesalsys target messagesalsys-task controlalsys-confTgurationalsys-thread controlalsys-em codealsys-adaprobe supportalsys-task keriel_probealsys extantalsys-interrupt manageralsys-rts interruptalsys-intirrupt rendezvousalsys-cifo suppr talsys-bind-rtsalsys-io controlalsys basic ioalsys io tracesalsys-binary ioalsys-huffer-ioalsys-file_panagement

Section 6

Address Clauses

6.1 Address Clauses for Objects

An address clause can be used to specify an address for an object asdescribed in RM 13.5. When such a clause applies to an object the compilerdoes not cause storage to be allocated for the object. The program accessesthe object using the address specified in the clause. It is theresponsibility of the user therefore to make sure that a valid allocationof storage has been done at the specified address.

An address clause is not allowed for task objects, for unconstrainedrecords whose size is greater than 8k bytes or for a constant.

There are a number of ways to compose a legal address expression for use inan address clause. The most direct ways are:

For the case where the memory is defined in Ada as another object, usethe 'ADDRESS attribute to obtain the argument for the address clause forthe second object.

For the case where an absolute address is known to the programmer, usethe function SYSTEM.IMAGE, whose specification is described in Section3.

C-29

Page 52: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

APPENDIX F OF THE A64 STANWD

For the case where the desired location is memory defined in assembly oranother non-Ada language (is relocatable), an interfaced routine may beused to obtain the appropriate address from referencing informationknown to the other language.

6.2 Address Clauses for Program Units

Address clauses for program units are not implemented in the currentversion of the compiler.

6.3 Address Clauses for Interrupt Entries

Interrupt entries are not supported.

Section 7

Unchecked Conversions

Unchecked conversions are allowed between any types provided theinstantiation of UNCHECKED CCNVERSION is legal Ada. It is the progranner'sresponsibility to determine- if the desired effect is achieved.

If the target type has a smaller size than the source type then the targetis made of the least significant bits of the source.

Section 8

Input-Output Packages

In this part of the Appendix the implementation-specific aspects of theinput-output system are described.

8.1 Introduction

In Ada, input-output operations (10) are considered to be performed onobjects of a certain file type rather than being performed directly onexternal files. An external file is anything external to the program thatcan produce a value to be read or receive a value to be written. Values

.transferred for a given file must be all of one type.

Generally, in Ada documentation, the term file refers to an object of acertain file type, whereas a physical manifestation is known as an externalfile. An external file is characterized by

Its name, which is a string defining a legal path name under the currentversion of the operating system.

Its form, which gives implementation-dependent information on file

C-30

Page 53: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

APPENDIX F OF THE Ada STANDARD

characteristics.

Both the name and the form appear explicitly as parameters of the AdaCREATE and OPEN procedures. Though a file is an object of a certain filetype, ultimately the object has to correspond to an external file. BothCREATE and OPEN associate a NAME of an external file (of a certain FORM)with a program file object.

Ada 10 operations are provided by means of standard packages [14).

SE••NTIAL_I0 A generic package for sequential files of a single elementtype.

DIRECTIO A generic package for direct (random) access files.

TEXT_10 A generic package for human readable (text, ASCII) files.

I0_EXCEPTIONS A package which defines the exceptions needed by the abovethree packages.

The generic package LOWLEVEL_10 is not implemented in this version.

The upper bound for index values in DIRECT_10 and for line, column and pagenumbers in TEXT 10 is given by

C(XJNT'LAST - 2**31 -1

The upper bound for field widths in TEXT_10 is given by

FIELD'LAST - 255

8.2 Correspondence between External Files and O5/2 Files

Ada input-output is defined in terms of external files. Data is read fromand written to external files. Each external file is implemented as astandard OS/2 file, including the use of STANDARDINPUT andSTANDARD OUTPUT.

The name of an external file can be either

the null string

a OS/2 filename

a OS/2 special file or .i.Device name;device name (for example, CON andPRN)

If the name is a null string, the associated external file is a temporaryfile and will cease to exist when the program is terminated. The file willbe placed in the current directory and its name will be chosen by OS/2.

If the name is a OS/2 filename, the filename will be interpreted according

C-31

Page 54: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

APPENDIX F OF THE Ada STANDARD

to standard OS/2 conventions (that is, relative to the current directory).The exception NAME ERROR is raised if the name part of the filename hasmore than 8 characters or if the extension part has more than 3 charactersfor a FAT file system. HPFS files system allows longer names.

If an existing OS/2 file is specified to the CREATE procedure, the contentsof the file will be deleted before writing to the file.

If a non-existing directory is specified in a file path name to CREATE, thedirectory will not be created, and the exception NAME-ERROR is raised.

8.3 Error Handling

OS/2 errors are translated into Ada exceptions, as defined in the RN bypackage 10 EXCEPTIONS. In particular, DEVICE ERROR is raised in cases ofdrive not ready, unknown media, disk full or Hardware errors on the disk(such as read or write fault).

8.4 The FORM Parameter

The form parameter is a string, formed from a list of attributes, withattributes separated by coewuas. The string is not case sensitive. Theattributes specify:

Buffering

BUFFERSIZE -> sizein_bytes

Appending

APPEND -> YES I NO

Truncation of the name by OS/2

TRUNCATE -> YES I NO

DIRECT 10 on UNCONSTRAINED objects

RECORDSIZE -> size_in_bytes

where:

BUFFER SIZE: Controls the size of the internal buffer. This option isnot supported for DIRECT 10. The default value is 1024. This optionhas no effect when used Sy TEXT 10 with an external file that is acharacter device, in which case-the size of the buffer will be 0.

APPEND: If YES output is appended to the end of the existing file. IfNO output overwrites the existing file. This option is not supportedfor DIRECT 10. The default is NO.

C-32

Page 55: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

APPENDIX F OF THE Ada SANAD

CNT 0 .. 2147483647 - 2**31 - 1

POSITIVE C(XONT 1 .. 2147483647 - 2**31 - 1

For the package TEXT 10, the range of values for the type FIELD is as

follows:

FIELD 0 .. 255 - 2**8 - 1

9.2 Floating Point Type AttributesFLOAT LC_FLOA

DIGITS 6 15

MANTISSA 21 51

EMAX 84 204

EPSILON 9.53674E-07 8.88178E-16

LARGE 1.93428E+25 2.57110E+61

SAFEEMAX 125 1021

SAFESMALL 1.17549E-38 2.22507E-308

SAFE LARGE 4.25353E+37 2.24712E+307

FIRST -3.40282E+38 -1.79769E+308

LAST 3.40282E+38 1. 79769E+308

MACHINE RADIX 2 2

MACHINEEDAX 128 1024

MACHINEDIIN -125 -1021

MACHINE ROUNDS true true

MACHINE OVERFLCWS false false

SIZE 32 64

9.3 Attributes of Type DURATION

DURATION'DELTA 2.0 ** (-14)

DURATION4SMALL 2.0 ** (-14)

C-36

Page 56: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

APPED4IX F OF THE Ada STMNARD

DiRATIN' FIRST -131_072.0

DURATION'LAST 131_072.0

DURATICN'LARGE same as DURATION'LAST

Section 10

Other Implementation-Dependent Characteristics

10.1 Use of the Floating-Point Coprocessor

Floating point coprocessor instructions are used in programs that performarithmetic on floating point values in some fixed point operations and whenthe FLOAT 10 or FIXED 10 packages of TEXT 10 are used. The mantissa of afixed poijnt value may-be obtained through-a conversion to an appropriateinteger type. This conversion does not use floating point operations.

The OS/2 kernel emulates floating point instructions in software, if nocoprocessor is present. However, the emulation does not seem 100%compatible. The major area of incompatibility is in floating pointexceptions. Consequently floating point coprocessor is required for fullcompatibility of the Ada runtime.

10.2 Characteristics of the Heap

All objects created by allocators go into the heap. Also, portions of theRuntime Executive representation of task objects, including the taskstacks, are allocated in the heap.

UICHECKED DEALILOATION is implemented for all Ada access objects exceptaccess objects to tasks. Use of UNCHECKEDDEALLOCATION on a task objectwill lead to unpredictable results.

All objects whose visibility is linked to a subprogram, task body, or blockhave their storage reclaimed at exit, whether the exit is normal or due toan exception. Effectively pragma CONTROLLED is automatically applied toall access types. Moreover, all compiler temporaries on the heap(generated by such operations as function calls returning unconstrainedarrays, or many concatenations) allocated in a scope are deallocated uponleaving the scope.

Note that the progranmer may force heap reclamation of temporariesassociated with any statements by enclosing the statement in a begin .. endblock. This Is especially useful when complex concatenations or otherheap-intensive operations are performed in loops, and can reduce oreliminate STORAGE ERRORs that might otherwise occur.

The maximum size of the heap is limited only by available memory. Thisincludes the amount of physical memory (RAM) and the amount of virtual

C-37

Page 57: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

APPEDIX F OF THE Ada STANDARD

memory (hard disk swap space).

10.3 Characteristics of Tasks

The default task stack size is 4K bytes (96K bytes for the environmenttask), but by'using the Binder option STACK.TASK the size for all taskstacks in a program may be set to a size from 1K bytes to 32767 bytes.

Preemption of Ada tasks are performed by OS/2 since they are OS/2 threads.PRIORITY values are in the range 1..86. A task with undefined priority (nopragma PRIORITY) will take the default priority given by OS/2.

The accepter of a rendezvous executes the accept body code in its ownstack. Rendezvous with an empty accept body (for synchronization) does notcause a context switch.

The main program waits for completion of all tasks dependent upon librarypackages before terminating.

Abnormal completion of an aborted task takes place immdiately, except whenthe abnormal task is the caller of an entry that is engaged in arendezvous, or if it is in the process of activating some tasks. Any suchtask becomes abnormally completed as soon as the state in question isexited.

The message

Deadlock in Ada program

is printed to STANDARD OUTPUT when the Runtime Executive detects that nofurther progress is poissible for any task in the program. The execution ofthe program is then abandoned.

10.4 Definition of a Main Subprogram

A library unit can be used as a main subprogram if and only if it is aprocedure that is not generic and that has no formal parameters.

10.5 Ordering of Compilation Units

The Alsys OS/2 Ada Compiler imposes no additional ordering constraints oncompilations beyond those required by the language.

Section 11

Limitations

11.1 Compiler Limitations

C-38

Page 58: IENTATION PAGE AD-A276 243 the b~ alww~ to~ orn &V aw mes … · 2011. 5. 14. · under IBM OS/2 Version 2.1 + Threads Target Computer System: CompuAdd 433 under IBM OS/2 Version

APPEDIX F OF THE Ada STRal"j

The maxinun identifier length is 255 characters.

The maximum line length is 255 characters.

The maxinum number of unique identifiers per compilation unit is 2500.

The maximum number of ccmpilation units in a library is 2000.

The maximun number of Ada libraries in a family is 2000.

11.2 Hardware Related Limitations

The maximum amount of data in the heap is limited only by availablememory.

If an unconstrained record type can exceed 8192 bytes, the type is notpermitted (unless constrained) as the element type in the definition ofan array or record type.

A dynamic object bigger than 8192 bytes will be indirectly allocated.Refer to ALLOCATION parameter in the COMPILE command. (Section 4.2 ofthe User's Guide.)

C-39