Partial program execution with attribute-based data conversion for dynamic program analysis
AssigneeInternational Business Machines Corporation
InventorTAKAAKI TATEISHI
Life of this patent
Estimating the term…
Abstract
The embodiment may include a computing device that identifies a software code. The embodiment may determine an attribute access and a method call. The embodiment may inject instrumentation code to the software code to capture the attribute access and the method call. The embodiment may convert an attribute into a value using a conversion method based on determining, during an execution of the software code, that the attribute access failed. The embodiment may create a mock object and uses the mock object as a result of the method call to continue execution of the software code based on determining, during the execution of the software code, that the method call failed.
Claims20
A processor-implemented method for attribute-based data conversion, the method comprising:
- identifying software code;
- determining an attribute access and a method call within the software code;
- injecting instrumented code into the software code to capture the attribute access and the method call;
- based on determining, during an execution of the software code, that the attribute access failed, converting an attribute into a value using a conversion method;
- and
- based on determining, during the execution of the software code, the method call failed:
- creating a mock object;
- and
- using the mock object, as a result of the method call, to continue the execution of the software code.
A computer system for attribute-based data conversion, the computer system comprising:
- one or more processors, one or more computer-readable memories, one or more computer-readable tangible storage medium, and program instructions stored on at least one of the one or more tangible storage medium for execution by at least one of the one or more processors via at least one of the one or more memories, wherein the computer system is capable of performing a method comprising:
- identifying software code;
- determining an attribute access and a method call within the software code;
- injecting instrumented code into the software code to capture the attribute access and the method call;
- based on determining, during an execution of the software code, that the attribute access failed, converting an attribute into a value using a conversion method;
- based on determining, during the execution of the software code, the method call failed:
- creating a mock object;
- and
- using the mock object, as a result of the method call, to continue the execution of the software code.
A computer program product for attribute-based data conversion, the computer program product comprising:
- one or more computer-readable tangible storage medium and program instructions stored on at least one of the one or more tangible storage medium, the program instructions executable by a processor, the program instructions comprising:
- program instructions to identify software code;
- program instructions to determine an attribute access and a method call within the software code;
- program instructions to inject instrumented code into the software code to capture the attribute access and the method call;
- based on determining, during an execution of the software code, that the attribute access failed, program instructions to convert an attribute into a value using a conversion method;
- and
- based on determining, during the execution of the software code, the method call failed:
- program instructions to create a mock object;
- and
- program instructions to use the mock object, as a result of the method call, to continue the execution of the software code.
Dependencies are inferred from the claim text.