68
____ ~ ~ r R ~l~ F COPV en Data Entered) AT ION PAGE -ErOP RCoMrE-EoNGFOP. A D-A 204 928 1Z. GOVT ACCESSION NO. 3. RECIPIENT'S CATALOG NUMBER 4. IIILL (andSubtitle) 5. TYPE OF REPORT & PERIOD COVERED Ada Compiler Validation Summary Report: DDC-I, 28 July 1988 to 28 July 1988 Inc.. DACS-386/UNIX, Version 4.2, ICL DRS 300 Host and 6 Target .PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB S Gaithersburg, MD g. PERFORMING ORGANIZATION AND ADDRESS 10. PROGRAM ELEMENT, PROJECT, TASK AREA & WORK UNIT NUMBERS NBS Gaithersburg, MD 11. CONTROLLING OFFICE NAME AND ADDRESS 12. REPORT DATE Ada Joint Program Office United States Department of Defense '13. UMUL Uf FAb Washington, DC 2E301-3081 14. MONITORING AGENCY NAME L ADDRESS(Ifdifferent from Controlling Office) 15. SECURITY CLASS (of this report) UNCLASSIFIED NBS 15a. jELASSFICATION/DOWNGRADING Gaithersburg, MD U N/A 16. DISTRIBUTION STATEMENT (ofthisReport) Approved for public release; distribution unlimited. 17. DISTRIBUTION STATEMENT (of the abstract entered in Block 20. If different from Report) DEL C UNCLASSIFIEDMAR19 18. SUPPLEMENTARY NOTES 19. KEYWORDS (Continue on reverse side if necessary and identify by block number) Ada Programming language, Ada Compiler Validation Summary Report, Ada Compiler Validation Capability, ACVC, Validation Testing, Ada Validation Office, AVO, Ada Validation Facility, AVF, ANSI/MIL-STD- 1815A, Ada Joint Program Office, AJPO 20. ABS TRACT (Continue on reverse side if necessary and identify by block number) DACS--386/UNIX, Version 4.2, DDC-I, Inc., NBS, Gaithersburg, MD, ICL DRS 300 under DRS/NX Ver 3 Level 0 Increment 50 which is run over UNIX SYSTEM V/386 Rel. 3.1 (Host) and ICL DRS 300 under DRS/NX Ver 3 Level 0 Increment 50 which is run over UNIX SYSTEM V/386 Rel. 3.1 (Target), ACVC 1.9. DD ,u' 1473 EDITION OF I NOV 65 IS OBSOLETE I JAN 73 S/N 01O2-LF-014-6501 UNCLASSIFIED SECURITY CLASSIFICATION OF THIS PAGE (When Data Entered)

Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

  • Upload
    vonga

  • View
    215

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

____ ~ ~ r R ~l~ F COPVen Data Entered)

AT ION PAGE -ErOP RCoMrE-EoNGFOP.

A D-A 204 928 1Z. GOVT ACCESSION NO. 3. RECIPIENT'S CATALOG NUMBER

4. IIILL (andSubtitle) 5. TYPE OF REPORT & PERIOD COVERED

Ada Compiler Validation Summary Report: DDC-I, 28 July 1988 to 28 July 1988

Inc.. DACS-386/UNIX, Version 4.2, ICL DRS 300 Host and 6Target .PERFORMING-bRG. REPORT NUMBERTarget

7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs)

NB S

Gaithersburg, MD

g. PERFORMING ORGANIZATION AND ADDRESS 10. PROGRAM ELEMENT, PROJECT, TASKAREA & WORK UNIT NUMBERS

NBSGaithersburg, MD

11. CONTROLLING OFFICE NAME AND ADDRESS 12. REPORT DATEAda Joint Program OfficeUnited States Department of Defense '13. UMUL Uf FAbWashington, DC 2E301-3081

14. MONITORING AGENCY NAME L ADDRESS(Ifdifferent from Controlling Office) 15. SECURITY CLASS (of this report)

UNCLASSIFIEDNBS 15a. jELASSFICATION/DOWNGRADINGGaithersburg, MD U N/A

16. DISTRIBUTION STATEMENT (ofthisReport)

Approved for public release; distribution unlimited.

17. DISTRIBUTION STATEMENT (of the abstract entered in Block 20. If different from Report) DEL C

UNCLASSIFIEDMAR19

18. SUPPLEMENTARY NOTES

19. KEYWORDS (Continue on reverse side if necessary and identify by block number)

Ada Programming language, Ada Compiler Validation Summary Report, AdaCompiler Validation Capability, ACVC, Validation Testing, AdaValidation Office, AVO, Ada Validation Facility, AVF, ANSI/MIL-STD-1815A, Ada Joint Program Office, AJPO

20. ABS TRACT (Continue on reverse side if necessary and identify by block number)

DACS--386/UNIX, Version 4.2, DDC-I, Inc., NBS, Gaithersburg, MD, ICL DRS 300 under

DRS/NX Ver 3 Level 0 Increment 50 which is run over UNIX SYSTEM V/386 Rel. 3.1 (Host)

and ICL DRS 300 under DRS/NX Ver 3 Level 0 Increment 50 which is run over UNIX

SYSTEM V/386 Rel. 3.1 (Target), ACVC 1.9.

DD ,u' 1473 EDITION OF I NOV 65 IS OBSOLETE

I JAN 73 S/N 01O2-LF-014-6501 UNCLASSIFIEDSECURITY CLASSIFICATION OF THIS PAGE (When Data Entered)

Page 2: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

Ada Compiler Validation Summary Repor-:

Compiler Name: DACS-386/UNIX, Version 4.2

Certificate Number: 880728S1.09141

Host: Target:ICL DRS 300 ICL DRS 300under DRS/NX Ver 3 Level 0 under DRS/NX Ver 3 Level 0Increment 50 Increment 50

which is run over which is run overUNIX SYSTEM V/386 Rel. 3.1 UNIX SYSTEM V/386 Rel. 3.1

Testing Completed 28 July 1988 Using ACVC 1.9

This report has been reviewed and is approved.

Accession ForNTIS ORA&I

-Ada Validation Fa~lit DTIC TABDr. David K. Jeffe son UnannouncedChief, Information Systems Justis-uatioEngineering DivisionNational Bureau of Standards BGaithersburg, MD 20899 Distrbution/

Availability Codes

jA v a i 11 a -ni d -/o -r -Dist Special

Kda Validation OrganizationDr. John F. Kramer4-Institute for Defense AnalysesAlexandria, VA 22311

Ada Jnt Program OfficeVirginia L. CastorDirectorDepartment of DefenseWashington DC 20301

89S6

Page 3: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

AVF Control Number: NBS88VDDC545-2

Ada CompilerVALIDATION SUMMARY REPORT:

Certificate Number: 880728S1.09141DDC-I, Inc.

DACS-386/UNIX, Version 4.2ICL DRS 300

Completion of On-Site Testing:28 July 1988

Prepared By:Software Standards Validation Group

Institute for Computer Sciences and TechnologyNational Bureau of Standards

Building 225, Room A266Gaithersburg, Maryland 20899

Prepared For:Ada Joint Program Office

United States Department of DefenseWashington, D.C. 20301-3081

"", i , m t~l NDUE I II I II

Page 4: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

TABLE OF CONTENTS

CHAPTER 1 INTRODUCTION

1.1 PURPOSE OF THIS VALIDATION SUMMARY REPORT .... 1-21.2 USE OF THIS VALIDATION SUMMARY REPORT ........ .. 1-21.3 REFERENCES .......... .................... 1-31.4 DEFINITION OF TERMS ....... ............... 1-31.5 ACVC TEST CLASSES ...... ................ .1-4

CHAPTER 2 CONFIGURATION INFORMATION

2.1 CONFIGURATION TESTED ...... ............... .2-12.2 IMPLEMENTATION CHARACTERISTICS ... .......... .2-2

CHAPTER 3 TEST INFORMATION

3.1 TEST RESULTS ....... ................... .3-13.2 SUMMARY OF TEST RESULTS BY CLASS ........ . . 3-13.3 SUMMARY OF TEST RESULTS BY CHAPTER .. ........ .3-23.4 WITHDRAWN TESTS ....... ................. .3-23.5 INAPPLICABLE TESTS ....... ................ .3-23.6 TEST, PROCESSING, AND EVALUATION MODIFICATIONS . 3-43.7 ADDITIONAL TESTING INFORMATION ... .......... .3-53.7.1 Prevalidation ....... ................. .3-53,7.2 Test Method ....... .................. .3-63.7.3 Test Site ....... ................... .3-7

APPENDIX A CONFORMANCE STATEMENT

APPENDIX B APPENDIX F OF THE Ada STANDARD

APPENDIX C TEST PARAMETERS

APPENDIX D WITHDRAWN TESTS

Page 5: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

CHAPTER 1

INTRODUCTION

This Validation Summary Report> kRy describes the extent to which aspecific Ada compiler conforms to the Ada Standard, ANSI/MIL-STD-1815A.This report explains all technical terms used within it and thoroughlyreports the results of testipg this compiler using the Ada CompilerValidation Capability -4+AvG. An Ada compiler must be implementedaccording to the Ada Standard, and any implementation-dependent featuresmust conform to the requirements of the Ada Standard. The Ada Standardmust be implemente. in its entirety, and nothing can be implemented thatis not in the Standard.%

Even though all validated Ada compilers conform to the Ada Standard, itmust be understood that some differences do exist betweenimplementations. The Ada Standard permits some implementationdependencies--for example, the maximum length of identifiers or themaximum values of integer types. Other differences between compilersresult from the characteristics of particular operating systems,hardware, or implementation strategies. All the dependencies observedduring the process of testing this compiler are given in this report.'

This information in this report is derived from the test resultsproduced during validation testing. The validation process includessubmitting a suite of standardized tests, the ACVC, as inputs to an Adacompiler and evaluating the results. , The purpose of validating is toensure conformity of the compiler to the Ada Standard by testing thatthe compiler properly implements legal language constructs and that itidentifies and rejects illegal language constructs. The testing alsoidentifies behavior that is implementation dependent but permitted bythe Ada Standard. Six classes of test are used. These tests aredesigned to perform checks at compile time, at link time, and duringexecution.

1-1

Page 6: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

1.1 PURPOSE OF THIS VALIDATION SUMMARY REPORT

This VSR documents the results of the validation testing performed on anAda compiler. Testing was carried out for the following purposes:

To attempt to identify any language constructs supported bythe compiler that do not conform to the Ada Standard

To attempt to identify any unsupported language constructsrequired by the Ada Standard

To determine that the implementation-dependent behavior isallowed by the Ada Standard

On-site testing was completed 28 July 1988 at Copenhagen, Denmark.

1.2 USE OF THIS VALIDATION SUMMARY REPORT

Consistent with the national laws of the originating country, the AVOmay make full and free public disclosure of this report. In the UnitedStates, this is provided in accordance with the "Freedom of InformationAct" (5 U.S.C. #552). The results of this validation apply only tothe computers, operating systems, and compiler versions identified inthis report.

The organizations represented on the signature page of this report donot represent or warrant that all statements set forth in this reportare accurate and complete, or that the subject compiler has nononconformities to the Ada Standard other than those presented. Copiesof this report are available to the public from:

Ada Information ClearinghouseAda Joint Program OfficeOUSDREThe Pentagon, Rm 3D-139 (Fern Street)Washington DC 20301-3081

or from:

Software Standards Validation GroupInstitute for Computer Sciences and TechnologyNational Bureau of StandardsBuilding 225, Room A266Gaithersburg, Maryland 20899

Questions regarding this report or the validation test results should bedirected to the AVF listed above or to:

1-2

Page 7: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

Ada Validation OrganizationInstitute for Defense Analyses1801 North Beauregard StreetAlexandria VA 22311

1.3 REFERENCES

i. Reference Manual for the Ada Programming Language,ANSI/MIL-STD-1815A, February 1983 and ISO 8652-1987.

2. Ada Compiler Validation Procedures and Guidelines. Ada JointProgram Office, 1 January 1987.

3. Ada ComDilft Validation Capability Im~lementers' Guide.,December 1986.

1.4 DEFINITION OF TERMS

ACVC The Ada Compiler Validation Capability. The set of Adaprograms that tests the conformity of an Ada compiler tothe Ada programming language.

Ada Commentary An Ada Commentary contains all information relevant tothe point addressed by a comment on the Ada Standard.These comments are given a unique identification numberhaving the form AI-ddddd.

Ada Standard ANSI/MIL-STD-1815A, February 1983 and ISO 8652-1987.

Applicant The agency requesting validation.

AVF The Ada Validation Facility. The AVF is responsible forconducting compiler validations according to procedurescontained in the Ada Compiler Validation Procedures andGuidelines.

AVO The Ada Validation Organization. The AVO has oversightauthority over all AVF practices for the purpose ofmaintaining a uniform process for validation of Adacompilers. The AVO provides administrative andtechnical support for Ada validations to ensureconsistent practices.

Compiler A processor for the Ada language. In the context ofthis report, a compiler is any language processor,including cross-compilers, translators, and

1-3

Page 8: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

interpreters.

Failed test An ACVC test for which the compiler generates a resultthat demonstrates nonconformity to the Ada Standard.

Host The computer on which the compiler resides.

Inapplicable An ACVC test that uses features of the language that atest compiler is not required to support or may legitimately

support in a way other than the one expected by thetest.

Language The Language Maintenance Panel (LMP) is a committeeMaintenance established by the Ada Board to recommend

interpretations and Panel possible changes to theANSI/MIL-STD for Ada.

Passed test An ACVC test for which a compiler generates the expectedresult.

Target The computer for which a compiler generates code.

Test An Ada program that checks a compiler's conformityregarding a particular feature or a combination offeatures to the Ada Standard. In the context of thisreport, the term is used to designate a single test,which may comprise one or more files.

Withdrawn An ACVC test found to be incorrect and not used to checktest conformity to the Ada Standard. A test may be incorrect

because it has an invalid test objective, fails to meetits test objective, or contains illegal or erroneous useof the language.

1.5 ACVC TEST CLASSES

Conformity to the Ada Standard is measured using the ACVC. The ACVCcontains both legal and illegal Ada programs structured into six testclasses: A, B, C, D, E, and L. The first letter of a test nameidentifies the class to which it belongs. Class A, C, D, and E testsare executable, and special program units are used to report theirresults during execution. Class B tests are expected to producecompilation errors. Class L tests are expected to produce compilationor link errors.

Class A tests check that legal Ada programs can be successfully compiledand executed. There are no explicit program components in a Class Atest to check semantics. For example, a Class A test checks thatreserved words of another language (other than those already reserved inthe Ada language) are not treated as reserved words by an Ada compiler.

1-4

Page 9: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

A Class A test is passed if no errors are detected at compile time andthe program executes to produce a PASSED message.

Class B tests check that a compiler detects illegal language usage.Class B tests are not executable. Each test in this class is compiledand the resulting compilation listing is examined to verify that everysyntax or semantic error in the test is detected. A Class B test ispassed if every illegal construct that it contains is detected by thecompiler.

Class C tests check that legal Ada programs can be correctly compiledand executed. Each Class C test is self-checking and produces a PASSED,FAILED, or NOT APPLIC*LE message indicating the result when it isexecuted.

Class D tests check the compilation and execution capacities of acompiler. Since there are no capacity requirements placed on a compilerby the Ada Standard for some parameters--for example, the number ofidentifiers permitted in a compilation or the number of units in alibrary--a compiler may refuse to compile a Class D test and still be aconforming compiler. Therefore, if a Class D test fails to compilebecause the capacity of the compiler is exceeded, the test is classifiedas inapplicable. If a Class D test compiles successfully, it isself-checking and produces a PASSED or FAILED message during execution.

Each Class E test is self-checking and produces a NOT APPLICABLE,PASSED, or FAILED message when it is compiled and executed. However,the Ada Standard permits an implementation to reject programs containingsome features addressed by Class E tests during compilation. Therefore,a Class E test is passed by a compiler if it is compiled successfullyand executes to produce a PASSED message, or if it is rejected by thecompiler for an allowable reason.

Class L tests check that incomplete or illegal Ada programs involvingmultiple, separately compiled units are detected and not allowed toexecute. Class L tests are compiled separately and execution isattempted. A Class L test passes if it is rejected at link time--thatis, an attempt to execute the main program must generate an errormessage before any declarations in the main program or any unitsreferenced by the main program are elaborated.

Two library units, the package REPORT and the procedure CHECK FILE,

support the self-checking features of the executable tests. The packageREPORT provides the mechanism by which executable tests report PASSED,FAILED, or NOT APPLICABLE results. It also provides a set of identityfunctions used to defeat some compiler optimizations allowed by the AdaStandard that would circumvent a test objective. The procedure CHECKFILE is used to check the contents of text files written by some of theClass C tests for chapter 14 of the Ada Standard. The operation ofREPORT and CHECKFILE is checked by a set of executable tests. Thesetests produce messages that are examined to verify that the units areoperating correctly. If these units are not operating correctly, then

1-5

Page 10: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

the validation is not attempted.

The text of the tests in the ACVC follow conventions that are intendedto ensure that the tests are reasonably portable without modification.For example, the tests make use of only the basic set of 55 characters,contain lines with a maximum length of 72 characters, use small numericvalues, and place features that may not be supported by allimplementations in separate tests. However, some tests contain valuesthat require the test to be customized according toimplementation-specific values--for example, an illegal file name. Alist of the values used for this validation is provided in Appendix C.

A compiler must correctly process each of the tests in the suite anddemonstrate conformity to the Ada Standard by either meeting the passcriteria given for the test or by showing that the test is inapplicableto the implementation. The applicability of a test to an implementationis considered each time the implementation is validated. A test that isinapplicable for one validation is not necessarily inapplicable for asubsequent validation. Any test that was determined to contain anillegal language construct or an erroneous language construct iswithdrawn from the ACVC and, therefore, is not used in testing acompiler. The tests withdrawn at the time of validation are given inAppendix D.

1-6

Page 11: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

CHAPTER 2

CONFIGURATION INFORMATION

2.1 CONFIGURATION TESTED

The candidate compilation system for this validation was tested underthe following configuration:

Compiler: DACS-386/UNIX, Version 4.2

ACVC Version: 1.9

Certificate Number: 880728S1.09141

Host Computer:

Machine: ICL DRS 300

Operating System: DRS/NX Ver 3 Level 0Increment 50

which is run over:UNIX SYSTEM V/386 Rel. 3.1

Memory Size: 8 Mbyte RAM

Target Computer:

Machine: ICL DRS 300

Operating System: DRS/NX Ver 3 Level 0Increment 50

which is run over:UNIX SYSTEM V/386 Rel. 3.1

Memory Size: 8 Mbyte RAM

Communications Network: VAX-11/8530 via Ethernet LAN viaSUN-3 Workstation via streamer tapeto the RC900 (386/UNIX VWorkstation) via floppy disks to theICL DRS 300.

2-1

Page 12: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

2.2 IMPLEMENTATION CHARACTERISTICS

One of the purposes of validating compilers is to determine the behaviorof a compiler in those areas of the Ada Standard that permitimplementations to differ. Class D and E tests specifically check forsuch implementation differences. However, tests in other classes alsocharacterize an imnlementation. The tests demonstrate the followingcharacteristics:

- Capacities.

The compiler correctly processes tests containing loopstatements nested to 65 levels and recursive proceduresseparately compiled as subunits nested to 17 levels. It doesnot process 65 levels of block nesting. It correctly processesa compilation containing 723 variables in the same declarativepart. (See test D55A03A. .H (8 tests), D56001B, D64005E. .G (3tests), and D29002K.)

- Universal integer calculations.

An implementation is allowed to reject universal integercalculations having values that exceed SYSTEM.MAX INT. Thisimplementation processes 64 bit integer calculations. (Seetests D4AOQ2A, D4A002B, D4AO04A, and D4AO04B.)

- Predefined types.

This implementation supports the additional predefined typesSHORT INTEGER, LONGINTEGER, and LONGFLOAT in the packageSTANDARD. (See tests B86001BC and B86001D.)

Based literals.

An implementation is allowed to reject a based literal with avalue exceeding SYSTEM.MAXINT during compilation, or it mayraise NUMERIC ERROR or CONSTRAINT ERROR during execution. Thisimplementation raises NUMERIC ERROR during execution. (See testE24101A.)

- Expression evaluation.

Apparently all default initialization expressions for recordcomponents are evaluated before any value is checked to belongto a component's subtype. (See test C32117A.)

2-2

Page 13: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

Assignments for subtypes are performed with the same precisionas the base type. (See test C35712B.)

This implementation uses no extra bits for extra precision.This implementation uses all extra bits for extra range. (Seetest C35903A.)

Apparently NUMERIC ERROR is raised when an integer literaloperand in a comparison or membership test is outside the rangeof the base type. (See test C45232A.)

Apparently NUMERICERROR is raised when a literal operand in afixed point comparison or membership test is outside the rangeof the base type. (See test C45252A.)

Apparently underflow is gradual. (See tests C45524A..Z.)

- Rounding.

The method used for rounding to integer is apparently round toeven. (See tests C46012A..Z.)

The method used for rounding to longest integer is apparentlyround to even. (See tests C46012A..Z.)

The method used for rounding to integer in static universal realexpressions is apparently round away from zero. (See testC4AOl4A.)

Array types.

An implementation is allowed to raise NUMERICERROR orCONSTRAINTERROR for an array having a 'LENGTH that exceedsSTANDARD.INTEGER'LAST and/or SYSTEM.MAXINT. For thisimplementation:

Declaration of an array type or subtype declaration with morethan SYSTEM.MAXINT components raises NUMERICERROR. (See testC36003A.)

NUMERICERROR is raised when an array type with INTEGER'LAST + 2components is declared. (See test C36202A.)

NUMERICERROR is raised when an array type with SYSTEM.MAXINT +2 components is declared. (See test C36202B.)

A packed BOOLEAN array having a 'LENGTH exceeding INTEGER'LASTraises NUMERICERROR when the array objects are declared. (Seetest C52103X.)

2-3

Page 14: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

A packed two-dimensional BOOLEAN array with more thanINTEGER'LAST components raises NUMERICERROR when the array typeis declared. (See test C52104Y.)

A null array with one dimension of length greater thanINTEGER'LAST may raise NUMERICERROR or CONSTRAINTERROR eitherwhen declared or assigned. Alternatively, an implementation mayaccept the declaration. However, lengths must match in arrayslice assignments. This implementation raises NUMERICERRORwhen the array type is declared. (See test E52103Y.)

In assigning one-dimensional array types, the expression appearsto be evaluated in its entirety before CONSTRAINTERROR israised when checking whether the expression's subtype iscompatible with the target's subtype. In assigningtwo-dimensional array types, the expression appears to beevaluated in its entirety before CONSTRAINT ERROR is raised whenchecking whether the expression's subtype is compatible with thetarget's subtype. (See test C52013A.)

- Discriminated types.

During compilation, an implementation is allowed to eitheraccept or reject an incomplete type with discriminants that isused in an access type definition with a compatible discriminantconstraint. This implementation accepts such subtypeindications. (See test E38104A.)

In assigning record types with discriminants, the expressionappears to be evaluated in its entirety before CONSTRAINTERRORis raised when checking whether the expression's subtype iscompatible with the target's subtype. (See test C52013A.)

- Aggregates.

In the evaluation of a multi-dimensional aggregate, all choicesappear to be evaluated before checking against the indexsubtype. (See tests C43207A and C43207B.)

In the evaluation of an aggregate containing subaggregates, notall choices are evaluated before being checked for identicalbounds. (See test E43212B.)

All choices are evaluated before CONSTRAINT ERROR is raised if abound in a nonnull range of a nonnull aggregate does not belongto an index subtype. (See test E43211B.)

- Representation clauses.

2-4

Page 15: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

An implementation might legitimately place restrictions onrepresentation clauses used by some of the tests. If arepresentation clause is not supported, then the implementationmust reject it.

Enumeration representation clauses containing noncontiguousvalues for enumeration types other than character and booleantypes are supported. (See tests C35502I. .J, C35502M. .N, andA39005F.)

Enumeration representation clauses containing noncontiguousvalues for character types are supported. (See testsC35507I..J, C35507M..N, and C55B16A.)

Enumeration representation clauses for boolean types containingrepresentational values other than (FALSE -> 0, TRUE -> 1) arenot supported. (See tests C355081..J and C35508M..N.)

Length clauses with SIZE specifications for enumeration typesare supported. (See test A39005B.)

Length clauses with STORAGE SIZE specifications for access typesare supported. (See test A39005C.)

Length clauses with STORAGE SIZE specifications for task typesare supported. (See tests A39005D and C87B62D.)

Length clauses with SMALL specifications are not supported.(See tests A39005E and C87B62C.)

Record representation clauses are not supported. (See testA39005G.)

Length clauses with SIZE specifications for derived integertypes are supported. (See test C87B62A.)

- Pragmas.

The pragma INLINE is supported for procedures. The pragmaINLINE is supported for functions. (See tests LA3004A, LA3004B,EA3004C, EA3004D, CA3004E, and CA3004F.)

Input/output.

The package SEQUENTIAL 10 can be instantiated with unconstrainedarray types and record types with discriminants withoutdefaults. (See tests AE2101C, EE2201D, and EE2201E.)

The package DIRECT 10 can be instantiated with record types with

discriminants without defaults. (See tests AE21OH and

2-5

Page 16: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

EE240IG.)

There are no strings which are illegal external file names forSEQUENTIALIO and DIRECTIO. (See tests CE2102C and CE2102H.)

Modes IN FILE and OUTFILE are supported for SEQUENTIAL10.(See tests CE2102D and CE2102E.)

Modes INFILE, OUTFILE, and INOUTFILE are supported forDIRECTIO. (See tests CE2102F, CE2102I, and CE2102J.)

RESET and DELETE are supported for SEQUENTIALIO and DIRECTIO.(See tests CE2102G and CE2102K.)

Dynamic creation and deletion of files are supported forSEQUENTIALIO and DIRECTIO. (See tests CE2106A and CE2106B.)

Overwriting to a sequential file truncates the file to lastelement written. (See test CE2208B.)

An existing text file can be opened in OUTFILE mode, cannot becreated in OUT FILE mode, and cannot be created in INFILE mode.(See test EE3102C.)

Only one internal file may be associated with the same externalfile if only one file is opened for writing. (See testCE3111B.)

More than one internal file can be associated with each externalfile for text I/O for reading only or for writing only. (Seetests CE3111A, CE3111C. .E (3 tests), CE3114B, CE3115A, CE211OB,and CE2111D.)

More than one internal file can be associated with each externalfile for sequential I/O for both reading and writing. (Seetests CE2107A..D (4 tests), CE211OB, and CE2111D.)

More than one internal file can be associated with each externalfile for direct and sequential I/O for writing only. (See testCE2107E.)

More than one internal file can be associated with each externalfile for direct I/0 for both reading and writing. (See testsCE21O7F..I (4 tests), and CE2110B.)

More than one internal file cannot be associated with eachexternal file for direct I/O for both reading and writing. (Seetest CE2111H.)

An extrrnal file associated with more than one internal file canbe dele ed for SEQUENTIALIO, DIRECT_IO, and TEXTIO. (See testCE2110B.)

2-6

Page 17: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

Temporary sequential files are given names. Temporary directfiles are given names. Temporary files given names are notdeleted when they are closed. (See tests CE2108A and CE2108C.)

Generics.

Generic subprogram declarations and bodies can compiled inseparate compilations. (See test CAI012A.)

Generic package declarations and bodies can be compiled inseparate compilations so long as no instantiations of thoseunits precede the bodies. This compiler requires that a genericunit's body be compiled prior to instantiation, and so the unitcontaining the instantiations is rejected. (See tests CA2009C,BC3204C, and BC3205D.)

Generic unit bodies and their subunits can be compiled inseparate compilations. (See test CA3011A.)

2-7

Page 18: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

CHAPTER 3

TEST INFORMATION

3.1 TEST RESULTS

Version 1.9 of the ACVC comprises 3122 tests. When this compiler wastests, 28 tests had been withdrawn because of test errors. The AVFdetermined that 236 tests were inapplicable to this implementation. Allinapplicable tests were processed during validation testing.Modifications to the code, processing, or grading for 69 tests wererequired to successfully demonstrate the test objective. (See section3.6.)

The AVF concludes that the testing results demonstrate acceptableconformity to the Ada Standard.

3.2 SUMMARY OF TEST RESULTS BY CLASS

RESULT TEST CLASS TOTALA B C D E L

Passed 108 1048 1624 16 16 46 2858

Inapplicable 2 3 229 1 1 0 236

Withdrawn 3 2 21 0 2 0 28

TOTAL 113 1053 1874 17 19 46 3122

3-1

Page 19: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

3.3 SUMMARY OF TEST RESULTS BY CHAPTER

RESULT CHAPTER TOTAL2 3 __2 36 7 8 9 0_11 J .2 13 14

Passed 187 494 548 247 165 98 140 326 135 36 232 3 247 2858

Inapplicable 17 78 126 1 0 0 3 1 2 0 2 0 6 236

Withdrawn 2 14 3 0 1 1 2 0 0 0 2 1 2 28

TOTAL 206 586 677 248 166 99 145 327 137 36 236 4 255 3122

3.4 WITHDRAWN TESTS

The following 28 tests were withdrawn from ACVC Version 1.9 at the timeof this validation:

B28003A E28005C C34004A C35502P A35902C C35904AC35904B C35A03E C35AO3R C37213H C37213J C37215CC37215E C37215G C37215H C38102C C41402A C45332AC45614C E66001D A74106C C85018B C87BO4B CC1311BBC3105A ADlAOlA CE2401H CE3208A

See Appendix D for the reason that each of these tests was withdrawn.

3.5 INAPPLICABLE TESTS

Some tests do not apply to all compilers because they make use offeatures that a compiler is not required by the Ada Standard to support.Others may depend on the result of another test that is eitherinapplicable or withdrawn. The applicability of a test to animplementation is considered each time a validation is attempted. Atest that is inapplicable for one validation attempt is not necessarilyinapplicable for a subsequent attempt. For this validation attempt, 236test were inapplicable for the reasons indicated:

C241131..K (3 tests) were rejected because they contain declarationsthat exceed MAXINLEN (126 characters)

C355081. .J (2 tests) and C35508M. .N (2 tests) use enumerationrepresentation clauses for boolean types containing representationalvalues other than (FALSE -> 0, TRUE -> 1). These clauses are notsupported by this compiler.

3-2

Page 20: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

C35702A uses SHORTFLOAT which is not supported by this implementation.

A39005E and C87B62C use length clauses with SMALL specifications whichare not supported by this implementation.

A39005G uses a record representation clause which is not supported bythis compiler.

C45231D requires a macro substitution for any predefined numeric typesother than INTEGER, SHORT INTEGER, LONG_INTEGER, FLOAT, SHORTFLOAT, andLONG FLOAT. This implementation supports only INTEGER, LONGINTEGER,FLOAT, and LONGFLOAT.

C45531M, C45531N, C45532M, and C45532N use fine 48 bit fixed point basetypes which are not supported by this compiler.

C455310, C45531P, C455320, and C45532P use coarse 48 bit fixed pointbase types which are not supported by this compiler.

C4AOl3B uses a static value that is outside the range of the mostaccurate floating point base type. The declaration was rejected atcompile time.

D56001B uses 65 levels of block nesting which exceeds the capacity ofthe compiler.

B86001D requires a predefined numeric type other than those defined bythe Ada language in package STANDARD. There is no such type for thisimplementation.

C87B62B this test contains the application of the attribute STORAGESIZEto access types for which no corresponding STORAGESIZE length clausehas been provided; this compiler rejects such an application. The AVOaccepted this behavior because the Ada standard is not clear on how sucha situation should be treated; the matter will be discussed by thelanguage maintenance body.

C96005B requires the range of type DURATION to be different from thoseof its base type; in this implementation they are the same.

CA2009C, BC3204C, BC3205D, and CA2009F compiles generic subprogramdeclarations and bodies in separate compilations; the compilation occursfollowing a compilation that contains instantiations of those units.This compiler requires that a generic unit's body be compiled prior toinstantiation, and so the unit containing the instantiations isrejected.

CE21O5A checks that CREATE is permitted for an IN FILE forSEQUENTIAL_10. An implementation can raise USE ERROR or NAMEERROR (seeAI-00332). This implementation raises USEERROR.

3-3

Page 21: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

CE2105B checks that CREATE is permitted for an IN FILE for DIRECTIO.An implementation can raise USE ERROR or NAME-ERROR (see AI-00332).This implementation raises USEERROR.

CE2111H checks whether resetting an internal file has any effect uponother internal files accessing the same external file for DIRECT_10. Animplementation can raise USE ERROR or NAMEERROR (see AI-00332). Thisimplementation raises USEERROR.

CE3109A checks that CREATE is permitted for an IN FILE. Animplementation can raise USEERROR or NAMEERROR (see AI-00332). Thisimplementation raises USEERROR.

CE3111B checks whether more than one internal file may be associatedwith the same external file if only one file is opened for writing. Animplementation can raise USEERROR or NAME ERROR (see AI-00332). Thisimplementation allows an external file to be simultaneously opened forreading and writing. However, the exception END ERROR is raised. Thereason for END ERROR being raised is that this implementation allowsmore than one internal file to be associated with the same external filewhile one is OPENed in IN FILE mode and the other is OPENed in OUT FILEmode with the output being directed to a buffer. When the file is read,the END ERROR exception is raised because the output has not beenflushed to the external file; if the buffer were small enough or theoutput large enough then the output would be flushed to the externalfile, but this is problematic. Ada does not define the physical statusof a file until that file has been closed.

EE2401D uses instantiations of package DIRECT 10 with unconstrainedarray types. These instantiations are rejected by this compiler.

The following 201 tests require a floating-point accuracy that exceedsthe maximum of 15 digits supported by this implementation:

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)C45421L..Y (14 tests) C45521L..Z (15 tests)C45524L..Z (15 tests) C45621L..Z (15 tests)C45641L..Y (14 tests) C46012L..Z (15 tests)

3.6 TEST, PROCESSING, AND EVALUATION MODIFICATIONS

It is expected that some tests will require modifications of code,processing, or evaluation in order to compensate for legitimateimplementation behavior. Modifications are made by the AVF in caseswhere legitimate implementation behavior prevents the successfulcompletion of an (otherwise) applicable test. Exemples of such

3-4

Page 22: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

modifications include: adding a length clause to alter the default sizeof a collection; splitting a Class B test into sub-tests so that allerrors are detected; and confirming that messages produced by anexecutable test demonstrate conforming behavior that wasn't anticipatedby the test (such as raising one exception instead of another).

Modifications were required for 69 Class B tests.

The following Class B test files were split because syntax errors at onepoint resulted in the compiler not detecting other errors in the test:

B22003A B26001A B26002A B26005AB28001D B29001A B2AO03A B2AOO3BB2AO03C B33301A B35101A B37106AB37301B B37302A B38003A B38003BB38009A B38009B B51001A B53009AB54AOlC B55AO1A B61001C B61001DB61OOIF B61001H B610011 B61OOIMB6100IR B61001S B61001W B67001AB67001C B67001D B91OOlA B91002AB91002B B91002C B91002D B91002EB91002F B91002G B91002H B910021B91002J B91002K B91002L B95030AB95061A B95061F B95061G B95077AB97101A B97101E B97102A B97103EB97104G BA1101BOM BAllOlBI BAIIO1B2BAIlOlB3 BAIIOIB4 BC1OAEB BC1IO9ABC1109C BC1109D BC1202A BC1202BBC1202E BC1202F BC1202G BC2001DBC2001E

C34007A, C34007D, C34007G, C34007M, C34007P, C34007S these tests containthe application of the attribute STORAGE SIZE to access types for whichno corresponding STORAGESIZE length clause has been provided; thiscompiler rejects such an application. The AVO accepted this behaviorbecause the Ada standard is not clear on how such a situation should betreated; the matter will be discussed by the language maintenance body.For this implementation, the lines within each of these tests which havethe STORAGE SIZE length clause were changed to comment lines under thedirection of the AVF Manager. These modified tests ran to a successfulcompletion and produced a PASSED message.

3.7 ADDITIONAL TESTING INFORMATION

3.7.1 Prevalidation

Prior to validation, a set of test results for ACVC Version 1.9 producedby the DACS-386/UNIX was submitted to the AVF by the applicant forreview. Analysis of these results demonstrated that the compilersuccessfully passed all applicable tests, and the compiler exhibited theexpected behavior on all inapplicable tests.

3-5

Page 23: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

3.7.2 Test Method

Testing of the DACS-386/UNIX using ACVC Version 1.9 was conductedon-site by a validation team from the AVF. The configuration consistedof a VAX-11/8530 computer (20 Mbytes RAM; 4 456 Mbytes disk drives; 24terminal ports; 1 1600/6250 bpi tape-drive) operating under VMX Version4.5 onto which was loaded the magnetic tape, a SUN-3/50 Workstationoperating under UNIX V Rel. 1.0.4 which served to transfer the testfiles onto a streamer tape, a RC900 (386/UNIX V Workstation) and a ICLDRS 300 which served as the host/target computer. The VAX-11/8530 waslinked via an Ethernet LAN to the SUN-3/50 Workstation; the SUN-3/50Workstation was linked via streamer tape to the RC900 (386/UNIX VWorkstation) which was in turn linked via floppy disks to the ICL DRS300.

A magnetic tape containing all tests except for withdrawn tests wastaken on-site by the validation team for processing. Tests that makeuse of implementation-specific values were customized before beingwritten to the magnetic tape. The contents of the magnetic tape wereloaded directly onto the VAX-ll/8530, then downloaded via an EthernetLAN to the SUN UNIX Workstation and then downloaded via a streamer tapeto the RC900 (386/UNIX V Workstation) and then downloaded via floppydisks to the ICL DRS 300. The contents of these floppy tapes wereloaded onto the ICL DRS 300.

After the test files were loaded to disk on the ICL DRS 300, the fullset of tests was compiled, and all executable tests were linked andexecuted on the ICL DRS 300. Results were copied onto floppy disks andloaded onto the RC900 (386/UNIX Workstation); the RC900 (386/UNIXWorkstation) wrote a streamer tape which was then transferred to theSUN-3/50 Workstation. The results were then transfered from theSUN-3/50 Workstation via the Ethernet LAN to the VAX-II/8530. Theresults were then printed from the VAX-11/8530 computer.

The compiler was tested using command scripts provided by DDC-I, Inc.and reviewed by the validation team. The compiler was tested using alldefault option I switch settings except for the following:

Option I Switch Effect.

-L List option

-1 Name of the program library; both the defaultvalues and explicitly specified programlibraries were used.

Tests were compiled, linked, and executed using the same Host/Targetcomputer. Test output, compilation listings, and job logs were capturedon magnetic tape and archived at the AVF.

3-6

Page 24: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

3.7.3 Test Site

Testing was conducted at Copenhagen, Denmark and was completed on 28

July 1988.

3-7

Page 25: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

APPENDIX A

CONFORMANCE STATEMENT

A-1

Page 26: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

APPENDIX A

CONFORMANCE STATEMENT

DDC International A/S has submitted the following Declaration ofConformance statement concerning the DACS-386/UNIX.

DECLARATION OF CONFORMANCE

Compiler Implementor: DDC International A/SAda Validation Facility:

Software Standards Validation GroupInstitute for Computer Sciences and TechnologyNational Bureau of StandardsBuilding 225, Room A266Gaithersburg, Maryland 20899

Base Configuration

Base Compiler Name: DACS-386/UNIX, Version: 4.2Host Architecture ISA:

ICL/DRS 300 OS&VER #: DRS/NX Ver 3 Level 0 Increment 50Target Architecture ISA:

ICL/DRS 300 OS&VER #: DRS/NX Ver 3 Level 0 Increment 50

Implementor's Declaration

I, the undersigned, representing DDC International A/S, have implementedno deliberate extensions to the Ada Language Standard ANSI/MIL-STD-1815Ain the compiler(s) listed in this declaration. I declare that DDCInternational A/S is the owner of record of the Ada language compiler(s)listed above and, as such, is responsible for maintaining saidcompiler(s) in conformance to ANSI/MIL-STD-1815A. All certificates andregistrations for Ada language compiler(s) listed in this declarationshall be made only in the owner's name.

____________________Date: 2 L- like

DDC International A/SHasse Hanssor. Department Manager, Product Development

Page 27: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

Owner's Declaration

I, the undersigned, representing DDC International A/S, takefull responsibility for implementation and maintenance of theAda compiler(s) listed above, and agree to the publicdisclosure of the final Validation Summary Report. I furtheragree to continue to comply with the Ada trademark policy, asdefined by the Ada Joint Program Office. I declare that all ofthe Ada language compilers listed, and their host/targetperformance are in compliance with the Ada Language StandardANSI/MIL-STD-1815A.

tile Date: 'e 7 /

DDC International A/SHasse Hansson, Department Manager, Product Development

Page 28: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

APPENDIX B

APPENDIX F OF THE Ada STANDARD

The only allowed implementation dependencies correspond toimplementation-dependent pragmas, to certain machine-dependentconventions as mentioned in chapter 13 of MIL-STD-1815A, and tocertain allowed restrictions on representation clauses. Theimplementation-dependent characteristics of the DACS-80x86, Version 4.2,are described in the following sections which discuss topics inAppendix F of the Ada Language Reference Manual (ANSI/MIL-STD-1815A)..Implementation-specific portions of the package STANDARD are alsoincluded in this appendix.

package STANDARD is

type INTEGER is range -2 147_483 648 .. 2_147 483_647;type SHORTINTEGER is range -32_768 .. 32_767;type LONG INTEGER is range

-16#8000_0000_0000# .. 16#7FFFFFFFFFFFFFFF#;

type FLOAT is digits 6 range-3.40282366920938E38 .. 3.40282366920938E38;

type LONGFLOAT is digits 15 range-1.7976931348623157E308 .. 1.7976931348623157E308;

type DURATION is delta 2#l.0#E-14 range -131_072.0 .. 131_071.0;

B-1

Page 29: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

VORDDC-t Ada Compiler System T 11l

User's Guide

for DACS-386/UNJXTM

'IDDC-I Ada Compiler System is a trademark of DDC-I, Lnc.

November 15, 1988 Document no.: DDC-I 5801/RPT/74, issue 3

DDC International A/S untotieve! Teieotmone Tpe 4lxGiro

Page 30: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

APPENDIX FIMPLEMENTATION-DEPENDENT

CHARACTERISTICS

This appendix describes the implementation-dependent characteristics of DACS-386/UNIXI as required in Appendix F of the Ada Reference Manual (ANSI/MIL-STD-1815A).

F.1 Implementation-Dependent Pragmas

This section describes all implementadon defined pragmas.

F.1.1 Pragma INTERFACESPELLING

This pragma allows an Ada program to call a non-Ada program whose name containscharacters that would be an invalid Ada subprogram identifier. This pragma must be usedin conjunction with pragma INTERFACE, i.e., pragma INTERFACE must be specified forthe non- Ada subprogram name prior to using pragma INTERFACE,_SPELLING.

The pragma has the format:

pragma INTERFACESPELLING (subprogram name, string literal);

where the subprogram name is that of one previously given in pragma INTERFACE andthe string literal is the exact spelling of the interfaced subprogram in its native language.This pragma is only required when the subprogram name contains invalidcharacters for Ada identifiers.

F.1.2 Pragma INTERRUPT-HANDLER

The DACS-386/UNIX T4 allows the use of pragma INTERRUPTHANDLER forcompatibility with other DACS compiler systems. In this implementation this pragma doesnot have any affect in the Ada program. The following information is reference only. It hasthe format:

pragma INTERRUPTHANDLER;

The pragma must appear as the first thing in the specification of the task object. The taskmust be specified in a package and not a procedure.

F.1.3 Pragma LTSTACKSPACE

This pragma sets the size of a library task stack segment. The pragma has the format:

pragrna LTSTACKSPACE (T, N);

Page F-1

DOC International A/S

Page 31: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

User's GuideImplementation Dependent Characteristics

where T denotes either a task object or task type and N designates the size of the library

task stack segment in words,

The size of the library task stack is normally specified via the representation clause:

for TSTORAGE-SIZE use N;

The size of the library task stack segment determines how many tasks can be created whichare nested within the library task. All tasks created within a library task will have theirstacks allocated from the same segment as the library task stack. Thus, pragmaLT-STACK-SPACE must be specified to reserve space within the library task stacksegment so that nested tasks' stacks may be allocated.

The following restrictions are places on the use of LTSTACKSPACE:

I) It must be used only for library tasks.

2) It muct be placed immediately after the task object or type name declaration.

3) The library task stack segment size (N) must be greater than or equal to the librarytask stack size.

F.2 Implementation-Dependent Attributes

No implementation-dependent attibutes are defined.

Page F-2

DOC International A,'S

Page 32: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

User's Guide

Implementation Dependent Characteristics

F.3 Package System

The package System for DACS-386/UNIX'r is:

package System is

type Word is new Short-Integer,type DWord is new Integer,type QWord is new Long-Integertype UnsignedWord is range 0..65535;for UnsignedWord'SIZE use 16;type UnsignedDword is range 0.. 16#7FFFFFFF#;for UnsignedDWord'SIZE use 32;

type Address is recordoffset : UnsignedDWord;

end record;

subtype Priority is Word range 0.31;type Name is (386UNIX);

SystemName : constant Name := 386UNIX;Storage-Unit : constant "= 16;Memory-Size constant 2**32;M.in_hat constant := -16#800000000000-0000#;Max-nt constant := 16#7FFFFFFF FFFFFFFF#;MaxDigits constant := 15;MaxMantissa constant 31;Fine-.Delta: constant := 2#1.0#E-31;Tick: constant := 0.000000-0625;

--machine dedpendant

type Interface-Language is (ASM86, C86, C86 REVERSE);type Exceptionld is record

unit-number UnsignedDWord;unique-number : UnsignedDWord;

end record;

type TaskValue is new Integer,type AccTaskValue is access TaskValue;

type Semaphore is recordcounter : UnsignedWord;first : TaskValue;last : TaskValue;

end record;

InitSemaphore • constant Semaphore'(1, 0, 0);

end SYSTEM;

Page F-3

DOC International A'S

Page 33: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

User's Guide

Implementation Dependent Characteristics

F.4 Representation Clauses

The DACS-386/UNLX fully supports the 'SIZE representation for derived types. Therepresentation clauses that are accepted for non-derived types are described in the followingsubsections.

F.4.1 Length Clause

Some remarks on implementation dependent behavior of length clauses are necessary:

- When using the SIZE attribute for discrete types, the maximum value that can bespecified is 16 bits.

- SIZE is only obeyed for discrete types when the type is a part of a compositeobject, e.g. arrays or records, for example:

type byte is range 0..255;

for byte'size use 8;

sixteenbitsallocated : byte; -- one word allocated

eightbitper.element: array(O..7) of byte; -- four words allocated

type rec is recordc 1,c2 : byte; -- eight bits per component

end record;

- Using the STORAGE-SIZE attribute for a collection will set an upper limit on thetotal size of objects allocated in this collection. If further allocation is attempted, theexception STORAGEERROR is raised.

- When STORAGE-SIZE is specified in a length clause for a task, the process stackarea will be of the specified size. The process stack area will be allocated inside the"standard" stack segment.

F.4.2 Enumeration Representation Clause

Enumeration representation clauses may specify representations in the range ofINTEGER'FIRST + 1..INTEGER'LAST- 1.

F.4.3 Record Representation Clauses

When representation clauses are applied to records the following restrictions are imposed:

- the component type is a discrete type different from LONG-INTEGER

Page F-4

DOC International A/S

Page 34: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

User's GuideImplementation Dependent Characteristics

the component type is an array with a discrete element type different from

LONGINTEGER

the storage unit is 16 bits

- a record occupies an integral number of storage units

- a record may take up a maximum of 32K storage units

a component must be specified with its proper size (in bits), regardless of whetherthe component is an array or not.

if a non-array component has a size which equals or exceeds one storage unit (16bits) the component must start on a storage unit boundary, i.e. the component mustbe specified as:

component at N range 0.. 16 * M - 1;

where N specifies the relative storage unit number (0,1,...) from the beginning ofthe record, and M the required number of storage units (1,2,...)

the elements in an array component should always be wholly contained in onestorage unit

- if a component has a size which is less than one storage unit, it must be whollycontained within a single storage unit:

component at N range X .. Y;

where N is as in previous paragraph, and 0 <= X <= Y <- 15

When dealing with PACKED ARRAY the following should be noted:

- the elements of the array are packed into 1,2,4 or 8 bits

If the record type contains components which are not covered by a component clause, theyare allocated consecutively after the component with the value. Allocation of a recordcomponent without a component clause is always aligned on a storage unit boundary.Holes created because of component clauses are not otherwise utilized by the compiler.

F.4.3.1 Alignment Clauses

The DACS-386/UNLX"'4 allows the use of alignment clauses for compatibility with otherDACS Ada Compiler Systems. In this implementation, however, these representationclauses do not actually modify the internal data representation of objects. The followinginformation is provided to show the allowed syntax for the representation clauses.

Page F-5

DDC International A'S

Page 35: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

User's GuideImplementation Dependent Characteristics

F.5 Implementation-Dependent Names for Implementation-Dependent Components

None defined by the compiler.

F.6 Address Clauses

This section describes the implementation of address clauses and what types of entities mayhave their address specified by the user. In the DACS 386/UNIX T" implementation,addresses clauses are allowed to provide compatibility with other DACS Ada CompilerSystems, although they do not actually affect the data representation.

F.6.1 Task Entries

The implementation supports two methods to equate a task entry to a hardware interruptthrough an address clause:

1) Direct transfer of control to a task accept statement when an interrupt occurs(requires use of the pragma INTERRUPT-HANDLER).

2) Mapping of an interrupt onto a normal conditional entry call, i.e., the entry can becalled from other tasks without special actions, as well as being called when aninterrupt occurs.

F.7 Unchecked Conversions

Unchecked conversion is only allowed between objects of the same "size".

Page F-6

Doc International A/S

Page 36: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

User's Guide

Implementation Dependent Characteristics

F.8 Input/Output Packages

The implementation supports all requirements of the Ada language. It is an effectiveinterface to the UNIX file system, and in the case of the text I/O also an effective interfaceto the UNIX standard input, standard output and standard error streams.

This section describes the functional aspects of the interface to the UNIX file system,including the methods of using the interface to take advantage of the file control facilitiesprovided.

The Ada input-output concept as defined in Chapter 14 of the ARM does not constitute acomplete functional specification of the input-output packages. Some aspects of the 110system are not described at all, with others intentionally left open for implementation. Thissection describes those sections not covered in the ARM.

The UNIX operating system considers all files to be raw sequences of characters. Files caneither be accessed sequentially or randomly. Files are not structured into records, but anaccess routine can treat a file as a sequence of records if it arranges the record level input-output. Two restrictions that apply are:

If a direct access (using lseek(2)) to standard input, standard output, or standarderror will cause a USEERROR to occur.

Attempting to direct access (using Iseek(2), open(2), mknod(2), or pipe(2)) aUNIX pipe or FIFO will cause a USE-ERROR to occur.

Note that for sequential or text files (Ada files not UNIX external files) RESET on a file inmode OUT.FILE will empty the file. Also, a sequential or text file opened as anOUT-FILE will be emptied.

F.8.1 External Files

An external file is either a UNIX disk file, a UNIX FIFO, a UNIX pipe, or any devicedefined in the UNIX directory. The use of devices such as a tape drive or communicationline may require special access permissions or have restrictions. If an inappropriateoperation is attempted on a device, the USEERROR exception is raised.

External files created within the UNIX file system shall exist after the termination of theprogram that created it, and will be accessible from other Ada programs. A form createdwith the FORM parameter will also exist after program termination. However, pipes andtemporary files will not exist after program termination.

Creation of a file with the same name as an existing external file will cause the exceptionUSE-ERROR to be raised. Also, creation of files with mode IN-FILE will raiseUSE-ERROR.

The name parameter to the input/output routines must be a valid UNIX file name. If thename parameter is empty then a temporary file is created in the /tmp directory. This file isautomatically deleted when the program that created it terminates.

Page F-7

DOC International A/S

Page 37: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

user's Guide

Implementation Dependent, Characteristics

F.8.2 File Management

This section provides useful information for performing file management functions withinan Ada program.

The only restrictions in performing Sequential and Direct I/O are:

The maximum size of an object of ELEM4ENTTYPE is 32k bytes.

If the size of an object of ELEMENT_TYPE is variable, the maximum size must bedeterminable at the point of instantiation from the value of the SIZE attribute.

The NAME parameter

The NAME parameter must be a valid UNIX pathname (unless null). If any directory in thepathname iinaccessible, a USEERROR is raised.

The UNIX names "stdin", "stdout", and "stderr" can be used with TEXTJtO.OPEN/ Nophysical opening of the external file is performed and the Ada file will be associated withalready open external file. These names have no significance for other packages.

Temporary files (NAME = null sting) are created using tmpname(3) and are deleted when

CLOSED. Abnormal program termination may leave temporary files in existence.

The FORM parameter

The FORM parameter has the following facilities:

A FIFO special file can be opened using the open(2) system call. This is achievedwith the "FIFO" string. Note that this cannot be used with CREATE.

The default value for this facility is "ORDINARY", which designates the creationof an ordinary file.

An additional flag associated with FIFO specials is provided to allow waiting orimmediate return. This flag, and its status, is specified with the additionalstings, "ONDELAY--ON" for ON and "ONDELAY=OFF" for OFF. Defaultis "O_NDELAY=OFF".

The "APPEND" string car, be used to open text files without emptying the file.This parameter cannot be used with CREATE. The default condition is"NOAPPEND".

Access rights to a file can be controlled by using a "MODE=<mode>" string inthe CREATE procedure. <mode> is an octal, decimal, or hexadecimal integer inthe standard UNIX format. Default mode is 0644. This facility can also be usedby OPEN to change access permissions on existing files by means of thechmod(2) system call.

Page F-8

DDC International A/S

Page 38: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

User's GuideImplementation Dependent Characteristics

If more than one of the three options (FIFO, APPEND, and MODE) is included, therightmost option is selected. Blanks are not significant within any pan of the string. Thesyntax of the FORM parameter provides all default options as required in the AdaReference Manual:

<form-parameter> := [<option> ....]

where <option> := <access rights> I <fifo> I <append>

<access-rights> is MODE=<mode #>. The mode number can bein decimal, octal (0###), or hexadecimal (0##).

<fifo> is either "FIFO [ONDELAY= ONIOFF]" or "ORDINARY"

<append> is either "APPEND" or "NOAPPEND"

File Access

The following guidelines should be observed when performing file I/O operations:

- At a given instant, any number of files in an Ada program can be associated withcorresponding external files.

- When sharing files between programs, it is the responsibility of the programmer todetermine the effects of sharing files.

- The RESET and OPEN operations to files of mode OUTFILE will empty thecontents of the file in SEQUENTIAL 10 and TEXTJO.

- Files can be interchanged between SEQUENTIALJO and DIRECT.IO without anyspecial operations, if the files are the same object type.

Page F-9

ODC Intemrnationa A/S

Page 39: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

User's Guide

Implementation Dependent Characteristics

F.8.3 Package TEXT_10

The specification of package TEXT_1O:

with BASIC_10_TYPES;

with IOEXCEPTIONS;package TEXT-1O is

type FILE-TYPE is limited private;

type FILEMODE is (INFILE, OUTFILE);

type COUNT is range 0.. LONGINTEGER'LAST;subtype POSITIVE-COUNT is COUNT range 1 .. COUNTLAST;UNBOUNDED: constant COUNT:= 0; -- line and page length

-- max. size of an integer output field 2#....#

subtype FIELD is INTEGER range 0.. 35;

subtype NUMBERBASE is INTEGER range 2.. 16;

type TYPE-SET is (LOWERCASE, UPPER_CASE);

-- File Management

procedure CREATE (FILE : in out FILE-TYPE;MODE : in FILE-MODE :=JUTFILE;NAME : in STRING .-

FORM :in STRING

procedure OPEN ( FILE in out FILEwTYPE;MODE in FILEMODE;NAME : in STRING;FORM : in STRING :=..

procedure CLOSE (FILE : in out FILE_TYPE;)procedure DELETE (FILE : in out FILETYPE);procedure RESET (FILE : in out FILE_TYPE; MODE : in FIL.E_MODE);procedure RESET (FILE : in out FILETYPE);

function MODE (FILE : in FILETYPE) return FILEMODE;function NAME (FILE : in FILE_TYPE) return STRING;function FORM (FILE : in FILETYPE) return STRING;

function ISOPEN (FILE • in FLE TYPE return BOOLEAN;

-- control of default input and output files

procedure SET-INPUT (FILE: in FILETYPE);procedure SET_OUTPUT (FILE : in FILETYPE);

Page F-10

DOC InternationaJ A/S

Page 40: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

User's GuideImplementation Dependent Characteristics

function STANDARD_INPUT return FILE_TYPE;function STANDARDOUTPUT return FILETYPE;

function CURRENTINPUT return FILETYPE;

function CURRENT_OUTPUT return FILE-TYPE;

-- specification of line and page lengths

procedure SETLINELENGTH (FILE: in FILETYPE; TO: in COUNT);procedure SETLINELENGTH (TO: in COUNT);

procedure SETPAGE_LENGTH (FILE : in FILETYPE; TO: in COUNT);procedure SETPAGELENGTH (TO: in COUNT);

function LINE-LENGTH (FILE : in FILE-TYPE) return COUNT;function LINE-LENGTH return COUNT;

function PAGE-LENGTH (FILE: in FILE.TYPE) return COUNT;function PAGELENGTH return COUNT;

-- Column, Line, and Page Control

procedure NEWLINE (FILE : in FILE_TYPE;SPACING : in POSMVE_..COUNT := 1);

procedure NEWLINE (SPACING : in POSITIVECOUNT := 1);

procedure SKIPLINE (FILE: in FILETYPE;SPACING : in POSITVE_COUNT:= I);

procedure SKIPLINE (SPACING : in POSTIVECOUNT := 1);

function ENDOFLINE (FILE : in FILE_TYPE) return BOOLEAN;function ENDOFLINE return BOOLEAN;

procedure NEWPAGE (FILE : in FILETYPE);procedure NEWPAGE;

procedure SKIP_PAGE (FILE : in FILEYPE);procedure SKIP-PAGE;

function ENDOFPAGE (FILE : in FILE_TYPE) return BOOLEAN;function ENDOfFPAGE return BOOLEAN;

function ENDOFFILE (FILE : in FILE_TYPE) return BOOLEAN;function END_OFFILE return BOOLEAN;

procedure SETCOL (FILE: in FILETYPE; TO : in POSITIVECOUNT);procedure SET.COL (TO: in POSMVECOUNT);

procedure SETLINE (FILE: in FILE_TYPE; TO: in POSITIVECOUNT);procedure SET_LINE (TO in POSITIVE_COUNT);

function COL (FILE: in FILETYPE) return POSITIVECOUNT;function COL return POSIIVECOUNT;

Page F-11

DOC International A,'S

Page 41: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

User's GuideImplementation Dependent Characteristics

function LINE (FILE in FILE_TYPE) return POSITIVECOUNT;function LINE return POSITIVECOUNT;

function PAGE (FILE : in FILETYPE) return POSITIVE-COUNT;

function PAGE return POSITIVECOUNT;

-- Character Input-Output

procedure GET (FILE in FILE-TYPE; ITEM : out CHAPACTER);procedure GET ( ITEM : out CHARACTER);procedure PUT (FILE in FILETYPE; ITEM: in CHARACTER);procedure PUT (ITEM : in CHARACTER);

-- String Input-Output

procedure GET (FILE : in FILETYPE; ITEM : out CHARACTER)-procedure GET (ITEM : out CHARACTER);procedure PUT (FILE : in FILETYPE; ITEM: in CHARACTER);procedure PUT (ITEM : in CHARACTER);

procedure GET-LINE (FILE : in FILETYPE;ITEM : out STRING;

LAST : out NATURAL);

procedure GETLINE (ITEM : out STRING; LAST : out NATURAL);procedure PUTLINE (FILE : in FILETYPE; ITEM : in STRING);procedure PUT_LINE (ITEM : in STRING);

Page F-12

DDC International A/S

Page 42: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

User's Guide

Implementation Dependent Characteristics

-- Generic Package for Input-Output of Integer Types

generictype NUM is range <> is

DEFAULTWIDTH: FIELD := NUMWIDTH;DEFAULT-BASE : NUMBERBASE := 10;

procedure GET ( FILE in FILETYPE;ITEM out NUM;WIDTH in FIELD := 0);

procedure GET ( ITEM out NUM;WIDTH :in FIELD:= 0);

procedure PUT ( FILE in FILETYPE;ITEM in NUM;WIDTH in FIELD:= DEFAULTWIDTH;BASE in NUMBER-BASE:= DEFAULT_BASE);

procedure PUT ( ITEM in NUM;WIDTH in FIELD := DEFAULTWIDTH;BASE in NUMBERBASE := DEFAULTLBASE);

procedure GET ( FROM in STRING;ITEM out NUM;LAST out POSITIVE);

procedure PUT ( TO out STRING;ITEM in NUM;BASE in NUMBER~BASE := DEFAULTBASE);

end INTEGERJIO;

Page F-13

DoC International A/S

Page 43: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

User's Guide

Implementation Dependent Characteristics

-- Generic Packages for Input-Output of Real Types

generictype NUM is digits <>;

package FLOATIO is

DEFAULT-FORE: FIELD:= 2;DEFAULTAFT : FIELD:= NUM'DIGITS - 1;DEFAULTEXP :FIELD:= 3;

procedure GET ( FILE in FILETYPE;ITEM :out NUM;WIDTH :in FIELD:= 0);

procedure GET ( ITEM out NUM;WIDTH in FIELD:= 0);

procedure PUT ( FILE in FILETYPE;ITEM in NUM;FORE in FIELD:= DEFAULTFORE;AFT in FIE.D:= DEFAULT-AFT;EXP in FIELD:= DEFAULT-EXP);

procedure PUT ( ITEM in NUM;FORE in FIELD:= DEFAULT.FORE;AFT in FIELD:= DEFAULT-AFT;EXP in FIELD:= DEFAULT.EXP);

procedure GET ( FROM in STRING;ITEM :out NUM;LAST out POSITIVE);

procedure PUT ( TO out STRING;ITEM in NUM;AFT in FIELD DEFAULT-AFT;EXP in FIELD DEFAULTEXP);

end FLOATIO;

Page F-14

DOC International A/S

Page 44: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

user's GuideImplementation Dependent. Characteristics

genenctype NUM is delta <>;

package FIXED-1O is

DEFAULT_FORE FIELD:= NUM'FORE;DEFAULTAFT FIELD:= NUM'AFT;DEFAULTEXP FIELD:= 0;

procedure GET ( FILE in FILE-TYPE;ITEM out NUM;WIDTH :in FIELD 0);

procedure GET ( TEM out NUM;WIDTH :in FIELD 0);

procedure PUT ( FILE in FILETYPE;ITEM in NUM;FORE in FIELD:= DEFAULTFORE;

.. AFT in FIELD:= DEFAULTAFT;EXP in FIELD:= DEFAULTEXP);

procedure PUT ( ITEM in NUM;FORE in FIELD:= DEFAULTFORE;AFT in FIELD:= DEFAULTAFT;EXP in FIELD:= DEFAULTEXP);

procedure GET ( FROM in STRING;ITEM out NUM;LAST out POSITIVE);

procedure PUT ( TO out STRING;ITEM in NUM;AFT in FIELD:= DEFAULT-AFT;EXP in FIELD:= DEFAULTEXP);

end FIXEDIO;

Page F-15

DOC International A/S

Page 45: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

User's Guide

Implementation Dependent Characteristics

-- Generic Fickage for Input-Output of Enumeration Types

generictype ENUM is (<>);

package ENUMERATIONIO is

DEFAULT-WIDTH FIELD 0;DEFAULT-SETTING TYPESET UPPER-CASE;

procedure GET ( FILE: in FILE-TYPE; ITEM: out ENUM);procedure GET ( ITEM: out ENUM);

procedure PUT ( FILE FILETYPE;ITEM :in ENUM;

WIDTH in FIELD DEFAULTWIDTK-SET in TYPESET DEFAULT SETTING);

procedure PUT ( iTEM in ENUM;WIDTH : in FIELD DEFAULT_WIDTH;SET in TYPESET DEFAULTSET=ING);

procedure GET ( FROM : in STRING;ITEM out ENUM;LAST out POSITIVE);

procedure PUT ( TO out STRING;ITEM : in ENUM;SET : in TYPE-SET DEFAULTSETTING);

end ENUMERATIONJO;

-- Exceptions

STATUS-ERROR : exception renames IOEXCEPTIONS.STATUSERROR;MODEERROR : exception renames ICLEXCEPTIONS.MODEERROR;NAMEERROR : exception renames IOEXCEPTIONS.NAMEERROR;USEERROR : exception renames IOEXCEPTIONS.USEERROR;DEVICEERROR : exception renames IOEXCEPTIONS.DEVICEERROR;END-ERROR : exception renames IOEXCEPTIONS.ENDERROR;DATAERROR : exception renames IOEXCEPTIONS.DATAERROR;LAYOUTERROR exception renames IOEXCEPTIONS.LAYOUTERROR;

private

type FILETYPE is new BASICIOJTYPES.FILETYPE;

end TEXT IO;

Page F-16

DDC International A/S

Page 46: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

User's Guide

Implementation Dependent Characteristics

F.8.4 Package LOW-LEVEL_1O

The specification of LOW-LEVEL-IO is:

with SYSTEM;

package LOW.LEVELIO is

subtype port-address is System.Word;

type byte is new integer,

procedure send-control (device in port.address; data : in System.Word);

procedure send control (device in port-address; data : in byte);

procedure receive-control (device in port.address; data : out byte);

procedure receive-control (device : in port-address; data : out System.Word);

private

pragma inline (send_control, receive-control);

end LOW-LEVEL-I0;

Page F-17

DOC International A/S

Page 47: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

User's GuideImplementation Dependent Characteristics

F.8.5 Package SEQUENTIAL_10

In SEQUENTIALJO, type checking for DATAERROR has been excluded for elements

are an unconstrained type.

-- Source code for SEQUENTIAL_O

with IO EXCEPTIONS;

generic

type ELEMENT-TYPE is private;

package SEQUENTIAL-IO is

type FILE-TYPE is limited private;

type FILE-MODE is (IN-FILE, OUTFILE);

-- File management

procedure CREATE(FILE : in out FILE_TYPE;MODE : in FILEMODE OUT-FILE;NAME :in STRINGFORM. : in STRING

procedure OPEN ( FILE : in out FILEJTYPE;MODE :in F1LEMODE;NAME : in STRING;FORM : in STRING

procedure CLOSE (FILE : in out FILE_TYPE);

procedure DELETE(FILE : in out FILETYPE);

procedure RESET (FILE : in out FILETYPE; MODE: in FILEMODE);

procedure RESET (FILE : in out FILE_TYPE);

function MODE (FILE : in FILE_TYPE) return FILEMODE;

function NAME (FILE : in FILE_TYPE) return STRING;

function FORM (FILE : in FILE_TYPE) return STRING;'

function ISOPEN(FILE : in FILE_TYPE) return BOOLEAN;

-- input and output operations

procedure READ ( FILE : in FILEJYPE;ITEM : out ELEMENTTYPE);

Page F-18

DDC Internahonal AiS

Page 48: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

User's GuideImplementation Dependent, Characteristics

procedure WRITE ( FILE in FILE-TYPE;rI'EM in ELEMBNL-TYPE);

function END..,OF-FILE(FILE: in FILET'YPE) return BOOLEAN;

-exceptions

STATUSERROR exception renames IQ-EXCEPTIONS.STATUS-ERROR;MODEERROR exception renames IOEXCEPTIONS.MODE_.ERROR;NAME-ERROR exception renames 10-EXEPIONSNAME-.ERROR;USE-.ERROR exception renames IQEXCEPTIONS.USE-ERROR;,DEVICEERROR exception renames IQ-EXCEPTIONS.DEVICE_ERROR;ENDERROR exception renames 10-.EXCEPTIONS.END-.ERROR;DATA-ERROR exception renames IO.._EXCEPTIONS.DATAERROR;

private

type FILE-.TYPE is new BASIClO.jYPES.FLETYPE;

end SEQUENTIAL_10;

Page F-19

ODC International A,'S

Page 49: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

User's Guide

Implementation Dependent Characteristics

F.8.6 Package Direct_10

In DIRECTIO, type checking for DATA-ERROR has been excluded for elements of anunconstrained type.

with BASICIOTYPES;with IOEXCEPTIONS;

generic

type ELEMENTTYPE is private;

package DIRECT-IO is

type FILETYPE is limited private;

type FILE-MODE is (IN-FILE, INOUT-FILE, OUTFILE);

type COUNT is range O..LONGNTEGER'LAST;

subtype POSITIVECOUNT is COUNT range 1..COUNTLAST;

-- File management

procedure CREATE(FILE : in out FILE_TYPE;MODE : in FILEMODE INOUTFILE;NAME : in STRINGFORM : in STRING

procedure OPEN ( FILE : in out FILE_TYPE;MODE : in FILE_MODE;NAME : in STRING;FORM : in STRING

procedure CLOSE (FILE : in out FILETYPE);

procedure DELETE(FILE : in out FILETYPE);

procedure RESET (FILE : in out FILE_TYPE;MODE :in FILEMODE);

procedure RESET (FILE : in out FILETYPE);

function MODE (FILE in FR.E_TYPE) return FILE-MODE;

function NAME (FILE : in FILE_TYPE) return STRING;

function FORM (FILE in FILEYPE) return STRING;

function ISOPEN(FILE in FILE_TYPE) return BOOLEAN;

Page F-20

DOC International A/S

Page 50: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

User's Guide

Implementation Dependent Characteristics

-- input and output operations

procedure READ ( FILE in FILETYPE;ITEM out ELEMEN-TTYPE;FROM in POSTIVE-COUN7);

procedure READ ( FILE in FILETYPE;ITEM out ELEMEN7_TYPE);

procedure WRITE ( FILE in FILETYPE;ITEM in ELEMEN7 TYPE;TO in POSITIVECOUNT);

procedure WRITE ( FILE in FILETYPE;ITEM in ELEMENTTYPE);

procedure SETINDEX(FILE: in FILETYPE;

TO : in POSITVE_.COUNT);

function INDEX(FILE: in FILETYPE) return POSITIVECOUNT;

function SIZE (FILE: in FILETYPE) return COUNT;

function END_OFFILE(FILE: in FILETYPE) return BOOLEAN;

-- exceptions

STATUSERROR exception renames IOEXCEPTIONS.STATUSERROR;MODEERROR exception renames IO_.EXPETIONS.MODE-ERROR;NAMEERROR exception renames IOEXCEPTIONS.NAMEERROR;USE-ERROR exception renames IOEXCEPTIONS.USEERROR;DEVICEERROR exception renames IO_EXCE'TIONS.DEVICE,_ERROR;ENPLERROR exception renames IOEXCEPTIONS.ENDERROR;DATAERROR exception renames IO EXCEPFTIONS.DATAERROR;

private

type FILETYPE is new BASIC_10_TYPES.FILETYPE;

end DIRECTIO;

Page F-21

DOC International A/S

Page 51: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

User's GuideImplementation Dependent Characteristics

F.9 Machine Code Insertions

The reader should be familiar with the code generation strategy and the 80386 instructionset to fully benefit from this section.

As described in chapter 13.8 of the ARM [ 83] it is possible to write procedures containingonly code statements using the predefined package MACHINECODE. The packageMACHINE-CODE defines the type MACHINEINSTRUCTION which, used as a recordaggregate, defines a machine code insertion. The following sections list the typeMACHINE-INSTRUCTION and types on which it depends, give the restrictions, andshow an example of how to use the package MACHINECODE.

F.9.1 Predefined Types for Machine Code Insertions

The following types are defined for use when making machine code insertions (their typedeclarations are given in the following pages):

type opcodetypetype operand-typetype register.typetype segment-registertype machineinsu-uction

The type REGISTER_TYPE defines registers and register combinations. The doubleregister combinations (e.g. BXSI) can be used only as address operands (BXSIdescribing [BX+Sr]). The registers STi describe registers on the floating stack. (ST is thetop of the floating stack).

The type SEGMENTREGISTER defines the four segment registers that can be used tooverwrite default segments in an address operand.

The type MACHINE INSTRUCTION is a discriminant record type with which every kindof instruction can be described. Symbolic names may be used in the form

name ADDRESS

type opcode-type is (-- 8086 instructions:

m-AAA, m.AAD, m-AAM, mAAS,mADC, mADD, mAND,mCALL, mCALLn,m-CBW, mCLC, mCLD m-CLI,m CMC, mCMP, mCMPS, mCWD,m-DAA, mDAS,m-DEC, m-DIV, mHLT,m_IDIV, mIMUL, mIN, m~INC,mINT, mINTO, mIRET,m_JA, mJAE, mJB, m-JBE,mJC, m_JCXZ, mJE, m-JG,mJGE, m_.L, mJLE, m-JNA,

Page F-22

DOC International AIS

Page 52: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

User's GuideImplementation Dependent Characteristics

rnJNAE, m-JNB, mjNBE. mnJNCmI- NE, mnJNG, m_ -JNGE, inJNL,M)JNLE, mnINO, mnJNP, mnJNS.m_-JNZ, m-10, miP, m-IPE,mJPO, miJS. mIZ, mJMP.inLAJ-F. mnLDS, mnLES, m_-LEA.in-LOCK, mnLODS,inLOOP, m_.LOOPE, in_LOOPNE, rn...LOOPNZ,mLOOPZ, tn_.MOV, rnMOYS, rn-MUL,m...NBG, mnNOP, -NYOT, mn-.OR,rn-OUT, rn..OP, rn.POPF, rMYUSH,m..PUS HF,m-RCL, in-RCR, m...ROL, m...ROR,m.-REP, rn-REPE, rn-REPNE,m-RET, mnRBTP, rn-RETN, rn-RETNP,rn-SAHF,rn..SAL, m-SAR, rn-SHL, inSHR,mnSBB, m-.SCAS,in-STC, m-STD, in5T1, rn-STOS,in..SUB, rnjEST, mnWAIT, niXCHG,rn)(LAT, mnXOR,

-8087/80 187/80287 Floating Point Processor instructionsm...FABS, rn...FADD, m-.FADDD, mnFADDP,mF.BLD, inYBSTP, rn-FCHS, inFNCLEX,rnFCOM, mn.FCOMD, m..FCOMP, mnFCOMPD,rn.JCOMPP, mnJDECSTP, mFDIV, rn_-FDIVD,mFDWP, m-YDIVR, rnJDIVRD, n.FDIVRP,m..YFREE, rn..YIADD, rnYIADDD, mICOM,in.JICOMD, m..YICOMP, rnJICOMPD, m-IDIV,nt.FIDIVD, mj*DI1VR, m-IDIVRD,mnFILD, m...FILDD, mILDL, in.YIMU.L,mnFIM1JLD, inJINCSTP, mnJNINIT, inFIST,m..YISTD, injISTP, rn_,FISTPD, rn-.FISTPL,m-.FISUB,m-FISUBD, m,.YISUBR, m..YISUBRD, rn-YLD,rin=D inJLDCW, inJLDENV, m-JLDLG2,m-FLDLN2, mnJLDL2E, inJLDL2T, m-JLDPI,mJ-LDZ, mFLD1, m3..MUL, inFMULD,in-JMULP, inJNOP, m_..PATAN, rn-YPREM,m-..FPTAN, mrn-FNDIN~T, rnFRSTOR, rnFSAVE,m..FSCALE, in-SETPM, rn..FSQRT,rn-.FST, mFSTD, rn-FSTCW,in..STENV, mFSTP, m..YSTPD, rn-FSTSW,m...FSTSWAX, m_.FSUB, in..FSUBD, rn-.FSUBP,m...FSUBR, inFSUBRD, Imh.FSUBRP, m-JTST,m-JWAIT, m-FXAM, rn-YXCH, m-FXTRACT,inFYL2X, rn-YL2XPl, m-F2XMl,

Page F-23

DC iternational A/S

Page 53: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

User's GuideImplementation Dependent Characteristics

80186/80286/80386 instructions:-- Notice that some immediate versions ot the 8086 instructions-- only exist on these targets (shifts, rotates, push, imul, ...)

inBOUND, inCLTS, in.ENTER. m-INS,in.LAR, mj EVE, mnLGDT, inUDTinLSL inj)UTS m-POPA, m-PUSHAm_..SGDT, in..SIDT,in..ARPL, rn UDT. m-LMSW, inLTR,nSLDT, rn.SMSW, m-STR, mnYERR.

rnVE.RW,-the 80386 specific instructions:

mSETA, m-.SETAE, inSETB, inSETBE,m-SETC, in_SETE, m-SETG, inSETGE,m...SETL, mSETLE, mSETNA, inSETNAE.rn..SETNB, m-SETNBE inSETNC, m-.SETNE,m-SETNG, inSETNGE, iSETNL, in..SETNLEin..SETNO, m-SETNP, inSETNS, inSETNZ,m-SETO, m-SETP, inSETPE, inSETPO,inSETS, in-.SETZ,

inBSF, m.,BSR,m-.BT, m-BTC, m-BTR, m-BTS,

m-LFS, m.LGS, inLSS,in.MOVZX in.MOVSX,m-.MOVCR, m-MOVDB3, rrlMOVTR,m...SHLD, M..SHRD,

-the 80387 specific instructionsin_FUCOM, m-YUCOMP, inJUCOMPPm...FPREMI, m-FSIN, m-F.COS, rnFSINCOS

Page F-24

ODC International A/S

Page 54: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

User's GuideImplementation Dependent Characteristics

-bytc/word/dword variants (to be used, when not deductible from

inet) mADDCB, inADCW, m-ADCD,inADDB, inADDW, inADDD,inANDB, inANDW, inANDD,m-BTW. m-BTD,minBTCW. rn.BTCD,in_ BTRW, mn3TRD,inBTSW, m..BTSD,rn BWW, m-CWDE,in_CWDW mCDQ,inCMPB, inCMPW, mCMPD,inCMPSB, inCMPSW, m-CMPSD,minDECB, in.DECW, rmDECD,in_ DIVB inDIVW, mnDIVD,inJDIVB, inDIVW, iID)IVD,inIMIJLB, m-IMLW, rnIMUD,inINCB, miINCW, inINCD,minNSB, iINSW, m-INSD,

inLODSB, iLODSW, inLODSD,inMOVB, M-MOVW, in_MCVI),inMOVSB, inMOVSW, inMQVSD,inMOVSXB, inMOVSXW,mnMOVZXB, inMOVZCW,in.MULB, m-MAULW, in_MULD,in_NEGB, m-NEGW, rXLNEGD,xm-OTB inNOTW, in.NOTD,in.ORB, inORW, in_ORD,inOUTSB, in..OUTSW, rnCUTSD,inPOPW, mnPOPD,inPUSHW, m-PUSHD,inRCLB, miRCLW, inRCLD,inRCRB, M.RCRW, inRCRD,inROLB, mROLW, in.ROLD,inRORB, m-RORW, mRORD,flLSALB, m -SALW, inLSALD,inSARB, MnSARW, in_SARI),m-SHLB, m-SHLW, inSH-LDW,inSHRB, m -SH-RW, m_SHRDW,inSBBB, in..SBBW, m-SBBD,inSCASB, m-SCASW, m-SCASD.inSTOSB inSTOSW, inSTOSD.m-SUBB, in SUB W, inSUBI),rn-TESTB, inTESI'W, in_TSTD,inXORB, m-XORW, m-XORD,inDATAB, inDATAW, inDATAD

-Special'insaructions'

m-abel, in-reset);

Page F-25

OOC international A. S

Page 55: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

User's Guide

implementation Dependent Characteristics

type operand-type is ( none, no operands

immediate, I immediate operandregister. I register operandaddress, -- I address operandsystem-address, 1 'address operandname, .. CALL nameregisterimmed'ate, .- 2 operands: dest is

-- register, source is- immediate

register, register, - 2 register operandsregister address, -- 2 operands: dest is register,

-- source is addressaddress-register, -- 2 operands: dest is address,

-- source is registerregister-system address, -- 2 operands: dest is register,

-- source is 'addresssystem-addressregister, -- 2 operands: dest is 'address,

-- source is registeraddress-immediate, -- 2 operands: dest is 'address,

-- source is immediatesystem-address immediate, -- 2 operands: dest is 'address,

- source is immediateimmediateregister, -. only allowed for OUT port is

-. immediate source is register

immediate immediate, -- only allowed for ENTERregister jegister immediate, - allowed for IMULimm,SHRDimm,

-- and SHLDimmregister-addressnimmediate -- allowed for RvULimmregister.system-address_iunmediate -- allowed for RAULimm

address-register-immediate -- allowed for SHRDimm,-- SHLDimm

system-addressregister_imrediate -- allowed for SHRDimm,-- SHLDimm

type register-type is ( AX, CX, DX, BX, -- word registersSP, BP, SI, DI,

AL, CL, DL, BL, -- byte registersAH,CH,DH,BH, --

EAX, ECX, EDX, EBX -- dword registersESP, EBP, ESI, EDI

ES, CS, SS, DS, selector registersFS, GS

BXSI, BXDI, -. 8086/80186/80286BP-SI, BPDI, -- combinations

ST, ST1, ST2, ST3, -- floating stack registersST4, ST5, ST6, ST7,nil);

Page F-26

DOC International AS

Page 56: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

User's GuideImpiemnentaitofl Dependent. Characteristics

type segrnentregister is ( ES, CS, SS, DS, FS, GS, nil )

subtype machine-string is string (1-.100);

pragma page;type machine-insuruction (operand-ind :operand-type is record

opcode :opcodejtype;

case operand-kind iswhen immnediate =>

immediate integer,

when register =>rjregister register-type;

when address =>a-segment registerjype-,a_address..jeg register-ype;a-offset integer,

when system-_address =>sa-addess svstem.address;

when name =>rist-ing machine..sting;

when registerjmxnediate =>rjL'regiStet rcgister...ype;r i immnediate :integer,

when register..egister =>r-r.-.register-.to regiSter..type;rregisterj.rom:i register-type-,

when register..address =>r _a_registerjoc registerj..ype;r -a segment segmnent3registerr _a_address..reg rcgisterj-ype;r_a-offset integer,

when address-register =>a-r.segment segmnft-.regster,a_r_address..yeg register..typic;a..r,.offset integer;a_r~registerfrom register-.type;

when register..systenLaddr5ss =>r-sa reisterJo register..type;r-.sa-address system.address

when systemn-address-register =>sa-r .address systern.address;sa-r-reg-from registerjtype;

Page F-27

ODC international A/S

Page 57: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

User's GuideINS, SOImplementation Dependent Characteristics

when address-.immediate =>aj.~segment segment-.register,a-i-address-eg registerjype;a-i-offset integer,a-i-immediate integer,

when system...address-immediate =>sa-i-address systern.address;sa i immediate integer.

when immediate_register =>irregister integer-,ir_register register-..type;

when immnediate-immediate =>_imminrrediatel. integer,

i-ij-jim ediate2 integer,

when register-egister-immediate =>r~jriiregisterl registerjype;r-r-;-register2 register-type;r-rjriediate2 integer,

when register _address_immediate =>r..a.Lregister register..type;r-a..segment register..Sype;r-a-i address-reg register-ype;r..aj-offset integer,r _aLimm-ediate integer,

when register-system-address immediate =>r _sa_..gister register-.type;addr 10 system.address;r _sa i immrediate integer-,

when address..register -immediate =>a-rLregister register..Sype;a-r-i-.segment register-.type;a-r-i-address-reg regtsterjype;a-r-i offset integer,a_r_iLinediate integer,

when system..address~register.Jmmuediate =>sa_r_address system.address;,sa-r-i-.register register-type;sa_r_immediate integer,

when others =>null;

end case-,end record-,

Page F-28

O0C international A/S

Page 58: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

User's Guide

Implementation Dependent Characteristics

F.9.2 Restrictions

Only procedures, and not functions, may contain machine code insertions. Also proceduresthat use machine code insertions specified with PRAGMA inline.

Symbolic names in the form x'ADDRESS can only be used in the following cases:

1) x is an object of scalar type or access type declared as an object, a formal parameter,or by static renaming.

2) x is an array with static constraints declared as an object (not as a formal parameter

or by renaming).

3) x is a record declared as an object (not a formal parameter or by renaming).

All opcodes defined by the type OPCODE_type except the meCALL can be used.

Two opcodes to handle labels have been defined:

mlabel: defines a label. The label number must be in therange 1 <= x <= 25 and is put inthe offset field in the first operand of the MACHINEJNSTRUCTION.

mreset: used to enable use of more than 25 labels. The label number after a mreRESETmust be in the range 1 <= x <=25. To avoid errors you must make sure that allused labels have been defined before a reset, since the reset operation clears allused labels.

All floating instructions have at most one operand which can be any of the following:

- a memory address- a register or an immediate value- an entry in the floating stack

F.9.3 Examples

The following section contains examples of how to use the machine code insertions andlists the generated code.

Page F-29

DDC international A/S

Page 59: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

User's GuideImplementation Dependent Characteristics

F.9.3.2 Example Using Labels

The following assembler code can be described by machine code insertions as shown:

MOV AX,7MOV CX,4CIMP AX,CXJG 1JE 2MOV CX.AX

1: ADD AX,CX2: MOV SS: [BP+DI], AX

with MACHINE_CODE; use MACHINE-CODE;package example-MC is

procedure test-labels;pragma inline (testjlabels);

end example-MC;

package body exampleMC is

procedure test~labels is

begin

MACHINEINSTRUCTION'(registerjxnmediate, xm.MOV, AX, 7);MACHINEThN'STRUCTION'(register~imfmediate, rnkMOV, CX, 4);MACHINEJ-NSTRUCTION'(registe register, mCM.P, AX, CX);MACHINE-INSTRUCTION'(imnediate, m-JG, 1);MACHiNEINSTRUCrION(inimediate, mnJE, 2);MACHINEINSTRUCTION'(register-register, rnMOV, CX, AX);MACHINE..JNSTRUCTION'(immxediate, mjabel, 1);MACHINEINSTRUCT'ION(register-r.egister, rn.ADD, AX, CX);MACHINE.TISTRUCTION'(inunediate, mjlabel, 2);MACINE-INSTRUCTION'(address-egister,m..MOV ,S S,BP-.DI,O,AX);

end test-labels;

end exarnple..MC;

Page F-30

DOC International A/S

Page 60: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

User's Guide

implementation Dependent Characteristics

F.10 Package Tasktypes

The TaskTypes packages defines the TaskControlBlock type. This data structure could beuseful in debugging a tasking program.

with System;package TaskTypes is

subtype Offset is System.UnsignedD Word;subtype Blockld is Systemn.UnsignedD Word;

type TaskEntry is new System.UnsignedD Word;type EntryIndex is new System.UnsignedD Word;type Airernativeld is new System.UnsignedD Word;type Ticks is new System.UnsignedD Word;type Bool is new Boolean;for Bool' size use 8;type Ulntg is new System.UnsignedD Word;

type TaskStaxe is (Initial,Engaged,Running,Delayed.

EntryCallingUnconditional,SelectingTimed,SelectingTermninable,Accepting,Synchronizing,Completed,Terminated);

type TaskTypeDescriptor isrecord

priority :System.LPriority;entry...count Ulntg;block-id :Blockid,first-own..address :System.Address,modulenumber :Ulntg;entry-.number :UIntg;code-address :System.Address;stack-.size :SystexmQWord;stack -segment-.size :Ulnrg;

end record;

type NPXSaveArea is array(l..48) of System.Word;

pragma page;type TaskControlB lock is

recordsem System.Semaphore;

Page F-31

Doc ,flternationai A/S

Page 61: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

User's Guide

I~~ implementation Dependent Characteri stics

-Delay queue handling

dnext. System.TaskValuc;dprev System.TaskValue;ddelay Ticks,

-Saved registers

SS System.Word;SP :Offset;

-Ready queue handling

next :System.TaskValue ,

-Semaphore handling

setnnext System.Task Value;

-- Priority fields

priority System-Priority;saved-.priority System.Priority;

time-slice Ticks;

stack -start Offset;stack-end Offset;

-State fields

state TaskS tate;is-abnormal Book;is-activated Bool;failure Bool;

-Activation handling fields

activator System.TaskValue;act-chain System.TaskValue;next-.chain System.Task Value;no-not-act Systcm.Word;act-block Blockid;

-Accept queue fields

partner :System.Task Value;

next-partner :System.Task Value;

-Entry queue fields

next-caller System.TaskValue;

Page F-32

DOC International A/S

Page 62: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

User's Guide

MWO implementation Dependent Characteristics

-Rendezvous fields

called-task System.TaskValue;task-entry TaskEntry;entry -index Entry Index;entryassoc System.Address;caillparams System.Address;alt-id Alternativeld;excp-id System.Excepuionld;

-Dependency fields

parent-task Systern.TaskValue;parent-block Blockld;child-task System.Task Value;next~child System.TaskValue;first..child Systern.Task Value;prev - hild Systcm.Task Value;child.act System.Word;blockact System.Word;terminated-task System.Task Value;

-Abortion handling fields

busy System.Word;

Auxiliary fields

ttd TaskTypeDescriptorsegrnent..size System.Word;

Run-Time System fields

ACF Offset;collection Systern.Address;

-NPX save areaNPXSave NPXSave~rea;

end record;

end TaskTypes;

Page F-33

DOC International A/S

Page 63: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

APPENDIX C

TEST PARAMETERS

Certain tests in the ACVC make use of implementation-dependent values,such as the maximum length of an input line and invalid file names. Atest that makes use of such values is identified by the extension .TSTin its file name. Actual values to be substituted are represented bynames that begin with a dollar sign. A value must be substituted foreach of these names before the test is run. The values used forthis validation are given below.

Name and Meaning Value

$BIGIDI <125 X "A">lIdentifier the size of themaximum input line length withvarying last character.

$BIGID2 <125 X "A">2Identifier the size of themaximum input line length withvarying last character.

$BIGID3 <63 X "A">3<62 X "A">Identifier the size of themaximum input line length withvarying middle character.

$BIGID4 <63 X "A">4<62 X "A">Identifier the size of themaximum input line length withvarying middle character.

$BIGINTLIT <123 X "0">298An integer literal of value 298with enough leading zeroes sothat it is the size of themaximum line length.

$BIGREALLIT <120 X "0">69.OEIA universal real literal ofvalue 690.0 with enough leadingzeroes to be the size of themaximum line length.

C-1

Page 64: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

$BIG_STRINGI <63 X "A">A string literal which whencatenated with BIG STRING2yields the image of BIG_IDl.

$BIGSTRING2 <62 X "A">lA string literal which whencatenated to the end ofBIG STRING1 yields the image ofBIG-IDl.

$BLANKS <106 X "

A sequence of blanks twentycharacters less than the sizeof the maximum line length.

$COUNT_LAST 2147483647A universal integer literalwhose value isTEXTIO.COUNT'LAST.

$FIELDLAST 35A universal integerliteral whose value isTEXTIO.FIELD'LAST.

$FILENAMEWITHBADCHARS "abc ̂ W. !@#longname"An external file name thateither contains invalidcharacters or is too long.

$FILENAME WITH WILD CARD CHAR "abv%.*longname2"An external file name thateither contains a wild cardcharacter or is too long.

$GREATERTHAN DURATION 100_000.0A universal real literal thatlies between DURATION'BASE'LASTand DURATION'LAST or any valuein the range of DURATION.

$GREATEPTHAN DURATION BASE LAST 200_000.0A universal real literal that isgreater than DURATION'BASE'LAST.

$ILLEGALEXTERNALFILENAMEl "BAD-CHARACTER*"

An external file name whichcontains invalid characters.

C-2

Page 65: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

$ ILLEGALEXTERNAL_FILE._N AE2 "BAD-CHARACTER*A ^

An external file name whichis too long.

$INTEGER FIRST -2147483648A universal integer literalwhose value is INTEGER'FIRST.

$INTEGERLAST 2147483647A universal integer literalwhose value is INTEGER'LAST.

$1NTEGERLASTPLUS_1 2147483648A universal integer literalwhose value is INTEGER'LAST + 1.

$LESS_THANDURATION -100_000.0A universal real literal thatlies between DURATION'BASE'FIRSTand DURATION'FIRST or any valuein the range of DURATION.

SLESSTHANDURATION BASEFIRST -200_000.0A universal real literal that isless than DURATION'BASE'FIRST.

$MAX_DIGITS 15Maximum digits supported forfloating-point types.

$MAXIN LEN 126Maximum input line lengthpermitted by the implementation.

$MAX_INT 9223372036854775807A universal integer literalwhose value is SYSTEM.MAXINT.

$MAX_INTPLUS_1 9223372036854775808A universal integer literalwhose value is SYSTEM.MAXINT+l.

$MAX_LENINTBASEDLITERAL <121 X "0"> 2:11:A universal integer basedliteral whose value is 2#11#with enough leading zeroes inthe mantissa to be MAXINLENlong.

C-3

Page 66: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

$MAX_LENREALBASEDLITERAL 16:<119 X "0">F.E

A universal real based literalwhose value is 16:F.E: with

enough leading zeroes in the

mantissa to be MAXINLEN long.

$MAXSTRING LITERAL "<12 X "1234567890" + "1234">

A string literal of size

MAX IN LEN, including the quote

characters.

$MIN_INT -9223372036854775808

A universal integer literalwhose value is SYSTEM.MIN_ INT.

$NAME SHORTSHORTINTEGER

A name of a predefined numeric

type other than FLOAT, INTEGER,SHORTFLOAT, SHORTINTEGER,LONGFLOAT, or LONGINTEGER.

$NEGBASEDINT 16#ffffffff#

A based integer literal whose

highest order nonzero bit

falls in the sign bit

position of the representationfor SYSTEM.MAXINT.

C-4

Page 67: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

APPENDIX D

WITHDRAWN TESTS

Some tests are withdrawn from the ACVC because they do not conform tothe Ada Standard. The following 28 tests had been withdrawn at the timeof validation testing for the reasons indicated. A reference of theform "AI-ddddd" is to an Ada Commentary.

B28003A: A basic declaration (line 36) wrongly follows a laterdeclaration.

E28005C: This test requires that 'PRAGMA LIST (ON);' not appear in alisting that has been suspended by a previous "pragma LIST(OFF);"; the Ada Standard is not clear on this point, and thematter will be reviewed by the ARG.

C34004A: The expression in line 168 wrongly yields a value outside ofthe range of the target type T, raising CONSTRAINTERROR.

C35502P: Equality operators in lines 62 & 69 should be inequalityoperators.

A35902C: Line 17's assignment of the nomimal upper bound of afixed-point type to an object of that type raisesCONSTRAINT_ERROR, for that value lies outside of the actualrange of the type.

C35904A: The elaboration of the fixed-point subtype on line 28 wronglyraises CONSTRAINTERROR, because its upper bound exceeds thatof the type.

C35904B: The subtype declaration that is expected to raiseCONSTRAINTERROR when its compatibility is checked against thatof various types passed as actual generic parameters, may infact raise NUMERIC ERROR or CONSTRAINTERROR for reasons notanticipated by the test.

C35A03E, These tests assume that attribute 'MANTISSA returns 0 when& R: applied to a fixed-point type with a null range, but the Ada

Standard doesn't support this assumption.

C37213H: The subtype declaration of SCONS in line 100 is wronglyexpected to raise an exception when elaborated.

C37213J: The aggregate in line 451 wrongly raises CONSTRAINTERROR.

D-1

Page 68: Ada Compiler Validation Summary - Defense Technical ... Target Version 4.2, ICL DRS 300 Host and 6.PERFORMING-bRG. REPORT NUMBER Target 7. AUTHOR(s) 8. CONTRACT OR GRANT NUMBERs) NB

C37215C, Various discriminant constraints are wrongly expectedE, G, H: to be incompatible with type CONS.

C38102C: The fixed-point conversion on line 23 wrongly raisesCONSTRAINTERROR.

C41402A: 'STORAGESIZE is wrongly applied to an object of an accesstype.

C45332A: The test expects that either an expression in line 52 willraise an exception or else MACHINE OVERFLOWS is FALSE.However, an implementation may evaluate the expressioncorrectly using a type with a wider range than the base type ofthe operands, and MACHINEOVERFLOWS may still be TRUE.

C45614C: REPORT.IDENT_ INT has an argument of the wrong type(LONG_INTEGER).

E66001D: AI-330 states this test is to be changed from an "E" test to a"B" test during the next version of the ACVC. AI-330 wasapproved in July 1986, 6 months before the initial version ofACVC Version 1.9 was released and a nearly a full year beforethe final version of ACVC Version 1.9 was released. This testis withdrawn pending further comment from AJPO regarding issueof the test being a B Test rather than an E Test.

A74106C, A bound specified in a fixed-point subtype declarationC85018B, lies outside of that calculated for the base type, raisingC87B04B, CONSTRAINT ERROR. Errors of this sort occur re lines 37 & 59,CC131IB: 142 & 143, 16 & 48, and 252 & 253 of the four tests,

respectively (and possibly elsewhere).

BC3105A: Lines 159..168 are wrongly expected to be illegal; they arelegal.

ADlAO1A: The declaration of subtype INT3 raises CONSTRAINTERROR forimplementations that select INT'SIZE to be 16 or greater.

CE240H: The record aggregates in lines 105 & 117 contain the wrongvalues.

CE320BA: This test expects that an attempt to open the default outputfile (after it was closed) with mode IN FILE raises NAMEERRORor USEERROR; by Commentary AI-00048, MODEERROR should beraised.

D-2