Method and system for compiling multiple languages

Data processing: software development – installation – and managem – Software program development tool – Translation of code

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C717S143000

Reexamination Certificate

active

06836883

ABSTRACT:

TECHNICAL FIELD
The present invention relates to source language compiler technology and particularly to the use of compilers to create a runtime library and environment that is independent of the source language used to generate the executable programs or applications that execute in the runtime environment.
BACKGROUND OF THE INVENTION
Compilers are computer programs that read applications or programs written in one language, i.e., a source language such as a high-level programming language, and convert the source language program into a second language, i.e., a target language. Additionally, compilers typically perform other functions, such as reporting errors and importing other files or libraries for use by the source language file. The product of a compilation is typically a machine code language that can be executed directly on a particular processor in a particular operating environment.
Generally, the compilation process involves two parts, a front end portion for doing analysis and a back end portion for performing synthesis. The front end analysis parses the source language file, checks for lexical, grammatical or syntactic problems, and creates an intermediate representation of the source language file. The synthesis step analyzes the intermediate representation of the source language file and generates the target language file from the intermediate representation. The back end synthesis primarily depends on a particular target machine and is relatively independent of the source language used in creating the source file. On the other hand, the front end analysis depends primarily on the specific source language used and is relatively independent of the target machine.
There are at least three types of high-level programming languages in use today. The primary types of languages may be classified as procedural languages, functional languages, and object oriented programming languages. Additionally, each specific programming language has an associated library of functions that may be used by a software developer using that language. For example, almost every programming language has an input/output library of functions to allow the user to read information from an input device, such as from a file or a keyboard, and to write information to an output device such as a file, a display or a printer. In order to use this library of functions, the source language file has an “include” or “import” statement that indicates to the compiler the name of the desired library file.
During compile time, a language-specific compiler reads the source language file, determines that a library declarations file is needed and continues by reading the library declarations file. Importantly, in order for the library declarations file to be handled by the compiler, the library declarations file must be written in the native language for that compiler, i.e., the same language as the source language file. For example, if a user writes a source level program in C++ and the program uses a library declarations file, such as “stdio.h”, then the library declarations file must be written in C++ so that the C++ compiler can read and understand the library declarations file. At runtime, the resulting executable program must execute along with a library program file that supplies the implementation of those items from the library declarations file actually used by the source language program written by the user.
One particular drawback associated with front end portions of compilers relates to the fact that only one type of source language file can be “consumed” by a particular front end. That is, compilers only compile files written in a particular source language and are not flexible in receiving other source language files. Moreover, the library declarations files that are imported by a compiler must also be written in the particular source language associated with a particular compiler. Unfortunately, different source languages provide benefits or advantages in performing some functions over other programming languages and many such benefits are associated with specific library functions. Since compilers for one language cannot use a library declarations file written in another language, library declarations files are often translated or rewritten into other source languages so that the library functions may be used by other source languages.
It is with respect to these considerations and others that the present invention has been made.
SUMMARY OF THE INVENTION
The present invention relates to a front end compiler system that compiles received information into two forms, metadata and instruction code either of which may be fed back into either the same or another front end system. The metadata contains information that describes the instruction code, which can be used by a front end system during a later compilation. The instruction code, also referred to as executable instructions can take many forms, such as object code directly executable on a processor or an “intermediate” type instruction code that may be executed on a back end execution environment. Since different front ends may read different source languages, and since each front end may also read the output of any other front end, a system is presented where a particular set of functionality created in one source language, using a front end adapted to that language, may be directly utilized by a front end adapted to a different language. This allows developers to use a source language particularly well suited to one type of problem to create functionality that can then be directly used by a program, component, or other entity created in a different source language.
Thus, the present invention relates to both a front end compiler system that produces metadata and executable instruction information and a front end compiler system that is able to compile this new information in addition to being able to compile a native source language file. In essence, a front end system of the present invention generates an common language file that can be both executed on a processor or other back end execution system and also compiled into another file, e.g., an executable file for execution on a target computer system or yet another front end system.
The present invention also relates to a system having multiple front ends that consume multiple programming languages and share a common library of functions. The common library is represented in a common language that can be used by multiple different source languages. The front end compiler systems read the common language files that make up the common library and the source language files that use the library. Additionally, the front end systems produce common language files. The common language files produced by the front end systems can be used in the common library. The common language files may also be supplied to a back end system or runtime environment that further compiles the common language file to an executable form and executes the file. At runtime, a library program file corresponding to the common language library file is used by the runtime environment to layout the objects and methods used during execution. Additionally, the back end portion may be targeted for a particular machine.
In accordance with other aspects, the present invention relates to a system for compiling a computer program written in a native source code language that has a plurality of front end compilers. Each front end compiler is associated with a different native source code language and each front end compiler consumes common language information in addition to its native source code. Moreover, each front end compiler produces a common language file that can be consumed by a runtime environment that is targeted for a particular machine. Additionally, the runtime environment has a loader for loading the common language file into the runtime environment and a layout engine for examining the common language file and determining the layout for classes and objects used at runtime.
In accorda

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Method and system for compiling multiple languages does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Method and system for compiling multiple languages, we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Method and system for compiling multiple languages will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-3324257

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.