BACKGROUND

The present disclosure, generally, relates to program analysis technology, more particularly, to computer-implemented methods, computer systems and computer program products for processing a program.

In a machine learning program, tabular data having a plurality of columns and rows is often used to train an inference model. Dependencies among columns of such tabular data represent domain knowledge, which is useful for semantic automated feature engineering. Meanwhile, dynamic program analysis is useful for analyzing a program to monitor the behavior of the program during the execution. The dynamic program analysis on a program that handles such tabular data requires preparation of actual data, which would be rarely available in the field of the machine learning due to secrecy and license reasons. Also, it is difficult to create a synthetic data set without knowledge about column names and data types. Furthermore, the machine learning program would generate a dataset dynamically during the execution of the program. Static program analyses are not good at handling such tabular data and corresponding operations.

SUMMARY

According to an embodiment of the present invention, a computer-implemented method for processing a target program is provided. The computer-implemented method includes initiating execution of a target program that handles a data structure object. The computer-implemented method also includes creating a synthetic data structure object by using a mixed data object instead of handling the data structure object in a manner instructed originally in the target program. The mixed data object includes a first data object and a second data object and is configured to redirect a method call to the second data object in response to the first data object being unable to handle the method call.

According to other embodiment of the present invention, a computer-implemented method for converting a target program into a modified target program is provided. The computer-implemented method includes obtaining a target program that handles a data structure object. The computer-implemented method also includes injecting, into the target program, code to incorporate a definition of a mixed data object that includes a first data object and a second data object and is configured to redirect a method call to the second data object in response to the first data object being unable to handle the method call. The computer-implemented method further includes injecting, into the target program, code to incorporate a redefinition of a method for creating a synthetic data structure object by using the mixed data object instead of handling the data structure object in a manner instructed originally in the target program.

According to another embodiment of the present invention, a computer system for processing a target program is provided. The computer system includes a processor; and a memory coupled to the processor. The processor is configured to initiate execution of a target program that handles a data structure object. The processor is also configured to create a synthetic data structure object by using a mixed data object instead of handling the data structure object in a manner instructed originally in the target program, in which the mixed data object includes a first data object and a second data object and is configured to redirect a method call to the second data object in response to the first data object being unable to handle the method call.

According to yet another embodiment of the present invention, a computer program product for processing a target program is provided. The computer program product includes a computer readable storage medium having program instructions embodied therewith. The program instructions are executable by a computer to cause the computer to perform a computer-implemented method. The computer-implemented method includes initiating execution of a target program that handles a data structure object. The computer-implemented method also includes creating a synthetic data structure object by using a mixed data object instead of handling the data structure object in a manner instructed originally in the target program. The mixed data object includes a first data object and a second data object and is configured to redirect a method call to the second data object in response to the first data object being unable to handle the method call.

Additional features and advantages are realized through the techniques of the present invention. Other embodiments and aspects of the invention are described in detail herein and are considered a part of the claimed invention.

