Automatic generation of fortran 90 interfaces to fortran 77...

Data processing: software development – installation – and managem – Software program development tool – Translation of code

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C719S310000

Reexamination Certificate

active

06802057

ABSTRACT:

FIELD OF THE INVENTION
The present invention relates generally to data processing systems and, more particularly, to the automatic generation of Fortran 90 interfaces to Fortran 77 code.
BACKGROUND OF THE INVENTION
Before 1990, programmers wrote enormous amounts of code in the Fortran 77 (F77) programming language, which is a fixed parameter language, meaning that each call to a particular subprogram (e.g., a subroutine or a function) contains the same list of parameters. For example, the subprogram SASUM (N, A, Inca) requires three parameters, each of which must be specified every time the subprogram is called. In this example, “N” indicates the length of A, “A” is an array pointer, and “Inca” indicates the stride of A, which is the relative offset within the array for each element to be operated upon. The SASUM subprogram sums the elements of array A at the Inca stride. Thus, for example, if the stride were 2, every second element (e.g., elements A[
1
], A[
3
], A[
5
], etc.) would be summed.
In 1990, the Fortran 90 (F90) language was developed as an improvement over the F77 language by providing a number of additional features, including optional parameters and parameter checking. The use of optional parameters allows a programmer to use different parameter lists to invoke the same subprogram. For example, the following three subprogram calls invoke the same subprogram, even though the number of parameters differs:
Total=SASUM (grades)
Total=SASUM (N, grades)
Total=SASUM (N, grades, Inca)
F90's parameter checking feature determines whether the types of the parameters are appropriate, whether the number of parameters in the parameter list is appropriate, and whether the shape of the parameters is appropriate. The “shape” of a parameter refers to the dimensionality of the parameter. For example, a two-dimensional array has a shape of 2D.
Although F90 provides a number of beneficial features, because there is so much existing code written in F77, it is cost prohibitive to rewrite all of the F77 code. Therefore, it is desirable to facilitate the use of F77 code from F90 code.
SUMMARY OF THE INVENTION
In accordance with methods and systems consistent with the present invention, a system that automatically generates F90 interfaces to F77 code is provided. These interfaces provide for the use of optional parameters and, because they are written in F90, also allow for parameter checking. These interfaces are automatically generated to allow a programmer to reap the benefits of F90 calling without having to rewrite the F77 underlying code.
In accordance with an implementation of methods consistent with the present invention, a method is provided in a data processing system that receives F77 source code and that automatically generates a F90 interface to the F77 source code.
In accordance with another implementation, a method is provided in a data processing system having source code with a subprogram having specified parameters. The method reads the source code, where the source code is written in a language where the specified parameters are required parameters such that a value for each specified parameter is required to be provided when the subprogram is invoked. Further, the method generates a stub routine that invokes the subprogram and that facilitates use of a missing value for at least one of the specified parameters.
In yet another implementation, a method is provided in a data processing system with a subprogram written in a fixed parameter language such that the subprogram has a required set of parameters requiring values when the subprogram is invoked. The method invokes a first stub routine with a first plurality of parameter values, the first stub routine using the first parameter values to generate the values for the required set of parameters and invoking the subprogram with the values for the required set of parameters. Further, the method invokes a second stub routine with a second plurality of parameter values, the second stub routine using the second parameter values to generate the values for the required set of parameters and invoking the subprogram with the values for the required set of parameters. The second parameter values have a different number than the first parameter values.
In accordance with an implementation of systems consistent with the present invention, a computer-readable memory device encoded with a program having instructions for execution by a processor is provided. The program comprises fixed parameter code with a subprogram having a plurality of required parameters requiring values at invocation. The program also comprises a stub routine that receives a set of parameter values and creates the values for the required parameters from the received set of parameter values to invoke the subprogram, where the received set of parameter values lacks at least one of the values for the required parameters.
In another implementation of systems consistent with the present invention, a data processing system is provided. This data processing system contains a storage device and a processor. The storage device comprises fixed parameter source code with a subprogram having a plurality of required parameters that require values when the subprogram is invoked and an interface generator that reads the subprogram and that generates an interface file with indications of characteristics of the required parameters. The storage device also comprises a stub generator that reads the interface file and that generates a plurality of stubs for the subprogram. Each of the stubs receives a set of parameter values, generates the parameters from the received set of parameter values, and invokes the subprogram with the values for the required parameters. The received set of parameter values for at least one of the stub routines lacks the value for at least one of the required parameters. The processor runs the interface generator and the stub generator.


REFERENCES:
patent: 4675832 (1987-06-01), Robinson et al.
patent: 4685082 (1987-08-01), Cheung et al.
patent: 4812996 (1989-03-01), Stubbs
patent: 5073851 (1991-12-01), Masterson et al.
patent: 5075847 (1991-12-01), Fromme
patent: 5079707 (1992-01-01), Bird et al.
patent: 5119465 (1992-06-01), Jack et al.
patent: 5146593 (1992-09-01), Brandle et al.
patent: 5168563 (1992-12-01), Shenoy et al.
patent: 5179702 (1993-01-01), Spix et al.
patent: 5274813 (1993-12-01), Itoh
patent: 5274821 (1993-12-01), Rouquie
patent: 5297274 (1994-03-01), Jackson
patent: 5301312 (1994-04-01), Christopher, Jr. et al.
patent: 5325499 (1994-06-01), Kummer et al.
patent: 5325533 (1994-06-01), McInerney et al.
patent: 5353401 (1994-10-01), Iizawa et al.
patent: 5390314 (1995-02-01), Swanson
patent: 5438659 (1995-08-01), Notess et al.
patent: 5485619 (1996-01-01), Lai et al.
patent: 5499349 (1996-03-01), Nikhil et al.
patent: 5500881 (1996-03-01), Levin et al.
patent: 5519866 (1996-05-01), Lawrence et al.
patent: 5530816 (1996-06-01), Holt
patent: 5535393 (1996-07-01), Reeve et al.
patent: 5539907 (1996-07-01), Srivastava et al.
patent: 5553235 (1996-09-01), Chen et al.
patent: 5574922 (1996-11-01), James
patent: 5613063 (1997-03-01), Eustace et al.
patent: 5636374 (1997-06-01), Rodgers et al.
patent: 5640550 (1997-06-01), Coker
patent: 5673387 (1997-09-01), Chen et al.
patent: 5675790 (1997-10-01), Walls
patent: 5675802 (1997-10-01), Allen et al.
patent: 5689712 (1997-11-01), Heisch
patent: 5696937 (1997-12-01), White et al.
patent: 5710727 (1998-01-01), Mitchell et al.
patent: 5724262 (1998-03-01), Ghahramani
patent: 5737605 (1998-04-01), Cunningham et al.
patent: 5740431 (1998-04-01), Rail
patent: 5742793 (1998-04-01), Sturges et al.
patent: 5745897 (1998-04-01), Perkins et al.
patent: 5748892 (1998-05-01), Richardson
patent: 5748961 (1998-05-01), Hanna et al.
patent: 5761426 (1998-06-01), Ishizaki et al.
patent: 5774724 (1998-06-01), Heisch
patent: 5784698 (1998-07-01), Brady et al.
patent: 5787285 (1998-07-01), Lanning
patent: 5787480 (1998-07-01), Scales et al.
patent: 5805795 (1998-09

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Automatic generation of fortran 90 interfaces to fortran 77... does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Automatic generation of fortran 90 interfaces to fortran 77..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Automatic generation of fortran 90 interfaces to fortran 77... will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-3312674

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.