Patent US2481154A successfully refreshed from Google Patents.
Patent US5357452A successfully refreshed from Google Patents.
← Back to Patent Explorer
US5357452A Expired / Lapsed US ⏱️ 0.0 years remaining

Automatic generation of auto-checking testing functions

Assignee: Sun Microsystems Inc
•
Filing: 1992-06-30
•
Granted: 1994-10-18
•
Expires: 2012-06-30
📄 Original PDF 🌐 Google Patents 🔄 Sync Now

Abstract

Abstract An auto-checking testing funtion generator is provided for generating auto-checking testing functions for procedures of a software interface from a formal specification specifying the procedures. The procedures are specified with procedure semantic expressions identifying the procedures and specifying their arguments, returning results, raisable exceptions, exceptional and normal terminations. Each exception or normal termination specifies the correct post-execution exception or normal termination state for the procedure given a particular pre-execution state. The procedure semantic expressions are boolean expressions constructed using comparison and boolean operators, calls to the procedure, auxiliary and special functions. The auxiliary functions are user supplied, and the special functions are supplied by the auto-checking testing funtion generator. An auto-checking testing funtion is generated for each procedure. Each generated auto-checking testing funtion has the same execution flow for determining whether the procedure behaved properly or improperly when executed. The execution flow makes the determination by evaluating the specified exceptional and normal terminations.

Inventors

  • 👤 Luigi A. Pio-di-Savoia
  • 👤 Jonathan Gibbons
  • 👤 James D. Halpern
  • 👤 Roger Hayes

Bibliographic Details

Application Number —
Jurisdiction US
Data Source google_patents
Last Synchronized 2026-11-09 09:53
CPC Classifications
G; G06; G06F; G06F11/00; G06F11/36; G06F11/3668; G06F11/3672; G06F11/3684

Claims Analysis

Total Claims: 22
Claim 1
Independent Claim 176 words
In a computer system comprising a software component, wherein said software component comprises a procedure, and an interface for invoking said procedure, a method for generating an auto-checking test function for said procedure, said method comprising the steps of: (a) identifying and specifying said procedure using a plurality of procedure semantic expressions, each of said procedure semantic expressions being constructed using selected ones of comparison operators, Boolean operators, calls to said procedure, auxiliary and special functions, said auxiliary functions being user supplied, and said computer system further having i) a special Boolean function having an exception specified as its argument, said special Boolean function returning an affirmative value when its argument is raised after execution of said procedure; and ii) a special temporal function having at least one variable name as its argument, said special temporal function returning a pre-execution value for each of said at least one variable name after execution of said procedure; and (b) generating said auto-checking test function based on said identification and specification made using said plurality of procedure semantic expressions.
Claim 2
Dependent Claim 176 words
In a computer system comprising a software component, wherein said software component comprises a procedure, and an interface for invoking said procedure, a method for generating an auto-checking test function for said procedure, said method comprising the steps of: (a) identifying and specifying said procedure using a plurality of procedure semantic expressions, each of said procedure semantic expressions being constructed using selected ones of comparison operators, Boolean operators, calls to said procedure, auxiliary and special functions, said auxiliary functions being user supplied, and said computer system further having i) a special Boolean function having an exception specified as its argument, said special Boolean function returning an affirmative value when its argument is raised after execution of said procedure; and ii) a special temporal function having at least one variable name as its argument, said special temporal function returning a pre-execution value for each of said at least one variable name after execution of said procedure; and (b) generating said auto-checking test function based on said identification and specification made using said plurality of procedure semantic expressions.
Claim 3
Dependent Claim 157 words
The method as set forth in claim 1, wherein, said generated auto-checking test function in said step b) comprises a plurality of execution steps, said execution steps comprising: i) evaluating and recording pre-execution state of said procedure; ii) evaluating and recording pre-execution values for selected variables of said procedure, said selected variables being variables required subsequently to determine whether the correct corresponding termination state is reached from said recorded pre-execution state; iii) executing said procedure; iv) determining whether any exceptions were raised during said execution; v) determining whether each raised exception is expected if at least one exception was raised during said execution; vi) determining whether each corresponding correct exception termination state is reached if at least one raised exception is expected; vii) determining whether any exceptions are expected if no exception was raised during said execution; viii) determining whether each correct normal termination state is reached if no exception was raised nor expected during said execution.
Claim 4
Dependent Claim 74 words
The method as set forth in claim 2, wherein, said step b) comprises: b.1) parsing and tokenizing said procedure semantic expression using a YACC grammar; b.2) generating intermediate representation for said tokenized procedure semantic expression, said intermediate representation being a syntax tree; b.3) analyzing and restructuring said generated intermediate representation, said restructured intermediate representation being an annotated syntax tree; and b.4) generating executable code for said auto-checking test function using said restructured intermediate representation.
Claim 5
Dependent Claim 27 words
The method as set forth in claim 3, wherein, said step b) further comprises the step of b.5) generating include files for said generated auto-checking test function.
Claim 6
Dependent Claim 131 words
The method as set forth in claim 2, wherein, said step (a) comprises the steps of: a.1) identifying said procedure; a.2) specifying each invoking argument of said identified procedure if said identified procedure has invoking arguments; a.3) specifying each returning result of said identified procedure if said identified procedure has returning results; a.4) specifying each raisable exception of said identified procedure if said identified procedure has raisable exceptions; a.5) specifying each exceptional termination of said identified procedure if said identified procedure has exceptional terminations, each specified exception termination identifying a correct exception termination state for said identified procedure given a particular pre-execution state; a.6) specifying each normal termination for said identified procedure, each specified normal termination identifying a correct normal termination state for said identified procedure given a particular pre-execution state.
Claim 7
Dependent Claim 85 words
The method as set forth in claim 5, wherein, said software component comprises a plurality of objects, wherein at least one object upon which said identified procedure is invocable, said interface being objected oriented; said method further comprises the step of a.7) specifying each inheritance characteristic of said at least one object if said at least one object inherits from other objects, said step a.7) being performed before said step b), and said step b) being performed based also on said specification in step a.7).
Claim 8
Dependent Claim 32 words
The method as set forth in claim 6, wherein, said locally defined objects are defined with object semantic expressions in like manner as said procedure being defined with said procedure semantic expressions.
Claim 9
Dependent Claim 78 words
The method as set forth in claim 7, wherein, said step b) comprises, b.1) parsing and tokenizing said procedure and object semantic expressions using a YACC grammar; b.2) generating intermediate representation for said tokenized procedure and object semantic expressions, said intermediate representation being a syntax tree; b.3) analyzing and restructuring said generated intermediate representation, said restructured intermediate representation being an annotated syntax tree; and b.4) generating executable code for said auto-checking test function using said restructured intermediate representation.
Claim 10
Dependent Claim 125 words
The method as set forth in claim 8, wherein, grammar constructs in said annotated syntax tree in said step b.3) are represented by C++ objects; grammar constructs other than function bodies are represented in said restructured syntax tree with C++ declarations which are represented by objects, each of said objects representing one of said C++ declarations supporting a print method, said print method being used to call a root node of said restructured syntax tree recursively to generate said executable code; and function bodies are represented by special closures separate from said restructured syntax tree in said step b.3), each of said special closures being an object having a print method for printing out executable code of the function body based on function specific parameters.
Claim 11
Dependent Claim 50 words
The method as set forth in claim 8, wherein, said step b) further comprises the step of b.5) generating definition files for said generated auto-checking test function, said definition files comprising object type definitions of said objects, inheritance characteristics of said defined object types, and methods of said object types.
Claim 12
Dependent Claim 187 words
In a computer system comprising a software component, wherein said software component comprises a procedure, and an interface for invoking said procedure, an apparatus for generating an auto-checking test function for said procedure, said apparatus comprising: a) receiving means for receiving identification and specifications of said procedure, said identification and specifications being made using a plurality of procedure semantic expressions, each of said procedure semantic expressions being constructed using selected ones of comparison operators, Boolean operators, calls to said procedure, auxiliary functions, and special functions, said auxiliary functions being user supplied,and said computer system further having i) a special Boolean function having an exception specified as its argument, said special Boolean function returning an affirmative value when its argument is raised after execution of said procedure, and j) a special temporal function having at least one variable name as its argument, said special temporal function returning a pre-execution value for each of said at least one variable name after execution of said procedure; b) auto-checking test function generator means coupled to said receiving means for generating said auto-checking test function based on said received identification and specifications.
Claim 13
Dependent Claim 187 words
In a computer system comprising a software component, wherein said software component comprises a procedure, and an interface for invoking said procedure, an apparatus for generating an auto-checking test function for said procedure, said apparatus comprising: a) receiving means for receiving identification and specifications of said procedure, said identification and specifications being made using a plurality of procedure semantic expressions, each of said procedure semantic expressions being constructed using selected ones of comparison operators, Boolean operators, calls to said procedure, auxiliary functions, and special functions, said auxiliary functions being user supplied,and said computer system further having i) a special Boolean function having an exception specified as its argument, said special Boolean function returning an affirmative value when its argument is raised after execution of said procedure, and j) a special temporal function having at least one variable name as its argument, said special temporal function returning a pre-execution value for each of said at least one variable name after execution of said procedure; b) auto-checking test function generator means coupled to said receiving means for generating said auto-checking test function based on said received identification and specifications.
Claim 14
Dependent Claim 153 words
The apparatus as set forth in claim 11, wherein, said generated auto-checking test function comprises a plurality of execution steps, said execution steps comprising: i) evaluating and recording pre-execution state of said procedure; ii) evaluating and recording pre-execution values for selected variables of said procedure, said selected variables being variables required subsequently to determine whether the correct corresponding termination state is reached from said recorded pre-execution state; iii) executing said procedure; iv) determining whether any exceptions were raised during said execution; v) determining whether each raised exception is expected if at least one exception was raised during said execution; vi) determining whether each corresponding correct exception termination state is reached if at least one raised exception is expected; vii) determining whether any exceptions are expected if no exception was raised during said execution; viii) determining whether each correct normal termination state is reached if no exception was raised nor expected during said execution.
Claim 15
Dependent Claim 116 words
The apparatus as set forth in claim 11, wherein, said first generating means comprises: b.1) parser and tokenizer means coupled to said receiving means for parsing and tokenizing said procedure semantic expression using a YACC grammar; b.2) intermediate representation generator means coupled to said parser and tokenizer means for generating intermediate representation for said tokenized procedure semantic expression, said intermediate representation being a syntax tree; b.3) analyzer means coupled to said intermediate representation generator means for analyzing and restructing said generated intermediate representation, said restructed intermediate representation being an annotated syntax tree; and b.4) code generator means coupled to said analyzer means for generating executable code for said auto-checking test function using said restructured intermediate representation.
Claim 16
Dependent Claim 23 words
The apparatus as set forth in claim 13, wherein, said code generator means further generates include files for said generated auto-checking test function.
Claim 17
Dependent Claim 137 words
The method as set forth in claim 11, wherein said said identification and specifications comprise: i) identification of said procedure; ii) specification of each invoking argument of said identified procedure if said identified procedure has invoking arguments; iii) specification of each returning result of said identified procedure if said identified procedure has returning results; iv) specification of each raisable exception of said identified procedure if said identified procedure has raisable exceptions; v) specification of each exceptional termination of said identified procedure if said identified procedure has exceptional terminations, each specified exception termination identifying a correct exception termination state for said identified procedure given a particular pre-execution state; and vi) specification of each normal termination for said identified procedure, each specified normal termination identifying a correct normal termination state for said identified procedure given a particular pre-execution state.
Claim 18
Dependent Claim 73 words
The apparatus as set forth in claim 15, wherein, said software component comprises a plurality of objects, wherein at least one object upon which said identified procedure is invocable, said interface being objected oriented; said identification and specifications further comprise specification of each inheritance characteristic of said at least one object if said at least one object inherits from other objects, said auto-checking test function being generated based also on said inheritance specification.
Claim 19
Dependent Claim 32 words
The apparatus as set forth in claim 16, wherein, said locally defined objects are defined with object semantic expressions in like manner as said procedure being defined with said procedure semantic expressions.
Claim 20
Dependent Claim 120 words
The apparatus as set forth in claim 17, wherein, said auto-checking test function generator means comprises, b.1) parser and tokenizer means coupled to said receiving means for parsing and tokenizing said procedure and object semantic expressions using a YACC grammar; b.2) intermediate representation means coupled to said parser and tokenizer means for generating intermediate representation for said tokenized procedure and object semantic expressions, said intermediate representation being a syntax tree; b.3) analyzer means coupled to said intermediate representation means for analyzing and restructuring said generated intermediate representation, said restructured intermediate representation being an annotated syntax tree; and b.4) code generation means coupled to said analyzer means for generating executable code for said auto-checking test function using said restructured intermediate representation.
Claim 21
Dependent Claim 117 words
The apparatus as set forth in claim 18, wherein, grammar constructs in said annotated syntax tree are represented by C++ objects; grammar constructs other than function bodies are represented in said restructured syntax tree with C++ declarations which are represented by objects, each of said objects representing one of said C++ declarations supporting a print apparatus, said print apparatus being used to call a root node of said restructured syntax tree recursively to generate said executable code; and function bodies are represented by special closures separate from said restructured syntax tree, each of said special closures being an object having a print apparatus for printing out executable code of the function body based on function specific parameters.
Claim 22
Dependent Claim 46 words
The apparatus as set forth in claim 17, wherein, said code generator means further generates definition files for said generated auto-checking test function, said definition files comprising object type definitions of said objects, inheritance characteristics of said defined object types, and methods of said object types.

References Cited (Backward Citations)

US4550406A Cited
US4595981A Cited
US4729096A Cited
US5159600A Cited

USPTO Annuity & Maintenance Windows

Annuity Stage Window Opens Payment Deadline Surcharge Period Until Estimated Fee Status
3.5 Years (Year 4) 1997-10-17 1998-04-18 1998-10-18 $2000.00 Window Closed / Lapsed
7.5 Years (Year 8) 2001-10-17 2002-04-18 2002-10-18 $3760.00 Window Closed / Lapsed
11.5 Years (Year 12) 2005-10-17 2006-04-18 2006-10-18 $7700.00 Window Closed / Lapsed

Assigned Categories & Tags

No categories assigned to this patent yet.

Assign Category Tag