# US 2021/0173640 A1 · System and method for syntax comparison and analysis of software code

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

- Number: US 2021/0173640 A1
- Document ID: US20210173640A1
- Status: Published application
- Kind: A1
- Application number: 16/703,702
- Filed: 2019-12-04
- Published: 2021-06-10
- Earliest claimed: 2019-12-04
- Assignees: AT&T Intellectual Property I, L.P.
- Applicants: AT&T Intellectual Property I, L.P.
- Inventors: David Irvin; Nicholas Nicas; Todd Fryer
- Web page: https://patentgrep.com/patent/US20210173640A1

## CPC

- G06F 8/75: Structural analysis for program understanding
- G06F 8/41: Compilation
- G06N 20/00: Machine learning
- G06N 20/10: using kernel methods, e.g. support vector machines [SVM]
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

Aspects of the subject disclosure may include, for example, a method in which a processing system loads a software program into compilers associated with different programming languages to identify a language of the software program, determines whether the software program is executable in the identified language, and compiles the software program to generate executable code. The system retrieves executable programs in the identified language from a program database, analyzes a syntax of the executable code and the executable programs, compares attributes of the executable code and the executable programs, and determines similarity ratings for the executable programs with respect to the executable code. The system also generates a code module comprising the executable code and at least a portion of the executable programs, based at least in part on the similarity ratings. Other embodiments are disclosed.

## Claims

### Claim 1

A method comprising:
receiving, by a processing system including a processor via equipment of a system user, a software program;
identifying, by the processing system, a language of the software program from among a group of different programming languages resulting in an identified language;
determining, by the processing system, whether the software program is executable in the identified language;
compiling, by the processing system, the software program, responsive to a determination that the software program is executable, thereby generating executable code;
retrieving, by the processing system from a program database, one or more executable programs in the identified language;
analyzing, by the processing system, a syntax of the executable code and the one or more executable programs;
comparing, by the processing system, attributes of the executable code and the one or more executable programs, based at least in part on the analyzing;
determining, by the processing system, similarity ratings for the one or more executable programs with respect to the executable code;
generating, by the processing system, a code module comprising the executable code and at least a portion of the one or more executable programs, based at least in part on the similarity ratings; and
providing, by the processing system, a report comprising attributes of the code module and a similarity of the code module with respect to the software program.

### Claim 2 (depends on 1)

The method of claim 1, wherein the identifying comprises loading the software program into a plurality of compilers each associated with a different programming language.

### Claim 3 (depends on 1)

The method of claim 1, further comprising:
cataloging, by the processing system, the executable code as a new database program.

### Claim 4 (depends on 3)

The method of claim 3, wherein the cataloging further comprises recording metadata regarding the executable code in the program database.

### Claim 5 (depends on 1)

The method of claim 1, wherein each program of the one or more executable programs has associated therewith a tag indicating attributes of that program.

### Claim 6 (depends on 1)

The method of claim 1, wherein the comparing is performed using one or more machine learning (ML) algorithms.

### Claim 7 (depends on 6)

The method of claim 6, further comprising generating, by the processing system using the one or more ML algorithms, suggestions for modifying the executable code.

### Claim 8 (depends on 1)

The method of claim 1, wherein the comparing is performed by applying one or more constraints regarding a computing environment of the executable code.

### Claim 9 (depends on 8)

The method of claim 8, wherein the program database comprises open source programs, and wherein one of the constraints specifies that the executable programs be open source programs.

### Claim 10 (depends on 1)

The method of claim 1, further comprising migrating, by the processing system, the software program from the identified language to a different programming language, thereby enabling generation of the code module in the different programming language.

### Claim 11 (depends on 1)

The method of claim 1, further comprising:
cataloging, by the processing system, the code module as a new executable program; and
storing, by the processing system, the code module in the program database.

### Claim 12 (depends on 1)

The method of claim 1, wherein the similarity ratings are determined at least in part according to criteria defined by the system user.

### Claim 13

A device, comprising:
a processing system including a processor; and
a memory that stores executable instructions that, when executed by the processing system, facilitate performance of operations, the operations comprising:
receiving a software program via equipment of a system user;
identifying a language of the software program from among a group of different programming languages resulting in an identified language;
determining whether the software program is executable in the identified language;
compiling the software program, responsive to a determination that the software program is executable, thereby generating executable code;
retrieving, from a program database, one or more executable programs in the identified language;
analyzing a syntax of the executable code and the one or more executable programs;
comparing attributes of the executable code and the one or more executable programs, based at least in part on the analyzing;
determining similarity ratings for the one or more executable programs with respect to the executable code;
generating a code module comprising the executable code and at least a portion of the one or more executable programs, based at least in part on the similarity ratings;
storing the code module in the program database; and
providing a report comprising attributes of the code module and a similarity of the code module with respect to the software program.

### Claim 14 (depends on 13)

The device of claim 13, wherein each program of the one or more executable programs has associated therewith a tag indicating attributes of that program.

### Claim 15 (depends on 13)

The device of claim 13, wherein the comparing is performed using one or more machine learning (ML) algorithms.

### Claim 16 (depends on 13)

The device of claim 13, wherein the comparing is performed by applying one or more constraints regarding a computing environment of the executable code.

### Claim 17 (depends on 13)

The device of claim 13, wherein the identifying is performed by loading the software program into a plurality of compilers each associated with a different programming language.

### Claim 18

A machine-readable medium comprising executable instructions that, when executed by a processing system including a processor, facilitate performance of operations, the operations comprising:
identifying a language of a software program from among a group of different programming languages resulting in an identified language;
determining whether the software program is executable in the identified language;
compiling the software program, responsive to a determination that the software program is executable, thereby generating executable code;
retrieving, from a program database, one or more executable programs in the identified language;
analyzing a syntax of the executable code and the one or more executable programs;
comparing attributes of the executable code and the one or more executable programs, based at least in part on the analyzing and using one or more machine-learning (ML) algorithms;
determining similarity ratings for the one or more executable programs with respect to the executable code;
generating a code module comprising the executable code and at least a portion of the one or more executable programs, based at least in part on the similarity ratings; and
providing a report comprising attributes of the code module and a similarity of the code module with respect to the software program.

### Claim 19 (depends on 18)

The machine-readable medium of claim 18, wherein the identifying comprises loading the software program into a plurality of compilers each associated with a different programming language.

### Claim 20 (depends on 18)

The machine-readable medium of claim 18, wherein the operations further comprise migrating the software program from the identified language to a different programming language, thereby enabling generation of the code module in the different programming language.
