← Back to Patent Explorer
EP0286361A2 Expired / Lapsed EP ⏱️ 0.0 years remaining

Method of verifying computer software

Assignee: Westinghouse Electric Corp
•
Filing: 1988-04-05
•
Granted: —
•
Expires: 2008-04-05
📄 Original PDF 🌐 Google Patents 🔄 Sync Now

Abstract

Abstract A computer program source code having a known format is divided into units and verified, unit by unit, by automatically instrumenting the code and generating a test driver program which executes all branches of an instru­mented code unit. Processors are used to generate a test driver program and to standardize the code format and to insert executable tracer statements into each block of reformatted code between control statements. A pseudocode having only control statements and tables identifying valid linkages between blocks of code are generated by another processor for use by a verifier in selecting values of input variables and expected outputs for test cases which execute each block of code in the selected unit. Results of the test cases are printed out indicating the sequence of block linkages generated by each test case, the expected output values and the actual output values.

Inventors

  • 👤 R. Ralph Delucia
  • 👤 Eric Phillip Casteel
  • 👤 Daniel Joseph Wolf

Bibliographic Details

Application Number —
Jurisdiction EP
Data Source google_patents
Last Synchronized 2026-11-04 06:31
CPC Classifications
G; G06; G06F; G06F11/00; G06F11/36; G06F11/3668; G06F11/3672; G06F11/3688

Claims Analysis

Total Claims: 13
Claim 1
Independent Claim 272 words
A method of verifying a computer program source code having known format and a series of program statements including non-control and control statements by which the program can branch to alternative program state­ments of the source code, said method comprising: operating a processor to standardize the format of the source code to a set of prescribed formatting standards to generate a reformatted source code; charac­terized by the steps of: selecting a target unit of the reformatted source code for verification; instrumenting said target unit of the reformatted code by operating a processor to divide said target unit into blocks of code, a block of code being marked by the non-control statements between control statements, and to insert into said blocks of code executable instructions to write an identifier into an output file for each block of code when it is executed; selecting test cases for said target unit of code with each test case comprising input values for variables in the target unit and expected output values, said test cases being selected such that each block of code in the test unit is executed; operating a processor to generate a test driver routine to implement said test cases; operating a processor to compile and link the test driver routine with the instrumented target unit of code; executing the compiled/linked test driver routine and instrumented target unit of code; and generating an output presenting actual output values and expected output values for each test case, and a sequential listing from said output file of the block identifiers of the blocks of said target unit code in the sequence in which they were executed.
Claim 2
Independent Claim 272 words
A method of verifying a computer program source code having known format and a series of program statements including non-control and control statements by which the program can branch to alternative program state­ments of the source code, said method comprising: operating a processor to standardize the format of the source code to a set of prescribed formatting standards to generate a reformatted source code; charac­terized by the steps of: selecting a target unit of the reformatted source code for verification; instrumenting said target unit of the reformatted code by operating a processor to divide said target unit into blocks of code, a block of code being marked by the non-control statements between control statements, and to insert into said blocks of code executable instructions to write an identifier into an output file for each block of code when it is executed; selecting test cases for said target unit of code with each test case comprising input values for variables in the target unit and expected output values, said test cases being selected such that each block of code in the test unit is executed; operating a processor to generate a test driver routine to implement said test cases; operating a processor to compile and link the test driver routine with the instrumented target unit of code; executing the compiled/linked test driver routine and instrumented target unit of code; and generating an output presenting actual output values and expected output values for each test case, and a sequential listing from said output file of the block identifiers of the blocks of said target unit code in the sequence in which they were executed.
Claim 3
Dependent Claim 132 words
The method of claim 1 wherein said instru­menting step includes operating a processor to insert non-executable comments with a unique block identifier at the beginning and the end of each block of code in the target unit, generating from the control statements and said block comments a block data table identifying the block by which each block is entered, the nesting level of the block, and any loop backs in a block and wherein the step of inserting executable write instructions into each block includes using said comments and block data table to insert at the beginning of each block an instruction to write the block identifier and to insert at the end of each block an instruction to write the block identifier of the block to which the target unit reverts.
Claim 4
Dependent Claim 41 words
The method of claim 2 wherein the step of generating an output includes generating a comparison of the block identifiers written to the output file during execution of a block of code and the block identifiers in the block data table.
Claim 5
Dependent Claim 27 words
The method of claim 2 wherein said instru­menting step includes generating a block linkage file identifying all possible transitions between blocks of code in the target unit.
Claim 6
Dependent Claim 76 words
The method of claim 2 wherein the target unit of code includes a call instruction calling an external routine, and wherein said instrumenting step includes: inserting an executable instruction before the call in­struction to write to the output file an indication of the call and inserting after the call instruction an executable instruction to write to the output file an indication that the program has returned to the target unit of code at the correct location.
Claim 7
Dependent Claim 67 words
The method of claim 5 wherein said instru­menting step includes inserting into the target unit before and after said call instruction, instructions to write to the output file the values of at least selected ones of the target code variables, and wherein said step of generating an output includes generating from the output file repre­sentations of the values of said selected variables before and after the call.
Claim 8
Dependent Claim 65 words
The method of claim 2 including generating a pseudocode for use in selecting said test cases by operat­ing a processor to generate a separate file containing only the control statements of the target unit with non-­executable comments inserted in place of the non-control statements, said comments identifying said blocks with the same identifiers as the comments inserted in the target code by said instrumenting step.
Claim 9
Dependent Claim 82 words
The method of claim 1 wherein the step of selecting test case includes operating a processor to generate a variable file for the test cases listing input and output variables for each test case along with the input value for each input variable and the expected value for each output variable, and said method further including when a program revision calls for a change in a designated variable, searching said variable file to identify the test cases which utilize said designated variable.
Claim 10
Dependent Claim 46 words
The method of claim 1 wherein said step of operating a processor to generate a test driver routine includes generating a software test specification listing the values of variables used by the test driver to imple­ment the test cases and the expected values of output parameters.
Claim 11
Independent Claim 231 words
A system for verifying computer program source code having a known format and a series of program statements, including non-control and control statements by which the program can branch to alternative program statements of the source code, said system comprising: means for instrumenting the source code by dividing the source code into blocks of code, a block of code being the non-control statements between control statements, and to insert into said blocks of code execut­able instructions to write to an output file an identifier for each block of code when it is executed; means for generating a variable file containing the input value of selected input variables of the source code and expected output values for output variables of the source code for selected test cases, said test cases being selected such that each block of code is executed; means for generating a test driver routine utilizing the values in the variable file to implement the test cases; means to compile and link the test driver routine with the instrumented source code; means for executing the compiled/linked test driver routine and the instrumented source code; and means for generating an output presenting actual output values and the expected output values for each test case, and a sequential listing from said output file of the block identifiers of the blocks of said source code in the sequence in which they were executed.
Claim 12
Independent Claim 231 words
A system for verifying computer program source code having a known format and a series of program statements, including non-control and control statements by which the program can branch to alternative program statements of the source code, said system comprising: means for instrumenting the source code by dividing the source code into blocks of code, a block of code being the non-control statements between control statements, and to insert into said blocks of code execut­able instructions to write to an output file an identifier for each block of code when it is executed; means for generating a variable file containing the input value of selected input variables of the source code and expected output values for output variables of the source code for selected test cases, said test cases being selected such that each block of code is executed; means for generating a test driver routine utilizing the values in the variable file to implement the test cases; means to compile and link the test driver routine with the instrumented source code; means for executing the compiled/linked test driver routine and the instrumented source code; and means for generating an output presenting actual output values and the expected output values for each test case, and a sequential listing from said output file of the block identifiers of the blocks of said source code in the sequence in which they were executed.
Claim 13
Dependent Claim 43 words
The system of claim 10 including: means to reformat the source code to a set of prescribed formatting standards to generate a reformatted source code; and means for selecting a target unit of the refor­matted source code for instrumentation by said instrument­ing means.

References Cited (Backward Citations)

No citation records indexed.

USPTO Annuity & Maintenance Windows

Maintenance schedule is calculated for granted US utility patents.

Assigned Categories & Tags

No categories assigned to this patent yet.

Assign Category Tag