Idiomatic source code generation
AssigneeDiffblue Ltd
InventorPeter Schrammel
Life of this patent
Estimating the term…
Abstract
A computer-implemented method comprising obtaining a first part or representation of a code section as a code part, said code part comprising a first code characteristic, analyzing the code part to identify context information related to the code section, obtaining a first idiomatic modifier based on the first code characteristic and the context information, wherein the first idiomatic modifier in use transforms a first code statement of the code part such that the transformed first code statement corresponds to an idiomatic representation of the first code statement, and generating a modified code part by applying the first idiomatic modifier to the code part.
Claims17
A computer-implemented method comprising:
- obtaining a first part or representation of a code section as a code part, said code part comprising a first code characteristic and a second code characteristic;
- analyzing the code part to identify context information related to the code section;
- obtaining a first idiomatic modifier based on the first code characteristic and the context information, wherein the first idiomatic modifier in use transforms a first code statement of the code part such that the transformed first code statement corresponds to an idiomatic representation of the first code statement;
- obtaining a second idiomatic modifier based on the second characteristic and the context information, wherein the second idiomatic modifier in use transforms a second code statement of the code part such that the transformed second code statement corresponds to an idiomatic representation of the second code statement;
- generating a modified code part by applying the first and second idiomatic modifiers to the code part, wherein the modified code part corresponds to an idiomatic representation of the code part;
- and
- compiling the modified code part.
A system comprising:
- one or more processors;
- and
- one or more non-transitory computer-readable media that collectively store instructions that, when executed by the one or more processors, cause the system to perform operations, the operations comprising:
- obtaining a first part or representation of a code section as a code part, said code part comprising a first code characteristic and a second code characteristic;
- analyzing the code part to identify context information related to the code section;
- obtaining a first idiomatic modifier based on the first code characteristic and the context information, wherein the first idiomatic modifier in use transforms a first code statement of the code part such that the transformed first code statement corresponds to an idiomatic representation of the first code statement;
- obtaining a second idiomatic modifier based on the second characteristic and the context information, wherein the second idiomatic modifier in use transforms a second code statement of the code part such that the transformed second code statement corresponds to an idiomatic representation of the second code statement;
- generating a modified code part by applying the first and second idiomatic modifiers to the code part, wherein the modified code part corresponds to an idiomatic representation of the code part;
- and
- compiling the modified code part.
Dependencies are inferred from the claim text.