# US 11,907,711 B2 · Fast porting of projects

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

- Number: US 11,907,711 B2
- Document ID: US11907711B2
- Status: Granted
- Kind: B2
- Application number: 17/319,450
- Filed: 2021-05-13
- Published: 2022-11-17
- Granted: 2024-02-20
- Earliest claimed: 2021-05-13
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Shuang Shuang Jia; Yi Chai; Xiao-Yu Li; Xin Zhao; Li Cao; Jiangang Deng; Hua Wei Fan; Zhou Wen Ya; Hong Wei Sun
- Web page: https://patentgrep.com/patent/US11907711B2

## CPC

- G06F 8/76: Adapting program code to run in a different environment; Porting
- G06F 8/75: Structural analysis for program understanding
- G06F 8/77: Software metrics
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Aspects of the invention include systems and methods configured to efficiently evaluate the efforts of a code migration (e.g., porting task) between different platforms. A non-limiting example computer-implemented method includes receiving a function of a source platform. The function can include a plurality of fields. An initial vector is constructed for each of the plurality of fields. The initial vector encodes a value of the respective field according to an encoding rule. The initial vectors are merged into a single final vector and the final vector is classified into one of a plurality of system function families of the source platform. A vector of a target platform at a minimum distance to the final vector is identified and an assessment is provided that includes a difficulty in porting a project comprising the function between the source platform and the target platform based at least in part on the minimum distance.

## Claims

### Claim 1

A computer-implemented method comprising:
receiving a function of a source platform, the function comprising a plurality of fields;
constructing a plurality of initial vectors, the plurality of initial vectors encoding a plurality of values for the plurality of fields according to encoding rules;
merging the plurality of initial vectors into a single final vector;
classifying the final vector into one of a plurality of system function families of the source platform;
identifying a vector of a target platform at a minimum distance to the final vector; and
generating an assessment comprising a difficulty in porting a project comprising the function between the source platform and the target platform based at least in part on the minimum distance.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, wherein the plurality of fields comprise a return type, one or more parameters, a name, a description, and a body.

### Claim 3 (depends on 1)

The computer-implemented method of claim 1, further comprising generating, for each of the plurality of system function families, one or more function subgroups, wherein the final vector belongs to a first subgroup of the source platform.

### Claim 4 (depends on 3)

The computer-implemented method of claim 3, wherein identifying the vector of the target platform at a minimum distance to the final vector comprises:
calculating a center of each of the one or more function subgroups;
identifying a second subgroup of the target platform having a minimum distance to the first subgroup;
calculating, for each vector in the second subgroup, a distance to the final vector; and
identifying the vector in the second subgroup having a minimum distance to the final vector.

### Claim 5 (depends on 3)

The computer-implemented method of claim 3, further comprising transforming the final vector based on an importance matrix comprising, for each element of the final vector, a scaling factor.

### Claim 6 (depends on 5)

The computer-implemented method of claim 5, further comprising:
randomly selecting a point in each subgroup of the one or more function subgroups;
determining whether each selected point belong to the associated subgroup; and
in response to one or more selected points not belonging to the respective subgroup, modifying the scaling factors of the importance matrix.

### Claim 7 (depends on 1)

The computer-implemented method of claim 1, wherein the assessment indicates whether the function of the source platform exists in the target platform, is equivalent to a function in the target platform, or is mismatched to a function in the target platform.

### Claim 8

A system comprising:
a memory having computer readable instructions; and
one or more processors for executing the computer readable instructions, the computer readable instructions controlling the one or more processors to perform operations comprising:
receiving a function of a source platform, the function comprising a plurality of fields;
constructing a plurality of initial vectors, the plurality of initial vectors encoding a plurality of values for the plurality of fields according to encoding rules;
merging the plurality of initial vectors into a single final vector;
classifying the final vector into one of a plurality of system function families of the source platform;
identifying a vector of a target platform at a minimum distance to the final vector; and
generating an assessment comprising a difficulty in porting a project comprising the function between the source platform and the target platform based at least in part on the minimum distance.

### Claim 9 (depends on 8)

The system of claim 8, wherein the plurality of fields comprise a return type, one or more parameters, a name, a description, and a body.

### Claim 10 (depends on 8)

The system of claim 8, wherein the operations further comprise generating, for each of the plurality of system function families, one or more function subgroups, wherein the final vector belongs to a first subgroup of the source platform.

### Claim 11 (depends on 10)

The system of claim 10, wherein identifying the vector of the target platform at a minimum distance to the final vector comprises:
calculating a center of each of the one or more function subgroups;
identifying a second subgroup of the target platform having a minimum distance to the first subgroup;
calculating, for each vector in the second subgroup, a distance to the final vector; and
identifying the vector in the second subgroup having a minimum distance to the final vector.

### Claim 12 (depends on 10)

The system of claim 10, wherein the operations further comprise transforming the final vector based on an importance matrix comprising, for each element of the final vector, a scaling factor.

### Claim 13 (depends on 12)

The system of claim 12, wherein the operations further comprise:
randomly selecting a point in each subgroup of the one or more function subgroups;
determining whether each selected point belong to the associated subgroup; and
in response to one or more selected points not belonging to the respective subgroup, modifying the scaling factors of the importance matrix.

### Claim 14 (depends on 8)

The system of claim 8, wherein the assessment indicates whether the function of the source platform exists in the target platform, is equivalent to a function in the target platform, or is mismatched to a function in the target platform.

### Claim 15

A computer program product comprising a non-transitory computer readable storage medium having program instructions embodied therewith, the program instructions executable by one or more processors to cause the one or more processors to perform operations comprising:
receiving a function of a source platform, the function comprising a plurality of fields;
constructing a plurality of initial vectors, the plurality of initial vectors encoding a plurality of values for the plurality of fields according to encoding rules;
merging the plurality of initial vectors into a single final vector;
classifying the final vector into one of a plurality of system function families of the source platform;
identifying a vector of a target platform at a minimum distance to the final vector; and
generating an assessment comprising a difficulty in porting a project comprising the function between the source platform and the target platform based at least in part on the minimum distance.

### Claim 16 (depends on 15)

The computer program product of claim 15, wherein the plurality of fields comprise a return type, one or more parameters, a name, a description, and a body.

### Claim 17 (depends on 15)

The computer program product of claim 15, wherein the operations further comprise generating, for each of the plurality of system function families, one or more function subgroups, wherein the final vector belongs to a first subgroup of the source platform.

### Claim 18 (depends on 17)

The computer program product of claim 17, wherein identifying the vector of the target platform at a minimum distance to the final vector comprises:
calculating a center of each of the one or more function subgroups;
identifying a second subgroup of the target platform having a minimum distance to the first subgroup;
calculating, for each vector in the second subgroup, a distance to the final vector; and
identifying the vector in the second subgroup having a minimum distance to the final vector.

### Claim 19 (depends on 17)

The computer program product of claim 17, wherein the operations further comprise transforming the final vector based on an importance matrix comprising, for each element of the final vector, a scaling factor.

### Claim 20 (depends on 19)

The computer program product of claim 19, wherein the operations further comprise:
randomly selecting a point in each subgroup of the one or more function subgroups;
determining whether each selected point belong to the associated subgroup; and
in response to one or more selected points not belonging to the respective subgroup, modifying the scaling factors of the importance matrix.
