Device for outputting initial values of data statement at high speed by using a proper work area5734906Abstract A device which outputs initial values of a data statement corresponding to a source program that has been converted into an intermediate program. The intermediate program contains initial value data corresponding to the initial values of the data statement. A taking-out mechanism takes out the initial value data from the intermediate program. An initial value storing mechanism prepares an initial value storage table and sets the initial value data taken out by the taking-out mechanism in the initial value storage table. An object program output mechanism generates an object program based on the initial value data set in the initial value storage table. The initial value storing mechanism sets an iteration count of the initial values in the initial value storage table, and increases the iteration count in correspondence with the respective initial values so that the initial values can be stored in the initial value storage table. Claims What is claimed is: Description BACKGROUND OF THE INVENTION
______________________________________
Example: PROGRAM EXAMPLE 3
INTEGER A(10000000)
DATA A(I), I=1,10000000) /5000000*1,500000*2/
END
Example: PROGRAM EXAMPLE 4
INTEGER A(10000000)
DATA(A(I), A(101), A(132), A(1000), A(12345),
A(1000000) /1, 2, 3, 4, 5, 6/
END
______________________________________
The following example shows the case to serially give the initial values and the case to non-serially give the initial values. Array A gives the initial values serially while array B gives the initial values non-serially. In other words, in array B, the initial value "1" is assignment 500 times per 1 every other one.
______________________________________
Example: PROGRAM EXAMPLE 5
INTEGER A(10000), B(1000)
DATA (A(I), I=1, 1000) /1000*1/
DATA (B(I), I=1, 1000, 2) /500*1/
END
______________________________________
In the description of the data statement using the DO implied list and the iteration count, the initial values with the same value are often serially output (to the serially assignment positions) as shown in array A in the above-mentioned example. On the other hand, by designating the incremental value till the next element to the DO implied list, as shown in array B in the above-mentioned example, the initial value can be output to the non-serial positions. However, it is generally known that the source program that is described to serially refer to the area is faster. On the basis of the above-mentioned idea, the first aspect of the invention prioritizes the case to serially give the initial values as mentioned above. The second aspect of the invention is intended to add the mechanism to reduce the number of initial value storage tables generated when the initial values are given non-serially at constant intervals. To reduce the required work area, it is necessary to reduce the number of initial value storage tables to be prepared. Therefore, as shown in FIG. 7, the initial value storage table 6 is made to be able to set the iteration count of initial value 6a. And as the initial values are given, 1 is added to the above-mentioned iteration count. By creating this kind of mechanism, a plurality of initial values can be saved in one initial value storage table 6. However, when the initial values are given non-serially at constant intervals, the above-mentioned mechanism requires a plurality of initial value storage tables. Thus, the initial value storage table is made to be able to set the length of space 6b. And, when the initial values are given non-serially at constant intervals, the length to which the initial values are not given is set to the length of space 6b. This will allow to store a plurality of initial values in one initial value storage table even when the initial values are given non-serially at constant intervals. This invention has reduced the number of initial value storage tables to be prepared on the basis of the above-mentioned principle. In the first aspect of the invention, the iteration count of initial value 6a is set to the initial value storage table 6, and the above-mentioned iteration count is made to increase in response to the number of initial values. Thus, when the initial values are given serially, a plurality of initial values can be saved in one initial value storage table 6, and the work area in giving the initial value can be made smaller, and the time to output the initial values to the object file can be reduced. In the second aspect of the invention, since the length of space 6b is set to the above-mentioned initial value storage table 6 in the first aspect of the invention, the same effect as that of the first aspect of the invention can be obtained and a plurality of initial values can be saved in one initial value storage table when the initial values are set with constant intervals of space. In the third aspect of the invention, since the means 8 to retain the head and end pointers which indicate the head and end positions of initial value storage table 6 is created, and the above-mentioned head and end pointers are renewed in inserting at or adding the prepared storage table to the head or end of the chain of the storage tables, the re-alignment of the tables can be omitted. In the fourth aspect of the invention, since the means 9 to change or divide the initial value storage table 6 is created in the first, second or third aspect of the invention, it is possible to respond to the a plurality of setting of initial values in the same area. FIG. 8 shows the configuration of the compiler which is the subject of this invention. In the Figure, 11 is the file which stores the source program subject to compilation; 12 is the source program analyzing means to analyze the structure of the source program and generate the intermediate program; and 13 is the file to store the intermediate program generated. 14 is the device to output the initial values of the data statement which is the subject of this invention; 14a is the initial value data take-out means to calculate the initial value assignment position and take out the value and length of the initial values; 14b is the means to store the initial values which prepare the storage table and sets the values according to the method to be explained later; 14c is the means to generate and output the object program on the basis of initial value storage table generated by the initial value storage means. 15 is the object program storage file to store the object program generated. Next, the embodiment of this invention of initial value storage table prepared by the above-mentioned device to output the initial values of the data statement 14 is explained. This invention uses the expansion of the second method of the above-mentioned conventional technology. FIG. 9 shows the first embodiment of this invention. In the first embodiment of this invention, the following information is added to the initial value storage table as shown in FIG. 9 to solve the problems of the above-mentioned second method. The pointers to the head and end of the chained initial value storage tables are also prepared. (1) Chain of the tables; (2) Pointer to the initial value; (3) Initial value assignment position; (4) Length of initial value (5) Number of repetition of initial value In order to reduce the number of initial value storage tables, the serial initial values are expressed in one initial value storage table. For example, in the following program example, the serial initial values are saved as shown in FIG. 10.
______________________________________
Example: PROGRAM EXAMPLE 6
INTEGER A(10)
DATA A(3), A(4), A(2) /3*1/
______________________________________
In the above example, first of all, the storage table is newly created, the address to the initial value "1" is set to the pointer to the initial value (2), and the address 8 is set to the initial value assignment position (3). In other words, assuming that one word is 4 bytes and A(1) is the address 0, A(1) is the addresses 0-3 and A(2) is the addresses 4-7, and A(3) is the addresses 8-11. The length of initial value (4) is set to the length of initial value 4 (bytes) and the iteration count of initial value (5) is set to 1 (Refer to FIG. 10 (a).) Then, when the initial value "1" is given to A(4), this initial values are serial to the first initial value to the positive direction (in the assignment order), and their lengths and values are equal. (How to give the initial value in this way is hereafter called "to give the initial value serially to the positive direction".) In this case, in order to store the initial value, it is sufficient to add 1 to the iteration count (5) of initial value storage table generated first (FIG. 10 (a)). Therefore, the initial value storage table becomes as shown in FIG. 10 (b). Then, when the initial value "1" is given to A(2), the initial values are serial to the first initial value to the negative direction, and has the same length and value. (How to give the initial value in this way is hereafter called "to give the initial value serially to the negative direction".) In this case, to store the initial value, it is sufficient to add 1 to the iteration count (5) of initial value storage table generated first and deduct the length of initial value from the initial value assignment position (3), i.e., 4. Therefore, the initial value storage table becomes as shown in FIG. 10 (c). In other words, the initial value storage tables are accumulated in the following procedure. (1) When there is no existing initial value storage table: Prepare a new storage table, set the pointer to the initial value (2), the initial value assignment position (3), the length of initial value (4), and the iteration count of initial value (5) (1 because of the new initial value) to the storage table generated. Because the chain of table (1) is the first one, the setting is empty. Also set the head and end pointers to the initial value storage table. (2) When there is an existing initial value storage table and if the assignment position of the given initial value is greater than the end assignment position of the storage table indicated by the end pointer (assignment position+length.times.the iteration count), prepare a new storage table, and add it to the end of the chain. And, renew the end pointer so that it will indicate the storage table added. (3) When there is an existing initial value storage table and if the assignment position of the given initial value is smaller than the end assignment position of the storage table indicated by the head pointer, prepare a new storage table, and insert it at the head of the chain. And, renew the head pointer so that it will indicate the storage table inserted. (4) When there is an existing initial value storage table, check whether there is "the storage table which gives the initial values serially to the positive direction" or "the storage table which gives the initial values serially to the negative direction". 4)-1 When there is "the storage table which gives the initial value serially to the positive direction" among the storage tables chained, add 1 to the iteration count of the storage table. 4)-2 When there is "the storage table which gives the initial values serially to the negative direction" among the storage tables chained, add 1 to the iteration count of the storage table, and deduct the length of initial value from the assignment position. (5) When the initial value settings are overlapped in the same area, change the initial value storage table by renewing the information of initial value storage table or dividing one initial value storage table into a plurality of initial value storage tables as needed. (6) When there is no "storage table which gives the initial values serially to the positive or direction", prepare a new initial value storage table and make it chained in such a way that the initial value assignment position would be in the ascending order. FIG. 11 through 13 show the flow charts to indicate the processing in this embodiment. The above-mentioned embodiment is explained in these figures. Clear the head and end pointers to the initial value storage table in step S1. Take out the initial values from the intermediate program in step S2, and judge whether there is an existing initial value storage table in step S3. When there is no existing initial value storage table, go to step S6, and prepare a new storage table. And, set the initial value assignment position ((3) of FIG. 10), the length ((4) of FIG. 10), the iteration count ((5) of FIG..10), and the pointer to the initial value (2) of FIG. 10), to the storage table prepared. Since the chain of the table (1) is the first one, the setting is empty. And, set the head and end pointers to the initial value storage table, and go to step S15 in FIG. 13. If there is an existing initial value storage table in step S3, go to step S4, and judge whether the assignment position of the given initial value is larger than the end assignment position of the initial value of the storage table indicated by the end pointer. If yes in step S4, go to step S5, prepare a new storage table, and add it to the end of the chain. Renew the storage table so that the storage table to which the end pointer is added would be indicated, and go to step S15 of FIG. 13. In step S4, when the assignment position of the given initial value is not greater than the end assignment position of initial value in the storage table indicated by the end pointer, go to step S7 in FIG. 12, judge whether the assignment position of the given initial value is smaller than the assignment position of the initial value in the storage table indicated by the head pointer, and if it is smaller, go to step S8, prepare a new storage table, set the information, and insert it at the head of the chain. And, renew the head pointer so that it indicates the inserted storage table, and go to step S15 of FIG. 13. In step S7, when the assignment position of the given initial value is not smaller than the initial value assignment position in the storage table indicated by the head pointer, go to step S9, judge whether there is "the storage table which gives the initial values serially to the positive direction" among the chained storage tables, and if there is one, go to step S10, add 1 to the iteration count, and go to step S15 in FIG. 13. In step S9, when there is no "storage table which gives the initial values serially to the positive direction" among the chained storage tables, go to step S11, judge whether there is "the storage table which gives the initial values serially to the negative direction" among the chained storage tables, and if there is one, go to step S12, add 1 to the iteration count, deduct the length of initial value from the assignment position, and go to step S15 in FIG. 13. In step S11, when there is no "storage table which gives the initial values serially to the negative direction" among the chained storage tables, go to step S13 in FIG. 13, and judge whether there are the storage table having the overlapping areas among the storage tables. If there is none, go to step S14, prepare a new storage table, set the information, and chain the initial value assignment position in such a way that it would be in the ascending order, and go to step S15. If there are the storage tables having the overlapping areas among the storage tables in step S13, to to step 16 and change the initial value storage table by renewing the information on the initial value storage table or dividing one initial value storage table into a plurality of initial value storage tables, and go to step S15. In step S15, judge whether there is the next initial value setting; If there is the next initial value setting, return to step S2 in FIG. 11, and repeat the above-mentioned processing. If there is no next initial value setting, end the procedure. In this embodiment, the number of initial value storage tables to be prepared can be reduced as mentioned above. As there are the head and end pointers indicating the positions of initial value storage table, the time to store the initial value can be shortened. This embodiment can respond to not only the source program described in such a way to give the initial values serially, but also to the case when the initial values are given non-serially. When the value other than 1 is described in the incremental value of the DO implied list of the data statement, the position of initial value often increase to the positive direction or decrease to the negative direction non-serially. In such a case, it is sufficient to insert the initial value storage table at the end or head, and there is no need of the operation to re-align them in the ascending order. For example, in the following program example, the initial values are given non-serially in array A, but is increasing to the positive direction. In array B, the initial values are given non-serially, but is decreasing to the negative direction.
______________________________________
Example: PROGRAM EXAMPLE 7
INTEGER A(1000), B(1000)
DATA (A(I), I=1,1000,2) /500*1/
DATA (B(I), I=1000,1,-2) /500*1/
END
______________________________________
In the case of the above-mentioned example, there is no need to re-align the initial value storage tables in the ascending order in generating them. It is sufficient to insert the initial value storage table at the end in array A, and at the head in array B, and there is no need to re-align them. FIG. 14 shows the example of saving the initial values according to the initial value storage table in the following program example.
______________________________________
Example: PROGRAM EXAMPLE 8
INTEGER A(1000), B(1000)
DATA A/100*1/
DATA (B(I), I=1,1000,2) /500*2/
END
______________________________________
In FIG. 14, (a) saves the initial value of array A. The chained storage tables (500 tables) in (b) store the initial values in array B. In the initial value setting of array A, one initial value storage table (20 bytes) is made as shown in the Figure. In the case of array B, 500 storage tables are made, and it is sufficient to add them to the end without the need to re-align them. As mentioned above, in this embodiment, the following effects can be obtained. (a) Since the initial value storage table has the iteration count, the work area can be significantly reduced compared to the conventional ones. For example, when the initial values are given to array A in the above-mentioned PROGRAM EXAMPLE 8, the work area of minimum 4000 bytes is required in the conventional technology as mentioned above in (1). When the additional information is to be prepared as shown in FIG. 5, additional 500 bytes are required as the additional information. In the conventional technology in the above-mentioned (2), assuming that the size of one table is 12 bytes, the work area of 12.times.1000 bytes is required. Against this, according to the above-mentioned embodiment, it is sufficient to use the size of one initial value storage table, i.e., the work area of 20 bytes. (b) This embodiment does not require the time to re-align the storage tables. For example, in array A of the above-mentioned PROGRAM EXAMPLE 8, while the conventional technology in the above-mentioned (1) and this embodiment do not require re-alignment, the conventional technology in (2) requires the time for re-alignment according to the generally known sorting algorithm. (c) In this embodiment, the time to output the initial values to the object file can be shortened. In other words, to output the initial value to the object file, it is necessary to refer to the work area where the initial values are saved. Since the work area to be referred to in this embodiment is small, the time to output the initial values to the object file can be shortened. For example, in array A of the above-mentioned PROGRAM EXAMPLE 8, the above-mentioned conventional technology (1) requires to refer to 4,000 bytes (+500 bytes if there is additional information) of the work area. The above-mentioned conventional technology (2) requires to refer to the length of initial value.times.the number of storage tables (4.times.1,000 bytes) as the work area. In this embodiment, it is sufficient to refer to the length of initial value.times.the number of storage tables (4.times.1 bytes). When the initial values are given non-serially as the initial values are given to array B in the above-mentioned PROGRAM EXAMPLE 8, this embodiment requires more work area than the conventional technology. In other words, in the above-mentioned conventional technology (1), the work area of 4,000 (+500) bytes is required as mentioned above. In the above-mentioned conventional technology (2), the work area of 12.times.500 bytes is required. This embodiment requires 20.times.500 bytes. In this way, setting the initial value per every other element is the most difficult case in this embodiment. However, in this embodiment, the proportion of the work area increasing from the conventional technology (1) is not large (in the conventional technology, half of the work area is wasted.), and the greater effect can be expected in other cases of setting the initial value. As for the time for re-aligning the storage table in the above case, the conventional technology (1) requires 0 time, the conventional technology (2) requires the number of times according to the generally known sorting algorithm. The re-alignment does not occur in this embodiment as the end pointer is set. As for the time to output the initial values to the object file in the above-mentioned case, the conventional technology (1) requires to refer to the work area of 4,000 bytes (+500 bytes). In the conventional technology (2) and this embodiment, it is sufficient to refer to the length of initial value.times.the number of storage tables (4.times.500 bytes). As mentioned above, in the case of setting the initial values in the above-mentioned array B, 500 initial value storage tables are created in the first embodiment. In view of the re-alignment time of the storage tables and the time to output the storage tables to the object file, sufficient effect can be expected compared to the conventional technology. However, when the initial values are set with constant intervals of space as mentioned in the above examples, the number of initial value storage tables can be reduced by improving the initial value storage tables as shown in the second embodiment. FIG. 15 shows the initial value storage table in the second embodiment of this invention. In the Figure, the information on the "length of space" is added to the initial value storage table as shown in FIG. 9. The information on the "length of space" shows the length of area to which the initial values are not given. For example, when the initial values are set with constant intervals of space as the initial values in array B of the following program example, one initial value storage table is created as shown in FIG. 16.
______________________________________
Example: PROGRAM EXAMPLE 9
INTEGER B(1000)
DATA (B(I), I=1,1000,2) /500*2/
END
______________________________________
In this embodiment, the following algorithm is added to the first embodiment to reduce the number of initial value storage tables. For example, assume that INTEGER B(10) is declared and the initial values are first given to B(3). In this case, as shown in FIG. 17, generate a new storage table, set the address to the initial value "2" to the pointer to the initial value (2), set the address 8 (B(1) is the address 0) to the initial value assignment position (3), set 4 to the length of initial value (4), set 1 to the iteration count of initial value (5), and set 0 to the length of space (6). (Refer to FIG. 17 (a).) When the initial value "1" is given to B(5) subsequently, this initial value has the space of a certain length from the first initial value assignment position, and has the equal length and value. In this case, in order to store the initial value, add 1 to the iteration count (5) of initial value storage table first generated, and set 4 to the length of space (6), as shown in FIG. 17 (b). If the space is open to the negative direction, deduct (the length of initial value+the length of space) from the initial value assignment position (3). (How to give the initial values in this way is hereafter called "giving the initial values with a certain length of space open".) When the initial values are given to B(7) subsequently, it has the space open with constant intervals to the positive direction of the previous initial value, and has the equal length and value. In this case, in order to store the initial value, it is sufficient to add 1 to the iteration count (5) of initial value storage table first generated, as shown in FIG. 11 (c). (How to give the initial values in this way is hereafter called "giving the initial value with constant intervals of space to the positive direction".) When the initial value 1 is given to B(1) subsequently, it has the space open with constant intervals to the negative direction of the previous initial value, and has the equal length and value. (How to give the initial values in this way is hereafter called "giving the initial values with constant intervals of space to the negative direction".) In this case, in order to store the initial value, it is sufficient to add 1 to the iteration count (5) of initial value storage table first generated, and deduct (the length of initial value+the length of space) from the initial value assignment position (3), as shown in FIG. 17 (d). In other words, the initial value storage tables are accumulated in the following procedure in this embodiment. (1) When there is no existing initial value storage table: Prepare a new storage table, set the pointer to the initial value (2), the initial value assignment position (3), the length of initial value (4), the iteration count of initial value (5) (1 as it is new), and the length of space (6) (0 first) to the storage table prepared. Since the chain of table (1) is the first one, the setting is empty. Also set the head and end pointers to the initial value storage table. (2) When there is an existing initial value storage table, and if the assignment position of the given initial value is larger than the end assignment position of initial value of the storage table indicated by the end pointer (assignment position+(the length of initial value+the length of space).times.the iteration count), conduct one of the following processing: (2)-1 When "the initial values are given with a certain length of space open" against the storage table indicated by the end pointer, add 1 to the iteration count and set the length of space. (2)-2 When "the initial values are given with constant intervals of space open to the positive direction" against the storage table indicated by the end pointer, add 1 to the iteration count. (2)-3 In other cases, prepare a new storage table, and add it to the end of the chain. And, renew it so that it would indicate the storage table to which the end pointer is added. (3) When there is an existing storage table, and the assignment position of the given initial value is smaller than the initial value assignment position of initial value in the storage table, conduct one of the following processing: (3)-1 When "the initial values are given with a certain length of space open" against the storage table indicated by the head pointer, add 1 to the iteration count, set the length of space, and deduct (the length of initial value+the length of space) from the initial value-assignment position. (3)-2 When "the initial values are given with a constant intervals of space open to the positive direction" against the storage table indicated by the head pointer, add 1 to the iteration count, and deduct (the length of initial value+the length of space) from the initial value assignment position. (3)-3 In other cases, prepare a new storage table, and insert it at the head of the chain. And, renew it so that it would indicate the storage table into which the head pointer is inserted. (4) When there is an existing storage table, check whether there is "the one in which the initial values are serially given to the positive or negative direction", "the one in which the initial values are given with a certain length of space open", or "the one in which the initial values are given with a certain length of space open to the positive or negative position". (4)-1 When there is "the one in which the initial values are serially given to the positive direction", add 1 to the iteration count of the storage table. (4)-2 When there is "the one in which the initial values are serially given to the negative direction", add 1 to the iteration count of the storage table, and deduct the length of initial value from the assignment position. (4)-3 When here is "the one in which the initial values are given with a certain length of space open", add 1 to the iteration count of the storage table, set the length of space, and deduct (the length of initial value+the length of space) from the initial value assignment position, if it is open to the negative direction. (4)-4 When there is "the one in which the initial values are given with constant intervals of space open to the positive position", add 1 to the iteration count of the storage table. (4)-5 When there is "the one in which the initial values are given with constant intervals of space open to the negative position", add 1 to the iteration count of the storage table, and deduct (the length of initial value+the length of space) from the initial value-assignment position. (5) When the initial value settings are overlapped in the same area, change the initial value storage table by changing the information of initial value storage table or dividing one initial value storage table into a plurality of initial value storage tables as needed. (6) When there is not "the one which the initial values are serially given to the positive or negative position", nor "the one in which the initial values are given with a certain length of space open", nor "the one in which the initial values are given with constant intervals of space open to the positive or negative position", prepare a new storage table, chain it so that the initial value assignment positions would be in the ascending order. FIG. 18 through FIG. 23 show the flow chart indicating processing of this embodiment. The above-mentioned embodiment is explained by using these figures. In step T1, clear the head and end pointers in the initial value storage table. In step T2, take out the initial values from the intermediate program. In step T3, judge whether there are existing initial value storage tables. When there is no existing initial value storage table, go to step T4, and create a new initial value storage table. And, set the initial value assignment position (3) of FIG. 15), length ((4) of FIG. 15), the iteration count ((5) of FIG. 15), the length of space ((6) of FIG. 15), and the pointer to the initial value ((2) of FIG. 15) on the storage table prepared. Since the chain of tables (1) is the first one, the setting is empty. Also set the head and end pointers to the initial value storage table and go to step T22 in FIG. 21. When there are existing initial value storage tables, go to step T5, judge whether the assignment position of the given initial value is larger than the end assignment position of initial value of the storage table indicated by the end pointer (assignment position (the length of initial value+the length of space).times.the iteration count). If it is larger, go to step T6, and conduct processing for the case which is larger than the end assignment position as explained later in FIG. 22, and go to step T22 in FIG. 21. When the assignment position of the given initial value is not larger than the end assignment position of initial value of the storage table indicated by the end pointer in step T5, go to step T7 in FIG. 19, and judge whether the assignment position of the given initial value is smaller than the assignment position of initial value of the storage table indicated by the head pointer. If it is smaller, go to step T8, and conduct processing for the case where it is smaller than the head assignment position to be explained later in FIG. 23, and go to step T22 in FIG. 21. When the assignment position of the given initial value is not smaller than the assignment position of initial value of the storage table indicated by the head pointer in step T7, go to step T9, and judge whether there is "the one in which the initial values are serially given to the negative direction" among the storage tables chained. If there is one, go to step T10, add 1 to the iteration count, and go to step T22 in FIG. 21. When there is not the "one in which the initial values are serially given to the positive direction" among the storage tables chained in step T9, go to step T11, and judge whether there is the "one in which the initial values are serially given to the negative position" among the storage tables chained. If there is one, go to step T12, add 1 to the iteration count, deduct the length of initial value from the assignment position, and go to step T22 in FIG. 21. When there is not the "one in which the initial values are serially given to the negative direction" among the storage tables chained in step T11, go to step T13 of in FIG. 20, and judge whether there is the storage table which has a certain length of space open among the storage tables. If there is one, go to step T14, add 1 to the iteration count, set the length of space, deduct (the length of initial value+the length of space) from the assignment position if it is open to the negative direction, and go to step T22 in FIG. 21. When there is not "the storage table which has a certain length of space open" among the storage tables in step T13, go to step T15, and judge whether there is the storage table which has certain intervals of space open to the positive direction among the storage tables. If there is one, go to step T16, add 1 to the iteration count, and go to step T22 in FIG. 21. When there is not "the storage table which has constant intervals of space open to the positive direction" among the storage tables in step T15, go to step T17, and judge whether there is the storage table which has constant intervals of space open to the negative direction among the storage tables. If there is one, go to step T18 in FIG. 21, add 1 to the iteration count, deduct (the length of initial value+the length of space) from the initial value assignment position, and go to step T22. When there is not "the storage table which has constant intervals of space open to the negative direction" among the storage tables in step T17, go to step T19 in FIG. 21, and judge whether there are the storage tables which have the overlapping work area. If there is one, go to step T21, change the initial value storage table by renewing the information on the initial value storage table or dividing one initial value storage table into a plurality of initial value storage tables, and go to step S15. When there is no "storage table which has the overlapping work area" among the storage tables, create a new storage table, set the information, chain it so that the initial value assignment position would be in the ascending order, and go to step T22. It is determined whether there is the next initial value setting in step T22. If there is the next initial value setting, return to step T2 in FIG. 18, and repeat the above-mentioned processing. If there is no next initial value setting, end the procedure. FIG. 22 shows the flow chart indicating the processing when the assignment position is larger than the end assignment position in step T6 of FIG. 18. Judge whether there is the storage table which has a certain length of space open among the storage tables in step R1. If there is one, go to step R2, add 1 to the iteration count, set the length of space, and end the procedure. When there is no "storage table which has a certain length of space open" among the storage tables in step R1, go to step R3, and judge whether there is the storage table which has constant intervals of space open to the positive direction among the storage tables. If there is one, go to step R4, add 1 to the iteration count, and end the procedure. When there is no "storage table which has constant intervals of space open to the positive direction" among the storage tables in step R3, go to step R5, prepare a storage table, set the information, add it to the end of the chain, renew the end pointer, and end the procedure. FIG. 23 shows the flow chart which indicates the processing when the assignment position is smaller than the head assignment position in step T5. Judge whether there is a storage table with a certain length of space open among the storage tables in step Q1. If there is one, go to step Q2, and add 1 to the iteration count, set the length of space, deduct (the length of initial value+the length of space) from the initial value assignment position, and end the procedure. It is determined whether there is a storage table which has a certain interval of space open among the storage tables in step Q1. If there is none, go to step Q3, and judge whether there is a storage table which has constant intervals of space open to the negative direction among the storage tables. If there is one, go to step Q4, add 1 to the iteration count, deduct (the length of initial value+the length of space) from the initial value assignment position, and end the procedure. When there is no storage table which has a certain interval of space open to the negative direction among the storage tables in step Q3, go to step Q5, prepare the storage table, set the information, add it to the end of the chain, renew the head pointer, and end the procedure. As mentioned above, since the "length of space" is added to the initial value storage table in this embodiment, it can get the same effect as the above-mentioned first embodiment, and even when the initial values are set by opening constant intervals of space, the number of initial value storage tables can be reduced. As explained above, as the initial value storage table in this invention has the iteration count, it can remarkably reduce the work area compared to the conventional one. The time to output the initial value to the object file can be also shortened. By creating the head and end pointers to show the position of the initial value storage tables, the time to re-align the storage tables is no longer required. Furthermore, because of the initial value storage table having the length of space, a plurality of initial values can be saved into one initial value storage table even when the initial values are given non-serially at constant intervals. The work area can be remarkably reduced compared to the conventional one in the same manner as mentioned above. The time to output the initial values to the object file can be also reduced. The present invention is not limited to the specifically disclosed embodiments, and variations and modifications may be made without departing from the scope of the present invention.
|
Same subclass Same class Consider this |
||||||||||
