ACATS 4.1 User's Guide
5.5.5.2 Foreign Language Interface Tests
Annex B, Interface to Other Languages, is part of
the Ada core language. However, most of the features contained in it
are optional. In particular, if an implementation does not support an
optional feature in Annex B, then it must indicate the non-support by
rejecting the test at compile time or by raising an appropriate exception
at run time. (See Ada
B(2/3).)
ACATS tests expect that an implementation that provides
one or more of the packages Interfaces.C, Interfaces.COBOL, or Interfaces.Fortran
implements the entire interface as defined by
Annex
B. As such, ACATS testing procedures expect that the implementation
will correctly process, and pass, all of the tests for interfaces to
C, COBOL, and/or Fortran code respectively, with the possible exception
of tests containing actual foreign code. If an implementation provides
a partial implementation of one of the foreign language interfaces, special
handling of the test results will be needed. In particular, some or all
tests may fail by reporting an error on a line other than on marked with
N/A => ERROR or may fail at runtime. Such cases need to be described
to the ACAL and ACAA and will be handled on a case-by-case basis.
An implementation that provides one or more of these
Interfaces child packages must successfully compile the Ada units of
tests with actual foreign language code. If the implementation does not
support the actual binding of the foreign language code to Ada, these
tests may report binding errors, or may reject the pragma Import, in
which case they may be graded as inapplicable. If the implementation
supports the binding and an appropriate compiler is available, the tests
must execute and report "Passed". If the implementation supports
the binding, but it is not feasible to have an appropriate compiler available,
then the tests may be graded as inapplicable by demonstrating that they
fail to bind.
If one of the Interfaces child packages is not provided,
then the corresponding tests may be graded as inapplicable, provided
they reject the corresponding
with clause (see
D.1.15
(C),
D.1.18 (COBOL), and
D.1.19
(Fortran) for lists of tests that use the packages). Similarly, if a
convention identifier for one of these languages is not supported, then
the corresponding tests may be graded as inapplicable, provided they
reject the corresponding aspect or
pragma (see
D.1.12
(C),
D.1.13 (COBOL), and
D.1.14
(Fortran) for lists of tests containing each convention).
The tests involving interfaces to foreign code are
listed below.
The foreign language code included in ACATS tests
uses no special or unique features, and should be accepted by any standard
(C, COBOL, or Fortran) compiler. However, there may be dialect problems
that prevent the code from compiling correctly. Modifications to the
foreign language code are allowable; the modifications must follow the
code as supplied as closely as possible and the result must satisfy the
requirements stated in the file header. Such modifications must be approved
in advance by the ACAL (and, if necessary, the ACAA).
The method for compiling foreign code is implementation
dependent and not specified as part of the ACATS. Ada code in these tests
must be compiled as usual. The Ada code includes Pragma Import that references
the foreign language code. The link name of foreign language object code
must be provided in ImpDef. When all code has been compiled, the test
must be bound (including the foreign language object code) and run. The
method for binding Ada and foreign language code is implementation dependent
and not specified as part of the ACATS. The test must report "PASSED"
when executed.
C
Language Interface
The following tests check the C language interface;
the ACATS expects that all of the tests identified below will be satisfactorily
processed as described above if the C language interface is supported.
The starred tests contain C code that must be compiled
and linked if possible, as described above. The C code is easily identifiable
because the file has the extension .C. The C code may be modified
to satisfy dialect requirements of the C compiler. The C code files must
be compiled through a C compiler, and the resulting object code must
be bound with the compiled Ada code. Pragma Import will take the name
of the C code from ImpDef.
cd30005* | cxb3003 | cxb3010 | cxb3017* |
|
bxb3001 | cxb3004* | cxb3011 | cxb3018 |
|
bxb3002 | cxb3005 | cxb3012 | cxb3019 |
|
bxb3003 | cxb3006* | cxb3013* | cxb3020 |
|
bxb3004 | cxb3007 | cxb3014 | cxb3021 |
|
cxb3001 | cxb3008 | cxb3015 | cxb3022 |
|
cxb3002 | cxb3009 | cxb3016 | |
|
COBOL
Language Interface
The following tests check the COBOL language interface;
the ACATS expects that all of the tests identified below will be satisfactorily
processed as described above if the COBOL language interface is supported.
The starred test contains COBOL code that must be
compiled and linked if possible, as described above. The COBOL code is
easily identifiable because the file has the extension .CBL.
The COBOL code may be modified to satisfy dialect requirements of the
COBOL compiler. The COBOL code files must be compiled through a COBOL
compiler, and the resulting object code must be bound with the compiled
Ada code. Pragma Import will take the name of the COBOL code from ImpDef.
cxb4001 | cxb4004 | cxb4007 | |
|
cxb4002 | cxb4005 | cxb4008 | |
|
cxb4003 | cxb4006 | cxb4009* | |
|
Fortran
Language Interface
The following tests check the Fortran language interface;
the ACATS expects that all of the tests identified below will be satisfactorily
processed as described above if the Fortran language interface is supported.
The starred tests contain Fortran code that must
be compiled and linked if possible, as described above. The Fortran code
is easily identifiable because the file has the extension .FTN.
The Fortran code may be modified to satisfy dialect requirements of the
Fortran compiler. The Fortran code files must be compiled through a Fortran
compiler, and the resulting object code must be bound with the compiled
Ada code. Pragma Import will take the name of the Fortran code from ImpDef.
cxb5001 | cxb5003 | cxb5005* | |
|
cxb5002 | cxb5004* | | |
|