# US 9,436,446 B1 · System for automating calculation of a comprehensibility score for a software program

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

- Number: US 9,436,446 B1
- Document ID: US9436446B1
- Status: Granted
- Kind: B1
- Application number: 14/941,791
- Filed: 2015-11-16
- Granted: 2016-09-06
- Earliest claimed: 2015-11-16
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Vivek K. Gupta; Manish Kataria; Nihar Tiku
- Web page: https://patentgrep.com/patent/US9436446B1

## CPC

- G06F 8/425: {Lexical analysis}
- G06F 8/427: {Parsing}
- G06F 8/75: Structural analysis for program understanding
- G06F 8/42: {Syntactic analysis}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method, a computer program product, and a computer system for automating calculation of a comprehensibility score for a software program. An analytics engine on a computer matches tokens of the software program with a language dictionary, a domain specific vocabulary, and a language grammar. The analytics engine determines a comprehensibility score for the software program, based on matching tokens. The analytics engine provides the comprehensibility score to a reviewer evaluating the software program.

## Claims

### Claim 1

A method for automating calculation of a comprehensibility score for a software program, the method comprising:
matching, by an analytics engine on a computer, tokens of the software program with a language dictionary, a domain specific vocabulary, and a language grammar, wherein the tokens are non-terminal symbols and comprise class names, method names, and variable names;
matching, by the analytics engine, a compound word with different matching words of the language dictionary, in response to determining that the compound word is used in a token;
calculating, by the analytics engine, a weighted average derived from various categories of the non-terminal symbols used in the software program;
determining, by the analytics engine, a comprehensibility score for the software program, based on the weighted average derived from the various categories of the non-terminal symbols used in the software program; and
providing, by the analytics engine, the comprehensibility score to a reviewer evaluating the software program.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
calculating, by the analytics engine, a percentage of a total number of matching tokens over a total number of the tokens in the software program so as to determine the comprehensibility score.

### Claim 3 (depends on 1)

The method of claim 1, further comprising:
calculating, by the analytics engine, a weighted average derived from various categories of production rules applied in the software program so as to determine the comprehensibility score.

### Claim 4 (depends on 1)

The method of claim 1, wherein the matching step begins automatically upon the software program being stored as an updated program with respect to an earlier program version in storage within a distributed development environment.

### Claim 5

A computer program product for automating calculation of a comprehensibility score for a software program, the computer program product comprising a computer readable storage medium having program code embodied therewith, the program code executable to:
match tokens of the software program with a language dictionary, a domain specific vocabulary, and a language grammar, wherein the tokens are non-terminal symbols and comprise class names, method names, and variable names;
match a compound word with different matching words of the language dictionary, in response to determining that the compound word is used in a token;
calculate a weighted average derived from various categories of the non-terminal symbols used in the software program;
determine a comprehensibility score for the software program, based on the weighted average derived from the various categories of the non-terminal symbols used in the software program; and
provide the comprehensibility score to a reviewer evaluating the software program.

### Claim 6 (depends on 5)

The computer program product of claim 5, further comprising the program code executable to:
calculate a percentage of a total number of the matching tokens over a total number of the tokens in the software program so as to determine the comprehensibility score.

### Claim 7 (depends on 5)

The computer program product of claim 5, further comprising the program code executable to:
calculate a weighted average derived from various categories of production rules applied in the software program so as to determine the comprehensibility score.

### Claim 8 (depends on 5)

The computer program product of claim 5, wherein the matching step begins automatically upon the software program being stored as an updated program with respect to an earlier program version in storage within a distributed development environment.

### Claim 9

A computer system for automating calculation of a comprehensibility score for a software program, the computer system comprising:
one or more processors, one or more computer readable tangible storage devices, and program instructions stored on at least one of the one or more computer readable tangible storage devices for execution by at least one of the one or more processors, the program instructions executable to:
match tokens of the software program with a language dictionary, a domain specific vocabulary, and a language grammar, wherein the tokens are the non-terminal symbols and comprise class names, method names, and variable names;
match a compound word with different matching words of the language dictionary, in response to determining that the compound word is used in a token;
calculate a weighted average derived from various categories of non-terminal symbols used in the software program;
determine a comprehensibility score for the software program, based on the weighted average derived from the various categories of the non-terminal symbols used in the software program; and
provide the comprehensibility score to a reviewer evaluating the software program.

### Claim 10 (depends on 9)

The computer system of claim 9, further comprising the program instructions executable to:
calculate a percentage of a total number of matching tokens over a total number of the tokens in the software program so as to determine the comprehensibility score.

### Claim 11 (depends on 9)

The computer system of claim 9, further comprising the program instructions executable to:
calculate a weighted average derived from various categories of production rules applied in the software program so as to determine the comprehensibility score.

### Claim 12 (depends on 9)

The computer system of claim 9, wherein the matching step begins automatically upon the software program being stored as an updated program with respect to an earlier program version in storage within a distributed development environment.
