Automatic generation of fortran 90 interfaces to fortran 77 code
First Claim
Patent Images
1. A method performed in a data processing system, the method comprising:
- generating a Fortran 77 interface file from Fortran 77 source code by invoking an interface generator, wherein the interface generator scans the Fortran 77 source code and creates an interface file for a subprogram contained in the Fortran 77 source code;
adding a code-generator statement to the interface file, wherein the code-generator statement includes a comment describing how to generate a value for a given parameter if the value for the parameter is missing;
invoking a stub generator, wherein the stub generator reads the interface file and generates a stub routine using the code-generator statement; and
compiling the stub routine.
1 Assignment
0 Petitions
Accused Products
Abstract
In accordance with methods and systems consistent with the present invention, a system that automatically generates Fortran 90 interfaces to Fortran 77 code is provided. These interfaces provide for the use of optional parameters and, because they are written in Fortran 90, also allow for parameter checking. These interfaces are automatically generated to allow a programmer to reap the benefits of Fortran 90 calling without having to rewrite the Fortran 77 underlying code.
139 Citations
8 Claims
-
1. A method performed in a data processing system, the method comprising:
-
generating a Fortran 77 interface file from Fortran 77 source code by invoking an interface generator, wherein the interface generator scans the Fortran 77 source code and creates an interface file for a subprogram contained in the Fortran 77 source code;
adding a code-generator statement to the interface file, wherein the code-generator statement includes a comment describing how to generate a value for a given parameter if the value for the parameter is missing;
invoking a stub generator, wherein the stub generator reads the interface file and generates a stub routine using the code-generator statement; and
compiling the stub routine. - View Dependent Claims (2)
linking the stub routine into Fortran 90 source code to enable its invocation from Fortran 90 source code.
-
-
3. A method performed in a data processing system, the method comprising:
-
selecting a subprogram from Fortran 77 source code;
creating an interface file for the subprogram;
generating a definition for the subprogram;
determining whether more than a maximum number of stub routines could be generated by determining each possible legal combination of parameters used by the subprogram, and when more than a maximum number of stub routines could be generated, providing an option to a user of editing the stub routines after the interface generator completes its processing; and
inserting a code-generator statement for each legal combination of parameters into the interface file indicating the stub routines that should be generated. - View Dependent Claims (4)
generating the stub routines using the code-generator statements; and
linking the stub routines into Fortran 90 source code to enable their invocation from the Fortran 90 source code.
-
-
5. A computer-readable medium containing instructions for controlling a data processing system to perform a method comprising the steps of:
-
generating a Fortran 77 interface file from Fortran 77 source code by invoking an interface generator, wherein the interface generator scans the Fortran 77 source code and creates an interface file for a subprogram contained in the Fortran 77 source code;
adding a code-generator statement to the interface file, wherein the code-generator statement includes a comment describing how to generate a value for a given parameter if the value for the parameter is missing;
invoking a stub generator, wherein the stub generator reads the interface file and generates a stub routine using the code-generator statement; and
compiling the stub routine. - View Dependent Claims (6)
linking the stub routine into Fortran 90 source code to enable its invocation from Fortran 90 source code.
-
-
7. A computer-readable medium containing instructions for controlling a data processing system to perform a method comprising the steps of:
-
selecting a subprogram from Fortran 77 source code;
creating an interface file for the subprogram;
generating a definition for the subprogram;
determining whether more than a maximum number of stub routines could be generated by determining each possible legal combination of parameters used by the subprogram and when more than a maximum number of stub routines could be generated, providing an option to a user of editing the stub routines after the interface generator completes its processing; and
inserting a code-generator statement for each legal combination of parameters into the interface file indicating the stub routines that should be generated. - View Dependent Claims (8)
generating the stub routines using the code-generator statements; and
linking the stub routines into Fortran 90 source code to enable their invocation from the Fortran 90 source code.
-
Specification