# US 2024/0403010 A1 · Code conversion device, method and program

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2024/0403010 A1
- Document ID: US20240403010A1
- Status: Published application
- Kind: A1
- Application number: 18/668,454
- Filed: 2024-05-20
- Published: 2024-12-05
- Earliest claimed: 2023-06-01
- Assignees: NEC Corporation
- Applicants: NEC Corporation
- Inventors: Masashi KOTERA
- Web page: https://patentgrep.com/patent/US20240403010A1

## CPC

- G06F 8/443: {Optimisation}
- G06F 8/51: Source to source
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The input means accepts input of a target program code which is the program code to be processed. The extraction means extracts, from the target program code, a first program code indicating that aggregation processing of each column in a data frame is performed based on a predetermined column value for a data frame representing data in a two-dimensional tabular format, and a second program code indicating predefined processing to be performed on each data frame for which the aggregation processing is performed and a function that calls the predefined processing. The conversion means converts the extracted first program code and second program code into alternative program code, which is program code indicating a process that does not make a function call that invokes the predefined processing by the function and that produces a same result as the processing by the first program code and the second program code.

## Claims

### Claim 1

A code conversion device comprising:
a memory storing instructions; and
one or more processors configured to execute the instructions to:
accept input of a target program code which is the program code to be processed;
extract, from the target program code, a first program code indicating that aggregation processing of each column in a data frame is performed based on a predetermined column value for a data frame representing data in a two-dimensional tabular format, and a second program code indicating predefined processing to be performed on each data frame for which the aggregation processing is performed and a function that calls the predefined processing;
convert the extracted first program code and second program code into alternative program code, which is program code indicating a process that does not make a function call that invokes the predefined processing by the function and that produces a same result as the processing by the first program code and the second program code; and
output the alternative program code.

### Claim 2 (depends on 1)

The code conversion device according to claim 1, wherein the processor is configured to execute the instructions to
generate the alternative program code by converting a program code contained in the function indicated by the second program code into a corresponding predetermined program code.

### Claim 3 (depends on 1)

The code conversion device according to claim 1, wherein the processor is configured to execute the instructions to
convert the first program code and the second program code into the alternative program code when a type of arguments used to call a processing and a type of a return value of the processing match.

### Claim 4 (depends on 1)

The code conversion device according to claim 1, wherein the processor is configured to execute the instructions to
convert a code indicated by a first operation, which is expressed by an expression linked by an equal sign among operations in predefined processing, into a code for speed-up the processing when both right and left sides of the expression are operations on the data frame to be the argument when invoking the processing, and when there is no possibility of changing the number of lines of the data frame to be the argument by the first operation.

### Claim 5 (depends on 1)

The code conversion device according to claim 1, wherein the processor is configured to execute the instructions to
convert a code indicated by a first operation, which is expressed by an expression linked by an equal sign among operations in predefined processing, into a code for speed-up the processing when at least one of right and left sides of the expression is not an operation on the data frame to be the argument when invoking the processing.

### Claim 6 (depends on 5)

The code conversion device according to claim 5, wherein the processor is configured to execute the instructions to
convert a code indicated by the operation expressed by the expression linked by an equal sign into a code for speed-up the processing when a data frame other than the data frame is generated by an equal sign filter by a key to be aggregated in the data frame to be the argument.

### Claim 7

A code conversion method comprising:
accepting input of a target program code which is the program code to be processed;
extracting, from the target program code, a first program code indicating that aggregation processing of each column in a data frame is performed based on a predetermined column value for a data frame representing data in a two-dimensional tabular format, and a second program code indicating predefined processing to be performed on each data frame for which the aggregation processing is performed and a function that calls the predefined processing;
converting the extracted first program code and second program code into alternative program code, which is program code indicating a process that does not make a function call that invokes the predefined processing by the function and that produces a same result as the process by the first program code and the second program code; and
outputting the alternative program code.

### Claim 8 (depends on 7)

The code conversion method according to claim 7, further comprising:
generating the alternative program code by converting a program code contained in the function indicated by the second program code into a corresponding predetermined program code.

### Claim 9

A non-transitory computer readable information recording medium storing a code conversion program, when executed by a processor, that performs a method for:
accepting input of a target program code which is the program code to be processed;
extracting, from the target program code, a first program code indicating that aggregation processing of each column in a data frame is performed based on a predetermined column value for a data frame representing data in a two-dimensional tabular format, and a second program code indicating predefined processing to be performed on each data frame for which the aggregation processing is performed and a function that calls the predefined processing;
converting the extracted first program code and second program code into alternative program code, which is program code indicating a process that does not make a function call that invokes the predefined processing by the function and that produces a same result as the process by the first program code and the second program code; and
outputting the alternative program code.

### Claim 10 (depends on 9)

The non-transitory computer readable information recording medium according to claim 9, wherein
the alternative program code is generated by converting a program code contained in the function indicated by the second program code into a corresponding predetermined program code.
