IP Library Granted Patent US 10,409,559
Granted Patent B2
US 10,409,559 · App. 15/074,208 · Granted Sep 10, 2019

Single-source-base compilation for multiple target environments

Inventors: Brian Goetz (Williston, VT); Maurizio Cimadamore (Dublin, IE)
Assignee: Oracle International Corporation
G06F8/30G06F8/41
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 10,409,559
App. No.
15/074,208
Granted
Sep 10, 2019
Kind
B2
Abstract

A method for software compilation is disclosed. A compiler may identify features of source code which are unavailable in a target environment for the compilation. The compiler may then translate the identified features into modified features in response to determining that projections for the identified features into the target environment are available. The compiler may then compile the source code dependent upon the modified features.

Claims (40)

1. A non-transitory computer-accessible storage medium having program instructions stored therein that, in response to execution by a computer system, causes the computer system to perform operations including:

receiving source code for a program written for a user-selected source environment that is compatible with software features included in the source code, wherein the source code is written in a first version of a programming language;

accessing a list of software features that are available in a target environment that is indicated for the source code, wherein the target environment specifies:

a particular version of an operating system on which a compiled version of the program will be executed, and

a second version of the programming language that is a prior version of the programming language than the first version;

in response to determining that a first software feature of one or more software features included in the source code is unavailable in the target environment:

identifying a portion of the source code that uses the first software feature that is unavailable in the target environment, wherein the identifying is performed prior to executing and compiling the portion of the source code;

translating the portion of the source code to generate a modified version of the portion of the source code in response to determining that a projection of the first software feature into the target environment is available, wherein the modified version of the portion of the source code is compatible with the particular version of the operating system; and

generating new source code for the program that is based on the modified version of the portion of the source code.

2. The non-transitory computer-accessible storage medium of claim 1 , wherein the operations further include compiling the new source code.

3. The non-transitory computer-accessible storage medium of claim 1 , wherein the operations further include selecting the target environment in response to user input.

4. A method, comprising:

receiving source code for a program written for a user-selected source environment that is compatible with software features included in the source code, wherein the source code is written in a first version of a programming language;

accessing a list of software features that are available in a target environment that is indicated for the source code, wherein the target environment specifies:

a particular version of an operating system on which a compiled version of the program will be executed, and

a second version of the programming language that is a prior version of the programming language than the first version;

in response to determining that a first software feature of one or more software features included in the source code is unavailable in the target environment:

identifying a portion of the source code that uses the first software feature that is unavailable in the target environment, wherein the identifying is performed prior to executing and compiling the portion of the source code;

translating the portion of the source code to generate a modified version of the portion of the source code in response to determining that a projection of the first software feature into the target environment is available, wherein the modified version of the portion of the source code is compatible with the particular version of the operating system; and

generating new source code for the program that is based on the modified version of the portion of the source code; and

wherein the method is performed by one or more computing devices.

5. The method of claim 4 , further comprising compiling the new source code.

6. The method of claim 4 , wherein translating the portion of the source code includes replacing a first source construct included in the source code with a second source construct, wherein the second source construct uses a second feature available in the target environment.

7. The method of claim 4 , further comprising selecting the target environment in response to user input.

8. A system comprising:

one or more memories configured to store instructions, and

one or more processors configured to receive instructions from the one or more memories and execute the instructions to cause the system to perform operations comprising:

receiving, via user input:

source code for a program written for a user-selected source environment that is compatible with software features included in the source code, wherein the source code is written in a first version of a programming language; and

a target environment that specifies:

a particular version of an operating system on which a compiled version of the program will be executed, and

a second version of the programming language that is a prior version of the programming language than the first version;

in response to receiving the source code and the target environment, and without further input from a user:

accessing a list of software features that are available in the target environment that is indicated for the source code;

in response to determining that a first software feature of one or more software features included in the source code is unavailable in the target environment:

identifying a portion of the source code that uses the first software feature that is unavailable in the target environment, wherein the identifying is performed prior to executing and compiling the portion of the source code;

translating the portion of the source code to generate a modified version of the portion of the source code in response to determining that a projection of the first software feature into the target environment is available, wherein the modified version of the portion of the source code is compatible with the particular version of the operating system; and

generating new source code for the program that is based on the modified version of the portion of the source code.

9. The system of claim 8 , wherein the operations further include compiling the new source code.

10. The system of claim 8 , wherein translating the portion of the source code includes replacing a first source construct included in the source code with a second source construct, wherein the second source construct is available in the target environment.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 18, 2016
From: GOETZ, BRIAN; CIMADAMORE, MAURIZIO
To: ORACLE INTERNATIONAL CORPORATION
Reel/Frame 038029/0775 →
Continuity (1)
Related Publication 20170269907A1 · Sep 21, 2017