ACATS 3.0 User's Guide
5.5.5.2 Foreign Language Interface Tests
Annex B, Interface to Other Languages, is part of
the Ada core language. Any implementation that provides one or more of
the packages Interfaces.C, Interfaces.COBOL, or Interfaces.Fortran must
correctly process, and pass, the tests for interfaces to C, COBOL, and/or
Fortran code respectively, with the possible exception of tests containing
actual foreign code.
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.
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
If the implementation provides the package Interfaces.C,
the tests identified below must be satisfactorily processed as described
above.
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* | cxb3005 | cxb3010 | cxb3015 |
|
cxb3001 | cxb3006* | cxb3011 | cxb3016 |
|
cxb3002 | cxb3007 | cxb3012 | |
|
cxb3003 | cxb3008 | cxb3013* | |
|
cxb3004* | cxb3009 | cxb3014 | |
|
COBOL
Language Interface
If the implementation provides the package Interfaces.COBOL,
the tests identified below must be processed satisfactorily, as described
above.
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
If the implementation has a Fortran language interface,
the tests identified below must be processed satisfactorily, as described
above.
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* | | |
|