Predicting year-2000 instruction failures6253336Abstract Object-code instruction traces are employed to analyze selected instructions of an application program for possible failure when confronted by a year-2000 date. The analysis includes directly identifying one or more instructions of the application program that may fail, as well as identifying whether the one or more instructions have a characteristic of a predefined false-positive failure pattern. A failure-pattern descriptor is assigned to each examined instruction which is indicative of whether the instruction may fail when confronted by a date in the year-2000 range, and whether the instruction is a possible false-positive failing instruction. The analysis employs user-specifiable run-control values, as well as predetermined filter-specification values in comparing traces of each selected object-code instruction to predefined instruction failure patterns. Claims What is claimed is: Description TECHNICAL FIELD
TABLE 1
Id Qualifying Attributes Analysis
1AB p Some dates in the y2k and EOC Y2k failure aspects -
ranges (e.g., 00-04 and 51-99). already failing.
1AK p Some dates in y2k range, none in Y2k failure aspects -
EOC range. already failing.
1AF p No dates in y2k range, some in Future y2k failure if
EOC range. data progression
continues.
1B00p Compare instruction, YY filter, and Test may avoid a y2k
either op1 always 0 or problem (remediated
op 2 always 0. code) or may create one
(eliminate 00 as
leap year).
1B03p Compare instruction, YY filter, and YY <= 3? May
either op1 or op2 always 3. create a y2k problem
(eliminate 00 as
leap year).
1B3Yp Compare instruction, YY filter, and Seen in leap-year
either (op1 = always 0 and op2 determination, where
always <= 3) or the test is of module 4
(op2 = always 0 and a test for YY = 00
and op1 always <= 3). handles 00 as a special
case.
1C2Kp Compare, add, or subtract instruction; May indicate routine
YY filter; and either op1 or op2 already remediated with
always = Y2K-LIMIT. window.
1CDMp Compare instruction and either (op1 Seen in days-in-month
>= 28 and op1 <= 31) or calculations.
(op2 >= 28 and op2 <= 31).
1NECp Compare instruction and no values Seen in return-code
in the 80-99 decades. comparisons.
1LECp Compare instruction and <4% of the Seen in COBOL internal
values in the 80-99 decades. routines.
1S12p Subtract instruction and op1 always Seen in Gregorian month
<= 12 (MM) calculations.
1SDMp Subtract instruction and 28 <= op1 Seen in Gregorian day
<= 31 (DD) calculations.
1S31p Subtract instruction and op1 always Seen in Gregorian day
<= 31 (DD) calculations.
1SNNp Add or subtract instruction, op1 No y2k failures (yet).
decades 00-19 empty, no negative Seen in pointer.
results, and op2 = constant. calculations.
Or add instruction, op2 decades
00-19 empty, no negative results,
and op1 = constant.
1ZMMp Compare instruction, YY filter, and One value always 0, the
either (op1 = 0 and op2 <= 12) or other always <= 12.
(op2 = 0 and op1 <= 12). Seen in month
(MM) calculations.
2CEQp Compare instruction followed by BE Compare for equal.
or BNE, and not (catalog id = No y2k failure.
CY 00 or no catalog-id).
2KONp Compare, add, or subtract instruction; No year-2000 failure
both op1 and op2 constants. aspects now.
2N89p Add or subtract instruction, op1 de- No y2k failure aspects
cades 80-99 empty, no negative and no "YY" values
results, and op2 = constant. Or add above 80. Seen in seg-
instruction, op2 decades 80-99 menting calculations.
empty, no negative results, and
op1 = constant.
2CTAp Add instruction, YY filter, and either Seen in COBOL table-
op1 or op2 = a negative constant. referencing computa-
tions, but also may
be a y2k failure.
2S9CP Subtract instruction and: YY filter Find the nines
and op1 always 99. Julian filter and complement of a date.
op1 always 99999, or Gregorian filter No y2k failure.
and op1 always 999999.
3 No catalog identifier assigned. Few, if any, y2k failure
aspects.
Note:
A "p" at tbe end of an id stands for a letter that indicates how many
instruction instances passed the filter: A for all, H for more than 92%;
and L for more than 75%.
In view of the above, a post-processor in accordance with the present invention provides, via histograms of the year values actually taken by date variables, a planning tool that is useful in designing windowing solutions for the source code. For example, if the post-processor output for an application that is not yet faced with year-2000 dates shows that no date processed by the application falls before 1941, then YY=00-40 can be used to represent year-2000 dates. Another set of advantages of the present invention derive from its "ease of use" and scope: It runs as a normal TSO application on any IBM S/390 machine. Thus, many members of a remediation team can perform analysis runs at the same time. It permits the user to affect the analysis by setting run-time control values that reflect individual aspects of the application being tested. It assigns special flags that help to winnow out false positives instead of merely identifying instructions that seem to process date variables. This helps to expedite the analysis task that is left to the remediation team. It identifies failures associated with performing arithmetic or comparisons on full Julian and Gregorian variables, instead of merely focusing on two-digit year variables. Thus, a wider set of failures can be identified. It identifies failures in compare, subtract, add, and multiply instructions, as well as compare logical (CLC) instructions that compare zoned-decimal, packed-decimal, and binary operands. Again, a wider set of failures can be identified. FIG. 3 presents one embodiment of a post-processor 220 in accordance with the present invention. Processor 220 includes a first, filter routine 310 and a second, aggregation routine 320 as described hereinbelow. Filter program 310 processes one or more filters and compares the filters to all trace records of the trace file. A filter may look for an op code match, an operand length, an operand range, a date format or other tests, and generates therefrom input files 316, 318 which are used for the aggregation program 320. The aggregation program analyzes these files and aggregates statistics for each instruction (i.e., assuming multiple execution instances). Specifically, y2k analysis for each instruction is performed and reports are generated. By way of example, in one embodiment filter program 310 receives as input a FIL-FILE.DATA-IN file 312, as well as a FILTER.RUN-CTLS file 322, and a trace file 314 (as described above). The FIL-FILE.DATA-IN file and FILTER.RUN-CTLS file are described below. FIL-FlLE.DATA-IN The filter-input file contains filter specification records. For example, the fields in each filter might be as discussed below. RULE-ID and COMMENT: Bytes 2-17 AND 120-128 contain identifiers that are used in output files produced by the post-processor. FILTER FLAGS: Bytes 19-26 contain the hex representation of 32 flags that specify the filtering rules. The flags are summarized in Table 2 below. L1 LL and L1 UL: Bytes 28-29 and 31-32 contain decimal values that specify lower and upper limits on the lengths of first operands of compare logical (CLC) and decimal instructions. Instructions must have first operand lengths in this range in order to pass the filter. L2 LL and L2 UL: Bytes 34-35 and 37-38 contain decimal values that specify lower and upper limits, respectively, on the lengths of second operands of decimal instructions. Instructions must have second operand lengths in this range in order to pass the filter. OP1 LL and OP1 UL: Bytes 40-58 and 60-78 contain decimal values that specify lower and upper limits, respectively, on first operands. Instructions must have first-operand values in this range in order to pass the filter. OP2 LL and OP2 UL: Bytes 80-98 and 100-118 contain decimal values that specify lower and upper limits, respectively, on second operands. Instructions must have second-operand values in this range in order to pass the filter. Parameters set by the user can also affect the analysis produced by the post-processor. The parameters are placed into the input files. For example, FILTER.RUN-CTLS might comprise a control file that contains the following values. Y2K LIMIT: A decimal value (00-99) that defines a "y2k range." For example, using 04 causes YY values 00-04 to be recognized as representing 2000-04. EOC LIMIT: A decimal value (00-99) that defines an "end-of-century range." For example, if the dates in a database of interest are all after 1940, setting EOC to 41 causes YY values 41-99 to be recognized as representing 1941-99.
TABLE 2
Filter Flags. The eight FILTER FLAG bytes, numbered 1-8, contain
character representations for eight corresponding hex values. The valid
characters are 0-9 and A-F, representing hex values 0-15.
Byte Meaning
1 Filter type: indicates what type of instructions are passed by the
filter. The values and types are:
Value Filter type
0 Compare instructions
2 Multiply instructions
4 CLC instructions that compare decimal numbers
6 CLC instructions that compare binary numbers
8 Subtract instructions
C Add instructions
2 Unused, must be 0.
3 Value tests: specifies tests to be performed. The four bits in
the hex digit represented by the value-tests byte are divided
into two sets of two bits each. The high-order two bits of the
hex digit specify whether range testing, using the operand ranges
specified by the filter (see "FIL-FILE.DATA-IN"), is done.
The bit values are:
Value Range test
00 No operand range test is performed
01 Test operand ranges according to the order specified
by the filter.
11 Test ranges using both the indicated order and also
the reverse order.
The low-order two bits of the hex digit specify when date testing
is performed. The bit values are:
Value Date test
00 Test only operand 1 for dates.
01 Test only operand 2 for dates.
10 Test both operands for dates.
11 Test that one operand is a date, but the other is not.
4 Date format: indicates the format of the values that allow an
instruction to be passed by the filter. The values and formats are:
Value Date format
1 Two-digit years (YY)
2 Gregorian dates containing two-digit years (YYMMDD)
3 Julian dates containing two-digit years (YYDDD)
5 T/C selector: specifies whether true dates or nines-complement
dates are passed:
Value True or nines-complement date
0 Pass true dates only.
2 Pass nines complement dates only.
3 Pass both.
6 All-instructions flag.
Value Which instructions are tested
0 Instructions are tested according to the selector bits
in bytes 7 and 8.
1 All instructions corresponding to the filter type are
tested.
7 Instruction selectors: The four bits in tbe hex digit,
numbered 0-3 from left to right, are bit-significant
controls which are interpreted according to the filter type.
Bits 0 and 1 must be zero.
Bits 2 and 3 are:
For compare-type filters:
Bit 2 = 1 Test compare logical (CL) instructions
Bit 3 = 1 Test compare logical (CLR) instructions
For subtract-type filters:
Bit 2 = 1 Test subtract logical (SL) instructions
Bit 3 = 1 Test subtract logical (SLR) instructions
For add-type filters:
Bit 2 = 1 Test add logical (AL) instructions
Bit 3 = 1 Test add logical (ALR) instructions
The four bits must all be zero for the other filter types.
8 Instruction selectors: The four bits in the hex digit, numbered 0-3
from left to right, are bit-significant controls which are
interpreted
according to the filter type.
For multiply-type filters:
Bit 0 = 1 Test multiply decimal (MP) instructions
Bit 1 = 1 Test multiply (M) instructions
Bit 2 = 1 Test multiply (MR) instructions
Bit 3 = 1 Test multiply (MH) instructions
For compare-type filters:
Bit 0 = 1 Test compare decimal (CP) instructions
Bit 1 = 1 Test compare (C) instructions
Bit 2 = 1 Test compare (CR) instructions
Bit 3 = 1 TeSt compare (CH) instructions
For subtract-type filters:
Bit 0 = 1 Test subtract decimal (SP) instructions
Bit 1 = 1 Test subtract (S) instructions
Bit 2 = 1 Test subtract (SR) instructions
Bit 3 = 1 Test subtract (SH) instructions
For add-type filters:
Bit 0 = 1 Test add decimal (AP) instructions
Bit 1 = 1 Test add (A) instructions
Bit 2 = 1 Test add (AR) instructions
Bit 3 = 1 Test add (AH) instructions
For CLC-decimal-type filters:
Bit 0 Must be zero.
Bit 1 = 1 Test CLC instructions with packed-decimal
(PD) values
Bit 2 = 1 Test CLC instructions with zoned-decimal
(ZD) values
Bit 3 = 1 Test CLC instructions with values containing Julian
or Gregorian with imbedded separators (e.g.,
YY/MM/DD or YY-DDD).
Bits 0-3 must be zeros for CLC-binary-type filters.
Continuing with FIG. 3, and as noted, filter program 310 provides input files for aggregation program 320. These files, which are labeled pass-detail file 316 and pass-miss file 318, designate whether a given instruction passed at least one filter or missed all of the predefined filters applied against the trace file. This pass-detail file and pass-miss file comprise the base data which is then used by aggregation program 320 to generate the y2k analysis for each instruction. This y2k analysis produces, in one embodiment, a y2k-SUM.LISTING file 330 and a MIX-SUM.LISTING file 332. These files are discussed below using samples from a test run. This test run analyzed a COBOL program, called Suite 15, that contains a concentration of date-processing routines. Y2K-SUM.LISTING FIG. 7 shows a file in accordance with the present invention that contains summaries for instructions that process two-digit years (YY) and that have high y2k-failure potential. The display for the first instruction in the figure illustrates the summary contents: The load-module and CSECT names are both SUITE15. The instruction is at CSECT offset SF68 (hex). It is a CLC that passed some fitter in 30 instances; in one instance its inputs caused rejection by all of the filters. In 30 passing instances (96.8%), the instruction passed a filter that identifies comparisons of Gregorian dates. The inputs were true dates in packed decimal (PD) form. The catalog identifier assigned to the instruction for the filter is 1AB H (see Table 1). The operand-1 range for the passing instances is 000227 to 991230. 20% the YY parts of the dates are in the 00-99 decade, 17% are in the 40-49 decade, 7% are in the 60-69 decade, and 57% are in the 90-99 decade. In addition, 20% of the YY values are in the y2k range (00-04 for the run). The operand-2 range for the passing instances is 000227-950115. 60% of the YY values are in the 00-09 decade, with 3% in the 60-69 decade and 37% in the 90-99 decade. In addition, 60% of the YY values are in the y2k range. In 12 instances, the instruction compared a date in the y2k range to a date in the EOC range ("Y2K failures=12"). In 11 instances, both dates were in the EOC range ("Fut Y2k failures=11"), thus suggesting additional y2k failures if the date progression continues. The display for the second instruction shows: A subtract decimal (SP) instruction passed a filter that identifies subtractions from two-digit-years in each of its 31 instances. The catalog identifier for the instruction is 1AB A. The operand-1 range was 00-99. Operand 2 was always 1. In four instances, subtracting produced a negative result (.Y2K failures=4"). In 23 other instances, the date was in the EOC range, suggesting more failures if the date progression continues. The display for the third instruction in the figure shows: A multiply decimal (MP) instruction passed a filter that identifies multiplications of two-digit-years (YY) by 12, 365, or 36525 in each of its 31 instances. The catalog identifier for the instruction is 1AB A. The operand-1 range is 00-99. Operand 2 was always 36525. Six dates were in the y2k range ("Y2K failures=6"). And 23 were in the EOC range. The display for the last instruction shows: A CLC instruction passed a filter that identifies comparisons of two-digit years (YY) in each of its 46 instances. The YY values were in zoned-decimal (ZD) form. The catalog id assigned to the instruction for the filter is 1B00A, indicating a compare to zero. The operand-1 range is 00 to 99. In 15 cases, zero was compared to a date in the y2k range ("Y2K failures=15"). MIX-SUM. LISTING FIG. 8 shows a sample file in accordance with the present invention that contains summaries for instructions that might be processing two-digit years (YY), but that are cataloged as having a lesser year-2000 failure potential. These instructions are sometimes false positives. The catalog identifier for the first instruction in the figure, 2N89A, flags a subtract instruction that produced no negative results and processed no dates in the 80-99 decade. Neither current nor future year-2000 failures are suggested. The catalog identifier for the second instruction, 2KONA, flags a subtract instruction that produced no negative results and took constant values in its first and second operands. This operation is seen in subroutine return-code testing. Neither current nor future year-2000 failures are suggested. The catalog identifier for the third instruction, 2S12A, flags an instruction that subtracted one from a value in the range 1-12. This operation is seen in month calculations, and it will not fail in year-2000 situations. The catalog identifier for the last instruction, 2TACA, flags an instruction that added -2 to a value in the range 0-24. This operation is seen in COBOL table references, and it will not fail in year-2000 situations. Post-Processor Logic To summarize, FIG. 3 indicates that the post-processor has two subprograms. Subprogram 1 analyzes traces to produce working files that are used by Subprogram 2. Embodiments of each of these programs are presented in greater detail below. Subprogram 1 (Filter) Program 1, as shown in FIG. 3, processes a trace file produced as described above. Each record in the trace file summarizes execution values for one instance of an instruction. That is, an instruction at a given offset in a given CSECT and load module is generally executed, and therefore traced, many times. Each record in the trace file is tested against each filter in the filter-input file (see "FIL-FILE.DATA-IN" above), using parameters taken from the run-control file (see "FILTER.RUN-CTLS" above) to determine whether the instruction and operand values recorded in the trace pass the tests specified by the filter. The steps taken for each trace-filter pair are matching the instruction op code in the trace with the instructions specified by the filter, comparing the operand lengths in the trace (for a CLC or decimal instruction) to the length ranges specified by the filter, comparing the operand values in the trace to the operand ranges specified by the filter, determining whether the operand values are valid for the date format specified by the filter, and performing a special test appropriate to the instruction type. The instruction is said to pass the filter when there is an op-code match, the operand lengths and values are within the filter-specified ranges, the operand values are valid for the specified date-type, and any special test is passed; otherwise, the instruction is rejected by the filter. The date-types and corresponding validity conditions are: Two-digit year (YY): the operand-value V for the instruction instance is such that 0.ltoreq.V.ltoreq.99. Julian date with two-digit year (YYDDD, YY/DDD): the operand-value, when expressed as a decimal number VV . . . VDDD with three low-order digits DDD and two or more high-order digits VV . . . V, is such that 0.ltoreq.VV . . . V.ltoreq.99 and either 1.ltoreq.DDD .ltoreq.365 or else DDD =366 if VV . . . V represents a leap year. Gregorian date with two-digit year (YYMMDD, YY/MM/DD): the operand value, when expressed as a decimal number VV . . . VMMDD with two low-order digits DD, two intermediate digits MM, and several high-order digits VV . . . V, is such that 1.ltoreq.MM.ltoreq.12, DD indicates a valid day number within the month whose number is MM, and 0.ltoreq.VV . . . V.ltoreq.99. The validity determination is made by testing the operand value, whatever its length or format. For example, zoned-decimal value 75 is identified as valid for the two-digit-year format when the value is contained in an operand that is 2-18 bytes long. And binary value 75 is identified as valid when it is contained in a halfword, word, or double word operand. The special test for a subtract instruction is to determine whether the first operand is non-negative and the second operand is positive; examples are where the first operand is 02 and the second is 1, the first operand is a Julian date 02101 and the second is 3000, or the first operand is a Gregorian date 000306 and the second is 1000. These are pre-conditions for a year-2000 failure that actually occurs when the difference between the two operands is negative. The special test for an add instruction is to determine whether one operand is non-negative and the second is negative; examples are where the first operand is 02 and the second operand is -4, the first operand is a Julian date 02101 and the second is -2000. Or the first operand is a Gregorian date 020306 and the second is -50000. These are preconditions for a year-2000 failure that actually occurs when the sum of the two operands is negative. The special test for a multiply instruction is to determine whether one operand is a two-digit-year value and the other is 12, 365, 36525, 120, 3650, 365250, 1200, 36 ,500, 3652500, . . . No special test is performed in the other cases. A record is written to the pass-detail file when the instruction passes the filter. The record identifies the instruction using its load-module and CSECT names, its offset within the CSECT, and its trace-file index; information derived from the filter and the trace record is also added. The load-module and CSECT names and the CSECT offset are derived from the trace record for the instruction; the trace-file index is the number of the record in the trace file. The other information includes: The instruction text and operand values taken from the trace; Indicators of which operands are dates, the year (YY) values derived from the dates, and an indication of whether the dates are in true or nines-complement form; An indicator of whether the instruction and its operands match a y2k-failure paradigm or a future-y2k-failure paradigm; For instructions that pass CLC-decimal filters, an indication of whether the operands are in packed-decimal (PD), zoned decimal (ZD), Julian-date-with separator (JS), or Gregorian-date-with-separator (GS) form; For instructions that pass compare or CLC filters, an indication of whether the instruction was followed by a branch-on-equal or a branch-on-not-equal; For instructions that pass subtract or add filters, an indication of whether the instruction produced a negative result; and The RULE-ID, filter type, date type, and COMMENT from the filter, and the index of the filter within the filter file. FIG. 4 shows how all of the traces and filters are processed in accordance with one embodiment of the present invention. Processing starts 400 by calling a program (TRACE-REQ) to manage the trace file and a TRACE-TABLE in main storage 410. The table contains slots that allow some number of traces (e.g., 256) to be copied to main storage for rapid access by the filter program. The called program has three major functions: 1. Fill the TRACE-TABLE: the next group of records is read from the trace file. Information derived from the trace records is placed in the TRACE-TABLE. A return code, T-RC, indicates whether records from the file have been placed in the table 420. T-RC is 0 when they have; T-RC is 1 when no records remain to be read from the file. When T-RC is 0, a pointer is set to cause the first record in the table to be returned when the next record is requested by the filter program 430. This information is derived from the trace records: The instruction location (load module name, CSECT name, and CSECT offset), the instruction text, and the trace-file index for the trace record. The operand values for the instruction, three indications of whether the operands are valid dates in each of the standard date formats (see "Date format" in Table 2), and year values extracted from the operands for date formats that are valid. A value may be a valid date in more than one format. For example, the operand value 12 is a valid two-digit year (YY) as well as a valid Julian date (00012). If the instruction is a CLC, indications of whether its operands are in packed-decimal, zoned-decimal, Julian-with-separator, or Gregorian-with-separator form. If the instruction is a compare or a CLC, indication of whether or not it is followed by a branch-on-equal or a branch-on-not-equal test. 2. Supply the next trace in the TRACE-TABLE: the record is copied to a work area that is accessible to the filter program. T-RC is 0 when a record is supplied; T-RC is 1 when all of the traces were returned previously. 3. Record a pass event for the last trace that was returned. The called program tallies the number of filters that pass each trace in the TRACE-TABLE. When all of the traces in the table have been processed against all of the filters, as indicated by a request that the table be refilled by a new group of traces, the tallies are written to the pass-miss file 440. One record is placed in the pass-miss file for each trace in the table; the record identifies the instruction by its load-module and CSECT names, its CSECT offset, and its trace-file index. It also records the number of filters that passed the instruction; the number is zero when the instruction is rejected by all of the filters. Another called program (FIL-REQ) supplies records from the filter file to the caller 460. The called program sets a return code, F-RC, to indicate whether a record has been resumed 470. F-RC is 0 when it has; and F-RC is 1 when no filters remain to be copied from the filter file. The filter program starts off by entering the primary loop at its first step 400. The primary loop in FIG. 4 starts with a call to TRACE-REQ to fill the TRACE-TABLE 410. When T-RC is 0 (420), indicating that traces have been copied to the TRACE-TABLE, Program 1 calls FILTER-REQ 430 to indicate that its next request for filter is to be satisfied starting from the beginning of the filter file. Otherwise, T-RC is 1 so the program is completed by calling TRACE-REQ to indicate that all of the final traces in the TRACE-TABLE have been processed 440 (whereupon processing proceeds to FIG. 5). When T-RC is 0 (above), the filter program enters a secondary loop. The first step of the loop is to call FIL-REQ to return the next filter 460. When return code F-RC is 0, indicating that a filter was returned, Program 1 enters a tertiary loop that tests all of the traces in the TRACE-TABLE against the filter 480, 490. Otherwise, F-RC is 1, indicating that no filters remain, and the program returns to the top of the primary loop to fill the TRACE-TABLE with the next group of traces. As noted, when F-RC is 0, Program 1 enters the tertiary loop, the first step of which is to call TRACE-REQ to fetch the next trace from the TRACE-TABLE 480. When T-RC is 1, indicating that all of the records in the TRACE-TABLE were returned previously, Program 1 returns from testing the return code 490 to the first step in the secondary loop to get the next filter 460; otherwise, T-RC is 0, indicating that a trace record was returned, so Program 1 performs pass tests for the current filter and current trace 495. When the instruction passes the filter, TRACE-REQ is called to record the pass event and a record is written to the pass-detail file, as described above. Then, Program 1 returns to the first step of the tertiary loop. Subprogram 2 (Aggregation) Subprogram 2 (herein "Program 2") as shown in FIG. 3, processes the pass-miss and pass-detail files from Program 1 in order to summarize the results, for each instruction, of all of its execution instances. The summaries are placed in the output files described above. Details on Program 2 are shown in FIG. 5. Program 2 starts by sorting the pass-miss and pass-detail files to prepare for a "sort-merge-join" operation 500. The pass-miss records are sorted by ascending instruction location; the pass-detail records are sorted by ascending instruction location and trace-file index. The instruction location is the concatenation of a load-module name, CSECT name, and offset within the CSECT. Thus, all execution instances of the same instruction are grouped into consecutive records of the sorted files. The first records of the sorted pass-miss and pass-detail files are read into main storage in preparation for entering the primary loop of FIG. 4. The pass-detail record is called the current pass-detail record, and the instruction represented by that record is called the current instruction in the following description. The first step in the primary loop is to read pass-miss records until the instruction location in a pass-miss record (PM-ISN-LOC) is equal to the instruction location in the current pass-detail record (PR-ISN-LOC) 510. When the two are not equal, the instruction instance represented in the pass-miss record has not passed any filter. Counters for the number of such unique instructions (NUM-ISN-NFIL) and the number of misses for all of the instances of such instructions (NUM-MIS-NFIL) are accumulated. A new instruction is recognized when the instruction location in the pass-miss records changes. The next step is to read further pass-miss records until the instruction location in a pass-miss record is greater than the instruction location in the current pass-detail record 530. When the pass count in a pass-miss record having the same instruction location as the current pass-detail record is zero, indicating an instance of the current instruction that did not pass any filter, a counter for the number of misses for the current instruction (NUM-MISS) is incremented. Next, all of the pass-detail records for the same instruction location as the current instruction are processed, as is explained below with reference to FIGS. 6a & 6b, to accumulate pass data for all execution instances of the instruction and to write certain file records 540. Execution in the primary loop ends if the last pass-detail record has been processed 550; otherwise, execution returns to the first step of the primary loop 510. When the primary loop in FIG. 3 has been completed, any remaining records in the pass-miss file represent other instructions that did not pass any filter. The records are read, until an end-of-file (EOF) condition is encountered, and counters for the number of such instructions (NUM-ISN-NFIL) and the number of misses for all of the instances of such instructions (NUM-MISS-NFIL) are incremented, based on the record contents 560. Once again, a new instruction is recognized when the instruction location in the pass-miss records changes. Program 2 ends 570 when the last record in the pass-miss file has been processed. FIGS. 6a & 6b show more details on a specific aspect of Program 2; that is, the program fragment 520 of FIG. 5 that accumulates information about all execution instances of an individual instruction in a RULE-TABLE. Entries in the RULE-TABLE are made to correspond to filters that passed the instruction. Each entry contains counters and other fields where maximum and minimum values are derived. First, the variable HOLD-TFI is initialized to all zeros. HOLD-TFI is used to determine when the pass-detail records for a new instruction instance start. The first loop of FIG. 6a starts 600 by comparing the trace-file index (TFI) in the current pass-detail record to HOLD-TFI 602. When they are not equal, a new execution instance of the current instruction has been encountered, so one is added to a counter (NUM-PASS) for the number of instances of the current instruction that have passed some filter, and the TFI from the pass-detail record replaces the previous HOLD-TFI value 604. Next, values from the pass-detail record are used to update the RULE-TABLE entry assigned for the filter whose filter-file index (FFI) is designated in the record. There are three cases to consider: The RULE-TABLE is empty (RTE-IDX-MAX, which designates the highest numbered entry that is in use, is zero 606): The first entry in the table is selected ("Set K=1") 612, and the values in entry RTE(K) are initialized by copying the FFI value in the pass-detail record to a field within the entry, setting the counter RTE-RULE-COUNT{K) to one, resetting other counters in the entry to zero, and copying the operand values from the pass-detail record to operand-maximum and operand-minimum variables in the entry 614. The RULE-TABLE is not empty (RTE-IDX-MAX is not zero), but none of the entries in the table has been assigned to accumulate information for filter FFI 608. The next unused entry is selected ("Set K=RTE-IDX-MAX+1" and "Set RTE-IDX-MAX=K") 610, and the values in entry RTE(K) are initialized 614 as is described above. Entry K in the table has already been assigned to accumulate information for filter FFI 608. One is added to counter RTE-RULE-COUNT(K), which tallies the number of instances of the current instruction that were passed by the filter 616. In any case, values from the pass-detail record are used to update counters and operand-range values in entry RTE(K) 618, as follows: For instructions that pass subtract or add filters, add one to counter RTE-NR-NUM(K) if the instruction produced a negative result. For instructions that pass CLC-decimal filters, use the indication of whether the operands are in packed-decimal (PO), zoned-decimal (ZD), Julian-date-with-separator (JS), or Gregorian-date-with-separator (GS) form to add one to counter RTE-PD-NUM(K), RTE-ZD-NUM(K), RTE-JS-NIJM(K), or RTE-GS-NUM(K), as appropriate. Use the indication of whether the dates processed by the instruction are in true or nines-complement form to add one to counter RTE-T-DATE(K) or RTE-C-DATE(K), respectively. Determine the decades of the operand YY values, and add one to the appropriate decade counters. The counters are used in forming histograms. Use the operand YY values to add one to "y2k range counters" for operands 1 and 2 when the YY values are in the y2k range. Update the maximum and minimum values for operands 1 and 2, as appropriate. For example, if the operand 1 value in the pass-detail record is larger than the present maximum for operand 1, use the larger value to replace the present maximum. After entry RTE(K) is updated, a test is made to determine whether the instruction location in the pass-miss record is greater than the instruction location in the pass-detail record 620; if so, the next pass-detail record is read and becomes the current pass-detail record 622. The last step in the loop is to return to the start of the loop when the last record in the pass-detail file has not been read and the instruction location in the pass-miss record is not equal to the instruction location in the current pass-detail record 624. Otherwise, execution continues as shown in FIG. 6b. As shown in FIG. 6b, the first step is to sort the RULE-TABLE elements by descending RTE-RULE-COUNT 630. The element for the filter that recorded the greatest number of passes for the current instruction appears first, the element for the next highest number of passes is next, and so on. The second step is to process each element of the sorted RULE-TABLE in turn. The information in each rule-table element (RTE) is used to generate a catalog id for the instruction-filter pair according to Table 1 632. Next, processing writes a record identifying the instruction to file Y2K-SUM.LISTING or MIX-SUM.LISTING 634. The file is determined using the catalog id recorded in variable RTE-CAT(1); that is, the id assigned for the filter that passed the instruction most frequently. The record contains the instruction location and text; and also indicates how many instruction instances were passed by some filter and how many were rejected by all of the filters. By way of example, see FIGS. 7 & 8. The last step of FIG. 6b also processes each element of the sorted RULE-TABLE. In particular, information in each element is used to generate a related set of records for the same instruction-analysis file as above 636. In one embodiment, the information included in each related set of records is as follows: The catalog id assigned to the instruction for the filter whose FFI value is RTE-FFI(K); the RULE-ID and COMMENT from the filter, its FFI value, and an indication of what percentage of the instruction instances passed the filter. For compare and CLC instructions, an indication of how many execution instances processed true dates and nines complement dates; for CLC instructions, an indication of how many instruction instances processed packed-decimal (PD), zoned-decimal (ZD), Julian-with-separator (JS), and Gregorian-with-separator (GS) dates. The range of values taken by operand 1 of the instruction across all of the instances that passed the filter; a histogram showing the decade populations, in percent of the total, for the year (W) values extracted from operand 1 for all of the passing instances; and the percent of the YY parts of the operand 1 values that fell into the y2k range. Similarly for operand 2. An indication of how many execution instances satisfied the year-2000-failure pattern for the instruction, and how many others satisfied the future-year-2000 failure pattern. Thereafter, processing of the pass logic is complete 638. Those skilled in the art will note that the present invention can be included in an article of manufacture (e.g., one or more computer program products) having, for instance, computer usable media. The media has embodied therein, for instance, computer readable program code means for providing and facilitating the capabilities of the present invention. The article of manufacture can be included as part of a computer system or sold separately. The flow diagrams depicted herein are exemplary. There may be other variations to these diagrams or the steps (or operations described herein) without departing from the spirit of the invention. For instance, the steps may be performed in differing order, or steps may be added, deleted, or modified. All these variations are considered a part of the claimed invention. Although preferred embodiments have been depicted and described in detail herein, it will be apparent to those skilled in the art that various modifications, additions, substitutions and the like can be made without departing from the spirit of the invention and these are therefore considered to be within the scope of the invention as defined in the following claims.
|
Same subclass Same class Consider this |
||||||||||
