IP Library › Granted Patent US 9,141,603
Granted Patent B2
US 9,141,603 · App. 13/655,671 · Granted Sep 22, 2015

Computer program product and computer system for language-enhanced programming tools

Inventors: Baiju Dalal (Maharashtra State, IN); Mohit Kalra (Delhi, IN)
Assignee: International Business Machines Corporation
G06F17/277G06F17/28
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,141,603
App. No.
13/655,671
Granted
Sep 22, 2015
Kind
B2
Abstract

Statements of a computer program expressed using a first source natural language are made meaningful to a programmer familiar with a second target natural language. The first source natural language of the computer program is determined from the programmer, or through analysis, and the second target natural language desired by the programmer is selected. Textual constructs may be parsed, with reference to stored coding conventions to determine meaningful lexical tokens. Such tokens are translated with a translation engine, and displayed to the programmer, desirably using a graphical user interface feature of an integrated development, environment (IDE) for computer programming in a particular programming language.

Claims (30)

1. A computer program product for selectively translating predetermined portions of a computer program from a source natural language to a target natural language, the computer program product including a non-transitory computer readable storage medium having instructions stored thereon for execution by a computer, wherein the instructions, when executed by the computer, cause the computer to implement a method comprising:

identifying predetermined, selected textual constructs of a computer program, wherein the identifying of the predetermined textual constructs includes identifying by a central processor of the computer system, the constructs including words in a source natural language, wherein the words of the construct are to be translated to a target natural language and wherein the words of the construct to be translated are delimited in the source code according to a stored coding convention, wherein the stored coding convention represents a pattern in which semantic content is expressed in the predetermined textual constructs; and

if the construct is a function or a variable name:

identifying words of a function or a variable name according to the coding convention, wherein the identifying of the words includes identifying by a central processor of the computer system;

translating the identified words of the function or variable name, from the source natural language to the target natural language; and

assembling the words as translated into the target natural language according to the coding convention;

if the construct is a comment, translating the words of the comment construct; and

displaying the source code translated variable name or comment in the target natural language.

2. The computer program product as claimed in claim 1 , wherein the method implemented by the computer executing the instructions of the computer program product further comprises operating the computer system to obtain the coding convention from a user.

3. The computer program product as claimed in claim 1 , wherein the method implemented by the computer executing the instructions of the computer program product further comprises operating the computer system to detect the coding convention by matching the function name or variable name against coding conventions stored in a repository.

4. The computer program product as claimed in claim 1 , wherein the coding convention is selected from the set including (1) zero or more words followed by a word, (2) zero or more words followed by a delimiter followed by a word, and (3) combinations of elements (1) and (2) with non-natural language prefixes and suffixes.

5. The computer program product as claimed in claim 1 , wherein the source code function names, variable names and comments of the computer program are identified from textual input supplied by a programmer.

6. The computer program product as claimed in claim 1 , wherein the method implemented by the computer executing the instructions of the computer program product further comprises displaying the translated source code function names, variable names and comments in part of a graphical user interface.

7. The computer program product as claimed in claim 1 , wherein the method implemented by the computer executing the instructions of the computer program product further comprises operating the computer system to assemble the translated words according to the coding convention prior to displaying the translated source code function names and variable names.

8. A computer system comprising:

a processor; and

a storage device connected to the processor, wherein the storage device has stored thereon a program for selectively translating predetermined portions of a computer program from a source natural language to a target natural language for controlling the processor, and wherein the processor is operative to execute instructions of the program to implement a method comprising:

identifying predetermined, selected textual constructs of a computer program, wherein the identifying of the predetermined textual constructs includes identifying by a central processor of the computer system, the constructs including words in a source natural language, wherein the words of the construct are to be translated to a target natural language and wherein the words of the construct to be translated are delimited in the source code according to a stored coding convention, wherein the stored coding convention represents a pattern in which semantic content is expressed in the predetermined textual constructs; and

if the construct is a function or a variable name:

identifying words of a function or a variable name according to the coding convention, wherein the identifying of the words includes identifying by a central processor of the computer system;

translating the identified words of the function or variable name, from the source natural language to the target natural language; and

assembling the words as translated into the target natural language according to the coding convention;

if the construct is a comment, translating the words of the comment construct; and

displaying the source code translated variable name or comment in the target natural language.

9. The computer system as claimed in claim 8 , wherein the processor is operative to execute instructions of the program to obtain the coding convention from a user.

10. The computer system as claimed in claim 8 , wherein the processor is operative to execute instructions of the program to detect the coding convention by matching the function name or variable name against coding conventions stored in a repository.

11. The computer system as claimed in claim 8 , wherein the coding convention is selected from the set including (1) zero or more words followed by a word, (2) zero or more words followed by a delimiter followed by a word, and (3) combinations of elements (1) and (2) with non-natural language prefixes and suffixes.

12. The computer system as claimed in claim 8 , wherein the source code function names, variable names and comments of the computer program are identified from textual input supplied by a programmer.

13. The computer system as claimed in claim 8 , wherein the processor is operative to execute instructions of the program to display the translated source code function names, variable names and comments in part of a graphical user interface.

14. The computer system as claimed in claim 8 , wherein the processor is operative to execute instructions of the program to assemble the translated words according to the coding convention prior to displaying the translated source code function names and variable names.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 18, 2013
From: DALAL, BAIJU; KALRA, MOHIT
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 030821/0766 →
Continuity (2)
Continuation 12475471 · May 30, 2009
Related Publication 20130041651A1 · Feb 14, 2013