Avoiding gather and scatter when calling Fortran 77 code...

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

C717S151000, C717S152000, C709S241000, C709S241000, C703S023000, C703S026000, C703S027000

Reexamination Certificate

active

06647546

ABSTRACT:

FIELD OF THE INVENTION
The present invention relates generally to data processing systems and, more particularly, to avoiding gather and scatter when calling Fortran 77 code from Fortran 90 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. Furthermore, when generating the interfaces, methods and systems consistent with the present invention perform an optimization that both saves a significant amount of processing time and saves memory.
In accordance with an implementation consistent with the present invention, a method is provided in a data processing system containing a subprogram written in a first programming language. The subprogram receives a parameter in a form suitable for the first programming language. and converts the parameter to a form suitable for a second programming language that is different from the first programming language. The form suitable for the second programming language prevents a compiler from generating code to gather the parameter when the subprogram is compiled by the compiler. Furthermore, the subprogram invokes another subprogram written in the second programming language and passes the parameter in the form suitable for the second programming language.
In another implementation, a method is provided in a data processing system containing a program written in a first programming language. The program expresses a parameter written in a form suitable for the first programming language in a form suitable for a second programming language that is different from the first programming language. The form suitable for the second programming language prevents a compiler during compilation from generating code to gather the parameter. Furthermore, the program invokes code written in the second programming language using the parameter in the form suitable to the second programming language.
In yet another implementation, a computer-readable memory device is provided that is encoded with a program written in a first programming language. that passes first arrays as arguments by specifying dope vectors for the first arrays. The computer-readable memory device is also encoded with a subprogram written in a second programming language that receives second arrays as arguments by the arguments referring to memory addresses of the second arrays, wherein the program passes a passed array as a parameter to the subprogram by specifying a reference to a memory address of the passed array.


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: 5179702 (1993-01-01), Spix et al.
patent: 5274813 (1993-12-01), Itoh
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: 5553235 (1996-09-01), Chen et al.
patent: 5613063 (1997-03-01), Eustace et al.
patent: 5636374 (1997-06-01), Rodgers et al.
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: 5742793 (1998-04-01), Sturges et al.
patent: 5745897 (1998-04-01), Perkins et al.
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-01), Whitten
patent: 5835705 (1998-11-01), Larsen et al.
patent: 5850554 (1998-12-01), Carver
patent: 5860024 (1999-01-01), Kyle et al.
patent: 5864867 (1999-01-01), Krusche et al.
patent: 5867649 (1999-02-01), Larson
patent: 5872977 (1999-02-01), Thompson
patent: 5905488 (1999-05-01), Demers et al.
patent: 5905856 (1999-05-01), Ottensooser
patent: 5913223 (1999-06-01), Sheppard et al.
patent: 5920895 (1999-07-01), Perazzoli, Jr. et al.
patent: 5940616 (1999-08-01), Wang
patent: 5963975 (1999-10-01), Boyle et al.
patent: 5974536 (1999-10-01), Richardson
patent: 5978892 (1999-11-01), Noel et al.
patent: 5991708 (1999-11-01), Levine et al.
patent: 5991893 (1999-11-01), Snider
patent: 6006031 (1999-12-01), Andrews et al.
patent: 6009514 (1999-12-01), Henzinger et al.
patent: 6014517 (2000-01-01), Shagam et al.
patent: 6016474 (2000-01-01), Kim et al.
patent: 6018793 (2000-01-01), Rao
patent: 6023583 (2000-02-01), Honda
patent: 6044438 (2000-03-01), Olnowich
patent: 6049798 (2000-04-01), Bishop et al.
patent: 6052708 (2000-04-01), Flynn et al.
patent: 6055368 (2000-04-01), Kunioka
patent: 6065019 (2000-05-01), Ault et al.
patent: 6072951 (2000-06-01), Donovan et al.
patent: 6077312 (2000-06-01), Bates et al.
patent: 6081868 (2000-06-01), Brooks
patent: 6085029 (2000-07-01), Kolawa et al.
patent: 6098169 (2000-08-01), Ranganathan
patent: 6101325 (2000-08-01), Flaat
patent: 6101525 (2000-08-01), Hecker
patent: 6119198 (2000-09-01), Fromm
patent: 6125430 (2000-09-01), Noel et al.
patent: 6141692 (2000-10-01), Loewenstein et al.

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

Avoiding gather and scatter when calling Fortran 77 code... does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Avoiding gather and scatter when calling Fortran 77 code..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Avoiding gather and scatter when calling Fortran 77 code... will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-3155809

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