92
VIC FILE COPN( -. REPORT DOCUMENTATION PAGE 1M .. O, w M coft "1 ,,n n I,, -I l ' "1' mm '' " '' 1 . Is , ,wwm o ow Nw dif . INNO ~ ufW "bwHwk. 8= = ~ ~ mwy- d wNn. I!ur MswI bilmA a m M ab~Oma so W tu. a wom m m VA er- Mi~10u a n"" ~ A~~ Wlmd a aiq w m ia" 490 . 0C30 1.• AGENCY UKE ONLY tLmw 0") 2. WPOA'M W T PORr TYPE AM MTES WMVE ED I Dec 89 to 1 Dec 90 Final 4.TfEfUANU.f Ada Compiler Validation Summary Report: U3 1avy, g p u Ada/L, Version 2.0 (/OPTIMIZE Option), Vax 8550 and VAX 11/785 (Hosts) to AN/UYK-43 (Target),891201. 1 02 1 2 (0 i AUTHORS) ( National Institute of Standards and Technology Gaithersburg, MD ( USA 7. PERWOKd ORGANIZATION NAIE(S) AND ADORESS(ES) . PERFORMING ORGANIZATON National Institute of Standards and Technology IPoR NUM R S National Computer Systems Laboratory Bldg. 255, Rm. A266 Gaithersburg, MD 20899 O USA ___________ S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States Department of Defense Washington, D.C. 20301-3081 11. SUPPLENTARY NOTES 12L DISTIUTWAVALABLTY STATEIENT 12b. 01STPRS.nIN COOE Approved for public release; distribution unlimited. 15. ABSTPACT &A~dmun2U wo*) LS Navy, Ada/L, Version 2.0, (/OPTIMIZE Option), Vax 8550 and VAX 11/785 (Hosts) to AN/UYK-43 (Target), ACVC 1.10 DTIC ELECTE JUN 2 , 199 Eu D w.SECTTEM Ada programming language, Ada Compiler Validation i.NtkSER OF Summary Report, Ada Compiler Validation Capability, Validation Testing, Ada Validation Office, Ada Validation Facility, ANSI/MIL- is.o*PRECO SJD-181A, Ada Joint Program Office 17. 1. lY CLASMICATiON 1S. KEGURITY qLA55IFATIN S0. LITATlN OF A-RACT OFPORT OF ATACT UNCLASSIFIED UNFZ EDUNCLASSIFIED NSN 75IO,00,=.00 90 06,2 1 a j j90 06 25 127-,

VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

VIC FILE COPN( -.

REPORT DOCUMENTATION PAGE 1M ..O, w M coft "1 ,,n n I,, -I l ' "1' mm '' " ' '

1 .Is , ,wwm o ow Nwdif .INNO ~ ufW "bwHwk. 8= = ~ ~ mwy- d wNn. I!ur

MswI bilmA a m M ab~Oma so W tu. a wom m m VA er-Mi~10u a n"" ~ A~~ Wlmd a aiq w m ia" 490 . 0C30

1.• AGENCY UKE ONLY tLmw 0") 2. WPOA'M W T PORr TYPE AM MTES WMVE EDI Dec 89 to 1 Dec 90 Final

4.TfEfUANU.f Ada Compiler Validation Summary Report: U3 1avy, g p u

Ada/L, Version 2.0 (/OPTIMIZE Option), Vax 8550 and VAX 11/785

(Hosts) to AN/UYK-43 (Target),891201. 102 12

(0 i AUTHORS)

( National Institute of Standards and Technology

Gaithersburg, MD

( USA

7. PERWOKd ORGANIZATION NAIE(S) AND ADORESS(ES) . PERFORMING ORGANIZATON

National Institute of Standards and Technology IPoR NUM R

S National Computer Systems Laboratory

Bldg. 255, Rm. A266

Gaithersburg, MD 20899O USA ___________

S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY

Ada Joint Program Office NL0R

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

11. SUPPLENTARY NOTES

12L DISTIUTWAVALABLTY STATEIENT 12b. 01STPRS.nIN COOE

Approved for public release; distribution unlimited.

15. ABSTPACT &A~dmun2U wo*)

LS Navy, Ada/L, Version 2.0, (/OPTIMIZE Option), Vax 8550 and VAX 11/785 (Hosts) to

AN/UYK-43 (Target), ACVC 1.10 DTICELECTE

JUN 2 , 199

Eu D

w.SECTTEM Ada programming language, Ada Compiler Validation i.NtkSER OF

Summary Report, Ada Compiler Validation Capability, Validation

Testing, Ada Validation Office, Ada Validation Facility, ANSI/MIL- is.o*PRECO

SJD-181A, Ada Joint Program Office17. 1. lY CLASMICATiON 1S. KEGURITY qLA55IFATIN S0. LITATlN OF A-RACT

OFPORT OF ATACTUNCLASSIFIED UNFZ EDUNCLASSIFIED

NSN 75IO,00,=.00 90 06,2 1 a jj90 06 25 127-,

Page 2: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

AVF control Number: NISTB9USN55541.10DTE VSR CCDPLEED BEFORE ON-SITE: 08-11-89DATE VSR WPnI'E AFTE O-SITE: 12-04-89DATE VSR MDDIFIED PER AVO CM S: 12-29-89DATE VSR MDDIFIED PER AVO CMENTS: 04-27-90

Ada C IERVALIAION SLD24 REPORt:

Certificate Number: 891201S1.10212U.S. NAVY

Ada/L, Version 2.0 (/OPTIMIZE Option)VAX 8550 and VAX 11/785 Hosts and AN/UYK-43 Target

Ccmpletion of On-Site Testing:12-01-89

Prepared By:Software Standards Validation GroupNational Computer Systems Laboratory

National Institute of Standards and TechnologyBuilding 225, Room A266

Gaitkersburg, Maryland 20899

Prepared For:Ada Joint Program Office

United States Department of DefenseWashington DC 20301-3081

Page 3: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

AVF Control Number: NIST89USN555 4 1.10DATE COMPLETED BEFORE ON-SITE: 08-11-89DATE COMPLETED AFTER ON-SITE: 12-04-89

Ada Compiler Validation Summary Report:

Compiler Name: Ada/L, Version 2.0 (/OPTIMIZE Option)

Certificate Number: 891201S1.10212

Hosts: VAX 8550 and VAX 11/785 under VMS, Version 5.1

Target: AN/UYK-43 Bare machine

Testing Completed 12-01-89 Using ACVC 1.10

This report has been reviewed and if, approved.

Ad adation Facility Ada Validation FacjlityD/ Da id K. Jefferson Mr. L. Arnold Joh(siief, Information Systems Manager, Softw'are StandardsEngineering Division (ISED) Validation GroupNational Computer Systems National Computer SystemsLaboratory (NCSL) Laboratory (NCSL)

National Institute of National Institute ofStandards and Technology Standards and TechnologyBuilding 225, Room A266 Building 225, Room A266Gaithersburg, MD 20899 Gaithersburg, MD 20899

Ada Validation-OrganizationDr. John F. Kramer Aepegsjon ForInstitute for Defense AnalysesFAlexandria VA 22311 NTIS GR& I

Ux ran olm :d fJJ 11s t I ."1 tC t 1,)11 _. _ __ .

Ada Joint Program Office Dtstri1,;iutonDr. John SolomondDirector AVI~ 1 1'Y CodesDepartment of Defense Di i , -, /orWashington DC 20301 tPocO.

Page 4: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

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-63.7 ADDITIONAL TESTING INFORMATION .... .......... .3-73.7.1 Prevalidation ....... ................. .3-73.7.2 Test Method .......................... .3-73.7.3 Test Site ......... ................... 3-8

APPENDIX A CONFORMANCE STATEMENT

APPENDIX B APPENDIX F OF THE Ada STANDARD

APPENDIX C TEST PARAMETERS

APPENDIX D WITHDRAWN TESTS

APPENDIX E COMPILER OPTIONS AS SUPPLIED BYU.S. NAVY

Page 5: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

CHAPTER 1

INTRODUCTION

This Validation Summary Report (VSR) 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-tsting this compiler using the Ada CompilerValidation Capability. (ACVC). 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 implemented 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.The information in this report is derived from the test results producedduring validation testing. The validation process includes submitting asuite of standardized tests, the ACVC, as inputs to an Ada compiler andevaluating the results.\ The purpose of validating is to ensureconformity of the compilee to the Ada Standard by testing that thecompiler properly implemetts lgal language constructs and that itidentifies and rejects ill~gal language constructs. The testing alsoidentifies behavior that is implementation dependent, but is permittedby the Ada Standard. Six klasses of tests are used. These tests aredesigned to perform checksi at compile time, at link time, and duringexecution. I

Kl

1-1

Page 6: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

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 by thecompiler that do not conform to the Ada Standard

• To attempt to identify any language constructs not supported bythe t ompiler but required by the Ada Standard

* To determine that the implementation-dependent behavior is allowedby the Ada Standard

On-site testing was completed 12-01-89 at Syscon Corporation,Washington, D.C.

1.2 UCE 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 to thecomputers, operating systems, and compiler versions identified in thisreport.

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 GroupNational Computer Systems LaboratoryNational Institute of Standards and TechnologyBuilding 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: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Ada Validation OrganizationInstitute for Defense Analyses1801 North Beauregard StreetAlexandria VA 22311

1.3 REFERENCES

1. 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 Compiler Validation Capability Implementers' Guide, SofTech,Inc., December 1986.

4. Ada Compiler Validation Capability User's 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 Commentary point addressed by a comment on the AdaStandard. These comments are given a uniqueidentification number having 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,

1-3

Page 8: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

including cross-compilers, translators, andinterpreters.

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.

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

Target The computer which executes the code generated by thecompiler.

Test A program that checks a compiler's conformity regardinga particular feature or a combination of features to theAda Standard. In the context of this report, the termis used to designate a single test, which may compriseone or more files.

Withdrawn An ACVC test found to be incorrect and not used to checktest conformity to the Ada Standard. A test may beincorrect because it has an invalid test objective,fails to meet its test objective, or contains illegal orerroneous use of 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 errorsbecause of the way in which a program library is used at link time.

Class A tests ensure the successful compilation and execution of legalAda programs with certain language constructs which cannot be verifiedat run time. There are no explicit program components in a Class A testto check semantics. For example, a Class A test checks that reservedwords of another language (other than those already reserved in the Adalaaguage) are not treated as reserved words by an Ada compiler. A ClassA test is passed if no errors are detected at compile time and theprogram executes to produce a PASSED message.

1-4

Page 9: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Class B tests check that a compil~r 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 the run time system to ensure that legal Adaprograms can be correctly compiled and executed. Each Class C test isself-checking and produces a PASSED, FAILED, or NOT APPLICABLE messageindicating the result when it is executed.

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.

Class E tests are expected to execute successfully and checkimplementation-dependent options and resolutions of ambiguities in theAda Standard. Each Class E test is self-checking and produces a NOTAPPLICABLE, PASSED, or FAILED message when it is compiled and executed.However, the Ada Standard permits an implementation to reject programscontaining some features addressed by Class E tests during compilation.Therefore, a Class E test is passed by a compiler if it is compiledsuccessfully and executes to produce a PASSED message, or if it isrejected by the compiler for an ailowabld 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. In some cases, animplementation may legitimately detect errors during compilation of thetest.

Two library units, the package REPORT and the procedure CHECKFILE,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 procedureCHECKFILE is used to check the contents of text files written by someof the Class C tests for Chapter 14 of the Ada Standard. The operation

1-5

Page 10: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

of REPORT 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, thenthe validation is not attempted.

The text of each test in the ACVC follows 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 animplementation is considered each time the implementation is validated.A test that is inapplicable for one validation is not necessarilyinapplicable for a subsequent validation. Any test that was determinedto contain an illegal language construct or an erroneous languageconstruct is withdrawn from the ACVC and, therefore, is not used intesting a compiler. The tests withdrawn at the time of this validationare given in Appendix D.

1-6

Page 11: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

CHAPTER 2

CONFIGURATION INFORMATION

2.1 CONFIGURATION TESTED

The candidate compilation system for this validation was tested under

the following configuration:

Compiler: Ada/L, Version 2.0 (/OPTIMIZE Option)

ACVC Version: 1.10

Certificate Number: 891201S1.10212

Host Computers:

Machine: VAX 8550 and VAX 11/785

Operating System: VMS, Version 5.1

Memory Size: 48MBytes / 16MBytes

Target Computer:

Machine: AN/UYK-43

Operating System: Bare machine

Memory Size: 16MBytes

Communications network: PORTAL/43

2-1

Page 12: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

2.2 IMLPEMEfTION CHARACgERISIS

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 inplementation differences. However, tests in other classes alsocharacterize an implementation. The tests demonstrate the followingcharacteristics:

a. Capacities.

(1) The compiler correctly processes a compilation containing723 variables in the same declarative part. (See testD29002K.)

(2) The compiler correctly processes tests containing loopstatements nested to 65 levels. (See tests D55A03A..H (8tests).)

(3) The compiler correctly processes tests containing blockstatements nested to 65 levels. (See test D56001B.)

(4) The compiler correctly processes tests containing recursiveprocedures separately compiled as subunits nested to 17levels. (See tests D64005E..G (3 tests).)

b. Predefined types.

(1) ns implementation supports the additional predefinedtypes LONG_INTEER and LONG_FLOAT in the package STANDARD.(See tests B86001T..Z (7 tests).)

c. Expression evaluation.

The order in which expressions are evaluated and the time atwhich constraints are checked are not defined by the language.While the ACVC tests do not specifically attempt to determinethe order of evaluation of expressions, test results indicatethe following:

(1) All of the default initialization expressions for recordco n are evaluated before any value is checked formembership in a component's subtype. (See test C32117A.)

(2) Assignments for subtypes are performed with the sameprecision as the base type. (See test C35712B.)

2-2

Page 13: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

(3) This implementation uses no extra bits for extra precisionand uses all extra bits for extra range. (See testC35903A.)

(4) NUMERIC ERROR is raised for pre-defined integer comparisonand for pre-defined integer membership. NO EXCEPTION israised for largeint comparison or for large_intmembership. NUMERIC ERROR is raised for small intcomparison and for smllint membership when an integerliteral operand in a comparison or membership test isoutside the range of the base type. (See test C45232A.)

(5) NUMERIC ERROR is raised when a literal operand in afixed-point comparison or membership test is outside therange of the base type. (See test C45252A.)

(6) Underflow is gradual. (See tests C45524A..K (11tests).)

d. Rounding.

The method by which values are rounded in type conversions isnot defined by the language. While the ACVC tests do notspecifically atteupt to determine the method of rounding, thetest results indicate the following:

(1) The method used for rounding to integer is round away fromzero. (See tests C46012A..K (11 tests).)

(2) The method used for rounding to longest integer is roundaway from zero. (See tests C46012A..K (11 tests).)

(3) The method used for rounding to integer in static universalreal expressions is round toward zero. (See test C4A014A.)

e. Array types.

An inplementation is allowed to raise NUMERIC ERROR orSERROR an array having a 'tLENGI that exceeds

STANDARD. INTEGER' LAST and/or SYS .MAX INT. For thisimplementation:

(1) Declaration of an array type or subtype declaration withmore than SYSTEM.MAXINT components raises NUMERICERROR.(See test C36003A.)

(2) NUMERIC ERROR is raised when 'LENGH is applied to an arraytype with INTEXER' LAST + 2 ccmqonert s. (See test C36202A.)

2-3

Page 14: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

(3) NUMERIC ERROR is raised when 'LENGIH is applied to an arraytype with SYSr.MAX nIT + 2 comoents. (See testC36202B.)

(4) A packed BOOLEAN array having a 'LEN= exceedingINTEGER'ILASr raises NUMERIC ERROR. (See test C52103X.)

(5) A packed two-dimensional BOOIEAN array with more thanINTEGER' LAST ccmponents raises NUMERIC ERROR when the arraytype is declared. (See test C52104Y.)

(6) A null array with one dimension of length greater thanINTEGER' AST may raise NUMERIC ERROR or CNSRAINT ERROReither when declared or assigned. Alternatively, animplementation may accept the declaration. Haoever,lengths must match in array slice assignments. Thisimplementation raises no exception. (See test E52103Y.)

(7) In assigning one-dimensional array types, the expression isevaluated in its entirety before CONSTRAINT ERR is raisedwhen checking whether the expression's subtype iscompatible with the target's subtype. (See test C52013A.)

(8) In assigning two-dimensional array types, the expression isnot evaluated in its entirety before CONSRAINT ERROR israised when checking whether the expression's su iscompatible with the target's subtype. (See test C52013A.)

f. Discriminated types.

(1) In assigning record types with discriminants, theexpression is evaluated in its entirety beforeCONSTRAINT ERROR is raised when checking whether theexpression's subtype is c atible with the target'ssubtype. (See test C52013A.)

g. Aggregates.

(1) In the evaluation of a multi-dirensional aggregate, thetest results indicate that all choices are evaluated beforechecking against the index type. (See tests C43207A andC43207B.)

(2) In the evaluation of an aggregate containing subaggregates,all choices are evaluated before being checked foridentical bounds. (See test E43212B.)

(3) All choices were not evaluated before CONSTRAINT ERROR isr when a bound in a non-null range of a non-nullaggregate does not belong to an index subtype. (See testE43211B.)

2-4

Page 15: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

h. Pragmas.

(1) The pragma INLINE is supported for functions or procedures.(See tests IA3004A..B (2 tests), EA3004C..D (2 tests), andC3004E..F (2 tests).)

i. Generics.

(1) Generic specifications and bodies can be compiled inseparate ccapilations. (See tests CAl012A, CA2009C,CA2009F, BC3204C, aid BC3205D.)

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

(3) Generic subprogram declarations and bodies can be compiledin separate compilations. (See tests CA1012A and CA2009F.)

(4) Generic library subprogram specifications and bodies can beccapiled in separate compilations. (See test CAl012A.)

(5) Generic non-library subprogram bodies can be capiled inseparate campilations fErn their stubs. (See test2O009F.)

(6) Generic package declarations and bodies can be compiled inseparate ccnpilaticns. (See tests CA2009C, BC3204C, andBC3205D.)

(7) Generic library package specifications and bodies can beccapiled in separate compilations. (See tests BC3204C andBC3205D.)

(8) Generic non-library package bodies as subunits can becompiled in separate xtrpilations. (See test CA20o9C.)

(9) Generic lunit bodies and their subunits can be compiled inseparate campilations. (See test CA3011A.)

j. an ad op.

(1) Me package SBWUM AL_10 cannot be instantiated withunconstrained array types and record types withdiscriminants without defaults. (See tests AE2101C,EE2201D, and EE2201E.)

(2) The package DIRECT 10 cannot be instantiated withunconstrained array types or record types withdiscriminants without defaults. (See tests AE2101H,

2-5

Page 16: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

EE2401D, and EE2401G.)

(3) USE ERmRR is raised when Mode IN FILE is not supported forthe- operation of CEATE for SJ IAL_IO. (See testCE2102D.)

(4) USE ERROR is raised when Mode INFILE is not supported forthe operation of CEATE for DIRECT_I0. (See test CE21021.)

(5) Modes INFILE, OUTFILE, and INOUT FILE are supported forDIRECT_ O. (See tests CE2102F, CE2--02J, CE2102R, CE2102T,and C2102)V.)

(6) Modes IN FILE and w3r FILE are supported for text files.(See tests CE31021..K (3 tests).)

(7) RESET and DELETE operations are supported forSEZUENTIAL_IO. (See tests CE2102G and CE2102X.)

(8) RESET and DEL operations are supported for DIRECT_0IO(See tests CE2102K and CE2102Y.)

(9) RESET and DE E operations are supported for text files.(See tests CE3102F..G (2 tests), CE3104C, CE3110A, andC3l14A.)

(10) Overwriting to a sequential file does not truncate thefile. (See test CE2208B.)

(11) Temporary sequential files are given names and deleted whenclosed. (See test CE2108A.)

(12) Temporary direct files are given names and deleted whenclosed. (See test C2108C.)

(13) TO~orary text files are given names and deleted whenclosed. (See test C3112A.)

(14) Only one internal file can be associated with each externalfile for sequential files when reading only. (See testCE2107A.)

(15) Only one internal file can be associated with each externalfile for sequential files when writing. (See testsCE2107B..E (4 tests), CE211OB, and CE2111D.)

(16) Only one internal file can be associated with each externalfile for direct files when reading. (See test CE2107F.)

(17) Only one internal file can be associated with each externalfile for direct files when writing. (See tests CE2107G..H(2 tests), CE2110D and CE2111H.)

2-6

Page 17: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

(18) Only one internal file can be associated with each externalfile for text files when reading only. (See CE3111A.)

(19) Only one internal file can be associated with each externalfile for text files when reading or writing. (See testsCE3111B, CE3111D..E (2 tests), CE3114B, alnd CE3115A.)

2-7

Page 18: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

CHAPTER 3

TEST INFORMATION

3.1 TEST RESULTS

Version 1.10 of the ACVC comprises 3717 tests. When this compiler wastested, 44 tests had been withdrawn because of test errors. The AVFdetermined that 471 tests were inapplicable to this implementation. Allinapplicable tests were processed during validation testing except for201 executable tests that use floating-point precision exceeding thatsupported by the implementation. Modifications to the code, processing,or grading for 41 tests were required to successfully demonstrate thetest objective. (See section 3.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 127 1132 1858 17 22 46 3202

Inapplicable 2 6 457 0 6 0 471

Withdrawn 1 2 35 0 6 0 44

TOTAL 130 1140 2350 17 34 46 3717

3-1

Page 19: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

3.3 SUMMARY OF TEST RESULTS BY CHAPTER

RESULT CHAPTER TOTAL2 4 - _ _._____I 10 _11_12_13 14

Passed 194 573 544 245 172 99 161 332 137 36 252 182 275 3202

Inapplicable 18 76 136 3 0 0 5 0 0 0 0 187 46 471

Wdrn 1 1 0 0 0 0 0 2 0 0 1 35 4 44

rOTAL 213 650 680 248 172 99 166 334 137 36 253 404 325 3717

3.4 WITHDRAWN TESTS

The following 44 tests were withdrawn from ACVC Version 1.10 at the timeof this validation:

A39005G B97102E C97116A BC3009B CD2A62D CD2A63ACD2A63B CD2A63C CD2A63D CD2A66A CD2A66B CD2A66CCD2A66D CD2A73A CD2A73B CD2A73C CD2A73D CD2A76ACD2A76B CD2A76C CD2A76D CD2A81G CD2A83G CD2A84MCD2A84N CD2B15C CD2DlB CD5007B CD5O1O CD7105ACD7203B CD7204B CD7205C CD7205D CE2107I CE3111CCE3301A CE3411B E28005C ED7004B ED7005C ED7005DED7006C ED7006D

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, 471tests were inapplicable for the reasons indicated:

a. The following 201 tests are not applicable because they havefloating-point type declarations requiring more digits thanSYSTEM.MAXDIGITS:

C24113L..Y (14 tests) C35705L..Y (14 tests)C35706L..Y (14 tests) C35707L..Y (14 tests)C35708L..Y (14 tests) C35802L..Z (15 tests)

3-2

Page 20: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

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)

b. C24113H, C241131, C24113J, C24113K (4 tests) are not applicablebecause this implementation supports a line length of 120characters.

c. C35508I, C35508J, C35508M, and C35508N are not applicable becausethey include enumeration representation clauses for BOOLEAN typesin which the representation values are other than (FALSE -> 0, TRUE-> 1). Under the terms of AI-00325, this implementation is notrequired to support such representation clauses.

d. C35702A and B86001T are not applicable because this implementationsupports no predefined type SHORTFLOAT.

e. The following 16 tests are not applicable because thisimplementation does not support a predefined type SHORTINTEGER:

C45231B C45304B C45502B C45503B C4550RC45504E C45611B C45613B C45614B C45631BC45632B B52004E C55BO7B B55B09D B86001VCD7101E

f. C45531M. .P (4 tests), C45532M..P (4 tests) are not applicablebecause this implementation does not support a 48 bit integermachine size.

g. B86001X, C45231D, and CD7101G (3 tests) are not applicable becausethis implementation does not support any predefined integer typewith a name other than INTEGER or LONGINTEGER.

h. B8600lZ is not applicable because this implementation supports nopredefined floating-point type with a name other than FLOAT, orLONGFLOAT.

i. C86001F is not applicable because, for this implementation, thepackage TEXT 10 is dependent upon package SYSTEM. This testrecompiles package SYSTEM, making package TEXT_10, and hencepackage REPORT, obsolete. Because of the recompilation, the testcompiles but fails to link.

J. CDl009C, CD2A41A, CD2A41B, CD2A41E, CD2A42A, CD2A42B, CD2A42C,CD2A42D, CD2A42E, CD2A42F, CD2A42G, CD2A42H, CD2A42I, CD2A42J (14tests) are not applicable because this implementation does notsupport 'SIZE representations for floating-point types.

k. CDI009N, CD009X, CDl009Y, CDIOO9Z, CDlC03H, CDlC04E, CD4031A,CD404A, CD4051A, CD4051B, CD4051C, CD4051D, CD7204C, EDlD04A (14tests)are not applicable because record representation clauses are

3-3

Page 21: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

not supported.

1. CDlCO4C is not applicable because this implementation does notsupport 'SMALL specification clause for a derived fixed point typewhen it is inherited from the parent.

Mn. CD2A51A, CD2A5lB, CD2A51D, CD2A5lE, 'rD2A52A, CD2A52B, CD2A52C,CD2A52D, CD2A52G, CD2A52H, CD2A52I, CD2A52J, CD2A53A, CD2A53B,CD2A53C, CD2A53D, CD2A53E, CD2A54A, CD2A54B, CD2A54C, CD2A54D,CD2A54G, CD2A54H, CD2A54I, CD2A54J, ED2A56A (26 tests) are notapplicable because this implementation does not support 'SIZErepresentations for fixed-point types.

n. CD2A6lA, CD2A6lB, CD2A6lC, CD2A6lD, CD2A6lE, CD2A6IF, CD2A61G,CD2A6lH, CD2A6lI, CD2A6lJ, CD2A6lK, CD2A6lL, CD2A62A, CD2A62B,CD2A62C, CD2A64A, CD2A64B, CD2A64C, CD2A64D, CD2A65A, CD2A65B,CD2A65C, CD2A65D (23 tests) are not applicable because thisimplementation does not support size specifications for array typesthat imply compression of component storage.

o. CD2A71A, CD2A7lB, CD2A71C, CD2A7lD, CD2A72A, CD2A72B, CD2A72C,CD2A72D, CD2A74A, CD2A74B, CD2A74C, CD2A74D, CD2A75A, CD2A75B,CD2A75C, CD2A75D (16 tests) are not applicable because thisimplementation does not support the 'SIZE specification for recordtypes implying compression of component Storage.

p. CD2AB4B, CD2A84C, CD2A84D, CD2A84E, CD2A84F, CD2A84G, CD2A84H,CD2A84I, CD2A84K, CD2A84L (10 tests) are not applicable because'SIZE representation clauses for access types are not supported.

q. CD2A9lA, CD2A9lB, CD2A9lC, CD2A9lD, CD2A9lE (5 tests) are notapplicable because this implementation does not support the 'SIZErepresentation clauses for task types.

r. CD5003B, CD5003C, CD5003D, CD5003E, CD5003F, CD5003G, CD5003H,CD5003I, CD5OllA, CD5OllC, CD5O1lE, CD5OllG, CD5OllI, CD5OllK,CD5OllM, CD5O1lQ, CD5Ol2A, CD5Ol2B, CD5OI2E, CD5012F, CD5012I,CD5Ol2J, CD5O12M, CD5Ol3A, CD5Ol3C, CD5Ol3E, CD50l3G, CD5013I,CD5013K, CD5Ol3M, CD50130, CD5Ol3S, CD5Ol4A, CD5Ol4C, CD5Ol4E,CD5Ol4G, CD5014I, CD5Ol4K, CD5Ol4M, CD50140, CD5Ol4S, CD5OI4T,CD5Ol4V, CD5OI4X, CD5OI4Y, CD5014Z (46 tests) are not applicablebecause this implementation does not support 'ADDRESS clauses forvariables.

s. CD5OllB, CD5OllD, CD5OllF, CD5OllH, CD5OllL, CD5OllN, CD5OllR,CD5O1lS, CD5OI2C, CD5Ol2D, CD5Ol2G, CD5Ol2H, CD5012L, CD5Ol3B,CD5Ol3D, CD5Ol3F, CD5Ol3H, CD5Ol3L, CD5013N, CD5Ol3R, CD5Ol4B,CD5014D, CD5Ol4F, CD5Ol4H, CD5OI4J, CD5OI4L, CD5014N, CD5Ol4R,CD5Ol4U, CD5014WJ (30 tests) are not applicable because thisimplementation does not support 'ADDRESS clauses for constants.

t. AE2l0lC, EE22OlD, and EE2201E use instantiations of package

3.4

Page 22: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

SEQUENTIAL_10 with unconstrained array types and record types withdiscriminants without defaults. These instantiations are rejectedby this compiler.

u. AE2101H, EE2401D, and EE2401G use instantiations of packageDIRECT_10 with unconstrained array types and record types withdiscriminants without defaults. These instantiations are rejectedby this compiler.

v. CE2102E is inapplicable because this implementation supports CREATEwith OUTFILE mode for SEQUENTIALIO.

w. CE2102F is inapplicable because this implementation supports CREATEwith INOUTFILE mode for DIRECTI0.

x. CE2102J is inapplicable because this implementation supports CREATEwith OUT FILE mode for DIRECT_10.

y. CE2102N is inapplicable because this implementation supports OPENwith INFILE mode for SEQUENTIALIO.

z. CE21020 is inapplicable because this implementation supports RESETwith INFILE mode for SEQUENTIALIO.

aa. CE2102P is inapplicable because this implementation supports OPENwith OUTFILE mode for SEQUENTIALIO.

ab. CE2102Q is inapplicable because this implementation supports RESETwith OUTFILE mode for SEQUENTIAL IO.

ac. CE2102R is inapplicable because this implementation supports OPENwith INOUT FILE mode for DIRECTIO.

ad. CE2102S is inapplicable because this implementation supports RESETwith INOUT FILE mode for DIRECTIO.

ae. CE2102T is inapplicable because this implementation supports OPENwith INFILE mode for DIRECTIO.

af. CE2102U is inapplicable because this implementation supports RESETwith INFILE mode for DIRECTIO.

ag. CE2102V is inapplicable because this implementation supports OPENwith OUT FILE mode for DIRECTIO.

ah. CE2102W is inapplicable because this implementation supports RESETwith OUT FILE mode for DIRECTI0.

ai. CE2105A is inapplicable because CREATE with IN FILE mode is not

supported by this implementation for SEQUENTIALiO.

aj. CE2105B is inapplicable because CREATE with IN-FILE mode is not

3-5

Page 23: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

supported by this implementation for DIRECTIO.

ak. CE2107A. .E (5 tests), CE2107L, CE2110B CE2111D are not applicablebecause multiple internal files cannot be associated with the sameexternal file when one or more files is reading or writing forsequential files. The proper exception is raised when multipleaccess is attempted.

al. CE2107F is not applicable because multiple internal files cannot beassociated with the same external file when one or more files isreading for direct files.

am. CE2107G..H (2 tests), CE2110D, and CE2111H are not applicablebecause multiple internal files cannot be associated with the sameexternal file when one or more files is writing for direct files.The proper exception is raised when multiple access is attempted.

an. CE3102F is inapplicable because text file RESET is supported bythis implementation.

ao. CE3102G is inapplicable because text file deletion of an externalfile is supported by this implementation.

ap. CE3102I is inapplicable because text file CREATE with OUTFILE modeis supported by this implementation.

aq. CE3102J is inapp'icable because text file OPEN with INFILE mode issupported by this implementation.

ar. CE3102K is inapplicable because text file OPEN with OUTFILE modeis not supported by this implementation.

as. CE3109A is inapplicable because text file CREATE with INFILE modeis not supported by this implementation.

at. CE3111A..B (two tests), CE3111D..E (2 tests), CE3114B, and CE3115Aare not applicable because multiple internal files cannot beassociated with the same external file when one or more files isreading or writing for text files. The proper exception is raisedwhen multiple access is attempted.

3.6 TEST, PROCESSING, AND EVALUATION MODIFICATIONS

It is expected that some rests 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. Examples of suchmodifications include: adding a length clause to alter the default sizeof a collection; splitting a Class B test into subtests so that allerrors are detected; and confirming that messages produced by an

3-6

Page 24: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

executable test demonstrate conforming behavior that was not anticipated

by the test (such as raising one exception instead of another).

Modifications were required for 41 tests.

The following tests contain no pragma elaboarate. Therefore, it ispossible that the package body may be elaborated before the package bodyof REPORT. Each of the following tests were modified with the additionof a pragma elaborate statement and with the modification report PASS:

C39005A CD7004C CD7005E CD7006E

CC3126A was modified by inserting the initializing expression ":-

(others -> 'H')" into line numbered 117. With this modification, this

test reports PASS.

For this implementation CD2CllA and CD2CllB were modified by insertingthe initialization ":- 5.0" into variable W's declaration (note that Wis declared along with one or two other variables in a single objectdeclaration; the initialization is not needed for them, but does notaffect their use). With this modification, these tests report PASS.

The following 34 tests were split because syntax errors at one pointresulted in the compiler not detecting other errors in the test:

B28003A B28003C B2AO03A B33201C B33202C B33203C B33301BB37106A B37201A B373011 B38003A B38003B B38009A B38009BB44001A B44004A BS1001A B54AOL B91001H B95063A BB1006BBC1002A BC1102A BC1109A BC1109B BC1109C BC1109D BC1201FBC120IG BC1201H BC1201I BC1201J BC1201L BC3013A

3.7 ADDITIONAL TESTING INFORMATION

3.7.1 Prevalidation

Prior to validation, a set of test results for ACVC Version 1.10produced by the Ada/L, Version 2.0 (/OPTIMIZE Option) compiler wassubmitted to the AVF by the applicant for review. Analysis of theseresults demonstrated that the compiler successfully passed allapplicable tests, and the compiler exhibited the expected behavior onall inapplicable tests.

3.7.2 Test Method

Testing of the Ada/L, Version 2.0 (/OPTIMIZE Option) compiler using ACVCVersion 1.10 was conducted on-site by a validation team from the AVF.The configuration in which the testing was performed is described by thefollowing designations of hardware and software components:

Host computers: VAX 8550 and VAX 11/785

3-7

Page 25: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Host operating system: VMS, Version 5.1Target computer: AN/UYK-43Target operating system: Bare machineCompiler: Ada/L, Version 2.0 (/OPTIMIZE Option'Linker: LNKLImporter: IMP LExporter: EXP LLoader/Downloader: PORTAL/43Runtime System: RTEXEC Version 2.0/RTLIB Version 2.0

The host and target computers were linked via PORTAL/43

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. Tests requiring modifications during theprevalidation testing were modified on-site.

TEST INFORMATION

The contents of the magnetic tape were loaded directly onto the hostcomputers.

The ACVC Version 1.10 was compiled and linked on the host VAX 8550. Allexecutable tests were transferred to the AN/UYK-43 using PORTAL/43 andwere run on the AN/UYK-43. Results were uploaded from the target systemto the VAX 8550 stored on disk and printed.

The ACVC Version 1.10 was compiled and linked on the host VAX 11/785.All executable tests were transferred to the AN/UYK-43 using PORTAL/43and were run on the AN/UYK-43. Results were uploaded from the targetsystem to the VAX 11/785 stored on disk and printed.

The compiler was tested using command scripts provided by U.S. NAVY andreviewed by the validation team. See Appendix E for a complete listingof the compiler options for this implementation. The compiler optionsinvoked during this test were:

For A, C, D, L Tests:

/SUMMARY /OPTIMIZE /SOURCE

For B, E Tests:

/SUMMARY /OPTIMIZE /SOURCE

Unless explicitly stated the following are the default options:

NO SOURCE, NO MACHINE, NO ATTRIBUTE, NOCROSS REFEPENCE,NO DIAGNOSTICS, NOSUMMARY, NO NOTES, PRIVATE, CONTAINERGENERATION,CODEON WARNING, LIST, NOMEASURE, DEBUG, NOOPTIMIZE, CHECKS,

3-8

Page 26: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

NOEXECUTIVE, NORTEONLY

Tests were compiled, linked, and executed as appropriate using a singlecomputer. Test output, compilation listings, and job logs were capturedon magnetic tape and archived at the AVF. The listings were examinedon-site by the validation team.

3.7.3 Test Site

Testing was conducted at Syscon Corporation, Washington, D.C. and wascompleted on 12-01-89.

3-9

Page 27: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

APPENDIX A

DECLARATION OF CONFORMANCE

U.S. NAVY has submitted the following Declaration of Conformanceconcerning the Ada/L, Version 2.0 (/OPTIMIZE Option).

A-i

Page 28: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

DECLARATION OF CONFORMANCE

Customer: U.S. NAVY

Ada Validation Facility:

Ada Validation FacilityNational Computer Systems Laboratory (NCSL)

National Institute of Standards and TechnologyBuilding 225, Room A266Gaithersburg, MD 20899

Ada Compiler Validation Capability (ACVC) Version: 1.10

Ada Implementation: Ada/L, Version 2.0 (/OPTIMIZE Option)Host Computer Systems: VAX 8550 and VAX 11/785Host OS and Version: VMS, Version 5.1Target Computer System: AN/UYK-43Target OS and Version: Bare machine

Customer's Declaration

I, the undersigned, representing U.S. NAVY, declare that the U.S. NAVYhas no knowledge of deliberate deviations from the Ada Language StandardAINSI/MIL-STD-I 15A in the implementation(s) listed.in this declarations.

L~C~kk. Date: 9S5Tgnature of: WWilliam L. Wilder,U.S. NAVY

Page 29: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

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 the Ada Standard, and tocertain allowed restrictions on representation clauses. Theimplementation-dependent characteristics of the Ada/L, Version 2.0(/OPTIMIZE Option) compiler, as described in this Appendix, are providedby U.S. NAVY. Unless specifically noted otherwise, references in thisappendix are to compiler documentation and not to this report.Implementation-specific portions of the package STANDARD, which are nota part of Appendix F, are:

package STANDARD is

type INTEGER is range -2_147_483_647 .. 2_147_483_647;type LONGINTEGER is range

- 9_223_372_036_854_775_807 .. 9_223_372_036_854_775_807;

type FLOAT is digits 6 range- (16#O.FFFFF8#E63) .. (16#O.FFFFF8#E63);

type LONGFLOAT is digits 15 range- (16#O.FFFFFFFFFFFFEO#E63) .. (16#O.FFFFFFFFFFFFEO#E63);

type DURATION is delta 2.0 ** (-14) range-131_071.0 .. 131_071.0;

end STANDARD;

B-1

Page 30: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Ada/L PSE Handbook Version 2.OC30 September 1989

Section 6

The Ada Language for the AN/UYK-43

The source language accepted by the compiler is Ada, asdescribed in the Military Standard, Ada Programming Language,ANSI/MIL-STD-181S5A-1983, 17 February 1983 ("Ada LanguageReference Manual").

The Ada definition permits certain implementationdependencies. Each Ada implementation is required to supply acomplete description of its dependencies, to be thought of asAppendix F to the Ada Language Reference Manual. This section isthat description for the AN/UYK-43 target.

6.1 Options

There are several compiler options provided by all ALS/NCompilers that directly affect the pragmas defined in the AdaLanguage Reference Manual. These compiler options currentlyinclude the CHECKS and OPTIMIZE options which affect the SUPPRESSand OPTIMIZE pragmas, respectively. A complete list of ALS/NCompiler options can be found in Section 10.2.

The CHECKS option enables all run-time error checking forthe source file being compiled, which can contain one or morecompilation units. This allows the SUPPRESS pragma to be used insuppressing the run-time checks discussed in the Ada LanguageReference Manual, but note that the SUPPRESS pragma(s) must beapplied to each compilation unit. The NO CHECKS option disablesall run-time error checking for all compilation units within thesource file and is equivalent to SUPPRESSing all run-time checkswithin every compilation unit.

The OPTIMIZE option enables all compile-time optimizationsfor the source file being compiled, which can contain one or morecompilation units. This allows the OPTIMIZE pragma to requesteither TIME-oriented or SPACE-oriented optimizations beperformed, but note that the OPTIMIZE pragma must be applied toeach compilation unit. If the OPTIMIZE pragma is not present,the ALS/N Compiler's Global Optimizer tends to optimize for TIMEover SPACE. The NO OPTIMIZE option disables all compile-timeoptimizations for arl compilation units within the source fileregardless of whether or not the OPTIMIZE pragma is present.

In addition to those compiler options normally provided bythe ALS/N Common Ada Baseline compilers, the Ada/L compiler alsoimplements the EXECUTIVE, DEBUG, and MEASURE options.

The EXECUTIVE compiler option shall enable processing of the

6.1 Options 6-01

Page 31: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Version 2.OC Ada/L PSE Handbook30 September 1989

EXECUTIVE pragma. The EXECUTIVE compiler option also allows WITHof units compiled with the RTE ONLY option. If NO EXECUTIVE isspecified on the command line, the pragma will be Tgnored andwill have no effect on the generated code.

The DEBUG compiler option shall enable processing of thepragma DEBUG to provide debugging support. If NO DEBUG isspecified, the DEBUG pragmas shall have no effect. Program unitscontaining DEBUG pragmas and compiled with the DEBUG compileroption may be linked with program units containing DEBUG pragmasand compiled with the NO DEBUG option; only those program unitscompiled with the DEBUG option shall have additional DEBUGsupport.

The MEASURE compiler option shall enable processing of thepragma MEASURE to provide debugging support. If NOMEASURE isspecified, the MEASURE pragmas shall have no effect. Programunits containing MEASURE pragmas and compiled with the MEASUREcompiler option may be linked with program units containingMEASURE pragmas and compiled with the NO MEASURE option; onlythose program units compiled with the MEASURE option shall haveadditional MEASURE support.

6-02 6.1 Options

Page 32: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Ada/L PSE Handbook Version 2.OC30 September 1989

6.2 Pragmas

These paragraphs describe the pragmas recognized andprocessed by the Ada/L compiler. The syntax defined in Section2.8 of the Ada Language Reference Manual allows a pragma as theonly element in a compilation unit, before a compilation unit, atdefined places within a compilation unit, or following acompilation unit. Ada/L associates pragmas with compilationunits as follows:

a. If a pragma appears before any compilation unit in acompilation, it will affect all following compilationunits, as specified below and in section 2.8 of theAda Language Reference Manual.

b. If a pragma appears inside a compilation unit, itwill be associated with that compilation unit, andwith the listings associated with that compilationunit, as described in the Ada Language ReferenceManual, or below.

c. If a pragma follows a compilation unit, it will beassociated with the preceding compilation unit, andeffects of the pragma will be found in the containerof that compilation unit and in the listingsassociated with that container.

6.2.1 Language-Defined Pragmas

This paragraph specifies implementation-specific changes tothose pragmas described in Appendix B of the Ada LanguageReference Manual. Unmentioned pragmas are implemented as definedin the Ada Language Reference Manual.

The pragmas MEMORY SIZE (arg), STORAGE UNIT (arg), andSYSTEM NAME (arg) must appear at the start of the firstcompilation when creating a program library, as opposed to thestart of any compilation unit. If they appear elsewhere, adiagnostic of severity WARNING is generated and the pragma has noeffect.

pragma INLINE (arg (,arg,...});

The arguments designate subprograms. There are threeinstances in which the INLINE pragma is ignored. Eachof these cases produces a warning message which statesthat the INLINE did not occur.

a. If a call to an INLINEd subprogram iscompiled before the actual body of thesubprogram has been compiled (a routinecall is made instead).

6.2.1 Language-Defined Pragmas 6-03

Page 33: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Version 2.OC Ada/L PSE Handbook30 September 1989

b. If the INLINEd subprograms compilation unitdepends on the compilation unit of itscaller (a routine call is made instead).

c. If an immediately recursive subprogram callis made within the body of the INLINEdsubprogram (the pragma INLINE is ignoredentirely).

pragma INTERFACE (arg, arg);

The first argument specifies the language and type ofinterface to be used in calls used to the externallysupplied subprogram, specified by the second argument.The allowed values for the first argument (languagename) are MACRO NORMAL and MACRO QUICK. MACRO NORMALindicates that parameters will be passed on the stackand the calling conventions used for normal Adasubprogram calls (see Section 3.4.14.2 ofAda/LIntf Spec]) will apply. MACRO QUICK is used inRTLIB routines to indicate that parameters are passedin registers. See Section 7.7 for details on the spacerequired to pass various types of parameters.

The user must ensure that an assembly-language body

container will exist in the library before linking.

pragma OPTIMIZE (arg);

The argument is either TIME or SPACE. The default isSPACE. This pragma will be effective only when theOPTIMIZE option has been given to the compiler, asdescribed in Appendix 20 of (ALS/N_Spec].

pragma PRIORITY (arg);

The argument is an integer static expression in therange 0..15, where 0 is the lowest use-specifiable taskpriority and 15 is the highest. If the value of theargument is out of range, the pragma will have noeffect other than to generate a WARNING diagnostic. Avalue of zero will be used if priority is not defined.The pragma will have no effect when not specified in atask (type) specification or the outermost declarativepart of a subprogram. If the pragma appears in thedeclarative part of a subprogram, it will have noeffect unless that subprogram is designated as the mainsubprogram at link time.

pragma SUPPRESS (arg (,arg));

This pragma is unchanged with the following exceptions:

6-04 6.2.1 Language-Defined Pragmas

Page 34: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Ada/L PSE Handbook Version 2.OC30 September 1989

Suppression of OVERFLOW CHECK applies only to integeroperations; and a SUPPRESS pragma has effect onlywithin the compilation unit in which it appears, exceptthat suppression of ELABORATION CHECK applied at thedeclaration of a subprogram or task unit applies to allcalls or activations.

6.2.2 Implementation-Defined Pragmas

This paragraph describes the use and meaning of thosepragmas recognized by Ada/L which are not specified in Appendix Bof the Ada Language Reference Manual.

pragma DEBUG;

To be supplied.

pragma EXECUTIVE [(arg)];

This pragma allows the user to specify that acompilation unit is to run in the executive state ofthe machine and/or utilize privileged instructions.The pragma has no effect if the Compiler optionNO EXECUTIVE is enabled, either explicitly or bydefault.

If PRAGMA EXECUTIVE is specified without an argument,executive state is in effect for the compilation unitand the code generator does not generate privilegedinstructions for the compilation unit. If PRAGMAEXECUTIVE (INHERIT) is specified, a subprogram in thecompilation unit inherits the state of its caller andthe code generator does not generate privilegedinstructions for the compilation unit. If PRAGMAEXECUTIVE (PRIVILEGED) is specified, the executivestate is in effect and the code generator may generateprivileged instructions for the compilation unit.Currently, the Ada/L compiler does not generate suchinstructions. In the absence of PRAGMA EXECUTIVE, thecompilation unit executes in task state and the codegenerator does not generate privileged instructions.If PRAGMA EXECUTIVE (INTERRUPT CMR) is specified, theAda/L compiler generates code which uses executivestate registers instead of task state registers (i.e.SCI instead of SCT).

PRAGMA EXECUTIVE is applied once per compilation unit,so its scope is the entire compilation unit. PRAGMAEXECUTIVE may appear between the context clause and theoutermost unit. If there is no context clause, thepragma EXECUTIVE must appear within that unit beforethe first declaration or statement. The placement of

6.2.2 Implementation-Defined Pragmas 6-05

Page 35: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Version 2.OC Ada/L PSE Handbook30 September 1989

the pragma before the context clause has no effect onany or all following compilation units. If PRAGMAEXECUTIVE appears in the specification of a compilationunit, it must also appear in the body of that unit, andvice versa. If the pragma appears in a specificationbut is absent from the body, the user is warned and thepragma is effective. If the pragma appears in the bodyof a compilation unit, but is absent from thecorresponding specification, the user is warned and thepragma has no effect. PRAGMA EXECUTIVE does notpropagate to subunits. If a subunit is compiledwithout PRAGMA EXECUTIVE and the parent of the subunitis compiled with PRAGMA EXECUTIVE, the user is warnedand PRAGMA EXECUTIVE has no effect on the subunit.

pragma FAST_INTERRUPTENTRY (argl, arg2);

I To be supplied.

pragma MEASURE (extraction-set, [arg,...]);

To be supplied.

pragma STATIC;

To be supplied.

pragma TITLE (arg);

This is a listing control pragma. It takes a singleargument of type string. The string specified willappear on the second line of each page of every listingproduced for the compilation unit. At most one suchpragma may appear for any compilation unit, and it mustbe the first lexical unit in the compilation unit(excluding comments).

pragma TRIVIAL-ENTRY (NAME: entrysimple name);

To be supplied

pragma UNMAPPED (arg [arg,....]);

The effect of this pragma is for unmapped (i.e., notconsistently mapped within the virtual space)allocation of data in a compilation unit. Thearguments of this pragma are access types to beunmapped. If a program tries to allocate more UNMAPPEDspace than is available in the physical configuration,then STORAGE ERROR will be raised at run-time. PragmaUNMAPPED musE appear in the same declarative region asthe type and after the type declaration.

6-06 6.2.2 Implementation-Defined Pragmas

Page 36: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Ada/L PSE Handbook Version 2.OC30 September 1989

6.2.3 Scope of Pragmas

The scope for each pragma previously described as differingfrom the Ada Language Reference Manual is given below:

DEBUG To be supplied.

EXECUTIVE Applies to the compilation unit in which the pragmaappears, i.e., to all subprograms and tasks withinthe unit. Elaboration code is not affected.The pragma is not propagated from specificationsto bodies, or from bodies to subunits. The pragmamust appear consistently in the specification,

body,and subunits associated with a library unit.

FAST INTERRUPTENTRYTo be supplied.

INLINE Applies only to subprogram names in itsarguments. If the argument is an overloadedsubprogram name, the INLINE pragma applies toall definitions of that subprogram name whichappear in the same declarative part as theINLINE pragma.

INTERFACE Applies to all invocations of the namedimported subprogram.

MEASURE To be supplied.

MEMORYSIZE Applies to the entire Program Library inwhich the pragma appears.

OPTIMIZE Applies to the entire compilation unit inwhich the pragma appears.

PRIORITY Applies to the task specification in which itappears, or to the environment task if itappears in the main subprogram.

STATIC To be supplied.

STORAGE-UNIT Applies to the entire Program Library inwhich the pragma appears.

SYSTEMNAME Applies to the entire Program Library inwhich the pragma appears.

SUPPRESS Applies to the block or body that containsthe declarative part in which the pragmaappears.

6.2.3 Scope of Pragmas 6-07

Page 37: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Version 2.OC Ada/L PSE Handbook30 September 1989

TITLE Applies to the compilation unit in

which the pragma appears.

TRIVIAL ENTRY To be supplied.

UNMAPPED Applies to all objects of the access typenamed as arguments.

6-08 6.2.3 Scope of Pragmas

Page 38: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Ada/L PSE Handbook Version 2.OC30 September 1989

6.3 Attributes

There is an implementation-defined attribute in addition tothe predefined attributes found in Appendix A of the Ada LanguageReference Manual.

p'PHYSICALADDRESS for a prefix p that denotes a dataobject:

Yields a value of type system.physicaladdress, which correspondsto the absolute address in physical memory of the object named byp. This attribute is used to support operations associated withthe pragma UNMAPPED.

The following notes augment the language-requireddefinitions of the predefined attributes found in Appendix A ofthe Ada Language Reference Manual.

T'MACHINE EMAX is 63.

T'MACHINE EMIN is -64.

T'MACHINE MANTISSA is 6.

T'MACHINE OVERFLOWS is TRUE.

T'MACHINERADIX is 16.

T'MACHINEROUNDS is FALSE.

6.3 Attributes 6-09

Page 39: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Version 2.OC Ada/L PSE Handbook30 September 1989

6.4 Predefined Language Environment

The predefined Ada language environment consists of thepackages STANDARD and SYSTEM, which are described below.

6.4.1 Package STANDARD

The package STANDARD contains the following definitions inaddition to those specified in Appendix C of the Ada LanguageReference Manual.

PACKAGE STANDARD IS

I TYPE boolean IS (false, true);

I -- The type universalinteger is predefined.

I TYPE integer IS RANGE -2 147 483 647 .. 2_147_483_647;I -- -(2**31 - 1) .. (2**31 -- )

I TYPE long_integer IS RANGEI -9223372036854775807 .. 9_223_372_036_854 775 807;

I TYPE float IS DIGITS 6 RANGE-(16#0.FFFFF8#E63) .. (16#0.FFFFFS#E63);

I TYPE longfloat IS DIGITS 15 RANGE-(16#0.FF FFFF FFFF FFE0#E63)(16#0.FFFFFF FFFFFFE0#E63);

I -- Predefined subtypes:

I SUBTYPE natural IS integer RANGE 0 .. integer'LAST;SUBTYPE positive IS integer RANGE 1 .. integer'LAST;

I -- Predefined string type:

I TYPE string IS ARRAY (positive RANGE <>) OF character;

I PRAGMA PACK(string);

I TYPE duration IS DELTA 2.0 ** (-14)RANGE -131_071.0 .. 131 071.0;

I -- - -- (2*17 - 1)

I -- The predefined exceptions:

I constraint error : exception;I numericerror : exception;I programerror : exception;I storageerror : exception;I tasking error : exception;

6-10 6.4.1 Package STANDARD

Page 40: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Ada/L PSE Handbook Version 2.OC30 September 1989

END STANDARD;

6.4.2 Package SYSTEM

The package SYSTEM for Ada/L is as follows:

PACKAGE SYSTEM IS

memory size : CONSTANT := 1048_576;-- 2**20-- virtual memory size (not configurable).

TYPE address IS RANGE O..system.memorysize - 1;-- virtual address.

TYPE name IS (anuyk43);-- only one compatible system name.

system name : CONSTANT system.name := system.anuyk43;-- Name of current system.

storage unit : CONSTANT := 32;-- word-oriented system (not configurable)

-- System Dependent Named Numbers

min int : CONSTANT := -((2"'63)-1);-- most negative integer.

maxint : CONSTANT := (2**63)-l;-- most positive integer.

max digits : CONSTANT :z 15; -- 15 with long_floatmost decimal digits in floating point constraint.

max-mantissa : CONSTANT := 31;-- most binary digits for fixed point subtype.

fine delta : CONSTANT:= 2#0.0000 0000 0000 0000 0000 0000 0000 001#;-- 2**(-3l)-is minimum fixed point constraint.

tick : CONSTANT := 4.8828125e-05;-- 1/20480 seconds is the basic clock period.

-- FOR address'SIZE USE 32;-- virtual address is a 32-bit quantity.

null addr : CONSTANT address := 0;-- Indicates a NULL address.

6.4.2 Package SYSTEM 6-11

Page 41: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Version 2.OC Ada/L PSE Handbook30 September 1989

-- Address clause (interrupt) addresses

ClassI Unhandled address CONSTANTaddress := 16#0800#;

ClassIIUnhandled address : CONSTANTaddress := 16#1800#;

CPOperand.MemoryResumeaddress : CONSTANTaddress := 16#1000#;

CPIOC CommandResume address : CONSTANTaddress := 16#1100#;

CP InstructionMemory_Resume address : CONSTANT-address := 16#1200#;

CP IOCInterruptCodeResume address : CONSTANTaddress := 16#1300#;

CP_OperandMemoryErroraddress CONSTANTaddress := 16#1400#;

I CPInstruction Memory_Error address : CONSTANTaddress := 16#1500#;

I CPIOCCommandOperandError address : CONSTANTaddress := 16#1600#;

I IOC.Memory_Erroraddress CONSTANTI address := 16#1700#;

I IPI Fault address : CONSTANTI address := 16#1900#;

I IOCMemory_Resumeaddress : CONSTANTaddress := 16#AOO#;

I IntercomputerTimeout address : CONSTANTaddress :- 16#1BOO#;

I Confidence TestFault address : CONSTANTaddress :- 16#lCOO#;

I CPUIOC.Microprocessor_Stopaddress : CONSTANTaddress := 16#DOO#;

I ModuleInterruptaddress : CONSTANTaddress :- 16#lEOO#;

I Power Tolerance Interrupt address : CONSTANTaddress := 16#FOO#;

6-12 6.4.2 Package SYSTEM

Page 42: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Ada/L PSE Handbook Version 2.OC30 September 1989

Class III1tUnhandled-address CONSTANTaddress :=16#2800#;

CP Illegal Instruction Error-address :CONSTANTaddress :=16#2200#;

Privileged_Instruction-Error-address :CONSTANTaddress :=16#2300#;

DataPatternBreakpoint address :CONSTANTaddress :=16#2400#;

OperandBreakpointMatch address :CONSTANTaddress :=16#2500#;

Operand Read address :CONSTANTaddress :=16*2600#;

DCU StatusInterrupt address :CONSTANTaddress :=16#2700#;

Operand WriteProtection address : CONSTANTaddress := 16#2900#;

Operand LimitProtection address CONSTANTaddress := 16#2A00*;

Instruction B reakpoint Match-address : CONSTANTaddress :=16*2B00*;

RPDUnderflow address : CONSTANTaddress := 16#2C00*;

InstructionExecuteProtection address : CONSTANTaddress :=16#2DOO#;

InstructionLimit Protection-address : CONSTANTaddress := 16*2E00*;

Precisly_Timed_Interrupts address :CONSTANTaddress :=16#2F00*;

1- /O Interrupts-- User should program

-- FOR entry-name USE AT system.address-of(-- interruptu>interrupt -name,-- for channels~channel-number);-- e.g.

-- USE system;

-- FR el USE AT address-of(ioc -cp interrupt,for-channel->5);

6.4.2 Package SYSTEM 6-13

Page 43: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Version 2.OC Ada/L PSE Handbook30 September 1989

Note that if the user wants to register for theIOC Illegal CAR Instruction interrupt, where only thFIOC-is to be specified, for-channel should be either 0or 32.

(Declaration of FUNCTION address-of is found below)

I OC IllegalCAR Instruction : CONSTANT address :16#3000#;IOCMemory_Protection : CONSTANT address 16#3100#;IOC ChannelFunction Error : CONSTANT address 16#3300#;IOC-Illegal Chain Instruction : CONSTANT address 16#3400#;IOC-Confidence Test Fault : CONSTANT address 16#3800#;IOCBreakpoint Match : CONSTANT address 16#3900#;IOCCP Interrugt : CONSTANT address 16#3B00#;IOCExternal InterruptMonitor : CONSTANT address : 16#3C00#;IOC External-Function Monitor : CONSTANT address 16#3D00#;IOCOutputData Monit~r : CONSTANT address 16#3E00#;IOC_Input_DataMonitor : CONSTANT address := 16#3F00#;

SUBTYPE IOinterrupts IS address RANGEIOCIllegal CAR Instruction..IOC Input_DataMonitor;

SUBTYPE channel numbers IS INTEGER RANGE 0..63;

physical memory size : CONSTANT := 2**31;-- maximum physical memory size (not configurable)

TYPE physical address ISRANGE 0..system.physical memorysize - 1-- absolute address.

nullphys addr : CONSTANT physical address 0;-- Indicates a NULL physical address.

TYPE word IS NEW INTEGER;-- objects of this type occupy one targetcomputer-- word *32 bits on the AN/UYK-43).-- UNCHECKED CONVERSION must be used to interpret-- the value-for an object of this type from Ada.

SUBTYPE priority IS integer RANGE 0..15;-- task priority, lowest = default = 0.

TYPE entry kind is (normal, immediate);-- enumeration type for use with.-- PRAGMA INTERRUPT HANDLERTASK.

-- The following exceptions are provided as a "convention"-- whereby the Ada program can be compiled with all implicit-- checks suppressed (i.e. pragma SUPPRESS or equivalent),-- explicit checks included as necessary, the appropriate-- exception raised when required, and then the exception is

6-14 6.4.2 Package SYSTEM

Page 44: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Ada/L PSE Handbook Version 2.OC30 September 1989

-- either handled or the Ada program terminates.

ACCESS CHECK : EXCEPTION;DISCRIMINANT CHECK : EXCEPTION;INDEX CHECK -: EXCEPTION;LENGTff CHECK : EXCEPTION;RANGE CHECK : EXCEPTION;DIVISfON CHECK : EXCEPTION;OVERFLOW-CHECK : EXCEPTION;ELABORATION CHECK : EXCEPTION;STORAGE.CHECK : EXCEPTION;

-- implementation-defined exceptions.UNRESOLVED REFERENCE : EXCEPTION;SYSTEMERROR : EXCEPTION;CAPACITY ERROR : EXCEPTION;-- The exception CAPACITYERROR is raised by the RTExec when-- Pre-RunTime specified resource limits are exceeded.

FUNCTION ADDRESS OF-- returns the system.address of the given Class III-- interrupt for the specified channel

(interrupt : IN 10 interrupts;-- The name of the interrupt

forchannel : IN channel numbers-- The channel number.

RETURN address;-- The address to be used in the-- representation (address) clause.

PRAGMA INTERFACE (MACRONORMAL,ADDRESSOF);

FUNCTION "AND"-- returns the logical 32 bit 'AND' between two integers.

(operand a : IN integer; -- The first operand.operand-b : IN integer -- The second operandRETURN integer; -- The results.

PRAGMA INTERFACE (MACRO-NORMAL, "AND");

FUNCTION "NOT"-- returns the logical 32 bit 'NOT' of an integer.

(operand a : IN integer -- The first operand.) RETURN-integer; -- The results.

PRAGMA INTERFACE (MACRO NORMAL, "NOT");

FUNCTION "OR"-- returns the logical 32 bit 'OR' between two integers.

(operand a : IN integer; -- The first operand.operand-b IN integer -- The second operand

6.4.2 Package SYSTEM 6-15

Page 45: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Version 2.OC Ada/L PSE Handbook30 September 1989

)RETURN integer; -- The results.

PRAGMA INTERFACE (MACRONORMAL, "OR");

END SYSTEM;

6-16 6.4.2 Package SYSTEM

Page 46: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Ada/L PSE Handbook Version 2.OC30 September 1989

6.5 Character Set

Ada compilations may be expressed using the followingcharacters-in addition to the basic character set:

lower case letters:

a b cde f g h i j k 1 m no pq r s t u v w x y z

special characters:

! $ ? @ [ / ] ( I " (accent grave) %

6.5 Character Set 6-17

Page 47: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Version 2.OC Ada/L PSE Handbook30 September 1989

6.6 Representation and Declaration Restrictions

Representation specifications are described in Section 13 ofthe Ada Language Reference Manual. Declarations are described inSection 3 of the Ada Langiiage Reference Manual.

In the following specifications, the capitalized word SIZEindicates the number of bits used to represent an object of thetype under discussion. The upper case symbols D, L, R,correspond to those discussed in Section 3.5.9 of the AdaLanguage Reference Manual.

6.6.1 Integer Types

Integer types are specified with constraints of the form

RANGE L..R

where

R <- system.maxint & L >= system.minint

For a prefix "t" denoting an integer type, length specificationsof the form

FOR t'SIZE USE n ;

may specify integer values n such that

n in 2..64,

and such that

R <= 2**(n-l)-1 & L >= -(2**(n-l)-i)

or else such that

R <= (2**n)-l & L >= 0

and

1 < n <= 15

For a stand-alone object of integer type, a default SIZE of 32 isused when:

R <= 2**31 - 1 & L >- -(2**31 - 1)

Otherwise, a SIZE of 64 is used.

For components of integer types within packed composite

6-18 6.6.1 Integer Types

Page 48: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Ada/L PSE Handbook Version 2.OC30 September 1989

objects, the smaller of the default stand-alone SIZE and the SIZEfrom a length specification is used.

6.6.2 Floating Types

Floating types are specified with constraints of the form:

DIGITS D

where D is an integer in the range 1 through 15.

For a prefix 'it" denoting a floating point type, lengthspecificationsof the form:

FOR t'SIZE USE n;

are permitted only when the integer value n = 32 for D <= 6 orN = 64 for 7 <= D <= 15.

6.6.3 Fixed Types

Fixed types are specified with constraints of the form

DELTA D RANGE L..R

where

MAX (AES(R), ABS(L))- <= 2**31 - 1.

actual delta

The actual delta defaults to the largest integral power of 2 lessthan or equal to the specified delta D. (This implies that fixedvalues are stored right-aligned.) For specifications of the form

FOR t'SMALL USE n;

n must be specified as an integral power of 2 such that n <= D.

For a prefix "t" denoting a fixed point type, lengthspecifications of the form

FOR tISIZE USE n;

are permitted only when n = 32. All fixed values have SIZE 32.

6.6.4 Enumeration T ypes

In the absence of a representation specification for an

6.6.4 Enumeration Types 6-19

Page 49: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Version 2.OC Ada/L PSE Handbook30 September 1989

enumeration type "t", the internal representation of t'FIRST is0. The default size for a stand-alone object of enumeration type't" is 32, so the internal representations of t'FIRST and t'LASTboth fall within the range:

-(2**31 - 1) .. 2**31 - 1.

For enumeration types, length specifications of the form

FOR t'SIZE USE n;

and/or enumeration representations of the form

FOR t USE <aggregate>;

are permitted for n in 2..32, provided the representations andthe SIZEconform to the relationship specified above, or else for n in1..32,is supported for enumeration types and provides an internalrepresentation of:

t'FIRST >= 0 .. t'LAST <= 2**(t'SIZE) - 1.

For components of enumeration types within packed compositeobjects, the smaller of the default stand-alone SIZE or the SIZEfrom a length specification is used.

Enumeration representations for types derived from thepredefined type standard.boolean will not be accepted, but lengthspecifications will be accepted.

6.6.5 Access Types

For access type, "t", length specifications of the form:

FOR t'SIZE USE n;

I will not affect the runtime implementation of "t", therefore n =I 32 is the only value permitted for SIZE, which is the valueI returned by the attribute.

For collection size specifications of the form:

FOR t'STORAGESIZE USE n;

for any value of "n" is permitted for STORAGE SIZE (and thatI value will be returned by the attribute call). The collectionI size specification will affect the implementation of "t" and itsI collection at runtime by limiting the number of objects for typeI "t" that can be allocated.

6-20 6.6.5 Access Types

Page 50: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Ada/L PSE Handbook Version 2.OC30 September 1989

The value of t'STORAGE SIZE for an access type "t" specifiesthe maximum number of storage_units used for all objects in thecollection for type 't". This includes all space used by theallocated objects, plus any additional storage required tomaintain the collection.

6.6.6 Arrays and Records

For arrays and records, a length specification of the form

FOR t'size USE n:

is not allowed unless it is the default size.

The PACK pragma may be used to minimize wasted space betweencomponents of arrays and records. The pragma causes the typerepresentation to be chosen such that the storage spacerequirements are minimized at the possible expense of data accesstime and code space.

A record type representation specification is not allowed.

For records, an alignment clause of the form:

AT MOD n

specify alignments of 1 word (word alignment) or 2 words(doubleword alignment).

If it is determinable at compile time that the SIZE of arecord or array type or subtype is outside the range ofstandard.integer, a diagnostic of severity WARNING is generated.Declaration of such a type or subtype would raise NUMERICERRORwhen elaborated.

6.6.7 Other Length Specifications

Length Specifications are discribed in Section 13.2 of theAda Language Reference Manual.

A length specification for a task type "t", of the form:

FOR t'STORAGE SIZE use N;

specifies the number of system.storage units that are allocatedfor the execution of each task object of type "t". This includesthe runtime stack for the task object but does not includeobjects allocated at runtime by the task object.

6.6.7 Other Length Specifications 6-21

Page 51: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Version 2.OC Ada/L PSE Handbook30 September 1989

6.7 System Generated Names

Refer to Section 13.7 of the Ada Language Reference Manualand the section above on the Predefined Language Environment fora discussion of p-zkage SYSTEM.

The system name is chosen based on the target(s) supported,but it cannot be changed. In the case of Ada/L, the system nameis ANUYK43.

6-22 6.7 System Generated Names

Page 52: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Ada/L PSE Handbook Version 2.OC30 September 1989

6.8 Address Clauses

Refer to Section 13.5 of the Ada Language Reference Manualfor a description of address clauses. All rules and restrictionsdescribed there apply. In addition, the following restrictionsapply.

An address clause designates a single task entry only. Theappearance of a data object, subprogram, package, or task unitname in an address clause is not allowed, and will result in thegeneration of a diagnostic of severity ERROR.

An address clause may designate a single task entry. Suchan address clause is allowed only within a task specificationcompiled with the EXECUTIVE compiler option. The meaningfulvalues of the simple expression are the allowable interrupt entryaddresses as defined-in Table 6-1. The use of other values willresult in the raising of a PROGRAM ERROR exception upon creationof the task.

If more than one task entry is equated to the same interruptentry address, the most recently executed interrupt entryregistration permanently overrides any previous registrations.

At most one address clause is allowed for a single taskentry. Specification of more than one interrupt address for atask entry is erroneous.

6.8 Address Clauses 6-23

Page 53: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Version 2.OC Ada/L PSE Handbook30 September 1989

--------------------------------------------------------------------------------------------

AN/LUYK-43(V) Interrupt Summary

.--------------------------------------------------------------------------------------------

Class 0+-------------------------------------------------------------------------------------------

ISC InterruptITarget-Computer Interrupt CODE Entry Address Registration

IClass I Unhandled Interrupt None 16#0800#

+-------------------------------------------------------------------------------------------

Class I+-------------------------------------------------------------------------------------------

ISC InterruptITarget-Computer interrupt CODE Entry Address Registration

IClass II Unhandled Interrupt None 16#1800#ICP-Operand Memory Resume 16*0# 16#1000#ICP-IOC Command Resume 16#1# 16#1100#ICP-Instruction Memory Resume 16#2# 16*1200#ICP-IOC Interrupt Code Resume 16#3# 16*1300*ICP-Operand Memory Error 16*4# 16*1400#ICP-Instruction Memory Error 16#5# 16#1500#ICP-IOC Command/Operand Error 16#6# 16*1600#IIOC Memory Error 16#7# 16#1700#IIPI Fault .16*9# 16*1900#IObC Memory Resume 16#A# 16#1AOO#IIntercomputer Timeout 16#B# 16*1500*ICP Confidence Test Fault 16#C# 16#1COO*ICPU/IOC Microprocessor Stop 16#D# 16#1000#IModule Interrupt 16#E# 16*lEOO*IPower Tolerance 16#F# l6#lFOO*

.--------------------------------------------------------------------------------------------

Table 6-la - Interrupt Entry Addresses

6-24 6.8 Address Clauses

Page 54: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Ada/L PSE Handbook Version 2.OC30 September 1989

-----------------------------------------------------------------------

AN/UYK-43(V) Interrupt Summary

--------------------------------------------------------------------------------------------.

Class II.--------------------------------------------------------------------------------------------

ISC InterruptTarget-Computer Interrupt CODE Entry Address Registration

Class III Unhandled Interrupt None 16#2800#Interprocessor Interrupt 16#0# 16#2000# UNDEFINABLEFloating Point Error 16#.1# 16#2100# UNDEFINABLEIllegal Instruction 16#2# 16#2200#Privileged Instruction Error 16#3# 16#2300#Data Pattern Breakpoint 16#4# 16#2400#Operand Address Breakpoint 16#5# 16#2500#Operand Read or

Indirect Addressing 16#6# 16#2600#DCU Status Interrupt 16#7# 16#2700#Operand Write 16#9# 16#2900#Operand Limit 16#A# 16#2A00#Instruction Address Breakpoint 16#B# 16#2B00#RPD Underflow 16#C# 16#2C00#Instruction Execute 16#D# 16#2D00#Instruction Limit 16#E# 16#2E00#Monitor Clock 16#F# 16#2F00# UNDEFINABLE

--------------------------------------------------------------------------------------------

Table 6-lb - Interrupt Entry Addresses (Continued)

6.8 Address Clauses 6-25

Page 55: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Version 2.OC Ada/L PSE Handbook30 September 1989

.------------------------------------------------------------------------------------------

AN/UYK-43(V) Interrupt Summary

-------------------------------------------------------------------------------------------

Class III-------------------------------------------------------------------------------------------

ISC InterruptITarget-Computer Interrupt CODE Entry Address Registration

IObC Illegal CAR Instruction 16#0# 16#3010#IObC memory Protection 16#1# 16#31IC#

I if the above interrupt is generated during CAR execution, nochannel number is available. The interrupt will betranslated to Class 11 Unhandled.

IUNDEFINED 16#2# 16#3200# UNDEFINABLEIChannel Function Error 16#3# 16#33IC#IObC Illegal Chain Instruction 16#4#.. 16#341C#

16#7#IObC confidence Test Fault 16#8# 16#381C#

IIf the above interrupt is generated during CAR execution, noIchannel number is available. The interrupt will be

translated to Class 11 Unhandled.

IObC Breakpoint Match 16#9# 16#391C#

I If the above interrupt is generated during CAR execution, noI channel number is available. The interrupt will beI translated to Class II Unhandled.

IObC Monitor Clock 16#A# 16*3A10* UNDEFINABLEIIOC Processor Interrupt 16#8# 16#3BIC#IExternal Interrupt Monitor 16#C# 16#3CIC#IExternal Function Monitor 16#D# 16#3DIC#IOutput Data Monitor 16#E# 16#3EIC#iInput Data Monitor 16#F# 16#3FIC#

IFor class III interrupts, the following interpretations apply:

IC => IOC, channel number whereI16#OO*..16#lF# indicates IOC 0, channel 16#00..16#lF#,

16#20#..16#3F# indicates IOC 1, channel 16#00..16#lF*4------------------------------------------------------------------------------------------+

Table 6-1c - Interrupt Entry Addresses (Continued)

6-26 6.8 Address Clauses

Page 56: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Ada/L PSE Handbook Version 2.OC30 September 1989

6.9 Unchecked Conversions

Refer to Section 13.10.2 of the Ada Language ReferenceManual for a description of UNCHECKED CONVERSION. It iserroneous if the user written ada program performsUNCHECKED CONVERSION when the source and target objects havedifferent sizes.

6.9 Unchecked Conversions 6-27

Page 57: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Version 2.OC Ada/L PSE Handbook30 September 1989

6.10 Restrictions on the Main Subprogram

Refer to Section 10.1 (8) of the Ada Language ReferenceManual for a description of the main subprogram. The subprogramdesignated as the main subprogram cannot have parameters. Thedesignation as the main subprogram of a subprogram whosespecification contains a formal_part results in a diagnostic ofseverity ERROR at link time.

The main subprogram can be a function, but the return valuewill not be available upon completion of the main subprogram'sexecution. The main subprogram may not be an import unit.

6-28 6.10 Restrictions on the Main Subprogram

Page 58: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Ada/L PSE Handbook Version 2.OC30 September 1989

6.11 Input/Output

Refer to Section 14 of the Ada Language Reference Manual fora discussion of Ada Input/Output and to Section 12 of the Ada/L IRun Time Environment Handbook for more specifics on the Ada/LInput/Output subsystem.

The Ada/L Input/Output subsystem provides the followingpackages to the user: TEXT IO, SEQUENTIAL 10, DIRECT 10, andLOW LEVEL 10. These packages execute in the context-of theuser-written Ada program task making the I/O request.Consequently, all of the code that processes an I/O request onbehalf of the user-written Ada program executes sequentially.The package 10 EXCEPTIONS defines all of the exceptions needed bythe packages SEQUENTIAL 10, DIRECT 10, and TEXT 10. Thespecification of this package is given in Section 14.5 of the AdaLanguage Reference Manual. This package is visible to all of theconstituent packages of the Ada/L I/O subsystem so thatappropriate exception handlers can be inserted.

I/O in Ada/L is performed solely on external files. Noallowance is provided in the I/O subsystem for memory residentfiles (i.e., files which do not reside on a peripheral device).This is true even in the case of temporary files. With theexternal files residing on the peripheral devices, Ada/L makesthe further restriction on the number of files that may be openon an individual peripheral device.

Section 14.1 of the Ada Language Reference Manual statesthat all I/O operations are expressed as operations on objects ofsome file type, rather than in terms of an external file. Fileobjects are implemented in Ada/L as access objects which point toa data structure called the File Control Block (see Section3.1.2.11 of the [Ada/L RTLIB PDS]). This File Control Block isdefined internally to each of the high-level I/O packages; itspurpose is to represent an external file. The File Control Blockcontains all of the I/O-specific information about an externalfile that is needed by the high-level I/O packages to accomplishrequested I/O operations.

6.11.1 Naming External Files

The naming conventions for external files in Ada/L are ofparticular importance to the user. All of the system-dependentinformation needed by the I/O subsystem about an external file iscontained in the file name. External files may be named usingone of three file naming conventions: standard, temporary, anduser-derived.

a. Standard File Names:

The standard external file naming convention used in I

6.11.1 Naming External Files 6-29

Page 59: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Version 2.OC Ada/L PSE Handbook30 September 1989

Ada/L identifies the specific location of the externalfile in terms of the physical device on which it isstored. For this reason, the user should be aware of theconfiguration of the peripheral devices on the AN/UYK-43at a particular user site.

Standard file names consist of a six characterprefix and a file name of up to twenty characters. Thesix character prefix has a predefined format. The firstand second characters must be either "DK," "MT," or "TT,"designating an AN/UYH-3(V) Recorder/Reproducer SetMagnetic Disk, the RD-358 Magnetic Tape Subsystem, or theAN/USQ-69 Data Terminal Set, respectively.

The third and fourth characters specify the channelon which the peripheral device is connected. Since thereare sixty-four channels on the AN/UYK-43, the values forthe third and fourth positions must lie in the range "00"to "63."

The range of values for the fifth position in theprefix (the unit number) depends upon the devicespecified by the characters in the first and secondpositions of the external file name. If the specifiedperipheral device is the AN/UYH-3 magnetic disk drive,then the character in the fifth position must be one ofthe characters "0," "l," "2," or "3." This valuedetermines which of the four disk units available on theAN/UYH-3 is to be accessed. If the specified peripheraldevice is the RD-358 magnetic tape drive, the characterin the fifth position must be one of the characters "0,""1," "2," or "3." This value determines which of the fourtape units available on the RD-358 is to be accessed. Ifthe specified peripheral device is the AN/USQ-69militarized display terminal, the character in the fifthposition depends on the channel type. If the channeltype is parallel then this character must be a "0". Thisis the only allowable value for the unit number when theAN/USQ-69 is connected to a parallel I/O channel. Thisis because the AN/USQ-69 may have only one unit on aparallel channel. If the channel type is serial then thecharacter in the fifth position must be one of thecharacters "0", "1", "2", "3", "4", "5", "6", "7", or '8"(the character "8" will be used to specify a broadcastmode transmission). The AN/USQ-69 allows up to eightterminals to be daisy chained together when running on aserial channel.

The colon, ":", is the only character allowed in theJ sixth position. If any character other than the colon isI in this position, the file name will be consideredI non-standard and the file will reside on the defaultI device defined during the elaboration of CONFIGURE_10.

6-30 6.11.1 Naming External Files

Page 60: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Ada/L PSE Handbook Version 2.OC30 September 1989

Positions seven through twenty-six are optional tothe user written Ada program and may be used as desired.These positions may contain any printable character theuser chooses in order to make the file name moreintelligible. Embedded blanks, however, are not allowed.

The location of an external file on a peripheraldevice is thus a function of the first six characters ofthe file name regardless of the characters that mightfollow. For example, if the external file"MT000:Old Data" has been created and not subsequentlyclosed, an attempt to create the external file"MT000:New Data" will cause the exception DEVICE ERROR(rather thin NAME ERROR or USEERROR) to be raisedbecause the peripheral device on channel "00" andcartridge "0" is already in use.

The user is advised that any file name beginningwith "xxxxx:" (where x denotes any printable character)is assumed to be a standard external file name. If thisexternal file name does not conform to the Ada/L standardfile naming conventions, the exception NAMEERROR will beraised.

b. Temporary File Names:

Section 14.2.1 of the Ada Language Reference Manualdefines a temporary file to be an external file that isnot accessible after completion of the main subprogram.If the null string is supplied for the external filename, the external file is considered temporary. In thiscase, the high level I/O packages internally create anexternal file name to be used by the lower level I/Opackages. The internal naming scheme used by the I/Osubsystem is a function of the type of file to be created(text, direct or sequential) and the current date andtime. This scheme is consistent with the requirementspecified in the Ada Language Reference Manual that allexternal file names be unique.

The first two characters of the file name are "TX,""D ," or "S ." The next eight characters are the date(four characters for the year, two characters for themonth, and two characters for the day). The remainingten characters are the time (five for seconds and fivefor the fraction part of a second). For instance, thetemporary external file name "D 198803311234598765" wouldbe a DIRECT I0 file created MarEh 31, 1988 at12,345.9876f seconds.

c. User-Derived File Names:

A random string containing a sequence of characters I

6.11.1 Naming External Files 6-31

Page 61: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Version 2.OC Ada/L PSE Handbook30 September 1989

of length one to twenty may also be used to name anexternal file. External files with names of this natureare considered to be permanent external files. The useris cautioned to refrain from using names which conform tothe scheme used by the 1/O subsystem to name temporaryexternal files (see list item "b.").

It is not possible to associate two or more internalfiles with the same external file. The exceptionUSE ERROR will be raised if this restriction is violated.

6.11.2 The FORM Specification for External Files

Section 14.2.1 of the Ada Language Reference Manual definesa string argument called the FORM, which suppliessystem-dependent information that is sometimes required tocorrectly process a request to create or open a file. In Ada/L,the string argument supplied to the FORM parameter on calls toCREATE and OPEN is retained while the file is open, so that callsto the function FORM can return the string to the user writtenAda program. FORM options specified on calls to CREATE have theeffects stated below. FORM options specified on calls to OPENhave no effect.

Ada/L only allows a FORM parameter when a file is open orcreated on the RD-358 tape drive. A USE ERROR will be raisedwhen a FORM parameter is associated with-any other Ada/L systemdevice. The FORM parameter specifically controls the positioningand formatting of the tape prior to tape I/O operations. Thissection identifies the arguments of the FORM parameter. Refer toSection 14.2.1 of the Ada Language Reference Manual and toSection 12.2.2 of the Ada/L Run Time Environment Handbook formore detail on the use of the FORM parameter.

The FORM parameter is a string literal of which a maximum oftwenty characters is processed. If the supplied FORM string islonger than the maximum allowed (20 characters), the exceptionUSE ERROR will be raised. The string literal is interpreted as asequence of arguments. If the user wishes to utilize the defaultarguments, a FORM parameter need not be supplied.

Only the first two arguments within the string areprocessed. All following characters or arguments will cause theUSE ERROR to be raised. The arguments are not case sensitive.The arguments must be separated by at least one delimiter. Alegal delimiter consists of a comma or blank. Extra delimitersare ignored. Of the recognized arguments, at most one formattingand one positioning argument are allowed. If conflictingarguments are used, the exception USEERROR will be raised.

Positioning arguments allow control of tape before its use.The following positioning arguments are available to the user:

6-32 6.11.2

Page 62: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Ada/L PSE Handbook Version 2.OC30 September 1989

a. REWIND - specifies that a rewind will be performedprior to the requested operation.

b. NOREWIND - specifies that the tape remains positionedas is.

c. APPEND - specifies that the tape be positioned at thelogical end of tape (LEOT) prior to the requestedoperation. The LEOT is denoted by two consecutivetapemarks.

The formatting argument specifies information about tapeformat. If a formatting argument is not supplied, the file isassumed to contain a format header record determined by the ALS/NI/O system. The following formatting argument is available tothe user:

a. NOHEAD - specifies that the designated file has noheader record. This argument allows the reading andwriting of tapes used on computer systems usingdifferent header formats.

6.11.3 File Processing

Processing allowed on Ada/L files is influenced by thecharacteristics of the underlying device. The followingrestrictions apply:

a.. Only one file may be open on an individual RD-358tape drive at a time.

b. The attempt to CREATE a file with the mode IN FILE isnot supported since there will be no data in Ehe fileto read.

6.11.4 Text Input/Output

TEXT 10 is invoked by the user-written Ada program toperform sequential access I/O operations on text files (i.e.,files whose content is in human-readable form). TEXT 10 is not ageneric package and, thus, its subprograms may be invokeddirectly from the user-written Ada program, using objects withbase type or parent type in the language-defined type character.TEXT 10 also provides the generic packages INTEGER 10, FLOAT 10,FIXED 10, and ENUMERATION 10 for the reading and wFiting ofnumeric values and enumeration values. The generic packageswithin TEXT 10 require an instantiation for a given element typebefore any 3f their subprograms are invoked. The specificationof this package is given in Section 14.3.10 of the Ada LanguageReference Manual.

6.11.4 Text Input/Output 6-33

Page 63: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Version 2.OC Ada/L PSE Handbook30 September 1989

The implementation-defined type COUNT that appears inSection 14.3.10 of the Ada Language Reference Manual is definedas follows:

type COUNT is range 0...INTEGERILAST;

The implementation-defined subtype FIELD that appears in Section14.3.10 of the Ada Language Reference Manual is defined asfollows:

subtype FIELD is INTEGER range 0...INTEGER'LAST;

At the beginning of program execution, the STANDARD INPUTfile and the STANDARD OUTPUT file are open, and associated withthe files specified by the user at export time. kdditionally, ifa program terminates before an open file is closed (except forSTANDARD INPUT and STANDARD OUTPUT), then the last line which theuser added to the file may Se lost; if the file is on magnetictape, the file structure on the tape may be inconsistent.

A program is erroneous if concurrently executing tasksattempt to perform overlapping GET and/or PUT operations on thesame terminal. The semantics of text layout as specified in theAda Language Reference Manual, Section 14.3.2, (especially theconcepts of current column number and current line) cannot beguaranteed when GET operations are interweaved with PUToperations. A program which relies on the semantics of textlayout under those circumstances is erroneous.

For TEXT 10 processing, the line length can be no longerthan 1022 characters. An attempt to set the line length throughSET LINE LENGTH to a length greater than 1022 will result inUSE-ERROR.

6.11.5 Sequential Input/Output

SEQUENTIAL 1O is invoked by the user-written Ada program toperform I/O on tEhe records of a file in sequential order. TheSEQUENTIAL 10 package also requires a generic instantiation for agiven element type before any of its subprograms may be invoked.Once the package SEQUENTIAL 1O is made visible, it will performany service defined by the subprograms declared in itsspecification. The specification of this package is given inSection 14.2.3 of the Ada Language Reference Manual.

The following restrictions are imposed on the use of thepackage SEQUENTIAL_10:

a. SEQUENTIAL 10 must be instantiated for a constrainedtype.

b. Ada/L does not raise DATA ERROR on a read operation

6-34 6.11.5 Sequential Input/Output

Page 64: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Ada/L PSE Handbook Version 2.OC30 September 1989

if the data input from the external file is not ofthe instantiating type (see the Ada LanguageReference Manual, Section 14.2.2).

6.11.6 Direct Input/Output

DIRECT 10 is invoked by the user-written Ada program toperform I/O-of the records of a file in an arbitrary order. Thepackage DIRECT IO requires a generic instantiation for a givenelement type before any of its subprograms may be invoked. Oncethe package DIRECT IO is made visible, it will perform anyservice defined by-the subprograms declared in its specification.The specification of this package is given in Section 14.2.5 ofthe Ada Language Reference Manual.

The following restrictions are imposed on the use of thepackage DIRECTIO:

a. DIRECT 10 must be instantiated for a constrainedtype.

b. Ada/L does not raise DATA ERROR on a read operationif the data input from the external file is not ofthe instantiating type (see the Ada LanguageReference Manual, Section 14.2.4).

6.11.7 Low Level Input/Output

LOW LEVEL IO is invoked by the user-written Ada program toinitiate physi~al operations on peripheral devices, and thusexecutes as part of the user-written Ada program task. Requestsmade to LOW LEVEL 10 from the user-written Ada program are passedthrough the RTEXEC GATEWAY to the channel programs in CHANNEL IO.Any status check or result information is the responsibility ofthe invoking subprogram and can be obtained from the subprogramRECEIVECONTROL within LOW LEVELIO.

The package LOW LEVEL 10 allows the user written Ada programto send I/O commands-to the I/O devices (using SEND CONTROL) andto receive status information from the I/O devices (usingRECEIVE CONTROL). A program is erroneous if it uses LOW LEVEL_10to access a device that is also accessed by high-level 170packages such as SEQUENTIAL_10 and TEXT 10. The following isexcerpted from the package LOW LEVELIO.

PACKAGE LOW LEVEL_10 IS

SUBTYPE channel range IS INTEGER RANGE 0..63;-- Range of Values allowed for channel number.

SUBTYPE device str IS STRINGG;

6.11.7 Low Level Input/Output 6-35

Page 65: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Version 2.OC Ada/L PSE Handbook30 September 1989

-- To be passed to CHANNEL 10 for future implementations-- of logical path name. The string will be ignored until-- logical path name support is added.

SUBTYPE btc int IS INTEGER RANGE 0..16383;-- Passes transfer counts to/from IOMANAGEMENT/RTEXEC.

SUBTYPE io functions IS INTEGER RANGE 0..20;-- Specifies the I/O function to be performed by LOW LEVEL 10.-- The following table shows the values associated with device

and-- device functions available.

-- VALUE -- DEVICE -- FUNCTION

-- 0 RD-358 Normal Read-- 1 RD-358 Read with Search data-- 2 RD-358 Normal Write-- 3 RD-358 Send EF Command-- 4 RD-358 Initialize Channel

0 R i-- 0 UYH-3 Read with 2 word EF-- 1 UYH-3 Read with 1 word EF-- 2 UYH-3 Write-- 3 UYH-3 Send 1 word EF Command-- 4 UYH-3 Send 2 word EF CommandI-- S UYH-3 Send 1 word EF Command (Same as function3)-- 6 UYH-3 Initialize ChannelS--US-69 Read

-- 1 USQ-69 Write-- 2 USQ-69 Write (Same as function 1)-- 3 USQ-69 Send Command-- 4 USQ-69 Initialize Channel

TYPE cap block IS-- Information that can be found in IOC control memory on-- a per channel/ per function basis.RECORD

cap : INTEGER; -- CAP register.instruct-base : INTEGER; -- CAP instruction base.index : INTEGER; -- CAP index register.accumulator : INTEGER; -- CAP accumulator register.status : INTEGER; -- CAP status register.buffer-base : INTEGER; -- CAP buffer base.bcw : INTEGER; -- CAP buffer control word.operand base : INTEGER; -- CAP operand base.

END RECORD;

TYPE short rec control block IS

6-36 6.11.7 Low Level Input/Output

Page 66: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Ada/L PSE Handbook Version 2.OC30 September 1989

-- I/O control block sent to LOW LEVEL 10 as a parameter-- when calling subprogram RECEIVEREQUEST.RECORD

channel low level io.channel range;-- Specifies channel-of interest.

ei word : INTEGER;-- External interrupt returned by the peripheral device.

END RECORD;

TYPE receive control block IS-- I/O control block sent to LOW LEVEL 10 as a parameter-- when calling subprogram RECEIVEREQUEST.RECORD

data low level io.short rec control block;-- Channel and ii word. - I

ef : low level io.cap block;-- External Function CAP information.

output : low level io.cap block;-- output-CAP information.

ei : low level io.capblock;-- Externil Interrupt CAP information.

input : low level io.cap block;-- Input CAP information.

END RECORD;

TYPE send control block IS-- I/O control block sent to LOW LEVEL 10 as a parameter-- when calling subprogram SENDREQUEST.RECORD

functionos : low level io.io functions;-- Indicates which I/O Function is to be requested-- of LOW LEVEL 10.

channel : lFw level io.channelrange;-- Specifies channel nuiber.

transfer count : low level io.btc int;-- Buffer transfer counE for 170 operation.

buffer addr : system.address;-- Address of data buffer.

command 1 : INTEGER;-- Holds the first word of the external-- function for the device.

command 2 : INTEGER;-- Holds the second word of the external-- function for the device.

filler 1 : INTEGER;-- Passes additional information to-- CHANNEL 10 (such as the terminal address-- for the USO-69 device).

END RECORD;

PROCEDURE SEND CONTROL-- Passes I/O control information to a procedure in

6.11.7 Low Level Input/Output 6-37

Page 67: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Version 2.OC Ada/L PSE Handbook30 September 1989

I -- 1O MANAGEMENT/RTEXEC in order to send data to theI -- specified device.

(device : IN low level io.device str-- This string will be-ignored until-- logical path names are implemented.

data : IN low level io.send control block-- I/O-control block-for sena request.

PROCEDURE RECEIVE CONTROL-- Passes I/O control information to a procedure in

0-- 1 MANAGEMENT/RTEXEC in order to obtain the status of-- the I/O operation.

(device IN low lcvel io.device str :=I";-- This string will be ignored until-- logical path names are implemented.

data IN OUT low level io.receive control block-- I/O control block for receive request.

PROCEDURE RECEIVE CONTROL-- Passes I/O control information to a procedure in-- 10 MANAGEMENT/RTEXEC in order to obtain the status of-- the I/O operation.

(device : IN low level io.device str := "";-- This string wIll be ignored until-- logical path names are implemented.

data : IN OUT low level io.short rec control block-- I/O control block for Feceive request.

END LOWLEVEL_10;

6-38 6.11.7 Low Level Input/Output

Page 68: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Ada/L PSE Handbook Version 2.OC30 September 1989

6.12 System Defined Exceptions

In addition to the exceptions defined in the Ada LanguageReference Manual, this implementation pre-defines the exceptionsshown in Table 6-2.

.----------------------------------------------------------------------------------------------

Name Significance.----------------------------------------------------------------------------------------------------

UNRESOLVEDREFERENCE Attempted call to a routine notlinked into the executable image.

SYSTEMERROR Serious error detected in underlyingAN/UYK-43 operating system.I.

I CAPACITY-ERROR Raised by the RTEXEC when Pre-RuntimeI specified resource limits are

exceeded.

I UNREGISTERED PTI Raised by the PTI support package ifthe PTI's state is returned as"unregistered".

I PASTPTITIME Raised by the PTI support package ifthe PTI start time is greater than the

1 current CALENDAR.CLOCit.

------------------------------------------------------------------------

Table 6-2a - System Defined Exceptions

6.12 System Defined Exceptions 6-39

Page 69: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Version 2.OC Ada/L PSE Handbook30 September 1989

------------------------------------------------------------------I Name Significance I

----------------------------------------------------------------- +

ACCESS-CHECK The ACCESS CHECK exception has beenraised explicitly within the program.

DISCRIMINANTCHECK DISCRIMINANT CHECK exception has beenraised explicitly within the program.

INDEX-CHECK The INDEXCHECK exception has beenraised explicitly within the program.

LENGTH-CHECK The LENGTH CHECK exception has beenraised explicitly within the program.

RANGECHECK The RANGECHECK exception has beenraised explicitly within the program.

DIVISIONCHECK The DIVISION CHECK exception has beenraised explicitly within the program.

OVERFLOW-CHECK The OVERFLOW CHECK exception has beenraised explicitly within the program.

ELABORATIONCHECK ELABORATION CHECK exceptiot, has beenraised explicitly within the program.

STORAGE-CHECK The STORAGE CHECK exception has beenraised explicitly within the program.

+-------------------------------------------------------------------------------------

Table 6-2b - System Defined Exceptions (Continued)

6-40 6.12 System Defined Exceptions

Page 70: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Ada/L PSE Handbook Version 2.OC

30 September 1989

6.13 Machine Code Insertions

The Ada language permits machine code insertions as definedin Section 13.8 of the Ada Language Reference Manual. Thissection describes the specific details for writing machine codeinsertions as provided by the predefined package MACHINECODE.

The Ada/L user may, if desired, include AN/UYK-43instructions within an Ada program. This is done by including aprocedure in the program which contains only record aggregatesdefining machine instructions. The package MACHINE CODE,included in the system program library, contains type, record,and constant declarations which are used to form theinstructions. Each field of the aggregate contains a field ofthe resulting machine instruction. These fields are specified inthe order in which they appear in the actual instruction. Sincethe AN/UYK-43 has several different formats for instructions,package MACHINE CODE defines different types for each of theseformats. For each of the fields which must have a certain valuefor a given instruction (i.e., part of the opcode), packageMACHINECODE defines a constant to use for that field.

The following procedure implements a floating pointexponential. Note that this actual procedure would not be used,because package MATHPACK implements the same operation in a moreefficient manner.

with machine code; use machine code;procedure fl~atingpointexponential

(x : FLOAT;ex : OUT FLOAT) is

BEGINformatI'(f LA,l,3,6,0,0,0);

-- EA Al,B6+0

formatV'(f FEX,l,f2_FEX,2,0,0,0,f6_FEX);-- FEX Al,A2

formatl'(f=>f SA,a=>2,k=>3,b=>6,i=>0,s=>0,y=>1);-- SA A2,B6+1

END;

Note that either positional or names aggregates may be used.Whenever a field does not appear in the MACRO/L instruction, itmust be filled in with 0, since no missing fields are allowed.For formatI instructions, when k=O, the s and y field arecollapsed and used together. For user convenience, an additionalrecord type, formatIi, for immediate, can be used to define the sand y fields as a single 16-bit quantity. This quantity isdefined as an unsigned integer, so if a negative number x isdesired, one should instead put the number x + 65535;

6.13 Machine Code Insertions 6-41

Page 71: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Version 2.0C Ada/L PSE Handbook30 September 1989

Table 6-3 contains a list of MACRO/L instructions and theirAda/L machine code equivalents, sorted by MACRO/L mnemonic.

6-42 6.13 Machine Code Insertions

Page 72: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Ada/L PSE Handbook Version 2.OC30 September 1989

--------------------------------------------------------------------------------------------

I MACROIL Ada/L4.-------------------------------------------------------------------------------------------

I AA a,ypkpbrs tormatI'(f-AA,a,ktb,i,sty);I AB a~y,k,b,s formatl'(f AB,a,klb,i,s,y);I AEI a,sy,b formatli (fAEI,a,k AEI,b,i,sy);ALP a,y,b,s formatl'(fA- LP~a,kA- LP,b,i,s,y);

I ANA a,y,krbps formatl'(fANA,a,kbri,s,y);I AND a,y,k,b,s formatl'(fANB,a,kpb,i,s,y);I ATSF a,b formatV'(f ATSF,a,f2_ATSF,b,0,0,0,f6_ATSF);I BC ak,y,b,s formatl'i? BC,a,k,bi,s,y);I BS ak,ypbfs formatla'(f BS,a,k,b,i's,y);I BZ akly,b,s formatIa'(f-BZ,a,k,b,i'soy);I C a,y,krbps formatl(f C!,a,k,b,i,s,y);I CD formatlVA'(f CB,aCD,0,i CEI CBN a,n formatIVCI(f-hDN,af4 CBN,n);I CBR agb formatV'(f CgR,a,f2 C§R,b,0,0,0,f6_CBR )I CCT a,b forniatIVA'(f CCT,a,S,i CCT);I CE formatlVA(f CE,a CE,0-iCE )I CG a,y,kob,s formatI'(f CG,a,k,b,i,s,y);I CHCL a,y,b,s formatIl(f-CHCL,a,k-CHCL,b,i CHCL,s,y);I CL a,y,k,bts formatI'(f-CL,a,k,bi,s,y);I Cm a,y,k,bts tormatl'f-CM,a,k,b,i,s,y);I CM4PS a,b formatV'(fCMPS,a,f2_CMPS,b,0,0,0,f6_CMPS )I CNT a,y,b,s formatI'(f-CNT,a,k CNT,b,i's,y);I CR0 a,b formatV'(f-CRB,a,ff CRB,b,0,0,0,f6 CR0 )1 CXI a.,y,k,b,s formatl'(f-CXI,a,k,S,i,s,y);I D a,y,keb,s formatl'(f-D,a,k,b,i,,y);I DA a,ylb,s formatI (f DA,a,k DA,b,i,s,y);I DAN alylb,s formatI (f-DAN,a,kDAN,b,i,s,y);I DC alylb,s formatl (f DCpa,kDC,b,i,s,y);I DJNZ a,y,k,b,s foriuatllIl'(f DJNZa,f3_DJNZ,k,b,i,s,y);I DJZ a,y-,k,b,s formatIll'(f-DJZ,a,f3D5JZ,kb,i,s,y);I DL a,y,b,s formatI'(f DL,a,kDL,b,i,s,y);I DS avy,b,s formatI'(f-DS,a,k DS,b,i,s,y);I DSP a,b,m formatV'(f DSP,a,f2_DSP,b,0,O,m,f6 DSP )I EECM formatIVA'Tf EECM,aEECM,0,i EECM T;I ESCM foriuatIVA' (f ESCM,a-ESCM,0,i-ESCM )I ETCM. formatIVA' (f-ETCM,a ETCM,0,ijETCH )I FA a,y,bps formatl(f FA,a,k FA,b..i,s,y);I FAC a,b fornatV'(f-FAC,a,?E2_FAC,b,O,0,0,f6_FAC )I FAN a,y,b,s formatI'(f FAN~a,kFAN,b,i,,s,y);I FANR a,y,b,s formatI'(f-FANR,a,kFFANR,bpi,spy);I FAR a,y,b,s formatI'(f-FAR,a,k F;AR,b,i,s,y);I FAS a,b formatV'(fFAS~a,fl FAS,b,0,0,0,f6 FAS )I FAT a,b forzatV'(fFAT,a,f2-FAT,b,O,0,0,f6-FAT )I FD a,y,bps formatI:(f-FD,a,k FD,b,i,s,y);I FDR a,y,b,s formatI (fFDR,,a,kFDR,b,i,s,y);

----------------------------------------------------- --------------------------------------

Table 6-3a - Machine Code instructions

6.13 Machine Code Insertions 6-43

Page 73: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Version 2.OC Ada/L PSE Handbook30 September 1989

4.-------------------------------------------------------------------------------------4

I MACRO/L Ada/L---------------------------------------------------------------------------------------

IFEX a,b formatV'(f FEX,a,f2_FEX,b,0,0,O,f6_FEX )IFLN a,b formatV'(f-FLN,a,f2_-FLN,b,0,O,0,t6 FLN4)IFLTF a,n tormatV'(f-FLTF,a,f!2FLTF,n,0,0,0,f6FLTF);IFM aly,b,s formatl'(f-FM,a,k FM,b,i,sjy);FMR a,y,b,s format1(fFmR,a,k_ FMR,b,i,s,y);

IFPA a,b formatV'(f-FPA,a,ff2FPA,b,0,0,O,f6_FPA); IIFPD a,b formatV'(f FPD,a,f2_FPD,b,0,0,0,f6 FPD); I1FPM4 a,b formatV'(f-FPM,a,f2 FPM~b,0,0,0,f6-FPM )IFPS a,b forumatV(fFPS,a,f2-FPS,b,0,O,O,f6-FPS )IFSA a,b formatV'(f FSA,a,f2-FSA,b,0,O,0,f6-FSA); IFSC a,b formatV'(f-FSC,a,f2_FSCgb,0,0,0,f6 FSC );

IFSD a,b formatV'if-FSD,a,f2 FSD,b,0,0,O,E6-FSD);IFSZ4 a,b formatV'(f-FSM,a,f2-FS4,b,0,0,0,f6 FSM);IFSS a,b fo~rmatV'(f FSS,a,f2-FSS,b,0,0,0,f6 FSS); IIFTSL a,b formatV'(f FTSL,a,f!_FTSL,b,0,0,0,F6-FTSL);IR A a,b forzuatI VA'?(f HA,ab,06);

IHAEI a,b formatIVA'(f-HAEI,a,b,iHLAEI )R AI formatIVA'(f-HAI,0,0,0),

IHALT formatIVA'(f HALT,O,O,i HALT )R AN a,b formatIVA'(f HAN,a,b,O),-

IHAND a,b formatlVA'(fHAND,a,b,iHAND )IHC a,b formatIVA'(fHC,a,b,0);-I CB a,b formatIVA'(f-HCB,a,b,0);E CL a,b formatIVA'(f-HCL,apb,O);S CM a,b formatIVA'(fHCM,a,b,0);

IHCP a formatIVA'(t-HCP,a,0,0);IHCRC a,b formatIVA'(f HCRC,a,b,iHCRC )E D a,b formatIVA'(fflD,a,b,Q);-

IHDCP a formatIVA'(f-HDCP,a,0,0);IHDLC a,m formatIVB'(f-HDLC,a,m);1 HDRS a,m format1VB'(f-HDRS,a,m);IHDRZ a,m formatIVB'(f-HDRZ,a,m);IHDSF a,b formatIVA'(f-HDSF,a,b,0);IHLB a,b formatIVA'(fHLB,a,b,0);IHLC a,m foruiatlVfl'(f HLC,a,m);IHLCA a,b formatlVA'(f HLCA,a,b,i HLCA )IELCI af4,b formatlVA 1'T(f HLCI,af4-b,iHLCI);IHLCT af4,b formatIVAl1( f HLCT,af4,b,i HLCT);I LTC a,b formatIVAT(fETCa,biHLTU )IEM a,b tormatIVA'(f HM,a,b,0);-I OR a,b formatIVA :(f2HOR,a,b,0);I PEI a,b formatIVA (fHPEI,a,b,iEPEI )I PI formatIVA'(fEHPI,O,0,O);,IHR a,b formatV'(t HA,a,f2 SR,b,0,0,O,f6_ER);IH RS a,m formatlVfl'(fERS,a,m);

4------------------------------------------------------=.; ------------------------------ 4

Table 6-3b - Machine Code Instructions (Continued)

6-44 6.13 Machine Code Insertions

Page 74: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Ada/L PSE Handbook Version 2.OC3.0 September 1989

+------------------------------------------------------------------------------------------

I MACRO/L Ada/L+-----------------------------------------------------------------------------------------

I HET a,b formatIVA'(f HRT,a,b,0);I HRZ am formatIVB' (f!HRZ,,a,m);I HSCA ab formatIVAM(f HSCA,a,b,i HSCA )I HSCI af4,b forinatIVA I'(f HSCI,af4,b,i HSCI);I HSCT af4,b formatIVA I.'(f HSCT-,af4,b,i-ESCT);I HSF ab forniatlVA'(f-H§F,a,b,0);I HSIM ab formatlVA'(f HSIM,a,b,i HSIM )I HSTC ab formatIVM(f-HSTC,a,b,i-HSTC )I HST1 formatIVA' (f HST1,a HST1,b HST1,i _HST1);HST2 formatIVA'if HST2,a-HST2,b HST2,i HST2);

I HST3 formatIVA' (fEIST3,aHST3,b-HST3, iHST3);I HST4 formatIVA' (f-HST4,a-HST4,b-HST4,i-HST4);I HSTD a,b formatIVA'(f HSTD,a,b,i HSTD )I STV ab forxatVA(CHSTV,a,b,i-HSTV )I fl ab formatv'(f Eff,af2_HV,b,0,0,0,f6-HV);I WFI formatIVA'Tf HwF,O,0,iHWFI )I HXOR ab formatIVA'(f-HXOR,a,b,0);I IBSC a formatIVA'(f IBSC,a,O,iIBSC )I 1111 a formatIVA'(t-IILM,a,O,i IILM )I10 a,y,b,s formatl'(f Id,a,kIO,b,TIrs,y);I IOCL a formatIVA'Tf IOCLaOiIOCL )IO1CR a formatIVAI(f!IOCR,a,O,i_10CR )I IOCS a formatlVAI(f IOCS,a,O,i IOCS )I OT a,b,m formatV'(fli5T,a,f2_I0T-b,O,0,m,f6_lOT )I IPI y,b,s formatl'(f IPIaIPIkIPI,b,i,s,yT;1 IR. fornmat'(f-IR,O,kFIR,0,0,0,0);I IRI4MS a,b formatIVA'(f IRMI4S,a,b,i IRMMS);I IRMSR ab formatVA(fIRMSR,a,biIRMSR )I ISMSR a,b formatlVA'(f-ISZ4SR,a,b,i-ISMSR )I ISP a,b,m formatV'(f INP,a,f2 ISP,b,0,0,m~f6_ISP )I y,k,b,s formatlll'TfJ,a J,E3 J,k,b,i,sy);-I JBNZ a,y,krb,s formatlll' (f JBNZ,a,fS JBNZ,k,bi,s"y);IJc a,y,k,b,s formatIIl'(I!JC,a,f3_JC!,k,b,i,s,y);I JE y,k,brs formatllI'(f-JE,aJE,f3 JE,k,b,i,s,y);I JEP a,y,k,b,s formatIIIV(f-JEP,!,f3 JEP,k,b,i,s,y);I JG y,klb,s formatIll'(f-JG,a JG,?3 JG,k,b,i,s,y);I JGE y,k,b,s formatlII'(f JGEaZ JGE,f3 JGE,k,b,i,s,y);I JL y,k,brs formatIII'(f-ht,a,.f3_JL,k-tb,iosry);I JLE y,kb,s formatlll'(f-JLE,a JLE,f3 JE,k,b,i,s,y);I JLT y,k,b,s formatIll'(f JLT,A JLT,f3-JLT,k,b,.,s,y);I JN aly,k,b,s formatIII'(f:JN,a,F3 JN,k,b,i,s,y);I JNE y,k,b,s format1II'(f JNEaJNE,f3 JNE,k,b,i,s,y);I JNF y,k,b,s formatllI'i(f:JNF,aJNF,f3-JNF,k,b,i'sy);I JNW y,k,b,s formatIll(f JNW,a JNW,f3-JNW,k,bi,s ,y);I JNZ a,y,k,b,s formatll (f-JNZa,f3 JNZ,k,b,i,s,y);

------------------------------------------------------------ -------- ----------- +

Table 6-3c - Machine Code Instructions (Continued)

6.13 Machine Code Insertions 6-45

Page 75: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

version 2.OC Ada/L PSE Handbook30 September 1989

-------------------------------------------------------------------------------------------

X ACRO/L Ada/L4.------------------------------------------------------------------------------------------4

I JOF y,k,brs formatIII'(f-JOF,a -JOF,f3 -JOF,k,b,i,s,y);I JOP a,y,k,bjs formatIII' f JOP,af3JOPk,b,i,s,y);i p a,y,k,b,s formatIII'(f -JP,a,f3-JP,k,b,i,s,y);i s sy,k,b formatllI'(f JS,0,f3 JS,k,b,i,s,y);JSC a,y,k,b,s formatIII'(f:JSC,a,f! JSC,k,b,i,s,y);

iJW y,k,b,s formatlll'(f -JW,a -JW,?E3 JW,k,b,i,s,y);I z a,y,k,b,s formatIII (f JZ,af3_JZk,b,i,s,y);I LA a,y,k,bts formatl'(fLK,a,k,b,i,s,y);I LB a,y,k,bes formatI'(f-LB,a,k,b,s,y);I LBJ a,y,k,b,s formatlII'(fLBJ,a,f3 LBJ,k,b,i,s,y);I LBEMP a,yjbvs formatl4 (f 'LBMP,a,k LBMP,bri,s,y);I LCI ak,y,b,s formatla'(f LCI,akp,i,sly);I LCM1 y,b,s formatl'(f !;CM1,a -LCM1,k -LCM1,b,i -LCM1,s,y);I LCM2 y,b,s formatl'(f LC42,a -LC42,k -LCM2,b,i -LCM2,s,y);*I LCM3 y,b,s formatI'(f-LCM3,a -LCM3,k -LCM3,b,i -LCM3,sry);I LCM4 y,b,s formatl'(f LCI4,a LCM4,k LCM4,b,i LCM4,s,y);I LCMA y,b,s formatI'(f-LCMA,a-LCMA,k-LCMA,b,i-LCMA,s,y);I LCMP y,bs formatl'(f -LCIP,a -LCMP,k_-LCMP,b,is,y);I LCMT y,b,s formatI'(f-LCMT,a LCMT,k LCMT,b,i LCMT,s,y);I LCPA a,y,b,s formatl'(f LCPA,a,k LCPA,b,i,S,Y);*I LCRA a,y,b,s formatll(f-hCRA,a,kLCRA,b,i,styfl1 LCT ak,y,b,s formatla'(F LCT,ak,b,irs,y);I LDIF a,y,k,b,s formatl'(f UDIF,a,kvb,ivs,y);LECM formatIVA;(f LECM,aLECM,O,iLECM )

I LIBP a,y,b,s formatI'(f LfBP,a,kLIBP,b,is,y);I LIM a,sy,b formatli'(rf LIM,a,k-LIM,b,i,sy);I LIMP a,y,bs formatl'(f Z;IMP,a,kLIMP,b,i,s,y);I LISR a,b formatIVA'Tf LISR,a,b,i LISR );I LLP a,y,b,s formatll(f LL;P,a,kLLP,b,i,s,y);I LLPN a,y,bs formatI'(f LLPN,a,kLLPN,b,i,s,y);I LM4 a,y,k,b,s formatI'(f-LM,a,k,bi',y);I LNA a,y,k,b,s formatl'(f LNA,a,k,b,i,s,y);I LRR a,m forzatV'(f RR,a,f2 LRR,O,O,O,m,f6_LRR);I LRRA a,b,i formatIVA'T(f LRRA,a-bi);I LSCH formatlVA'(f LSCM,aLSCM,O,i_LSCM);I LSUM a,y,k~b,s formatl'(t L§UM,a,k,bvi,s,y);I LTCM, formatlVATf LTC4,a LTCM,O,iLTCM )I LXB a,yk,b,s formatI'(f-LXB,a,k,,i,s,y);-I a,y,k,b,s formatl'(f M,a,k,b,i,svy);I MS a,y,b,s formatl'(f -MS,a,kMS,b,i's,y);I NLP a,y,bs formatll(f-NLP,a,k_ NLP,b~i,s,y);I OR a,y,bts formatI'(f OR,a,kOZR,b,i,s,y);I PEI asy,b formatli'(f PEI,a,k PEI,bri,sy);I PFCD formatIVA'(T PFCD 0O,O,i PFCD )I PFCE formnatIVA' (fPFCEO,0,i-PFCE )

4.-------------------------------------------------------- ---- ----- -----------------------

Table 6-3d - Machine Code Instructions (Continued)

6-46 6.13 Machine Code Insertions

Page 76: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Ada/L PSE Handbook Version 2.OC30 September 1989

.-------------------------------------------------------------------------------------------- 1

I MACRO/L Ada/L

IPFR a,y,b,s formatl(f PFR,a,kPFR,b,i-PFR,s,y);

IPIE formatIVA'(f-PIE,0,0,iPIE);IP141 ypbos formatl'(fPM41,aPMM,k PMM,b,i,s,y);IPMR y,b,s formatl'(fPMR,aPMR,k-PMR,b,i,s,,y);IPOP a,b formatV (fPOP,a,f2 POf,b,0,0,0,f6_POP);IPUSH a,b formatV'(fPUSH,a,ff2PUSH,b,0,0,0,f6PSH )IRA a,y,k,b,s formatI (fRA,a,k,b,i1r,s,y);IRALP a,y,b,s formatl'(fRALP,ak RALP,b,i,s,y);IRAN a,y,k,bts formatl'(f RAN,a,k.brips,y);IRCCR y,b,s formatI'(fRCCR,aRCCR,k RCCR,b,i,s,y);IRD a,y,krb~s formatl'(fRD,a,k,b,i,s,y);IRI a,y,k,b,s formatl'(f_-RI,a,kpbrirspy);IRIOAS a,b formatIVACf-RIOAS,a,b,i RIOAS);IRISR a,b formatIVA'(f-RISR,a,b,i WISR );IRJ y,k,bes formatIIlV(f RJ,aRJ,f3RJ,k,b,i,s,y);IRJC a,y,k,b,s formatIII'(f-RJC,a,f3 RC,kpb,i,s,y);IRJSC a,y,kb,s formatIII'(f-RJSC,a,f3_RJSC,k,b,i,s,y);IRLP a,y,bs formatl'(fRLP,a,k RLPb,i,s,y);IRMS a,bi formatIVA'(f-RMMS,a,b,i);IRMS a,y,b,s formatI'(f-RMS,a,kR4S,b,i,s,y);IRMSR y,b,s formatl (f _RMSR,aRMbSR,k RSR,b~i,s,y);IRNLP a,y,b,s formatl ,(fRNLP,a,kRNLP,b,i,sy);IROR a,y,b,s formatl'(f ROR,a,k ROR,b,i,s,y);IRP a,sy,b formatli'(?rRP,a,k RP,b,i,sy);IRPD y,k,b,s formatl'(f RPD,a RfD,k,b,i,s,y);IRER a,m formatVi(fRRR'a,f2_RRR,0,0,O,m,f6_RRR )IRSC a,y,b,s fornatI'(fRSC,a,kRSC,b,i,s,y);IRSD a formatIVA'Cf-RSD,a,0,iRSD);IRXOR a,y,b,s formatl'(fRXOR a,k-RXOR,b,i,s,.y);ISA a,y,k,b,s format1'(f-SAa~k,bi,s,,y);ISB a,y,k,bo-9 formatl'(fSB,a,k,b.i's,y);ISBN an formatIVCTf SBN,a,f4_SBN,n);ISBPC a,y,k,b,s formatI'(f-SBPC,a,kbios,,y);ISC a,yv,s formatl'(f SC,akSCb,i,sy);ISCI ak,y,b,s foruatla'(?_ SCI,aZ~b,i,s,y);ISCMA y,b,s formatl(fS9CMA,a SCMA,k SCZ4A,b,iSCMA,s,y);ISC14P y,b,s formatl'(fSCZP,aSCMP,k-SCMP,b,i,-s,y);ISCI4T y,b,s formatl'(f-SCMT,a-SCMT,k-SCMT,b,iSCMT,s,y);ISCM. y,b,s tormatI'(f-SC41,aSCZ41,kSCM1,b,i SCM1,s,y);ISCM2 yb,s formatl'(f-SCM2,a-SCM2,k-SCM2b,i-CM2,s,y);ISC143 y,b,s formatl'(fSC13,aSCM43,k-SCM3,b,i-SCM3,s,y);ISC144 y,b,s formatl'(fSCM4,aSCM4,k-SCM4,b,i-SCM4, s,y);ISCPA a,y,b,s formatl'(f-SCPA,a,k_SCPA#b,i,s,y);-ISCRA a,y,b,s formatl (f-SCRA,a,k SCRA,b,i,s,y);1SCSR y,b,s formatl ,(f-SCSR,a_-SCSR,k_SCSR,b,i,s,y);

Table 6-3e Machine Code Instructions (Continued)

6.13 Machine Code Insertions 6-47

Page 77: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Version 2.OC Ada/L PSE Handbook30 September 1989

4.------------------------------------------------------------------------------------------

I ACROIL ,Ada/L4.------------------------------------------------------------------------------------------

ISCT ak,y,b,s forznatla'(f SCT,ak,b~i~sty);ISDIF a,y,b,s formatIV(f_§DIF,a,k SDIF,b,i,s,y);ISDMC a formatIVA'(f SDMC,a,O,iSDMC );IISIEP a,y,b,s formatl(e SfBP,a,kSIBP,b,i,s,y);ISIMC a,b formatIVA;TfSIMC,a,b,iSIMC );IISIMP a,y,b,s formatl'(f SIMP,a,kSIMP,b,i,s,y);ISIRC a,b formatIVA'Tf SIRC,a,b,iSIRC )ISITC a,b formatIVA (f-SITC,a,b,i SITC )ISLP a,y,b,s formatI'(fS!;P,a,k SLP,bvirsry);ISM a,y,k,b,s formatl'(f SM,a,k,bi,i,s,y);ISMCC a forzatVMTf SMCCa,0,i SMCC )SMSR y,b,s formatl'(f-SISRaSMSR,kSMSR,b,i,s,y);

ISNA a,y,k,b,s formatIV(fSNA,a,k,b,i,s,y);ISRERA a,b,i formatIVA'Tf SRRA,a,b,i);ISSUM a,y,b,s formatlI(f-SU,a,k SSUM,b,i,s,y);ISTA' a,b formatV'(f STAF,a,f2f STAF,b,0,O,0,f6 STAB');ISTSB ak,y,lb,s formatIa'(f STSB,ak,S,i,s,y);-ISXB a,yk,b,s formatI'(f §XB,a,k,b,i,s,y);ITEN a,n formatIVC'TCf TBN,a,f4_TBN,n);ITR a,b formatV'(f Tff,a,f2_TR,b,O,O,0,f6_TR);ITSBN a,n formatIVC;Tf TSBN,a,f4-TSBN,n);ITSF y,bs formatI'(t T§F,O,k TSFb,irs,y);ITSM bi formatIVAI-f TSM ,aTSMgb,i);ITV a,b formuatV'(fTV,a,f2 Y%,,b,O,0,O,f6_TV);IWFBP a,y,b,s foriuatl'(f PJFBP,a,kF WFBP,b,iWFBP,s,y);IWFM a,y,b,s formatI'(ftWFM,a,kWRFM,b,i-WFM,s,y);IXOR a,y,bs formatI'(frXOR,a,k-XOR,b,is,y);IXR y,b,s formatI'(f-hR,O,k Rk,b,i,s,y);IXRL y,b,s formatl'(f-hRL,0,kXRL,b,i,s,y);I xS sy,b formatl'(f-XS,a-XS,kXS,b,i,sy);

4.--------------------------------------------------------------- ------------------------- 4

Table 6-3f - Machine Code Instructions (Continued)

6-48 6.13 Machine Code Insertions

Page 78: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

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 for thisvalidation are given below.

C-1

Page 79: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

_ 1-~ -w -g L (

(- z - c =M

-i- a - -. -C a_ - d 04 'a Inzcn Da of U) 0 4 =, MI be a. m adm -

e-u. 6- 0 I.E 0" Q 0 m CDl 9.11ccU 10. 04. 1- :d OS -9 I-.1

ei m-A00 1-Jh 09~ ~ -M( a- ,- i 1;c!ac cCme z 0 -= a I 0. 19:6 .4~I N Go -2-3 .

- 0I- mm ww. 0 .1. 10 Cc CA.. Id. 0 C2U

16 o -2 -i 0 Wa ad 13C - rn cmn as

Go U M o Q0 CA

a .. 1ZU4 -3 1.2 -10 0u p 6I d109 0 1-3 o10 ad t z- 1- .4 E - I S

0 n. _U 0 2 5 k. oC )r

cn ad mm too acmtoW ~ ~ ~ ~ ~ ~ ~ ~ I I- 2 I. m f - 3F o994

=- U3a wz050 Q go .2 rn-i goU 0. cna Q4 oi Qr4

EO :I ad a . I J . Ot. 0ZQ4 -(Jo -1- (dft =1S i-

Cn-i- - mm *. 0 a-an 0 W-4 s 0.U -a or Ca "0 "- .J v.".n.2a4jfft 92 vsf

;p . ob 0

WI -p mW

a 2 M)_4 imm 0~ W. 1- o0coI- cc m a 4-. M4.60~.A6 SiA Q UA- 0 ii U At qu f

go - cj ua .4 0 a 0 a-~a 1-* a40 -& 1 ;PM-4~. 2 n Ime. &u0Uwu ama 4-

Page 80: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

- c

91 a

ad C. - f-0

cilf eq - 1

CM) - 0 - -e cc **b

09M M

urn jM U-ciQC1

tm at

04 0 w~ 94 006-

-3 * 14C 01 *

~~ I. c

" F MM MEN 1~' -0 aOlI-- 1.14-~ A sU- IQ-

.1 to. 9

0- I UA In 99

Page 81: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

-U

NQ

Inn

Nk a

U i0 aNa

SIn-

Ux

Inn

"O 44oN0

A.0U nc 11 nM -

Nc

n as

r vvce Mb oU2 IVAUam=

-a: h. ft- U -m .CS

.9 e . -.. ka M.1 1. to

:12 0- -1) 010 grn-"a) "

ohm WISH

I ra I- I1~U u0 0

Page 82: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

U)U

0 0-

I- a, 2 - m C

I-% .f -a Nm 4

Cfl :16 Sl M4 --U) . I- (A~ -;

oz~C M . 4

02 =h

- U). .. U N -C -C

*O U3 O- V I.42 1 u Q U

m Paul I-E - .- 40-q Nq I- toI I u.

CA~~ P)h 4. . a0 N14 cc m I-t

ad rnc4 9b-

A- Qw wU~ a Q. Q v 0Qu

n mA..U 4 I 044R2 -02 ;C. 0 Kia R2 iUF uU

Mig 02-40 11 9.42 N N z

Page 83: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

I- an

:4~~~~- nomI n n0

ad1- P- mz CD Or.- anwg

il 1.- an 9 riU

aa"U co, 12.4

0~~~~10 cci a 4aWc Qa 0

K an 04 It

ad' 1-Ua a - M02U

I-i 0dU t4 .1.023 iQ l, U 3 .406 (-0.6

-C12 - 0 a~ a- 00 a I

an- -Ca

A2 F. u-m l1 I-4 .1 6m -

sa Iwo- Q -

10 - -sQ ' m o r

I-sn~~ An La *.4 0 an - 6-40 I-- z I. MI-

-CC c. 11-1 r- a t. 0

kidu 0 Nd -e ~~.. 1

6- .9 M 1-1-41- 1 )09 a . 00_ .I

an -9w *aI--.4 In . 1.- 4 . : . a- 9U 202 .~- a,~u 0s I 03 -C

Page 84: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

h.

W

ab W 0

00 0-.94

- U

Elm r 41% l lo.

an16 Im iI msA.j

Page 85: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

APPENDIX D

WITHDRAWN TESTS

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

A39005GThis test unreasonably expects a component clause to pack an arraycomponent into a minimum size (line 30).

B97102EThis test contains an unintended illegality: a select statementcontains a null statement at the place of a selective wait alternative(line 31).

C97116AThis test contains race conditions, and it assumes that guards areevaluated indivisibly. A conforming implementation may use interleavedexecution in such a way that the evaluation of the guards at lines 50 &54 and the execution of task CHANGING OF THE GUARD results in a call toREPORT.FAILED at one of lines 52 or 56.

BC3009BThis test wrongly expects that circular instantiations will be detectedin several compilation units even though none of the units is illegalwith respect to the units it depends on; by AI-00256, the illegalityneed not be detected until execution is attempted (line 95).

CD2A62DThis test wrongly requires that an array object's size be no greaterthan 10 although its subtype's size was specified to be 40 (line 137).

CD2A63A..D, CD2A66A..D, CD2A73A..D, CD2A76A..D [16 tests]These tests wrongly attempt to check the size of objects of a derivedtype (for which a 'SIZE length clause is given) by passing them to aderived subprogram (which implicitly converts them to the parent type(Ada standard 3.4:14)). Additionally, they use the 'SIZE length clauseand attribute, whose interpretation is considered problematic by the WG9ARG.

CD2A8lG, CD2A83G, CD2A84M & N, & CD50110These tests assume that dependent tasks will terminate while the mainprogram executes a loop that simply tests for task termination; this isnot the case, and the main program may loop indefinitely (lines 74, 85,86 & 96, 86 & 96, and 58, resp.).

D-1

Page 86: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

CD2Bl5C & CD7205CThese tests expect that a 'STORAGE SIZE length clause provides precisecontrol over the number of designated objects in a collection; the Adastandard 13.2:15 allows that such control must not be expected.

CD2DllBThis test gives a SMALL representation clause for a derived fixed-pointtype (at line 30) that defines a set of model numbers that are notnecessarily represented in the parent type; by Commentary AI-00099, allmodel numbers of a derived fixed-point type must be representable valuesof the parent type.

CD5007BThis test wrongly expects an implicitly declared subprogram to be at theaddress that is specified for an unrelated subprogram (line 303).

ED7004B, ED7005C & D, ED7006C & D [5 tests]These tests check various aspects of the use of the three SYSTEMpragmas; the AVO withdraws these tests as being inappropriate forvalidation.

CD7105AThis test requires that successive calls to CALENDAR.CLOCK change by atleast SYSTEM.TICK; however, by Commentary AI-00201, it is only theexpected frequency of change that must be at least SYSTEM.TICK --

particular instances of change may be less (line 29).

CD7203B, & CD7204BThese tests use the 'SIZE length clause and attribute, whoseinterpretation is considered problematic by the WG9 ARG.

CD7205DThis test checks an invalid test objective: it treats the specificationof storage to be reserved for a task's activation as though it were likethe specification of storage for a collection.

CE21071This test requires that objects of two similar scalar types bedistinguished when read from a file--DATA ERROR is expected to be raisedby an attempt to read one object as of the other type. However, it isnot clear exactly how the Ada standard 14.2.4:4 is to be interpreted;thus, this test objective is not considered valid. (line 90)

CE3111CThis test requires certain behavior, when two files are associated withthe same external file, that is not required by the Ada standard.

CE3301AThis test contains several calls to ENDOFLINE & ENDOFPAGE that haveno parameter: these calls were intended to specify a file, not to referto STANDARDINPUT (lines 103, 107, 118, 132, & 136).

D-2

Page 87: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

CE3411BThis test requires that a text file's column number be set to COUNT'LASTin order to check that LAYOUTERROR is raised by a subsequent PUToperation. But the former operation will generally raise an exceptiondue to a lack of available disk space, and the test would thus encumbervalidation testing.

E28005CThis test expects that the string "-- TOP OF PAGE. --63" of line 204will appear at the top of the listing page due to a pragma PAGE in line203; but line 203 contains text that follows the pragma, and it is thisthat must appear at the top of the page.

D-3

Page 88: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

APPENDIX E

COMPILER OPTIONS AS SUPPLIED BY

U.S. NAVY

Compiler: Ada/L, Version 2.0 (/OPTIMIZE Option)

ACVC Version: 1.10

E-1

Page 89: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Ada/L PSE Handbook Version 2.OC30 September 1989

10.2 Options

Options control the type of processing the compilerperforms. They enable the selection of listings produced as par:of the compilation process, make special processing requests, andindicate when special compilation units are being compiled. Thecompiler options, their functions and defaults are summarized inTable 10-1. Each option may be specified as shown or preceded bythe three characters "NO " to specify the opposite option. Forexample, SOURCE turns the source listing on; NOSOURCE turns thesource listing off.

The following error conditions are detected by the compilerduring option processing. In each case, the compiler issues aWARNING diagnostic and takes the action indicated.

a. The complement of an already-specified option isspecified; the last option is honored. For example,if NO SOURCE is specified, followed by SOURCE laterin the option list, SOURCE is the option that will bein effect.

b. An option is specified more than once. The lastoccurrence of the option is honored; all others areignored.

c. An undefined option is specified. The option isignored.

The compiler does not check options for redundantdirections. For example, no error is reported when bothNO SOURCE and NO PRIVATE are specified in the same compilerinvocation.

Some options impact the speed with which the compilationprocess is completed and the efficiency of the object codeproduced by the compiler. The remainder of this sectiondiscusses the implications of options for the compilationprocess, how options affect the quality of object code generatedby the compiler, and guidelines for using them.

10.2 Options 10-03

Page 90: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Version 2.OC Ada/L PSE Handbook30 September 1989

4.--------------------------------------------------------------------------------------------

Option Function4.--------------------------------------------------------------------------------------

Listing Control Options:

ATTRIBUTE Produce a Symbol Attribute Listing. (Produces anattribute cross-reference listing when bothATTRIBUTE and CROSS REFERENCE are specified.)Default: NOATTRIBUTE

CROSS-REFERENCE Produce a Cross-Reference Listing. (Produces anattribute cross-reference listing when bothATTRIBUTE and CROSS REFERENCE are specified.)Default: NO CROSSREFERNCE

DIAGNOSTICS Produce a Diagnostic Summary Listing.Default: NO DIAGNOSTICS

1MACHINE Produce a Machine Code Listing if code isgenerated. Code is generated whenCONTAINER GENERATION option is in effect and (1)there are no diagnostics of severity ERROR, SYSTEMor FATAL (2) NO CODE ON WARNING option is in effectand there are no diagnostics of severity higherthan NOTE. A diagnostic of severity NOTE isreported when a Machine Code Listing is requestedand no code is generated. OCTAL is an additionaloption that may be used with MACHINE to outputoctal values on the listing instead of hex values.Default: NOMACHINE

NOTES Include diagnostics of NOTE severity level in theSource Listing and Diagnostic Summary Listing.Default: NONOTES

PRIVATE If there is a Source Listing, text in the privatepart of a package specification is listed inaccordance with the selected SOURCE option, subjectIto requirements of LIST pragmas. Default: PRIVATE.

SOURCE Produce listing of Ada source statements.Default: NO-SOURCE

SUMMARY Produce a Summary Listing; always produced whenthere are errors in the compilation.Default: NO SUMMARY

.4--------------------------------------------------------------------------------------------

Table 10-la - Ada Compiler Options

10-04 10.2 Options

Page 91: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Ada/L PSE Handbook Version 2.OC30 September 1989

------------------------------------------------------------------------

I Option Function----------------------------------------------------------------------

Special Processing Options:

CHECKS Provide run-time error checking.NO CHECKS suppresses all run-time errorchecking. Please refer to the PragmaSUPPRESS description for further informationon run-time error checking.Default: CHECKS

CODE ON WARNING Generate code (and Machine Code Listing, ifrequested) only when there are no diagnosticsof a severity higher than WARNING.

NO CODE ON WARNING means no code is generatedwhen there-is a diagnostic of severity WARNINGor higher (i.e., ERROR, SYSTEM, or FATAL).Default: CODE ON WARNING

CONTAINERGENERATIONProduce a container if diagnostic severitypermits. NO-CONTAINERGENERATION means that nocontainer is produced even if there are nodiagnostics. No code (or Machine Code Listing,if requested) is generated if a container is notproduced because the NO CONTAINERGENERATIONoption is in effect.Default: CONTAINERGENERATION

DEBUG Include in compiler output only that informationneeded to link, export, and execute the currentunit. This option is ignored for a unit that:

o is a package or subprogram specification,o is a subprogram body for which there is

no previous declaration, oro contains a body stub, pragma INLINE,

generic declaration, or a generic body.

If DEBUG is used, internal representations arestored in the container as well as additionalsymbolic information.

A diagnostic of severity NOTE is issued whenthe option is ignored.Default: NO DEBUG

4--------------------------------------------------------------------------------------------

Table 10-lb - Ada Compiler Options (Continued)

10.2 Options 10-05

Page 92: VIC FILE COPN( REPORT DOCUMENTATION PAGE 1M · 2011. 5. 15. · S. SPONSORI OWUOR, AGENCY NAWE(S) AMQ ADoSS(ES) 10. SPONSRIN4GATORM AENCY Ada Joint Program Office NL0R United States

Version 2.OC Ada/L PSE Handbook30 September 1989

----------------------------------------------------------------------

I Option Function I----------------------------------------------------------------------

Special Processing Options (continued):

EXECUTIVE Enable pragma EXECUTIVE and allow visibilityto units which have been compiled with the/RTE ONLY option.DefaUlt: NO EXECUTIVE.

MEASURE Deferred.

OPTIMIZE Enable global optimizations in accordance withthe optimization pragmas specified in the sourceprogram. When NO OPTIMIZE is in effect, noglobal optimizations are performed, regardlessof the pragmas specified. The optimize optionenables global optimization. The goals of globalloptimization may be influenced by the userthrough the Ada defined optimize pragma.If time is specified, the optimizer concentrateson optimizing code execution time. If space isspecified, the optimizer concentrates onoptimizing code size. If the user does notinclude pragma optimize, the global optimizertends to optimize time over space.Default: NOOPTIMIZE

RTE.ONLY Restrict visibility of this unit only to thoseunits compiled with the /EXECUTIVE option.Default: NOT RTE ONLY.

4.-------------------------------------------------------------------- -----------------------------.

Table 10-1c - Ada Compiler Options (Continued)

10-06 10.2 Options