Method and apparatus for an automatic check of whether or not calling parameters correspond to called parameters during linkage operation
First Claim
1. A method for use in a language translating and linking system including a language translator for translating a plurality of source programs into object programs, respectively, a memorizing unit for storing said object programs as memorized object programs, and a linker for linking said memorized object programs to a load program, one of said source programs including a calling program while another of said source programs including a called program, said calling program passing control to said called program, said calling program having a first number of calling parameters, said called program having a second number of called parameters, each of said calling parameters having calling attribute which represents a data item containing information descriptive of each of said calling parameters, each of said called parameters having a called attribute which represents a data item containing information descriptive of each of said called parameters, said method comprising the steps of:
- extracting, in said language translator, said first number and said calling attributes from said calling program to generate first parameter information representing said first number and said calling attributes;
extracting, in said language translator, said second number and said called attributes from said called program to generate second parameter information representing said second number and said called attributes;
storing said first and said second parameter information in said memorizing unit as first and second output parameter information; and
comparing, in said linker, said first output parameter information with said second output parameter information to check whether or not said calling parameters correspond to said called parameters, respectively.
1 Assignment
0 Petitions
Accused Products
Abstract
In a language translating and linking system for translating and linking into a load program a plurality of source programs which include a calling program, having a first number of calling parameters, and a called program, having a second number of called parameters, the calling parameters must correspond to the respective called parameters. For this purpose, a compiler generates first and second parameter information representative of the calling and the called parameters from the calling and the called programs, respectively. A compiling unit memorizes the first and the second parameter information as first and second memorized parameter information. A linker compares the first memorized parameter information with the second memorized parameter information to check whether or not the calling parameters correspond to the respective called parameters. The first parameter information comprises the first number and attributes of the calling parameters while the second parameter information comprises the second number and attributes of the called parameters.
-
Citations
2 Claims
-
1. A method for use in a language translating and linking system including a language translator for translating a plurality of source programs into object programs, respectively, a memorizing unit for storing said object programs as memorized object programs, and a linker for linking said memorized object programs to a load program, one of said source programs including a calling program while another of said source programs including a called program, said calling program passing control to said called program, said calling program having a first number of calling parameters, said called program having a second number of called parameters, each of said calling parameters having calling attribute which represents a data item containing information descriptive of each of said calling parameters, each of said called parameters having a called attribute which represents a data item containing information descriptive of each of said called parameters, said method comprising the steps of:
-
extracting, in said language translator, said first number and said calling attributes from said calling program to generate first parameter information representing said first number and said calling attributes; extracting, in said language translator, said second number and said called attributes from said called program to generate second parameter information representing said second number and said called attributes; storing said first and said second parameter information in said memorizing unit as first and second output parameter information; and comparing, in said linker, said first output parameter information with said second output parameter information to check whether or not said calling parameters correspond to said called parameters, respectively.
-
-
2. A parameter checking apparatus for use in a language translating and linking system supplied with a plurality of source programs, said language translating and linking system including a language translator for translating said source programs into object programs, respectively, a memorizing unit for storing said object programs as memorized object programs, and a linker for linking said memorized object programs to a load program, one of said source programs including a calling program while another of said source programs including a called program, said calling program passing control to said called program, said calling program having a first number of calling parameters, said called program having a second number of called parameters, each of said calling parameters having a calling attribute which represents a data item containing information descriptive of each of said calling parameters, while each of said called parameters having a called attribute which represents a data item containing information descriptive of each of said called parameters, said parameter checking apparatus comprising:
-
extracting means, located in said language translator and supplied with said source programs, for extracting said first and second numbers and said calling and called attributes from said calling and called programs to generate first and second parameter information representing said first and second numbers and said calling and called attributes, respectively; memorizing means, located in said memorizing unit and coupled to said extracting means, for storing said first and said second parameter information as first and second output parameter information; and comprising means, located in said linker and coupled to said memorizing means, for comparing said first output parameter information with said second output parameter information to check whether or not said calling parameters correspond to said called parameters.
-
Specification