REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for...

59
REPORT DOCUMENTATION A A270 Public reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ".d maintaining the data needed. and reviewing the collection of informnation. Send comments rega s111 I ~ 11 11 11 11 ~lli rnmation. including suggestionri fto reducing this burden, to Washington Headquarters Service. Diredorale tfo Informat l4. Atrington. VA 22202-4302. and to the Office of Information and Regulatory Affair,. Office of Management and Bud 111 I1111111111111111111 1111111111 1. AGENCY USE (Leave 12. REPORT I I Final: 27 July 1991 4. TITLE AND 5. FUNDING Validation Summary Report: NATO SWG on APSE Compiler for Sun3/SunOS to MC68020, Version S3CM1.82, Sun3-50/SunOS with CAIS 5.5E (Host) to Motorola MVME 133XT (MC68020 bare machine)(Target) 6. IABG-AVF Ottobrunn, Federal Republic of Germany 7. PERFORMING ORGANIZATION NAME(S) AND 8. PERFORMING IABG-AVF, lndustrieanlagen-Betriebsgeselschaft ORGANIZATION Dept. SZT/ Einsteinstrasse 20 IABG-VSR 103 D-8012 Ottobrunn FEDERAL REPUBLIC OF GERMANY 9. SPONSORING/MONITORING AGENCY NAME(S) AND 10. SPONSORINGIMONITORING Ada Joint Program Office - AGENCY United States Department of Defensem31 T I Pentagon, Rm 3E1 14 Li I. . Washington, D.C. 20301-3081 E L CCTE n 11. SUPPLEMENTARY . CT. I) Wv& 12a. DISTRIBUTIONIAVAILABILITY . 12b. DISTRIBUTION Approved for public release; distribution unlimited. 13. (Maximum 200 NATO SWG on APSE Compiler for Sun3/SunOS to MC68020, Version S3CM1.82, Sun3-50/SunOS with CAIS 5.5E (Host) to Motorola MVME 133XT (MC68020 bare machine)(Target), 92072811.11261, ACVC 1.11. ' ') •. 92-27407 14. SUBJECT 15. NUMBER OF Ada programming language, Ada Compiler Val. Summary Report, Ada Compiler Val. 16._PRICE Capability, Val. Testing, Ada Val. Office, Ada Val. Facility, ANSIVMIL-STD-1815A, 16. PRICE 17. SECURITY 18. SECURITY 19. SECURITY 20. LIMITATION OF CLASSIFICATION CLASSIFICATION UNCLASSIFIED UNCLASSIFED UNCLASSIFIED NSN Standard Form 298. (Rev. 2-89) Preeaibed by ANSI Sid.

Transcript of REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for...

Page 1: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

REPORT DOCUMENTATION A A270Public reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep.".d maintaining the data needed. and reviewing the collection of informnation. Send comments rega s111 I ~ 11 11 11 11 ~lli rnmation. includingsuggestionri fto reducing this burden, to Washington Headquarters Service. Diredorale tfo Informat l4. Atrington. VA22202-4302. and to the Office of Information and Regulatory Affair,. Office of Management and Bud 111 I1111111111111111111 1111111111

1. AGENCY USE (Leave 12. REPORT

I I Final: 27 July 19914. TITLE AND 5. FUNDING

Validation Summary Report: NATO SWG on APSE Compiler forSun3/SunOS to MC68020, Version S3CM1.82, Sun3-50/SunOS with CAIS5.5E (Host) to Motorola MVME 133XT (MC68020 bare machine)(Target)

6.

IABG-AVFOttobrunn, Federal Republic of Germany

7. PERFORMING ORGANIZATION NAME(S) AND 8. PERFORMING

IABG-AVF, lndustrieanlagen-Betriebsgeselschaft ORGANIZATION

Dept. SZT/ Einsteinstrasse 20 IABG-VSR 103D-8012 OttobrunnFEDERAL REPUBLIC OF GERMANY

9. SPONSORING/MONITORING AGENCY NAME(S) AND 10. SPONSORINGIMONITORING

Ada Joint Program Office - AGENCY

United States Department of Defensem31 T IPentagon, Rm 3E1 14 Li I. .Washington, D.C. 20301-3081 E L CCTE n11. SUPPLEMENTARY . CT. I) Wv&

12a. DISTRIBUTIONIAVAILABILITY . 12b. DISTRIBUTION

Approved for public release; distribution unlimited.

13. (Maximum 200

NATO SWG on APSE Compiler for Sun3/SunOS to MC68020, Version S3CM1.82, Sun3-50/SunOS with CAIS5.5E (Host) to Motorola MVME 133XT (MC68020 bare machine)(Target), 92072811.11261, ACVC 1.11.

• ' ') •. 92-27407

14. SUBJECT 15. NUMBER OF

Ada programming language, Ada Compiler Val. Summary Report, Ada Compiler Val. 16._PRICE

Capability, Val. Testing, Ada Val. Office, Ada Val. Facility, ANSIVMIL-STD-1815A, 16. PRICE

17. SECURITY 18. SECURITY 19. SECURITY 20. LIMITATION OFCLASSIFICATION CLASSIFICATIONUNCLASSIFIED UNCLASSIFED UNCLASSIFIED

NSN Standard Form 298. (Rev. 2-89)Preeaibed by ANSI Sid.

Page 2: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

AVF Control Number: IABG-VSR 10327 July 1992

Ada COMPILERVALIDATION SUMMARY REPORT:

Certificate Number: 92072811.11261NATO SWG on APSE Compilerfor Sun3/SunOS to MC68020

Version S3CM1.82Sun3-50/SunOS with CAIS 5.53 Host

Motorola MVME 133XT (MC68020 bare machine) Target

Prepared By:IABG mbH, Abt. ITE

Einsteinstr. 20W-8012 Ottobrunn

Germany

Page 3: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

Certificate Information

The following Ada implementation was tested and determined to pass ACVC1.11. Testing was completed on July 28, 1992.

Compiler Name and VersionsNATO SWG on APSE Compiler for Sun3/SunOS to NC68020Version S3C01.82

Host Computer System:Sun3-50 under SunOS Version 4.0.3with CAIS Version 5.53

Target Computer System:Motorola MVME 133XT (KC68020 bare machine)

See Section 3.1 for any additional information about the testingenvironment.

As a result of this validation effort, Validation Certificate92072811.11261 is awarded to Alsys / German MoD. This certificateexpires 24 months after ANSI approval of ANSI/MIL-STD 1815B.

This report has been reviewed and is approved.

IABG, Abt. ITSMichael TonndorfEinsteinstr. 20W-8012 OttobrunnGermany

SAda a a on rganizationDi rct omputer & Software Engineering DivisionInsTY tut for Defense AnalysesAlexandria VA 22311

d~aJoint Program Office ___________

Dr. John Solomond, Director Accession ForDepartment of Defense NTIS GRA&IWashington DC 20301 DTIC TAB 3

Unannounced 1iJu--'tl1f tion

By-

Distribution/

Availability Codes

Avail and/orDist Special

Page 4: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

1-

.

DECLARATION OF CONFORMANCE

The following declaration of conformance was supplied by thecustomer.

Declaration of Conformance

Customer: -Alsys GmbH & Co. KG

Certificate Awardee: Alsys / German MoD

Ada Validation Facility: IABG mbH, Germany

ACVC Version: 1.11

Ada Implementation:

NATO SWG on APSE Compiler for Sun3/SunOS to MC68020 Version S3CM1.82

Host Computer System: Sun3-50/SunOS Version 4.0.3 underCAIS Version 5.5E

Target Computer System: Motorola MVME 133XT (Z68020)(bare machine)

Declaration:

We, the undersigned, declare that we have no knowledge ofdeliberate deviations from the Ada Language StandardANSI/MIL-STD-181SA ISO 8652-1987 in the implementation listedabove.

Customer Signature Date

Certificate Awardee Signature Date

0A 2<r

x"

Page 5: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

TABLE OF CONTENTS

CHAPTER 1 INTRODUCTION

1.1 USE OF THIS VALIDATION SUMMARY REPORT ..... ...... 1-11.2 REFERENCES.... ................. ................ 1-11.3 ACVC TEST CLASSES ............. ............... 1-21.4 DEFINITION OF TERMS ........... .............. 1-2

CHAPTER 2 IMPLEMENTATION DEPENDENCIES

2.1 WITHDRAWN TESTS ............. ................. 2-12.2 INAPPLICABLE TESTS .......... ................ 2-12.3 TEST MODIFICATTONS ......... .... ......... 2-3

CHAPTER 3 PROCESSING INFORMATION

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

APPENDIX A MACRO PARAMETERS

APPENDIX B COMPILATION SYSTEM OPTIONS

APPENDIX C APPENDIX F OF THE Ada. STANDARD

Page 6: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

CHAPTER 1

INTRODUCTION

The Ada implementation described above was tested according to the AdaValidation Procedures (Pro90] against the Ada Standard (Ada83) using thecurrent Ada Compiler Validation Capability (ACVC). This Validation SummaryReport (VSR) gives an account of the testing of this Ada implementation.For any technical terms used in this report, the reader is referred to(Pro90]. A detailed description of the ACVC may be found in the currentACVC User's Guide (UG89].

1.1 USE OF THIS VALIDATION SUMMARY REPORT

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

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

National Technical Information Service5285 Port Royal RoadSpringfield VA 22161

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

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

1.2 REFERENCES

(Ada83) Reference Manual for the Ada Proorammina Lanauaae,ANSI/MIL-STD-1815A, February 1983 and ISO 8652-1987.

[Pro90] Ada Compiler Validation Procedures, Version 2.1, Ada JointProgram Office, August 1990.

(UG89] Ada Compiler Validation Caoabilitv User's Guide, 21 June 1989.

1-1

Page 7: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

INTRODUCTION

1.3 ACVC TEST CLASSES

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

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

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

Class L tests check that an Ada implementation correctly detects violationof the Ada Standard involving multiple, separately compiled units. Errorsare expected at link time, and execution is attempted.

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

For each Ada implementation, a customized test suite is produced by theAVF. This customization consists of making the modifications described inthe preceding paragraph, removing withdrawn tests (see section 2.1), andpossibly removing some inapplicable tests (see section 2.2 and EUG891). . .

In oi.der to pass an ACVC an Ada implementation must process each test ofthe customized test suite according to the Ada Standard.

1,4 DEFINITION OF TERMS

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

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

1-2

Page 8: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

INTRODUCTION

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

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

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

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

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

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

part of a program and also for all or part of the datanecessary for the execution of the program; executesuser-written or user-designated programs; performsuser-designated data manipulation, including arithmeticoperations and logic operations; and that can executeprograms that modify themselves during execution. Acomputer system may be a stand-alone unit or may consist ofseveral inter-connected units.

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

Customer An individual or corporate entity who enters into anagreement with an AVF which specifies the terms andconditions for AVF services (of any kind) to be performed.

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

which validation status is realized.

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

Inapplicable A test that contains one or more test objectives found to betest irrelevant for the given Ada implementation.

ISO International Organization for Standardization.

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

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

input/output control, and data management. Usually,operating systems are predominantly software, but partial orcomplete hardware implementations are possible.

1-3

Page 9: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

INTRODUCTION

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

Validated Ada The compiler of a validated Ada implementation.Compiler

Validated Ada An Ada implementation that has been validated successfullyImplementation either by AVF testing or by registration (Pro90].

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

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

test objective, fails to meet its test objective, orcontains erroneous or illegal use of the Ada programminglanguage.

1-4

Page 10: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

CHAPTER 2

IMPLEMENTATION DEPENDENCIES

2.1 WITHDRAWN TESTS

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

E28005C B28006C C32203A C34006D C355081 C35508JC35508M C35508N C35702A C35702B B41308B C43004AC45114A C45346A C45612A C45612B C45612C C45651AC46022A B49008A B49008B A74006A C74308A B83022BB83022H B83025B B83025D B830268 C83026A C83041AB85001L C86001F C94021A C97116A C98003B BA2011ACB7001A CB7001B CB7004A CC1223A BC1226A CC1226BBC30098 BDlB02B BDlBO6A ADlBO8A BD2A02A CD2A21ECD2A23E CD2A32A CD2A41A CD2A41E CD2A87A CD2B1SCBD3006A BD4008A CD4022A CD4022D CD4024B CD4024CCD4024D CD4031A CD4051D CD5111A CD7004C ED7005DCD7005E AD7006A CD7006E AD7201A AD7201E CD7204BAD7206A BD8002A BD8004C CD9005A CD9005B CDA201ECE2107I CE2117A CE2117B CE2119B CE22058 CE2405ACE3111C CE3116A CE3118A CE3411B CE3412B CE3607BCE3607C CE3607D CE3812A CE3814A CE3902B

2.2 INAPPLICABLE TESTS

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

B22005A..C and B22005P (4 tests), respectively, check that the controlcharacters SOH, STX, ETX, and DLE are illegal when outside of characterliterals, string literals, and comments; for this implementation thosecharacters have a special meaning to the underlying system such that thetest file is altered before being passed to the compiler. (See section2.3.)

2-1

Page 11: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

IMPLEMENTATION DEPENDENCIES

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

C241130..Y (11 tests) (*) C357050..Y (11 tests)C357060..Y (11 tests) C357070..Y (11 tests)C357080..Y (11 tests) C358020..Z (12 tests)C452410..Y (11 tests) C453210..Y (11 tests)C454210..Y (11 tests) C455210..Z (12 tests)C455240..Z (12 tests) C456210..Z (12 tests)C456410..Y (11 tests) C460120..Z (12 tests)

(*) C24113W..Y (3 tests) contain lines of length greater than 255

characters which are not supported by this implementation.

The following 20 tests check for the predefined type LONGINTEGER:

C35404C C45231C C45304C C45411C C45412CC45502C C45503C C45504C C45504F C45611CC45613C C45614C C45631C C45632C 852004DC55B07A B55B09C B86001W C86006C CD7101F

C35404D, C45231D, B86001X, C86006E, and CD7101G check for a predefinedinteger type with a name other than INTEGER, LONG-INTEGER, orSHORT INTEGER.

C35713D and B86001Z check for a predefined floating-point type with a nameother than FLOAT, LONG-FLOAT, or SHORTFLOAT.

C41401A checks that CONSTRAINT ERROR is raised upon the evaluation ofvarious attribute prefixes; thas implementation derives the attributevalues from the subtype of the prefix at compilation time, and thus doesnot evaluate the prefix or raise the exception. (See Section 2.3.)

C45531M..P (4 tests) and C45532M..P (4 tests) check fixed-point operationsfor types that require a SYSTEM.MAX MANTISSA of 47 or grea..er. For thisimplementation, MAX MANTISSA is less than 47.

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

B86001Y checks for a predefined fixed-point type other than DURATION; forthis implementation, there is no such type.

C96005B checks for values of type DURATION'BASE that are outside the range-of DURATION. There are no such values for this implementation.

CD1009C uses a representation clause specifying a non-default size for afloating-point type; this implementation does not support such sizes.

CD2A84A, CD2A84E, CD2A84I..J (2 tests), and CD2A840 use representationclauses specifying non-default sizes for access types; this implementationdoes not support such sizes.

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

The following 264 tests check operations on sequential, text, anddirect access files; this implementation does not support externalfiles:

2-2

Page 12: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

IMPLEMENTATION DEPENDENCIES

CE2102A..C (3) CE2102G..H (2) CE2102K CE2102N..Y (12)CE2103C..D (2) CE2104A..D (4) CE2105A..B (2) CE2106A..5 (2)CE2107A..H (8) CE2107L CE2108A..H (8) CE2109A..C (3)CE211OA..D (4) CE2111A..I (9) CE2115A..B (2) CE2120A..B (2)CE2201A..C (3) EE2201D..E (2) CE2201F..N (9) CE2203ACE2204A..D (4) CE2205A CE2206A CE2208BCE2401A..C (3) EE2401D CE2401E..F (2) EE2401GCE2401H..L (5) CE2403A CE2404A..B (2) CE2405BCE2406A CE2407A..B (2) CE2408A..B (2) CE2409A..B (2)CE2410A..B (2) CE2411A CE3102A..C (3) CE3102F..H (3)CE3102J..K (2) CE3103A CE3104A..C (3) CE3106A..B (2)CE31078 CE3108A..B (2) CE3109A CE3110ACE3111A..B (2) CE3111D..E (2) CE3112A..D (4) CE3114A..B (2)CE3115A CE3119A EE3203A EE3204ACE3207A CE3208A CE3301A EE3301BCE3302A CE3304A CE3305A CE3401ACE3402A EE3402B CE3402C..D (2) CE3403A..C (3)CE3403E..F (2) CE3404B..D (3) CE3405A EE3405BCE3405C..D (1) CE3406A..D (4) CE3407A..C (3) CE3408A..C (3)CE3409A CE3409C..E (3) EE3409F CE3410ACE3410C..E (3) EE341OF CE3411A CE3411CCE3412A EE3412C CE3413A..C (3) CE.414ACE3602A..D (4) CE3603A CE3604A..B (2) CE3605A..E (5)CE3606A..B (2) CE3 7 04A..F (6) CE3704M..O (3) CE3705A..E (5)CE3706D CE3706F..G (2) CE3804A..P (16) CE3805A..B (2)CE3806A..B (2) CE3806D..E (2) CE3806G..H (2) CE3904A..B (2)CE3905A..C (3) CE3905L CE3906A..C (3) CE3906E..F (2)

CE2103A, CE2103B, and CE3107A expect that NAME ERROR is raised when anattempt is made to create a file with in illegal name; thisimplementation does not support the creation of external files and soraises USEERROR. (See section 2.3.)

2.3 TEST MODIFICATIONS

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

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

B22003A B24009A B29001A B38003A B38009A B380095B91001H BC2001D BC20ClE BC3204B BC3205B BC3205D -

B22005A..C and B22005P (4 tests) were graded inapplicable by EvaluationModification as directed by the AVO. These tests, respectively, checkthat control characters SOH, STX, ETX, and DLE are illegal outside ofcharacter literals, string literals, and comments. This implementation'sunderlying CAIS system gives special meaning to each of these controlcharacters such that their effect is to alter the test files in a way thatdefeats the test objectives -- either the characters alone, or togetherwith any text that follows them on the line, are not passed to thecompiler. Hence, B220053 and B22005P compile without error, while theother tests have syntactic errors introduced by the loss of test text.

B25002A, B26005A, and B27005A were graded passed by EvaluationModification as directed by the AVO. These tests check that controlcharacters SOH, STX, ETX, and DLE are illegal within of characterliterals, string literals, and comments, respectively. Thisimplementation's underlying CAIS system gives special meaning to each of

2-3

Page 13: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

IMPLEMENTATION DEPENDENCIES

these control characters such that their effect is to alter the test filesin the following way: these characters, and except in the case of DLE anytext that follows them on the line, are not passed to the compiler. Thetests were thus graded without regard for the lines that contained one ofthese four control characters.

C34007P and C34007S were graded passed by Evaluation Modification asdirected by the AVO. These tests include a check that the evaluation ofthe selector "all" raises CONSTRAINT ERROR when the value of the object isnull. This implementation determines the result of the equality tests atlines 207 and 223, respectively, based on the subtype of the object; thus,the selector is not evaluated and no exception is raised, as allowed byLRM 11.6(7). The tests were graded passed given that their only outputfrom REPORT.FAILED was the message "NO EXCEPTION FOR NULL.ALL - 2".

C41401A was graded inapplicable by Evaluation Modification as directed bythe AVO. This test checks that the evaluation of attribute prefixes thatdenote variables of an access type raises CONSTRAINT ERROR when the valueof the variable is null and the attribute is appropriate for an array ortask type. This implementation derives the array attribute values fromthe subtype; thus, the prefix is not evaluated and no exception is raised,as allowed by LRM 11.6(7), for the checks at lines 77, 87, 97, 108, 121,131, 141, 152, 165, & 175.

C83030C and C86007A were graded passed by Test Modification as directed bythe AVO. These tests were modified by inserting "PRAGMA ELABORATE(REPORT);" before the package declarations at lines 13 and 11,respectively. Without the pragma, the packages may be elaborated prior topackage Report's body, and thus the packages' calls to functionREPORT.IDENT INT at lines 14 and 13, respectively, will raisePROGRAM ERROR.

BC3204C..D and BC3205C..D (4 tests) were graded passed by EvaluationModification as directed by the AVO. These tests are expected to producecompilation errors, but this implementation compiles the units withouterror; all errors are detected at link time. This behavior is allowed byAl-00256, as the units are illegal only with respect to units that they donot depend on.

CE2103A, CE21038, and CE3107A were graded inapplicable by EvaluationModification as directed by the AVO. The tests abort with an unhandledexception- when USE ERROR is raised on the attempt to create an externalfile. This is acceptable behavior because this implementation does notsupport external files (cf. AI-00332).

2-4

Page 14: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

CHAPTER 3

PROCESSING INFORMATION

3.1 TESTING ENVIRONMENT

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

For a point of contact for technical and sales information about this Adaimplementation system, see:

Alsys GmbH & Co. KGAm Rippurrer Schlo3 7W-7500 Karlsruhe 51GermanyTel. +49 721 883025

Testing of this Ada implementation was mainly conducted at the AVF's siteby a validation team from the AVF. 273 executable tests were rerun on ansimilar configuration at the customer's site because of processingfailures during the first run. This was supervised by a team from the AVF.

3.2 SUMMARY OF TEST RESULTS

An Ada Implementation passes a given ACVC version if it processes eaqh.test of the customized test suite in accordance with the Ada ProgrammingLanguage Standard, whether the test is applicable or inapplicable;otherwise, the Ada Implementation fails the ACVC [Pro9Oj.

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

The list of items below gives the number of ACVC tests in variouscategories. All tests were processed, except those that were withdrawnbecause of test errors (item b; see section 2.1), those that require afloating-point precision that exceeds the implementation's maximumprecision (item e; see section 2.2), and those that depend on the supportof a file system -- if none is supported (item d). All tests passed,except those that are listed in sections 2.1 and 2.2 (counted in items band f, below).

3-1

Page 15: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

PROCESSING INFORMATION

a) Total Number of Applicable Tests 3593b) Total Number of Withdrawn Tests 95c) Processed Inapplicable Tests 59d) Non-Processed I/O Tests 264e) Non-Processed Floating-Point

Precision Tests 159

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

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

3.3 TEST EXECUTION

ACVC 1.11 was processed as follows: With the customer's macro parameterfile the customised ACVC 1.11 was produced. Then CAIS version 5.5E assupplied by the customer was loaded and installed on the candidate Sun3-50computer at IABG's premises. Next the basic CAIS node model and thecandidate Ada implementation were installed. Then the full set of testswas processed using command scripts provided by the customer and reviewedby the validation team. Tests were processed in two steps. In the firststep tests were compiled and linked as appropriate, producing listings andpossibly load modules. For the second step load modules were transferredvia FTP to a VAX 8350 computer, from where they were downloaded to thetarget computer on a serial communications line. Then the executableobject files were executed on the target. This was done using a commandscript provided by the customer and reviewed by the validation team. Theresults were captured on the VAX 8350 system. See Appendix B for acomplete listing of the processing options for this implementation. Italso indicates the default options.

After examination of the executable result files it turned out that 273results from chapter 3, 4, D, and E were missing. This was caused byprocessing restricitions imposed by the CAIS system and not by the Adaimplementation. These tests were successfully rerun on a similarconfiguration at the customer's site.

Compilation was made using the following parameter settings:

SOURCE => "'CURRENT USER'DOT(SRC)"LIBRARY => "'CURRENT--USER'ADA LIBRARY(SAMPLE)"LIST => "'CURRENT USER'DOT(LIS)"LOG => "'CURRENT USER'DOT(LOG)"

The parameters SOURCE and LIBRARY do not have a default value and need tobe specified anyway.

The default of the parameters LIST and LOG means that no listing, reap. nolog output is to be produced. The values used for validation are CAISpathnames in order to obtain the corresponding output in the file nodesspecified by the respective pathnames.

Linking was made using the following parameter settings:

UNIT => ... -- Main Program to be linkedLIBRARY -> "'CURRENT USER'ADA LIBRARY(SAMPLE)"EXECUTABLE -> ""CURRENTUSER'DOT(EXE)"KERNEL -> "'EXECUTABLE IMAGE'DOTPARENT'DOT(MTK133)"DEBUG => NOLOG -> "'CURRENT USER'DOT(LOG)"

The parameters UNIT, LIBRARY and EXECUTABLE do not have a default valueand need to be specified anyway.

3-2

Page 16: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

PROCESSING INFORMATION

The default value for the parameter KERNEL means that no kernel is linked.The value used for validation is a CAIS pathname to the minimal targetkernel for the MVME 133XT board. This is the only kernel provided by thecustomer with the candidate Ada implementation. It does neither containdebugger support nor communication support.

The default of the parameter LOG means that no log output is to beproduced. The value used for validation is a CAIS pathname in order toobtain the corresponding output in the file node specified by thepathname.

The default value for the parameter DEBUG is not used, since ALSYS hasprovided only the runtime system which does not include debugger support.

Test output, compiler and linker listings, and job logs were captured ona Magnetic Tape and archived at the AVF. The listings examined by thevalidation team were also archived.

3-3

Page 17: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

APPENDIX A

MACRO PARAMETERS

This appendix contains the macro parameters used for customizing the ACVC.The meaning and purpose of these parameters are explained in [UG89]. Theparameter values are presented in two tables. The first table lists thevalues that are defined in terms of the maximum input-line length, which isthe value for SMAX_IN LEN--also listed here. These values are expressedhere as Ada string aggregates, where "V" represents the maximum input-linelength.

Macro Parameter Macro Value

$MAXINLEN 255 -- Value of V

SBIG ID1 (l..V-1 -> 'A', V -> '1')

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

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

SBIGID4 (l..V/2 -> 'A') & '4' &(l..V-l-V/2 => 'A')

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

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

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

$BIGSTRING2 '"' & (l..V-I-V/2 -> 'A') & 'i' &

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

$MAXLEN INT BASED LITERAL"2:" & (1..V-5 > '0') & "11:"

$MAX_.LZREA__BASED_.L ITERAL"16:" & (1..V-7 -> '0') & "F.E:"

$MAXSTRINGLITERAL '"' & (l..V-2 -> 'A') &

A-1

Page 18: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

MACRO PARAMETERS

The following table lists all of the other macro parameters and theirrespect ive values.

Macro Parameter Macro Value

$ACC SIZE 32

$ALIGNMENT 4

$COUNT LAST 2 147 483 647

$DEFAULT MEM SIZE 2147483648

$DEFAULT STOR-UNIT a

$DEFAULT-SYS NAME MOTOROLA-68020-BARE

$DELTADCC 201.0#E-31

$ENTRY-ADDRESS SYSTEM. INTERRUPT VECTOR(l)

$ENTRY ADDRESS 1 SYSTEM. INTERRUPTVECTOR (2)

SENTRY ADDRESS2 SYSTEM.INTERRUPT VECTOR(3)

$FIELD-LAST 512

$FILE TERMINATOR

$FIXEDNAME NO-SUCH FIXED TYPE

$ FLOATNAME NO-SUCH FLOAT TYPE

$FORM-STRING

$FORM-STRING2 "CANNOT RESTRICTFILE CAPACITY"

$GREATER-THAN DURATION0.0

$GREATERTHAN DURATION BASE LAST200000.0

$GREATER THAN FLOAT BASE LAST1611. 0#E+2S6

$GREATER THAN FLOATSAFELARGE1610. 8#E+256

$GREATER THAN SHORT FLOAT SAFE LARGE1610. 8#E+32

A-2

Page 19: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

1MACRO PARAMETERS

$HIGHPRIORITY 15

$ ILLEGAL EXTERNAL FILE NAME1FILE1

$ ILLEGAL EXTERNAL FILE NAME2FILE2

$ INAPPROPRIATE LINE LENGTH-1

$ INAPPROPRIATE PAGE-LENGTH-1

$INCLUDE PRAGMA1 PRAGMA INCLUDE (-A28006Dl.TST-)

$INCLUDE PRAGMA2 PRAGMA INCLUDE (-B28006F1.TST-)

SINTEGER-FIRST -2147483648

$INTEGER-LAST 2147483648

$INTEGERLAST PLUS 1 2147483648

$ INTERFACE-LANGUAGE ASSEMBLER

$LESS THAN DURATION -0.0

$LESS THAN DURATIONEASEFIRST

-200 000ý0

SLINE-TERMINATOR 0

$LOW-PRIORITY 0

SMACHINE CODESTATEMENT

NULL;

SMACHINE CODE TYPE NO-SUCH-TYPE

$MANTISSA-DOC 31

$MAX-DIGITS 18

$MAX INT 2147483647

SMAXINTPLUS_1 2 147 483 648

SMIN-INT -2147483648

$NAME NO-SUCH TYPE

$NAME-LIST MOTOROLA-68020-BARE

A-3

Page 20: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

MACRO PARAMETERS

$NAME SPECIFICATIONi X2120A

$NAME SPECIFICATION2 X2120B

$NAME-SPECIFICATION3 X3119A

$NEG-BASED INT 16#FFFFFFFEP

$NEW MEM SIZE 2147483648

$NEW-SYS NAME MOTOROLA-68020-BARE

$PAGETERMINATOR f

$RECORD-DEFINITION NEW INTEGER

$RECORD-NAME NO SUCH MACHINE CODE TYPE

$TASK-SIZE 32

STASKSTORAGE SIZE 10240

$TICK 1.0

$VARIABLE-ADDRESS GETVARIABLE ADDRESS

$VARIABLEADDRESS 1 GET-VARIABLE ADDRESS 1

$VARIABLE-ADDRESS2 GET VARIABLE-ADDRESS2

A-4

Page 21: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

APPENDIX B

COMPILATION AND LINKER SYSTEM OPTIONS

The compiler and linker options of this Ada implementation, as describedin this Appendix, are provided by the customer. Unless specifically notedotherwise, references in this appendix are to compiler documentation andnot to this report.

B-i

Page 22: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

Compiling Chapter 4

4 Compiling

After a program library has been created, one or more compilation units can be com-piled in the context of this library. The compilation units must all be on the same file.One unit, a parameterless procedure, acts as the main program. If all units needed bythe main program and the main program itself have been compiled successfully, theycan be linked. The resulting code can then be downloaded-by using appropriate toolsof the SWG APSE (Loader, Debugger).

§4.1 and Chapter 5 describe in detail how to call the Compiler and the Linker. In§4.2 the Completer, which is called to generate code for instances of generic units, isdescribed.Chapter 6 explains the information which is given if the execution of a program isabandoned due to an unhandled exception.The information the Compiler produces and outputs in the Compiler listing is explainedin §4.4.Finally, the log of a sample session is given in Chapter 7.

4.1 Compiling Ada Units

To start the SYSTEAM Ada Compiler, use the compile-target command.

compile-target Command Description

Format

PROCEDURE compile-target C

source : stringanalyze-dependency : yes-no-answer :- no;check : yes-no-answer :a yes;copy-source : yes-no.answer := yes;given-by : source-choices : pathname;

inline : yes-no-answer :a yes;library : pathnametype

:- default-library:list : pathname-type :a nolist;log : pathname-type : nolog;machine-code : yes-unoanswer : no;

SYSTEAM Ada System - User Manual 39

Page 23: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

Compiling Chapter 4

Debugger know this name. You can use the directory.target C....full -> yes, ... ) command to see the file name of the copy. If a specifiedfile contains several compilation units a copy containing only the source textof one compilation unit is stored in the library for each compilation unit.Thus the Recompiler can recompile a single unit.If copy-source -> no is specified, the Compiler only stores the name ofthe source file in the program library. In this case the Recompiler and theDebugger are able to use the original file if it still exists.copy-source -> yes cannot be specified together with analyze.depen-dency.

given-by source-choices := pathnamegiven-by => pathname indicates that the string of the source parameteris to be interpreted as a pathname.given-by -> uniqueidentifier indicates that the string of the sourceparameter is to be interpreted as a unique identifier.By default it is interpreted as a pathname.

inline : yes.no.answer :- yesControls whether inline expansion is performed as requested by PRAGMAinline. If you specify no these pragmas are ignored.By default, inline expansion is performed.

library : pathna~me.type :-default-..librarySpecifies the program library the command works on. The compile_-targetcommand needs write access to the library.The default is 'CURRENT-USER' ADLIBRARYCSTD).

list pat:hname.type :- nolistControls whether a listing is written to the given file.By default, the compile command does not produce a listing file.

log : pathnaame.type :- LologControls whether the Compiler appends additional messages to the speci-fied file.By default, no additional messages are written.

machine-code : yes-no.answer :- noControls whether machine code is appended at the listing file. machine-code has no effect if list is nolist or analyze -dependency => yes isspecified.By. default, no machine code is appended at the listing file.

optimize : yes-no-answer :- yesControls whether full optimization is applied in generating code. There isno way to specify that only certain optimizations are to be performed.By default, full optimization is done.

SYSTEAM Ada System - Usr Manual 41

Page 24: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

Compiling Chapter 4

4.2 Completing Generic Instances

Since the Compiler does not generate code for instances of generic bodies, the Com-pleter must be used to complete such units before a program using the instances canbe executed. The Completer must also be used to complete packages in the programwhich do not require a body. This is done implicitly when the Linker is called.

It is also possible to call the Completer explicitly with the complete-target command.

complete-target Command Description

Format

PROCEDURE complete-target C

unit : umitname.typecheck : yes.no.answer :- yes:inline : yes-no-answer : yes;library : pathname.type

:- default-library;list : pathnametype :rnolist;log : pathname-type : nolog;machine-code : yes-no.answer :U no;optimize : yes-no.answer :- yes);

Description

The complete-target command invokes the SYSTEA.M Ada Completer.The Completer generates code for all instantiations of generic units inthe execution closure of the specified unit(s). It also generates code forpackages without bodies (if necessary).

By default, the Completer is invoked implicitly by the link-target com-mand. In normal cases there is no need to invoke it explicitly.

Parameters

unit : unitname.typespecifies the unit whose execution closure is to be completed.

check : yes.no.answer :- yesControls whether all run-time checks are suppressed. If you specify no thisis equivalent to the use of PRAGMA suppress for all kinds of checks.

SYSTEAM Ada System - User Manual 43

Page 25: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

Compiling Chapter 4

In the following the term recompilation stands for the recompilation of an obsoleteunit using the identical source which was used the last time. (This kind of recom-pilation could alternatively be implemented by using some appropriate intermediaterepresentation of the obsolete unit.) This definition is stronger than that of the LRM(10.3). If a new version of the source of a unit is compiled we call it compilation, nota recompilation.

The set of units to be checked for recompilation or new compilation is described byspecifying a unit and the kind of a closure which is to be built on it. In many casesyou will simply specify your main program.

The automatic recompilation of obsolete units is supported by the recompile_..argetcommand. It determines the set of obsolete units and generates a command file forcalling the Compiler in an appropriate order. This command file is in fact an Adaprogram using the facilities of the package CLIINTERFACE provided by the SWG APSECLI.

The recompilation is performed using the copy of the obsolete units which is (bydefault) stored in the library. (If the user does not want to hold a copy of the sourcesthe recompile_-target command offers the facility to use the original source.)

The automatic compilation of modified sources is supported by the autocompile-.target command. It determines the set of modified sources and generates a commandfile for calling the Compiler in an appropriate order. This command file is in fact anAda program using the facilities of the package CLI_.I1TERFACE provided by the SWGAPSE CLI. The basis of both the recompile-target and the autocompile_-targetcommand is the information in the library about the dependencies of the concernedunits. Thus neither of these commands can handle the compilation of units which havenot yet been entered in the library.

The automatic compilation of new sources is supported by the compile-target com-mand together with the analyze -dependency parameter. This command is able toaccept a set of sources in any order. It makes a syntactical analysis of the sources anddetermines the dependencies. The units "compiled" with this command are enteredinto the library, but only their names, their dependencies on other units and the nameof the source files are stored in the library. Units which are entered this way canbe automatically compiled using the autocompile-target command. They cannotbe recompiled using the recompile -target command because the recompile -targetcommand only recompiles units which were already compiled.

The next sections explain the usage of the recompiletarget command, the auto-compiletarget command, and the compil_-target command with analyze-depen-dency -> yes.

SYSTEAM Ada System - User Manual 45

Page 26: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

Compiling Chapter 4

The recompile -target command uses the copy of the source which isstored in the library for the recompilation. By default, the compile com-mand stores a copy of the source in the library. If there is no copy inthe library - because the unit was compiled using the copy-source => noparameter - the recompile_-target issues a warning and generates a com-pile-target command for the original source file name. It is not checkedwhether such a file still exists. This command only performs a real recom-pilation if the current source is the same which was last compiled.

In the command file each recompilation of a unit is executed under thecondition that the recompilation of other units it depends on was successful.Thus useless recompilations are avoided. The generated command file onlyworks correctly if the library was not mc iified since the command file wasgenerated.

Note: If a unit from a parent library is obsolete it is compiled in thesublibrary in which the recompile_-target command is used. In this casea later recompilation in the parent library may be hidden afterwards.

Parameters

unit : unitname-typeSpecifies the unit whose closure is to be built.

output : pathnametypeSpecifies the name of the generated command file.

body-ind : yes-no-answer :- nospecifies that unit stands for the secondary unit with that name. Bydefault, unit denotes the library unit. If unit specifies a subunit, the -bodyind parameter need not be specified.

bodies-only : yes-no-answer : noControls whether all units of the closure are recompiled (default) or onlythe secondary units. This parameter is only effective if conditional a>no is specified.

check yes.no-same.answer := same-check > same means that the same value for the parameter check isincluded in the generated command file which was in effect at the lastcompilation. See the same parameter of the compile-target command.Otherwise the given value for the check parameter is included in the com-mand file.By default the parameter value of the last compilation is included.

closure : closure-choices :- execute

SYSTEAM Ada System - User Manual 47

... .....• ... -----.- --

Page 27: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

Compiling Chapter 4

Otherwise the given value for the optimize parameter is included in the

command file.By default the parameter value of the last compilation is included.

End of Command Description

4.3.2 Compiling New Sources

The autocompiletarget command supports the automatic coLmilation of units forwhich a new source exists. The command receives as paramnter a unit which is to be

used to form the closure of units to be processed. The kind of closure can be specified.For every unit in the closure, the autocompile .targe checks whether there existsa newer source than that which was used for the last compilation. It generates a

command file with a sequence of compile- %.rget -.. mma nds to compile the units for

which a newer source exists. T- a unit t, -,mpiled depends on another unit which

is obsolete or which will become obsole L for which no newer source exists, the

autocompile-target cormnmaia always . an appropriate compile-target ( ....

recompile z> yes. ... .-mmand t.. ýuake it current; the recompile parameter

controls which other obsolete units are recompiled, and can indeed be used to specify

that the same recompilations are done as if the recompile-targe-t command was

applied subsequently. The generated command file is in fact an Ada program using

the fac .. ies of the package CLIINTERFACE provided by the SWG APSE CLI. Thename of the command file can be specified using the output parameter.

auto compile-target Command Description.

Format

PROCEDURE autocompile.target C

unit : unitname.typeoutput : pathname-type

body-ind : yes-no-answer :- no.

bodies-only : yes-no-answer := no:

check : yes-no-same.answer : same:

closure : closure-choices :W execute;

conditional : yes-no-answer :- yes;copy.source : yes-no-answer :U yes;

inline : yes-no-same-answer :- same;

library - pathnametype: default-library;

SYSTEAM Ada System - User Manual 49

Page 28: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

Compiling Chapter 4

The autocompile.-target command does not fully handle the problemwhich arises when several compilation units are contained within one sourcefile; it only avoids the multiple compilation of the same source file. If youwant to use the autocompile.-target command it is recommended not tokeep several compilation units in one source.

Parameters

unit : unitname-typeSpecifies the unit whose closure is to be built.

output : pathname-typeSpecifies the name of the generated command file.

body-ind : yes-no.answer :- nospecifies that unit stands for the secondary unit with that name. Bydefault, unit denotes the library unit. If unit specifies a subunit, thebody.ind parameter need not be specified.

bodies-only : yes-no.answer :- noControls whether all new units of the closure are compiled (default) or onlythe secondary units. This parameter is only effective if conditional =>

no is specified.

check : yes-no-same-answer := samecheck => same means that the same value for the parameter check isincluded in the generated command file which was in effect at the lastcompilation. See the same parameter of the compile-target command.Otherwise the given value for the check parameter is included in the com-mand file.

• By default the parameter value of the last compilation is included.

closure : closure-choices :- executeControls the kind of the closure which is built and which is the basis for theinvestigation for new sources. closure => noclosure means that only thespecified unit is to be checked. closure => compile means that only thoseunits on which the specified unit transitively depends are regarded. clo-sure => execute means that - in addition - all related secondary units andthe units they depend on are regarded. If closure -> tree is specified, awarning is issued stating that this is not meaningful for this command andthat the default value is taken instead.By default, the execution closure is investigated for new sources.

conditional : yes-no-answer :- yesControls whether the check for new sources is performed (default). nomeans that all units in the closure are compiled disregarding the modifica-tion date. This parameter is useful for compiling the complete closure withdifferent parameters than the last time.

SYSTEAM Ada System - User Manual 51

Page 29: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

Compiling Chapter 4

Controls whether the autocompile_-target command additionally recom-piles obsolete units. With recompile => as-necessary only those unitsare recompiled which are obsolete or become obsolete and are used byother units which are to be compiled because of new sources. recompile=> same-status additionally recompiles those units of the considered clo-sure which will become obsolete during the compilation of new sources.

This option specifies that there shall not be more obsolete units after theexecution of the command file than before. recompile x> as-possiblespecifies that all obsolete units of the closure and all units which will be-come obsolete are recompiled. ThLi is equivalent to a subsequent call of therecompile-target command after the run of the command file generatedby the autocompile -target command.

End of Command Description

4.3.3 First compilation

The SYSTEAM Ada System supports the first compilation of sources for which nocompilation order is known by the compile-target command with parameter ana.lyze.dependency in combination with the autocompile -target co-nmand.

With the analyze -dependency parameter the Compiler accepts sources in any orderand performs the syntax analysis. If the sources are syntactically correct the unitswhich are defined by the sources are entered into the library. Their names, their de-pendencies on other units and the name of the source files are stored in the library.Units which are entered this way can be automatically compiled using the autocom-pile-target command, i.e. the Autocompiler computes the first compilation orderfor the new sources. The name of the main program, of course, must be known and

specified with the autocompile.-target command.

Note that the compile-target ( .... analyze-dependency -> yes, ... ) commandreplaces other units in the library with the same name as a new one. Thus the librarymay be modified even if the new units contain semantic errors; but the errors will not

be detected until the command file generated by the autocompile -target command is

run. Hence it is recommended to use an empty sublibrary if you do not know anything

about the set of new sources.

If there are several sources containing units with the same name the last analyzed one

will be kept in the library.

The autocompile -target command issues special warnings if the information about

the new units is incomplete or inconsistent.

SYSTEAM Ada System - User Manual 53

Page 30: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

Compiling Chapter 4

Warnings and information messages have no influence on the success of a compilation.If there are any other diagnostic messages, the compilation was unsuccessful.

All error messages are self-explanatory. If a source line contains errors, the errormessages for that source line are printed immediately below it. The exact position inthe source to which an error message refers is marked by a number. This number isalso used to relate different error messages given for one line to their respective sourcepositions.

In order to enable semantic analysis to be carried out even if a program is syntacticallyincorrect, the Compiler corrects syntax errors automatically by inserting or deletingsymbols. The source positions of insertions/deletions are marked with a vertical barand a number. The number has the same meaning as above. If a larger region of thesource text is affected by a syntax correction, this region is located for the user byrepeating the number and the vertical bar at the end as well, with dots in betweenthese bracketing markings.

A complete Compiler listing follows which shows the most common kinds of errormessages, the technique for marking affected regions and the numbering scheme forrelating error messages to source positions. It is slightly modified so that it fits intothe page width of this document:

*- SYSTEAM ADA - COMPILER SUN3/SUNOS/CAIS x MC68020/BARE 1.82 *

"* 90-01-29/08:39:44 *

- Started at : 08:39:44

* PROCEDURE LISTING-EXAMPLE

1 PROCEDURE listing-example IS2 abc : procedure integer RANGE 0 .. 9 :- 1OE-1;

>>>>> SYNTAX ERRORSymbol(s) deleted (1)

>>>>> SYMBOL ERROR (1) An exponent for an integer literal must nothave a minus sign

3 def integer RANGE 0 .. 9;

SYSTEAM Ada System - User Manual 5

Page 31: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

Linking Chapter 5

5 Linking

The Linker of the SYSTEAM Ada System either performs incremental linking or finallinking.

Final linking produces a program image file (see §5.6) which contains a loadable pro-gram. The code portion which is part of the program image file must be loaded ontothe target later on. Final linking can (but need not) be based on the results of previousincremental linking.

Incremental linking means that a program is linked step by step (say in N _> 1 stepsI ... N). All steps except the last one are called incremental linking steps. In anincremental linking step, a collection image file (see §5.6) containing a collection isproduced; a collection is a set of Ada units and external units.

Each step X e {2 ... N} is based on the result of step X-1. The last step is alwaysa final link, i.e. it links the Ada main program. The result of an incremental linkingstep is also a code portion which must be loaded onto the target later on.

So the code of a program may consist of several code portions which are loaded ontothe target one by one. This is called incremental loading.

The reasons for the introduction of the concept of incremental linking and loading intothe Ada Cross System are the following:

It should be possible that some Ada library units and external units are compiled,linked, and burnt into a ROM that is plugged into the target, and that programsusing these units are linked afterwards.

* The loading time during program development should be as short as possible.This is achieved by linking those parts of the program that are not expectedto be changed (e.g. some library units and the Ada Runtime System). Theresulting code portion is loaded to the target and need not be linked or loadedlater on. Instead, only those parts of the program that have been modified orintroduced since the first link must be linked, so that the resulting code portionis much smaller in size than the code of the whole-program would be. Becausetypically this code portion is loaded several times during program development,the development cycle time is reduced drastically.

The Runtime System (which is always necessary for the execution of Ada programs)is always linked during the first linking step. In particular, this means that also theversion of the Runtime System (Debug or Non-Debug) is fixed during the first step.

The Linker gives the user great flexibility by allowing him to prescribe the mappingof single Ada units and assembler routines into the memory of the target. This, for

SYSTEAM Ada System - User Manual 57

Page 32: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

Linking Chapter 5

link-main-target Command Description

Format

PROCEDURE link.main-target (

unit : unitnametypeexecutable : pathnametypebase : pathname_.type nobase;check : yes-no-answer := yes;complete : yes0no-answer := yes;debug : yes-no.answer :W yes;directive : pathnametype

:- default-directive:external : extern list : noexternal;inline : yes-no-answer :- yes;kernel : pathnametype : noke-nel;library : pathnametype

:- default-library;linker-listing : pathnametype :- nolist;list : pathnametype : nolist:log : pathname_.type : nolog;machine-code : yes-no-answer : no;map : pathname ..type - nomap;optimize : yes-no.answer := yes);

Description

The link.main-target command invokes the SYSTEAM Ada Linker forfinal linking.

The Linker generates a program image and writes it into the file given bythe parameter executable. The code portion of this file can be loaded andexecuted by means of the SWG APSE Loader, resp. SWG APSE Debugger.

Parameters

unit : unitname-typeSpecifies the library unit which is the main program. This must be aparameterless library procedure.

executable : patbhname_-typeSpecifies the name of the file which will contain the result of the finallink, see §5.6. The named node must not yet exist. It is created by thiscommand.

SYSTEAM Ada System - User Manual 59

Page 33: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

Linking Chapter 5

kernel pathname.type :- nokernelSpecifies the name of the file that contains the assembled code of the TargetKernel that is to be linked to the program.If kernel->nokernel is specified, then no Target Kernel is linked to theprogram. Note that this feature is not meaningful in the SWG APSE.If you want to link the Minimal Target Kernel for the MVME133XT boardto your program, specify kernel=>minimal.-kernel. If you want to linkone of the target kernels which support the SWG APSE Loader (XTBSTarget Kernel) or the SWG APSE Debugger (XSDB Target Kernel) seethe corresponding User Manuals of these components.Note, the Minimal Target Kernel must not be linked to the final programif the Debug Runtime System is used.

library : pathnametype :- default-librarySpecifies the program library the command works on. The link.main_target command needs write access to the library unless completeu>no isspecified. If complete=>no is specified the link.maintarget commandneeds only read access.The default library is "CURRENT-USER ADA-LIBRARY (STD).

linker-listing : pathnametype :- nolistUnless linker-listing -> nolist is specified, the Linker of the SYS-TEAM Ada System produces a listing file containing a-table of symbolswhich axe used for linking the Ada units.By default, the Linker does not produce a listing file.

list : pathnametype :- nolistThis parameter is passed to the implicitly invoked Completer. See the sameparameter with the complete-target command.

log : pathnametype :- nologThis parameter controls whether the command writes additional messagesonto the specified file, and is also passed to the implicitly invoked Com-pleter. See the same parameter with the complete-target command.

machine*code : yesono-answer := noThis parameter is passed to the implicitly invoked Completer. See the sameparameter with the complete•target command. If linker-listing is notequal to nolist and machine-code => yes is specified, the Linker of theSYSTEAM Ada System generates a listing with the machine code of theprogram starter in the file given by linker-listing. The program starteris a routine which contains the calls of the necessary elaboration routinesand a call for the Ada subprogram which is the main program.By default, no machine code listing is generated.

map : pathnaae_.Tpe :a nomap

SYSTEAM Ada System - User Manual 61

Page 34: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

Linking Chapter 5

This program image file serves as input for the Loader or the Debugger in order toload the code portion included in the file onto the target.

5.2 Linking Collections

A set of Ada units and external units which can be linked separately is called a col-lection. Such a collection consists on one hand of all compilation units needed byany of the given library units, and on the other hand of all given external units. Allcompilation units must successfully have been compiled or completed previously.

The code of a linked collection does not contain any unresolved references and canthus be loaded to the target and used by programs linked afterwards without anychanges. In particular, this allows the code of a linked collection to be burnt into aROM. Linking a collection is called incremental liking.

Contrary to final linking, incremental lizing is not done selectively. Instead all codeand data belonging to the collection is linked, because the Linker does not know whichprograms or collections will be linked on the collection as a base.

Incremental linking results in a collection image file. There is a code portion in thisimage file which, together with the code of the given base (if any), is the code of allAda units and all external (assembler written) units that belong to the collection.

For incremental linking, the Linker is started by the link.incr-target command.

link-incr.target Command Description -

Format

PROCEDURE link.incrtarget (

collection : pathnase-typebase : patbhnametype :* nobase;contains : unit-list : nounits:debug : yes.no-answer := yes:directive : pathnametype

:a defaultdirective;external : extern-list : noexternal;library : pathnaaetype

:a default-library:log : pathnaaemtype : nolog;map : patbnaaetype : nomap):

SYSTEAM Ada System - User Manual 63

Page 35: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

Linking Chapter 5

Specifies a list of file nodes which contain the object code of those programunits which are written in Assembler; these file nodes contain informationgenerated by the Cross Assembler, see §5.5. When externalz>noexternalis given, external program units are not linked.

library : pathnametype :a default-librarySpecifies the program library the command works on. The link.incr_target command needs write access to the library unless complete->no isspecified. If completez>no is specified the link-incr-target commandneeds only read access.The default library is ' CURRENTUSER'ADALIBRARY (STD).

log : pathnametype := nologThis parameter controls whether the command writes additional messagesonto the specified file, and is also passed to the implicitly invoked Com-pleter. See the same parameter with the complete-target command.By default, no additional messages are written.

map : pathnametype :- nomapSpecifies whether the map listing of the Linker and the table of symbolswhich are used for linking the Ada units are to be produced in the specifiedfile.

End of Command Description

The contains and external parameters define a collection C as defined at the be-ginning of this section. If a base collection is specified (parameter base), then C isenlarged by all units belonging to this base collection. The units belonging to the basecollection are identified by their names (Ada name of a library unit or name of the -external unit) and by their compilation or assembly times. The Linker uses these tocheck whether a base unit is obsolete or not.

See §5.4 for the mapping process.

If no errors are detected within the linking process, then the result of an incrementallink is a collection image file containing the following:

* A code portion that contains the complete code of the linked collection, exceptthe code of the base collection.

* Base addresses and lengths of the regions actually occupied by the complete col-lection (including the base collection).

* Checksums of the regions which contain code sections and which are actuallyoccupied by the complete collection (including the base collection).

The names of all library units as specified by the user (parameter units) (including

those of the base collection).

SYSTEAM Ada System - User Manual 85

Page 36: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

Linking Chapter 5

region-list ::= region-name [(, region,.name)+]

The syntax is specified in an extended Backus-Naur notation with start symbol linker-directive-file. [X] means that X is optional, X + means that X is repeated severaltimes (but at least once), X I Y means that X or Y is used.

All characters are case insensitive. Hexadecimal numbers must be in the range 0FFFFFFFF. region-name, library-unit-name, and object-module.name can be anysequence of readable characters except comma and blank.

The user has to specify all contiguous memory regions of the target that are to be usedfor the program or the collection to be linked. Each REGION description defines thename, the base address, and the size in bytes of one region.

The RESET directive specifies a region whose first 8 bytes are to be reserved forthe initial program counter and the initial stack pointer. This directive supports thegeneration of ROMable programs: If a hardware reset occurs, then the processor fetchesits reset vector from the start address of the given region. The RESET directive isignored if KERNEL is not specified.

The STACK directive tells the Linker the size of the main task's stack and the nameof the region into which the stack is to be mapped.

It is possible to specify specific regions for the code or the data of Ada library unitsor of external (assembler written) units in LOCATION directives. If a region for alibrary unit is specified, this causes this unit and all its secondary units to be mappedinto this region. A region for the code or data of a library unit or of an external unitmust not be specified more than once.

In the CODE directive, a list of regions must be specified to be used for the code and-the constants of those units for which no LOCATION CODE directive is given. Thespecified regions are filled in the given order.

In the DATA directive, a list of regions must be specified to be used for the data ofthose units for which no LOCATION DATA directive is given. The specified regionsare filled in the given order.

A list of regions must be given to be used for the heap of the program (HEAP directive).

The following objects are allocated on the heap:

"* All Ada collections for which no length clause is specified;"* the storage for a task activation (see §10.3);

"* all task control blocks (see §10.3).

Enough space for these objects must be allocated; otherwise storage-error will beraised when the heap space is exhausted.

Page 37: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

Linking Chapter 5

resulting image may be reduced drastically when a base collection is given, even ifmemory space occupied by the "old" section is not reused.

The Linker automatically takes care that the regions specified by the user in the RE-GION descriptions of the directive file do not overlap with the regions actually occupiedby the given base collection. If the Linker detects an overlap, then it issues an informa-tion message and uses a region description which does not overlap with a base regionany longer.

The mapping of the sections of S into the regions proceeds as follows:

1. Final linking only: If there is a RESET directive, then space for the initial programcounter and for the initial stack pointer is reserved at the bottom of the givenregion.

2. Final linking only: The stack is mapped into the specified region with the givensize. If the given region has not enough space for the stack, then an error messageis issued.

3. The LOCATION directives are processed in the order in which they appear in theLinker's directive file. Each directive is treated as follows: If the specified libraryunit or external unit is not part of the resulting program (e.g. as a consequence ofselective linking), then the directive is ignored and a warning is issued. Otherwiseall memory sections belonging either to the given library unit or one of its sec-ondary units or to the given external unit, and containing code 6r data (as givenin the directive), are mapped into the given region. If the given region has notenough space left for this mapping, then an error message is issued.

-4. Then all sections not yet mapped are processed in an arbitrary order. If a sectioncontains code or constants, then the regions specified in the CODE directive arescanned in the given order and the section is mapped into the first region thathas enough space left. If the section is a data section, then the same is done withthe regions specified in the DATA directive. If no region is found that has enoughspace left, then an error message is issued.

Now each region is filled without any gaps, beginning at its base address. The sectionswhich are mapped into a region are sorted as follows: First the stack, then codesections, then data sections. If there is any space left in a region, then this space is acontiguous byte block at the top of the region

5. Final link only: The heap is located in those regions that have space of at least acertain minimum size (100 byte) left and are listed within the HEAP directive.

6. Final link only: If there is a RESET directive, then the values of the initial stackpointer and of the kernel entry point are written into the first 8 bytes of the givenregion.

Unless the parameter map=>nomap is given, the result of this mapping is written intothe specified map file. The map file is generated even if errors were detected duringlinking. The information written into the map file has the following structure:

SYSTEAM Ada System - User Manual 69

Page 38: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

Linking Chapter 5

5.6 Image Files

The files whose contents can be downloaded to a target board are called target imagefiles. Two different kinds of target images exist:

0 program images

0 collection images

Collection images are the result of an incremental link step (command link.incr_target), see §5.2. Program images are the result of linking a main program using thecommand link.main-target, see §5.1.

In order to distinguish these kinds of images in a CAIS database from executableimages for the host computer the SYSTEAM Ada System defines a node kind TARGET.IMAGE and a relation TARGET-IMAGE which can terminate at nodes of this kind. Hence,this relation must always be used as the last relation in pathnames denoting targetimage files of this SYSTEAM Ada System. This applies to pathnames given as values - -

to the parameters BASE, COLLECTION and EXECUTABLE in the commands mentioned.

As an exception to the general rule that nodes have to exist before they can be passedin pathnames to the SYSTEAM Ada System, target image nodes are created, seethe description of the parameters COLLECTION and EXECUTABLE in the respective linkcommands.

Loading of target image files to a target board is supported by the SWG APSE Loaderand SWG APSE Debugger. They take target image files produced by this SYSTEAMAda System as input.

SYSTEAM Ada System - User Manual 71

Page 39: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

APPENDIX C

APPENDIX F OF THE Ada STANDARD

The only allowed implementation dependencies correspond to implementation-

dependent pragmas, to certain machine-dependent conventions as mentionedin Chapter 13 of the Ada Standard, and to certain allowed restrictions onrepresentation clauses. The implementation-dependent characteristics ofthis Ada implementation, as described in this Appendix, are provided bythe customer. 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 not apart of Appendix F, are contained in the following Predefined LanguageEnviroment (chapter 13 of the compiler user manual).

C-1

Page 40: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

Predefined Language Environment Chapter 13

13 Predefined Language Environment

The predefined language environment comprises the package standard, the language-defined library units and the implementation-defined library units.

13.1 The Package STANDARD

The specification of the package standard is outlined here; it contains all predefinedidentifiers of the implementation.

PACKAGE standard IS

TYPE boolean IS (false. true);

-- The predefined relational operators for this type are as follows:

-- FUNCTION "" (left, right : boolean) RETURN booleaf;-- FUNCTION "/=" (left. right : boolean) RETURN boolean;-- FUNCTION "<" (left. right : boolean) RETURN boolean;-- FUNCTION "<= ( Cleft. right : boolean) RETURN boolean;-- FUNCTION ">" (left. right : boolean) RETURN boolean;-- FUNCTION ">(" left. right : boolean) RETURN boolean:

-- The predefined logical operators and the predefined logical-- negation operator are as follows:

-- FUNCTION "AND" (left. right : boolean) RETURN boolean;-- FUNCTION "OR" (left. right : boolean) RETURN boolean;-- FUNCTION "XOR" (left. right : boolean) RETURN boolean;

-- FUNCTION "NOT" (right : boolean) RETURN boolean;

-- The universal type universal-integer is predefined.

TYPE integer IS RANGE - 2-147-483.648 .. 2-147-483-647;

-- The predefined operators for this type are as follows:

-- FUNCTION "" (left. right : integer) RETURN boolean;-- FUNCTION "/(" Cleft. right : integer) RETURN boolean:

SYSTEAM Ada System - User Manual 107

Page 41: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

Predefined Language Environment Chapter 13

-- FUNCTION " (" Cleft. right : float) RETURN float;-- FUNCTION "-" (left, right : float) RETURN float;-- FUNCTION "*" (left, right : float) RETURN float;-- FUNCTION " (" Cleft. right : float) RETURN float;

-- FUNCTION "**" (left : float; right : integer) RETURN float;

-- An implementation may provide additional predefined floating-- point types. It is recommended that the names of such additional-- types end with FLOAT as in SHORT-FLOAT or LONG-FLOAT.-- The specification of each operator for the type universal-real.-- or for any additional predefined floating point type, is obtained-- by replacing FLOAT by the name of the type in the specification of-- the corresponding operator of the type FLOAT.

TYPE short-float IS DIGITS 6 RANGE- 16#O.FFFFFF#E32 .. 16#O.FFFFFF#E32;

TYPE long-float IS DIGITS 18 RANGE- 16#O.FFFFFFFFFFFFFFFF#E4096

16#O.FFFFFFFFFFFFFFFF#E4096;

-- In addition, the following operators are predefined for universal-- types:

-- FUNCTION "*" (left : UNIVERSAL-INTEGER; right : UNIVERSAL-REAL)RETURN UNIVERSAL_.REAL:

-- FUNCTION "*" (left : UNIVERSAL..REAL; right : UNIVERSAL-INTEGER)RETURN UNIVERSALREAL:

-- FUNCTION "I" (left : UNIVERSALAREAL; right : UNIVERSAL-INTEGER) =

RETURN UNIVERSALPiEAL;

-- The type universal-fixed is predefined.-- The only operators declared for this type are

-- FUNCTION "*" (left ANY-FIXED-POINT-TYPE;right ANYFIXEDPOINTTYPE) RETURN UNIVERSAL-FIXED;

-- FUNCTION "/" (left ANYFIXED-POINT-TYPE;right ANYFIXEDPOINT-TYPE) RETURN UNIVERSAL-FIXED;

-- The following characters form the standard ASCII character set.-- Character literals corresponding to control characters are not-- identifiers.

TYPE character IS(nul. soh. stx. etx. eot, enq. ack. bel.

SYSTEAM Ada System - User Manual 109

Page 42: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

Predefined Language Environment Chapter 13

dollar : CONSTANT character :percent . : CONSTANT character :ampersand : CONSTANT character : 'JO;colon : CONSTANT character : ';semicolon : CONSTANT character : ';

query : CONSTANT character : .7';at-hign : CONSTANT character : 'Q';lbracket : CONSTANT character :back-slash : CONSTANT character :r-bracket : CONSTANT character :- .circumflex : CONSTANT character : ';underline : CONSTANT character : .. ;

grave : CONSTANT character : ..lbrace : CONSTANT character :bar : CONSTANT character := 'Ir-brace : CONSTANT character :tilde : CONSTANT character :

lc-a : CONSTANT character 'a';

lc.z : CONSTANT character : z';

END ascii:

-- Predefined subtypes:

SUBTYPE natural IS integer RANGE 0 integer'last.;SUBTYPE positive IS integer RANGE 1 integer'last;

-- Predefined string type:

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

PRAGMA pack(string):

-- The predefined operators for this type are as follows:

-- FUNCTION "-" (left. right : string) RETURN boolean;-- FUNCTION "/=" (left. right string) RETURN boolean:-- FUNCTION "<" (left. right string) RETURN boolean;-- FUNCTION "<=" (left. right string) RETURN boolean:-- FUNCTION ">" (left. right : string) RETURN boolean;-- FUNCTION ">=" (left. right string) RETURN boolean:

-- FUNCTION "k" (left : string. right : string) RETURN string;

-- FUNCTION "k" (left : character; right : string) RETURN string;

-- FUNCTION "W" (left : string; right : character) RETURN string:

SYSTEAM Ada System - User Manual 11

Page 43: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

Predefined Language Environment Chapter 13

13.3.1 The Package COLLECTIONIJh4ANAGER

In addition to unchecked storage deallocation (cf. LRM(§13.10.1)), this implementa-tion provides the generic package collection-manager, which has advantages overunchecked deallocation in some applications; e.g. it makes it possible to clear a collec-tion with a single reset operation. See §15.10 for further information on the use of thecollection manager and unchecked deallocation.

The package specification is:

GENERICTYPE elem IS LIMITED PRIVATE;TYPE ace IS ACCESS elem;

PACKAGE collection-manager IS

TYPE status IS LIMITED PRIVATE:

PROCEDURE mark (s : OUT status);

-- Marks the heap of type ACC and-- delivers the actual status of this heap.

PROCEDURE release (s : IN status);

-- Restore the status s on the collection of ACC.-- RELEASE without previous MARK raises CONSTRAINTERROR

PROCEDURE reset;

-- Deallocate all objects on the heap of ACC

PRIVATE-- private declarations

END collection-manager;

A call of the procedure release with an actual parameter s causes the storage occupiedby those objects of type ace which were allocated after the call of mark that delivereds as result, to be reclaimed. A call of reset causes the storage occupied by all objectsof type ace which have been allocated so far to be reclaimed and cancels the effect ofall previous calls of zark.

SYSTEAM Ada System - User Manual 113

Page 44: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

Predefined Language Environment Chapter 13

WITH system:

PACKAGE privileged-operations IS

SUBTYPE long-range IS integer RANGE -2**31 .. 2**31-1;SUBTYPE word-range IS integer RANGE -2*.15 2**15-1;SUBTYPE byte-range IS integer RANGE -2**7 .. 2*7-1;

SUBTYPE bit-number IS integer RANGE 0 .. 7:-- 0 designates the least significant bit of a byte.-- 7 designates the most significant bit of a byte.

SUBTYPE vector.number IS integer RANGE 0 .. 255;

PROCEDURE assign-byte (dest: system.address:item : byte-range);

PROCEDURE assign-word (dest : system.address;item : word-range);

PROCEDURE assign-long (dest : system.address;item : long-range):

PROCEDURE assign-addr (dest : system.address:item system.address);

PROCEDURE bitset (dest : system.address;bitno : bit.number):

PROCEDURE bit-clear (dest : syszem.address;bitno : bit.number);

FUNCTION byte-value (addr : system.address) RETURN byte-range;FUNCTION word-value (addr : system.address) RETURN word-range;FUNCTION long-value (addr : system.address) RETURN long-range;FUNCTION addr.value (addr : system.address) RETURN system.address;

FUNCTION bitvalue (addr : system.address;bitno : bit-number) RETURN boolean;

-- true is returned if the bit is set. false otherwise.

PROCEDURE defineo.interrupt-service.routine(routine : system.address;for-vector : vector.number):

-- defines an assembler routine as interrupt service routine

EID privileged-operations;

SYSTEAM Ads System - User Manual 115

Page 45: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

Predefined Language Environment Chapter 13

PROCEDURE sincos (x : long-float;cos : OUT long-float;sin : OUT long-float);

FUNCTION sinh (x : long-float) RETURN long-float;

FUNCTION sqrt (x : long-float) RETURN long-float;

FUNCTION tan (x : long-float) RETURN long-float:

FUNCTION tanh (x : long-float) RETURN long-float;

FUNCTION tentox (x : long-float) RETURN long-float;

FUNCTION twotox (x : long-float) RETURN long-float;

END coprocessor.interface;

SYSTEAM Ada System - User Manual 117

Page 46: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

Appendix F Chapter 15

15 Appendix F

This chapter, together with the Chapters 16 and 17, is the Appendix F required in theLRM, in which all implementation-dependent characteristics of an Ada implementationare described.

15.1 Implementation-Dependent Pragmas

The form, allowed places, and effect of every implementation-dependent pragma isstated in this section.

15.1.1 Predefined Language Pragmas

The form and allowed places of the following pragmas are defined by the language;their effect is (at least partly) implementation-dependent and stated here. -

CONTROLLEDhas no effect.

ELABORATEis fully implemented. The SYSTEAM Ada System assumes a PRAGMA elaborate,i.e. stores a unit in the library as if a PRAGMA elaborate for a unit u was given,if the compiled unit contains an instantiation of u (or a generic program unit inu) and if it is clear that u must have been elaborated before the compiled unit. Inthis case an appropriate information message is given. By this means it is avoidedthat an elaboration order is chosen which would lead to a PROGRAM-ERRORwhen elaborating the instantiation.

INLINEInline expansion of subprograms is supported with the following restrictions:the subprogram must not contain declarations of other subprograms, tasks, genericunits or body stubs. If the subprogram is called recursively only the outer call ofthis subprogram will be expanded.

SYSTEAM Ada System - User Manual 123

Page 47: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

Appendix F Chapter 15

effect on scheduling of leaving the priority of a task or main program undefined bynot giving PRAGMA priority for it is the same as if the PRAGMA priority 0had been given (i.e. the task has the lowest priority).

SHAREDis fully supported.

STORAGE-UNIThas no effect.

SUPPRESShas no effect, but see §15.1.2 for the implementation-defined PRAGMA suppress-all.

SYSTEM-NAMEhas no effect.

15.1.2 Implementation-Defined Prag-mas

BYtEPACKsee §16.1.

EXTERNAL-NAME (<string>, <ada.name>)<ada.name> specifies the name of a subprogram or of an object declared in alibrary package, <string> must be a string literal. It defines the external nameof the specified item. The Compiler uses a symbol with this name in the callinstruction for the subprogram. The subprogram declaration of <ada_name> mustprecede this pragma. If several subprograms with the same name satisfy thisrequirement the pragma refers to that subprogram which is declared last.Upper and lower cases are distinguished within <string>, i.e. <string> must begiven exactly as it is to be used by external routines. This pragma will be used inconnection with the pragma intertace (assembler) (see 115.1.1).

SYSTEAM Ada System - User Manual 125

Page 48: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

Appendix F Chapter 15

15.1.3 Pragma Interface (Assembler,...)

This section describes the internal calling conventions of the SYSTEAM Ada System,which are the same ones which are used for subprograms for which a PRAGMA interface(ASSEMBLER.... ) is given. Thus the actual meaning of this pragma is simply that thebody needs and must not be provided in Ada, but in object form using the externalparameter at link time.

The internal calling conventions are explained in four steps:

- Parameter passing mechanism- Ordering of parameters- Type mapping- Saving registers

Parameter passing mechanism:

The parameters of a call to a subprogram are placed by the caller in an area calledparameter block. This area is aligned on a longword boundary and contains parametervalues (for parameter of scalar types), descriptors (for parameter of composite types)and alignment gaps.For a function subprogram an extra field is assigned at the beginning of the parameterblock containing the function result upon return. Thus the return value of a function istreated like an anonymous parameter of mode OUT. No special treatment is requiredfor a function result except for return values of an unconstrained array type (see below).

A subprogram is called using the JSR instruction. The address pointing to the begin-ning of the parameter block is pushed onto the stack before calling the subprogram. -

In general, the ordering of the parameter values within the parameter block does notagree with the order specified in the Ada subprogram specification. When determiningthe position of a parameter within the parameter block the calling mechanism and thesize and alignment requirements of the parameter type are considered. The size andalignment requirements and the passing mechanism are described in the following:

Scalar parameters or parameters of access types are piassed by value, i.e. the values ofthe actual parameters of modes IN or IN OUT are copied into the parameter blockbefore the call. Then, after the subprogram has returned, values of the actual pa-rameters of modes IN OUT and OUT are copied out of the parameter block into theassociated actual parameters. The parameters are aligned within the parameter blockaccording to their size: A parameter with a size of 8, 16 or 32 bits (or a multiple of8 bits greater than 32) has an alignment of 1, 2 or 4 (which means that the objectis aligned to a byte, word or longword boundary within the parameter block). If thesize of the parameter is not a multiple of 8 bits (which may be achieved by attaching

SYSTEAM Ada System - Usr Manual 127

Page 49: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

Appendix F Chapter 15

requirements of a parameter it is not always possible to place parameters in such a waythat two consecutive parameters are densely located in the parameter block. In such asituation a gap, i.e. a piece of memory space which is not associated with a parameter,exists between two adjacent parameters. Consequently, the size of the parameter blockwill be larger than the sum of the sizes used for all parameters. In order to minimizethe size of the gaps in a parameter block an attempt is made to fill each gap with aparameter that occurs later in the parameter list. If during the allocation of spacewithin the parameter block a parameter is encountered whose size and alignment fitthe characteristics ,nf an available gap, then this gap is allocated for the parameterinstead of appending it at the end of the parameter block. As each parameter will bealigned to a byte, word or longword boundary the size of any gap may be one, twoor three bytes. Every gap of size three bytes can be treated as two gaps, one of sizeone byte with an alignment of 1 and one of size two bytes with an alignment of 2. So,if a parameter of size two is to be allocated, a two byte gap, if available, is filled up.A parameter of size one will fill a one byte gap. If none exists but a two byte gap isavailable, this is used as two one byte gaps. By this first fit algorithm all parametersare processed in the order they occur in the Ada program.

A called subprogram accesses each parameter for reading or writing using the param-eter block address incremented by an offset from the start of the parameter blocksuitable for the parameter. So the value of a parameter of a scalar type or an accesstype is read (or written) directly from (into) the parameter block. For a parameter of acomposite type the actual parameter value is accessed via the descriptor stored in theparameter block which contains a pointer to the actual object. When standard entrycode sequences are used within the assembler subprogram (see below), the parameterblock address is accessible at address 8(A6).

Type mapping:

To access individual components of array or record types, knowledge about the type-mapping for array and record types is required. An array is stored as a sequential con-catenation of all its components. Normally, pad bits are used to fill each componentto a byte, word, longword or a multiple thereof depending on the size and alignmentrequirements of the components' subtype. This padding may be influenced using oneof the PRAGMAs pack or byte-pack (cf. 516.1). The offset of an individual arraycomponent is then obtained by multiplying the padded size of one array component bythe number of components stored in the array before it. This number may be deter-mined from the number of elements for each dimension using the fact that the arrayelements are stored row by row. (For unconstrained arrays the number of elements foreach dimension can be found in the descriptor stored in the parameter block.)

A record object is implemented as a concatenation of its components. Initially, loca-tions are reserved for those components that have a component clause applied to them.Then locations for all other components are reserved. Any gaps large enough to holdcomponents without component clauses are filled, so in general the record componentsare rearranged. Components in record variants are overlaid. The ordering mechanism

SYSTEAM Ada System - User Manual 129

Page 50: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

Appendix F Chapter 15

for procedures without parameters and

RTD #4

for functions and procedures with parameters.

Consider the following example. A function sin is to be implemented by an assemblerroutine. Its Ada specification is as follows:

FUNCTION sin (x : long-float) RETURN long-float;PRAGMA interface (assembler, sin);PRAGMA externalname ("CPSIN". sin);

It is implemented by the following assembler routine:

CPSIN: LINK.W A6.#-4 *-- allocate frameCLR.L (-4.A6) *-- clear the indicator bitsMOVEA.L (8.A6),AO *-- address of parameter blockFSIN.X (12.AO).FPO *-- parameter xFMOVE.X FPO.(AO) *-- store function resultUNLK A6 - remove frameRTD #4 *-- return to caller

15.2 Implementation-Dependent Attributes

The name, type and implementation-dependent aspects of every implementation-de-pendent attribute is stated in this section.

"SSYSTEAM Ada System - User Manual 131

Page 51: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

Appendix F Chapter 15

The value delivered by this attribute applied to a task type or task object is asfollows:If a length specification (STORAGE-SIZE, see §16.2) has been given for the tasktype, the attribute delivers that specified value; otherwise, the default value isreturned.

15.2.2 Implementation-Defined Attributes

There are no implementation-defined attributes.

15.3 Specification of the Package SYSTEM

The package system as required in the LRM(§13.7) is reprinted here with all imple-mentation-dependent characteristics and extensions filled in.

PACKAGE system IS

TYPE designated-by.address IS LIMITED PRIVATE;

TYPE address IS ACCESS designated-by.address;FOR address'storage.size USE 0;

address-zero : CONSTANT address :S NULL;

FUNCTION "(" Cleft : address; right : integer) RETURN address:FUNCTION "(" Cleft : integer: right : address) RETURN address;FUNCTION "-" (left : address: right : integer) RETURN address:FUNCTION "-" (left : address; right : address) RETURN integer;

SUBTYPE external-address IS STRING;

-- External addresses use hexadecimal notation with characters-- '0..9, a'..*f' and 'A'..'F'. For instance:"-- "7FFFFFFF"""- "80000000"-- "8" represents the same address as "00000008"

FUNCTION convert-address (addr : external-address) RETURN address;-- convert-address raises CONSTRAINT-ERROR if the external address

SYSTEAM Ada System - User Manual 133

Page 52: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

Appendix F Chapter 15

mode-error-id : CONSTANT exception.id :=name.error-id : CONSTANT exception-id..d ;use-error-id : CONSTANT exception.id :device-error-id : CONSTANT exception-id :end-error-id : CONSTANT exception.id :* ;data-error.id : CONSTANT exception.id :layout-error.id : CONSTANT exception.id :time.error-id : CONSTANT exception-id :

no.error.code CONSTANT :- 0;

TYPE exception.informationIS RECORD

excp.id exception-id;-- Identification of the exception. The codings of-- the predefined exceptions are given above.

code.addr : address;-- Code address where the exception occurred. Depending-- on the kind of the exception it may be be address of-- the instruction which caused the exception, or it-- may be the address of the instruction which would-- have been executed if the exception had not occurred..

error-code integer;END RECORD;

PROCEDURE get-exception.information(excp-info : OUT exception-information);

-- The subprogram get.exception-information must only be called-- from within an exception handler BEFORE ANY OTHER EXCEPTION-- IS RAISED. It then returns the information record about the-- actually handled exception.-- Otherwise. its result is undefined.

PROCEDURE raise.exception.id(excp--id : exception-id);

PROCEDURE raise-exception info(excpinfo : exception-information);

-- The subprogram raiseaexception-id raises the exception-- given as parameter. It corresponds to the RAISE statement.

-- The subprogram raise-exception-info raises the exception-- described by the information record supplied as parameter.-- In addition to the subprogram raise-exception-id it allows to-- explicitly define all components of the exception information-- record.

SYSTEAM Ada System - User Manua 135

Page 53: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

Appendix F Chapter 15

15.7 Restrictions on Unchecked Conversions

The implementation supports unchecked type conversions for all kinds of source andtarget types with the restriction that the target type must not be an unconstrainedarray type. The result value of the unchecked conversion is unpredictable, if

target-type'SIZE > sourcetype'SIZE

15.8 Characteristics of the Input-Output Packages

The implementation-dependent characteristics of the input-output packages as definedin the LRM(Chapter 14) are reported in Chapter 17 of this manual.

15.9 Requirements for a Main Program

A main program must be a parameterless library procedure. This procedure may bea generic instantiation; the generic procedure need not be a library unit.

15.10 Unchecked Storage Deallocation

The generic procedure unchecked-deallocation is provided; the effect of calling aninstance of this procedure is as described in the LRM(§13.10.1).

The implementation also provides an implementation-defined package collection-manager, which has advantages over unchecked deallocation in some applications (cf.§13.3.1).

Unchecked deallocation and operations of the collection-manager c~n be combinedas follows:

* collection..-manager.reset can be applied to a collection on which uncheckeddeallocation has also been used. The effect is that storage of all objects of thecollection is reclaimed.

* After the first unchecked-deallocation (release) on a collection, all followingcalls of release (unchecked deallocation) until the next reset have no effect,i.e. storage is not reclaimed.

SYSTEAM Ada System - User Manual 137

Page 54: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

Appendix F: Representation Clauses Chapter 16

16 Appendix F: Representation Clauses

In this chapter we follow the section numbering of Chapter 13 of the LRM and providenotes for the use of the features described in each section.

16.1 Pragmas

PACKAs stipulated in the LRM(§13.1), this pragma may be given for a record or arraytype. It causes the Compiler to select a representation for this type such that gapsbetween the storage areas allocated .to consecutive components are minimized.For components whose type is an array or record type the PRAGMA PACK has noeffect on the mapping oi the component type. For all other component types theCompiler will choose a representation for the component type that needs minimalstorage space (packing down to the bit level). Thus the components of a packeddata structure will in general not start at storage unit boundaries.

BYTE..PACKThis is an implementation-defined pragma which takes the same argument as thepredefined language PRAGMA PACK and is allowed at the same positions. Forcomponents whose type is an array or record type the PRAGMA BYTE-PACK hasno effect on the mapping of the component type. For all other component typesthe Compiler will try to choose a more compact representation for the componenttype. But in contrast to PRAGMA PACK all components of a packed data structurewill start at storage unit boundaries and the size of the components will be amultiple of system.storageoun.it. Thus, the PRAGMA BYTE-PACK does noteffect packing down to the bit level (for this see PRAGMA PACK).

SYSTEAM AdL Sv tovr -TTxpr M,,,ial 1•Q

Page 55: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

Appendix F: Representation Clauses Chapter 16

16.4 Record Representation Clauses

Record representa~tion clauses are supported. The value of the expression given in analignment clause must be 0, 1, 2 or 4. If this restriction is violated, the Compilerresponds with a RESTRICTION error message in the Compiler listing. If the value is0 the objects of the corresponding record type will not be aligned, if it is 1, 2 or 4 thestarting address of an object will be a multiple of the specified alignment.

The number of bits specified by the range of a component clause must not be greaterthan the amount of storage occupied by this component. (Gaps between componentscan be forced by leaving some bits unused but not by specifying a bigger range thanneeded.) Violation of this restriction will produce a RESTRICTION error message.

There are implementation-dependent components of record types generated in thefollowing cases :

If the record type includes variant parts and if it has either more than onediscriminant or else the only discriminant may hold more than 256 different values,the generated component holds the size of the record object.If the record type includes array or record components whose sizes depend on dis-criminants, the generated components hold the offsets of these record componentý(relative to the corresponding generated component) in the record object.

But there are no implementation-generated names (cf. LRM(§13.4(8))) denoting these* components. So the mapping of these components cannot be influenced by a represen--tation clause.

16.5 Address Clauses

Address clauses are supported for objects declared by an object declaration and forsingle task entries. If an address clause is given for a subprogram, package or a taskunit, the Compiler responds with a RESTRICTION error message in the Compilerlisting.

If an address clause is given for an object, the storage occupied by the object starts atthe given address. Address clauses for single entries are described in §16.5.1.

SYSTEAM Ada System - User Manual 141

Page 56: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

Appendix F: Representation Clauses Chapter 16

_IRRETURN is defined by the Ada Runtime System. It contains the start address ofthe Target Kernel routine that carries out the return from interrupt handling. It isvery important that when leaving ISR all registers (except the status register) have thesame values as they had when entering ISR. ISR is executed in the supervisor state ofthe processor, so all instructions (including privileged ones) can be used within ISR.The processor's priority depends on the interrupt source.

If you want to call the interrupt entry with the number N, then you must set a bitwithin the interrupt entry call pending indicator _IRENTRYC by the instruction:

btset (_IRRENTRYC).I.{N-I:1} *-- prepare call of*-- interrupt entry N

(Note: The Microware Cross Assembler has a bug which causes wrong code to begenerated for the bf set. The example shows a work around for this bug.)This instruction should be placed immediately in front of the last instruction of ISR.ISR need not call the interrupt entry each time it is activated. Instead ISR can, forexample, read one character each time it is activated, but call the interrupt entry onlywhen a complete line has been read.

A complete example for interrupt handling follows. For this example the second RS232serial line of the MVME133XT board is used (available through the P2 connector).The assembler routine ISRREAD is activated each time a character is-received on thatline. ISRREAD calls interrupt entry char-entry of TASK terminalin. terminalinuses TASK terminal-out to output each character read.The terminal should be set up for XON/XOFF (not CTS/RTS) flow control.

WITH system.privileged-operations.text.io;

USE privileged-operations.textio;

PROCEDURE terminal IS

PRAGMA priority (2);

PROCEDURE setup.scc;PRAGMA interface (assembler, setup.scc);PRAGMA external-name ("SETUPSCC", setup-scc);

PROCEDURE isr.read;PRAGMA interface (assembler, isr-read);PRAGMA external...nae ("ISRREAD". isr-read);

SYSTEAM Ada System - User Manual 143

Page 57: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

Appendix F: Representation Clauses Chapter 16

END LOOP;END terminal-out;

BEGINsetup-..CC;

def ine..interrupt-.service-.routin.(isr-.read'address. 16#80#)..

END terminal;

The following assembler routines also belong to the example:

typlang equ 0attrrev equ $8000

psect terminal .typlang.attrrev.0.0,0

sc-cb-.rro equ $FFFAOO0Osccb-.wro *qu $FFFAOOOOsccb-.rdr equ SFFFA0001sccb-.tdr equ $FFFA0001

SETUP...SCC:move.b #$30.Csccb-.wro).l - clear receiver error statusmove.b #$l0.(sccb-.wro).l -- clear external status interruptsmove.b #S09.(sccb-.wro).l W- R 9 -

move.b #$40,Csccb-.wro).l -- reset channel A kr B, disable IRs

move.b #$OA,(sccb-.wro).l W- R 10move.b #$00.Csccb-.wro).l K- RZ formatmove.b #$OE,(sccb-.wro).l *- R 14move.b *$82.(sccb...wro).l *-source-BR generator, RTXC input

*-disable BR generatormove.b #$04.(sccb..wro).l - WR 4move.b *$44.Csccb-.wro).l *-clck mode-x16.1 stop bit,no paritymove.b #$03.(sccb-.wro).l -- WR 3move.b *$C1,Csccb..wro).l -- 8 bits, enable receivermove.b #$05.(sccb-..ro).l *- R 5move.b *SEA.Csccb-.wro).l -- DTRtkRTS~on,8 bitscriable trarxsmtrmove.b #$OC.(sccb-.wro).1 - WR 12move.b #$02.(sccb-.wro).l -- lower byte of time conit (9800 Bd)move-b *SODCsccb-w.ro).l a- R 13move.b #$00.(sccb-.wro).l -- upper byte of time const (9800 Bd)move.b #S03.(sccb-.wro).l a- R 11move.b #$56.Csccb-.wro).l a- xCloclc-TxClock-ThxClockuBR output

a--Th~xC output

SYSTEAM Ad& System - User Manual 145

Page 58: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

Appendix F: Input-Output Chapter 17

17 Appendix F: Input-Output

In this chapter we follow the section numbering of Chapter 14 of the LRM and providenotes for the use of the features described in each section.

17.1 External Files and File Objects

The implementation only supports the files standard-input and standard-outputof PACKAGE text'_io. Any attempt to create or open a file raises the exception use-error.

17.2 Sequential and Direct Files

Sequential and direct files are not supported.

17.3 Text Input-Output

standard-input and standard-output are associated with the RS232 serial port ofthe target.

If the Minimal Target Kernel is used, then this serial port is used and all data ofstandard-output is directly written to this port and all data of standard-input isdirectly read from this port.

If the XTBS or XSDB Target Kernel is used, see the corresponding user manual for

the behaviour of the text input/output.

For tasking aspects of I/O operations see Chapter 14.

For further details on the I/O implementation within the Target Kernel see Chapter19.

SYSTEAM Ada System - User Manual 147

Page 59: REPORT A A270 AD-A257 074reep. - Defense Technical ... · PDF filePublic reporting burden for this collection of infomation is estimated to average 1 hourr AD-A257 074reep. ... MC68020

Appendix F: Input-Output Chapter 17

17.5 Low Level Input-Output

We give here the specification of the package low-level-io:

PACKAGE low-level-io IS

TYPE device-type IS (null-device);

TYPE datat-ype ISRECORD

NULL;END RECORD;

PROCEDURE send-control (device : device-type;data : IN OUT data-type);

PROCEDURE receive-control (device : device-type;data : IN OUT data-type);

END low-level-io;

Note that the enumeration type device-type has only one enumeration value, null- _device; thus the procedures send-control and receive-control can be called, but

- send.control will have no.effect-on any. physical device-.and the value of the actual _parameter data after a call of receive-control will have no physical significance.

SYSTEAM Ada System - User Manual 149