Scoring mechanism for automatically generated test programs
AssigneeArm Limited
InventorsSimon John Craske, Eric Jason Furbish, Jonathan William Brawn
Life of this patent
Estimating the term…
Abstract
A test program for a data processing apparatus is produced using a genetic algorithm which mutates instances being ordered lists of program instructions within a population forming the test program. The populations are evaluated using a metric by which the population as a whole is scored for its stimulation of predetermined functional points within the data processing apparatus when a determination is being made as to whether or not a particular instance should be swapped in or out of the population.
Claims17
A method of generating tests for a data processing apparatus, said tests comprising a population of program instructions formed of a plurality of instances of ordered lists of program instructions, said method comprising:
- (i) simulating functional states of said data processing apparatus occurring during simulated execution of said population;
- (ii) noting simulated occurrence of predetermined functional states of said data processing apparatus during said simulated execution of said population;
- (iii) calculating respective functional state score values for said predetermined functional states in dependence upon occurrence of said predetermined functional states during simulated execution of said population;
- (iv) forming a population score value dependent upon a combination of said respective functional state score values;
- (v) mutating one or more of said instances to form one or more candidate instances;
- (vi) replacing at least one of said instances of said population with one of said candidate instances to form a candidate population;
- (vii) repeating steps (i), (ii), (iii) and (iv) in respect of said candidate population to form a candidate population score value;
- (viii) comparing said candidate population score value with said population score value;
- (ix) replacing said population with said candidate population if said candidate population score value indicates that simulated execution of said candidate population results in simulated occurrence of a higher number of said predetermined functional states;
- and
- (x) repeating steps (v), (vi), (vii), (viii) and (ix) until one or more predetermined termination conditions are met.
Apparatus for processing data operable to generate tests for a data processing apparatus, said tests comprising a population of program instructions formed of a plurality of instances of ordered lists of program instructions, said apparatus comprising logic operable to perform the steps of:
- (i) simulating functional states of said data processing apparatus occurring during simulated execution of said population;
- (ii) noting simulated occurrence of predetermined functional states of said data processing apparatus during said simulated execution of said population;
- (iii) calculating respective functional state score values for said predetermined functional states in dependence upon occurrence of said predetermine functional states during simulated execution of said population;
- (iv) forming a population score value dependence upon a combination of said respective functional state score values;
- (v) mutating one or more of said instances to form one or more candidate instances;
- (vi) replacing at least one of said instances of said population with one of said candidate instances to form a candidate population;
- (vii) repeating steps (i), (ii), (iii) and (iv) in respect of said candidate population to form a candidate population score value;
- (viii) comparing said candidate population score value with said population score value;
- (ix) replacing said population with said candidate population if said candidate population score value indicates that simulated execution of said candidate population results in simulated occurrence of a higher number of said predetermined functional states;
- and
- (x) repeating steps (v), (vi), (vii), (iii) and (ix) until one or more predetermined termination conditions are met.
A computer program product comprising a computer readable storage medium containing computer readable instructions for controlling a computer to perform a method of generating tests for a data processing apparatus, said tests comprising a population of program instructions formed of a plurality of instances of ordered lists of program instructions, said method comprising:
- (i) simulating functional states of said data processing apparatus occurring during simulated execution of said population;
- (ii) noting simulated occurrence of predetermined functional states of said data processing apparatus during said simulated execution of said population;
- (iii) calculating respective functional state score values for said predetermined functional states in dependence upon occurrence of said predetermined functional states during simulated execution of said population;
- (iv) forming a population score value dependent upon a combination of said respective functional state score values;
- (v) mutating one or more of said instances to form one or more candidate instances;
- (vi) replacing at least one of said instances of said population with one of said candidate instances to form a candidate population;
- (vii) repeating steps (i), (ii), (iii) and (iv) in respect of said candidate population to form a candidate population score value;
- (viii) comparing said candidate population score value with said population score value;
- (ix) replacing said population with said candidate population if said candidate population score value indicates that simulated execution of said candidate population results in simulated occurrence of a higher number of said predetermined functional states;
- and
- (x) repeating steps (v), (vi), (vii), (viii) and (ix) until one or more predetermined termination conditions are met.
Dependencies are inferred from the claim text.