Patent Issued for Runtime class recompilation during mutation testing (USPTO 11237952): State Farm Mutual Automobile Insurance Company
2022 FEB 17 (NewsRx) -- By a
Patent number 11237952 is assigned to
The following quote was obtained by the news editors from the background information supplied by the inventors: “A versatile feature of virtual machine programming languages, targeting runtime environments such as the Java® Virtual Machine (“JVM®”), is that they may support dynamic recompilation at runtime. After source code is compiled to object code, errors in the object code may be detected by various forms of static or dynamic unit testing, where static testing is performed outside of runtime while dynamic testing is performed during runtime.
“Dynamic testing may reveal errors in object code which are not revealed by static testing, since the execution of the object code will cause read and write accesses to particular memory addresses, read and write accesses of memory blocks, read and write accesses to particular files on non-volatile storage, and such events which only take place during runtime. Dynamic testing provides a basis for more sophisticated testing techniques, such as mutation testing, wherein the underlying source code is mutated at various positions. Existing test suites are run against compiled object code. The quality of test suites against arbitrary changes in the object code is determined by whether tests fail, as expected, against these mutations. The more mutations are generated, the more effective the mutation testing may be in detecting test quality.
“Gosu® is an example of a JVM® programming language, targeting development environments such as enterprise software applications utilized in the property and casualty insurance industry. Languages such as Gosu® are specialized to generate a large number of Java® classes with minimal coding. Consequently, in such software development environments, test suites also require large numbers of unit tests to verify the expected behavior of the object code. Gosu® implements a version of the Framework for Integrated Tests (“FIT”), a testing tool for software development wherein tests may be created based on steps and expected outcomes, allowing thousands of tests to be created using a streamlined process.
“However, using FIT testing tools as implemented presently to support Gosu®, tests are run after compiling target object code in its entirety. This is incompatible with mutation testing techniques; since each individual mutation must be tested separately, each mutation would require a full re-compilation of all of the object code. Compounded by multiple mutations for each of thousands of unit tests in a suite, full-fledged mutation testing for a typical Gosu® application may take years in real time using current testing tools. Thus, there is a need to integrate the flexibility to perform mutation testing into development tools for programming languages such as Gosu® targeting a JVM® development environment.”
In addition to the background information obtained for this patent, NewsRx journalists also obtained the inventors’ summary information for this patent: “Systems and methods discussed herein are directed to implementing a programming language compiler, and more specifically implementing a compiler operative to perform iterative, per-class compilation directed to individual mutations of target source code during runtime and mutation testing of the target object code.”
The claims supplied by the inventors are:
“1. A method, comprising: mutating, by a processor running a first computing thread among a plurality of computing threads each executing target object code in a target runtime environment, part of a class file of target source code, wherein part of the class file or a different class file of the target source code is being mutated substantially concurrently, by the processor or by a different processor, in at least one other computing thread of the plurality of computing threads, and the part of the class file of the target source code is being mutated, by the processor or by a different processor, in the at least one other computing thread in a manner heterogeneous to the mutation of the part of the class file of the target source code in the first computing thread; causing, by the processor, a compiler executing in the first computing thread to compile the class file of the target source code containing the mutation without compiling other class files of the target source code, resulting in generating a mutant class object code; and replacing, by the processor, a non-mutant object class code of the executing target object code with the mutant class object code.
“2. The method of claim 1, further comprising writing, by the processor, the target source code to non-volatile storage including the class file containing the mutation before configuring the compiler.
“3. The method of claim 1, wherein mutating part of the class file comprises mutating a line of code of the class file.
“4. The method of claim 1, wherein mutating part of the class file is performed in accordance with one of a plurality of mutation patterns of a mutation configuration.
“5. The method of claim 1, wherein the compiler is configured by the processor executing a compiler script including a parameterized call to the compiler.
“6. The method of claim 5, wherein the compiler script configures a compiler target of the compiler as a Dynamic Code Evolution Virtual Machine (“DCEVM”).
“7. The method of claim 1, further comprising executing, by the processor in the first computing thread, pending unit tests among a test suite against the executing target object code after replacing the non-mutant object class code.
“8. The method of claim 7, wherein the compiler is further configured by the processor to run a test class tear down method before the pending unit tests are executed.
“9. A computing host comprising: one or more processors; and memory communicatively coupled to the one or more processors, the memory storing computer-executable modules executable by the one or more processors that, when executed by the one or more processors, perform associated operations, the computer-executable modules comprising: a compiler module; and a mutation test managing module further comprising computer-executable submodules executable by the one or more processors that, when executed by the one or more processors, perform associated operations, the computer-executable submodules comprising: a class file mutating submodule configured to mutate, in a first computing thread among a plurality of computing threads each executing target object code in a target runtime environment, part of a class file of target source code; to mutate part of the class file or a different class file of the target source code substantially concurrently among the plurality of computing threads; and to mutate the part of the class file of the target source code among the plurality of computing threads in a heterogeneous manner in each respective computing thread; a compiler configuring submodule configured to configure the compiler module executing in the first computing thread to compile the class file of the target source code containing the mutation without compiling other class files of the target source code, resulting in generating a mutant class object code; and a class loading submodule configured to replace a non-mutant object class code of the executing target object code with the mutant class object code.
“10. The computing host of claim 9, wherein the mutation test managing module further comprises a class file read/write submodule configured to write the target source code to non-volatile storage including the class file containing the mutation before the compiler configuring submodule configures the compiler.
“11. The computing host of claim 9, wherein the class file mutating submodule is configured to mutate part of the class file by mutating a line of code of the class file.
“12. The computing host of claim 9, wherein the class file mutating submodule is configured to mutate part of the class file in accordance with one of a plurality of mutation patterns of a mutation configuration.
“13. The computing host of claim 9, wherein the compiler configuring submodule is configured to configure the compiler by executing a compiler script including a parameterized call to the compiler.
“14. The computing host of claim 13, wherein the compiler script configures a compiler target of the compiler as a Dynamic Code Evolution Virtual Machine (“DCEVM”).
“15. The computing host of claim 9, wherein the computer-executable submodules further comprise a test executing submodule configured to execute, in the first computing thread, pending unit tests among a test suite against the executing target object code after the class loading submodule replaces the non-mutant object class code.
“16. The computing host of claim 15, wherein the compiler configuring submodule is further configured to configure the compiler to run a test class tear down method before the test executing submodule executes the pending unit tests.
“17. A computer-readable storage medium storing computer-readable instructions executable by one or more processors, that when executed by the one or more processors, cause the one or more processors to perform operations comprising: mutating, in a first computing thread among a plurality of computing threads each executing target object code in a target runtime environment, wherein part of a class file of target source code, part of the class file or a different class file of the target source code being mutated substantially concurrently in at least one other computing thread of the plurality of computing threads, and the part of the class file of the target source code being mutated in the at least one other computing thread in a manner heterogeneous to the mutation of the part of the class file of the target source code in the first computing thread; configuring a compiler executing in the first computing thread to compile the class file of the target source code containing the mutation without compiling other class files of the target source code, resulting in generating a mutant class object code; and replacing a non-mutant object class code of the executing target object code with the mutant class object code.
“18. The computer-readable storage medium of claim 17, wherein the operations further comprise writing the target source code to non-volatile storage including the class file containing the mutation before configuring the compiler.
“19. The computer-readable storage medium of claim 17, wherein mutating part of the class file comprises mutating a line of code of the class file.
“20. The computer-readable storage medium of claim 17, wherein mutating part of the class file is performed in accordance with one of a plurality of mutation patterns of a mutation configuration.
“21. The computer-readable storage medium of claim 17, wherein the compiler is configured by executing a compiler script including a parameterized call to the compiler.
“22. The computer-readable storage medium of claim 21, wherein the compiler script configures a compiler target of the compiler as a Dynamic Code Evolution Virtual Machine (“DCEVM”).
“23. The computer-readable storage medium of claim 17, wherein the operations further comprise executing, in the first computing thread, pending unit tests among a test suite against the executing target object code after replacing the non-mutant object class code.
“24. The computer-readable storage medium of claim 23, wherein the compiler is further configured to run a test class tear down method before the pending unit tests are executed.”
URL and more information on this patent, see: Pearson, Andrew L. Runtime class recompilation during mutation testing.
(Our reports deliver fact-based news of research and discoveries from around the world.)
New Risk Management Findings from Towson University Described (Evaluating Mail-based Security for Electoral Processes Using Attack Trees): Risk Management
“System For Exercise Program Management” in Patent Application Approval Process (USPTO 20220036762): Patent Application
Advisor News
Annuity News
Health/Employee Benefits News
Life Insurance News