Bi-directional conversion library

Data processing: database and file management or data structures – Database design – Data structure types

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C707S793000, C707S793000, C717S152000, C717S152000, C717S152000, C717S152000

Reexamination Certificate

active

06314429

ABSTRACT:

FIELD OF THE INVENTION
This invention relates in general to a method for translating data structures used by a computer program written in a first computer programming language to equivalent data structures in a second computer programming language and more specifically for translating between the data structures of the two computer programming languages Java™ and C.
BACKGROUND OF THE INVENTION
In present day multi-platform computing environments, it is often a requirement that programs written in one language have to interact with programs written in another language (e.g. a computer program from Java™ making use of a C library). A prime difficulty with the interaction of programs written in different computer programming languages is the representation of data—each language stores information differently. If two programs are to interact, one program must convert the data from the representation used by the other program to its own.
The Java™ Native Interface (JNI) Application Programming Interface (API) is provided in the Java™ programming language to call C functions as if they were written in Java™. The Java™ Native Interface also provides a set of functions for converting primitive data types. While this is an elegant solution from a Java™ code perspective, it results in an interface which is extremely difficult to understand and to use from a C code perspective. It is well known in the art that typical computer programs use complex data structures built from the primitive data types. The JNI does not provide a method for automating the conversion of complex data structures. Also, complexity of this interface practically ensures that faults will find their way into applications where native methods are used. The danger presented by these faults is extreme since the native method interface allows C functions to access pointers to memory residing inside a Java™ virtual machine (VM).
The Java™ VM is intended to present an abstract, logical machine design free from the distraction of inconsequential details of any implementation. The memory areas of the Java™ virtual machine do not presuppose any particular locations in memory or locations with respect to one another. The memory areas need not consist of contiguous memory. However, the instruction set, registers, and memory areas are required to represent values of certain minimum logical widths (e.g. the Java™ stack is 32 bits wide). These requirements are discussed in the following sections.
The Java™ virtual machine is a machine which runs a special set of instructions which specify every possible instruction which may be implemented by the machine. The Java™ VM allows every computer to run Java™ applications. A pointer is a data item which specifies a location of another data item. Pointers are very unstable and therefore their use can lead to unstable computer operations, which can lead to a possible crash of the entire Java™ VM.
To reduce the complexity of implementing native methods, and to minimize the number of places where pointers to memory within the Java™ VM are accessed, the inventors have recognized the desirability of providing a means to convert objects (or even primitive data types) used in legacy function calls (i.e. function calls provided by existing programs). In software, a legacy system is an existing system to which new code is being added and a legacy function is a function used in such a system. By localizing this conversion to a single location, much of the danger inherent in the use of native methods can be mitigated.
SUMMARY OF THE INVENTION
According to the present invention, a bidirectional conversion library is provided which translates and converts data structures used in a first programming language to equivalent data structures of a second programming language, and vice versa. In the preferred embodiment, using Java™ and C as the first and second programming languages, respectively, the library of the present invention utilizes the Java™ Native Interface (JNI). The JNI is the interface between Java™ and any other computer programming language which is to be incorporated into Java™ applications during the conversion process. At the present time, only C and C++ are supported by the Java™ Native Interface. The bi-directional conversion library of the preferred embodiment may be implemented as an API provided by a Dynamic Link Library (DLL) for allowing Java™ data objects to access C functions via a mapping layer. Each DLL function takes a pointer to the JNI as a first parameter. By limiting the use of this pointer to a select set of functions, the problem inherent in the prior art Java™ Native Interface API of allowing C functions to access pointers to memory residing inside the Java™ VM is eliminated.


REFERENCES:
patent: 5481712 (1996-01-01), Silver et al.
patent: 5734907 (1998-03-01), Jarossay et al.
patent: 5757925 (1998-05-01), Faybishenko
patent: 5872973 (1999-02-01), Mitchell et al.
patent: 5889992 (1999-03-01), Koerber
patent: 5960200 (1999-09-01), Eager et al.
patent: 5966702 (1999-10-01), Fresko et al.
patent: 5970490 (1999-10-01), Morgenstern
patent: 5995974 (1999-11-01), Anton et al.
patent: 5999972 (1999-12-01), Gish
patent: 6023698 (2000-02-01), Lavey, Jr. et al.
patent: 6066181 (2000-05-01), DeMaster
patent: 6081665 (2000-06-01), Nilsen et al.
patent: 6122627 (2000-09-01), Carey et al.
patent: 0 803 806 A2 (1997-10-01), None

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

Bi-directional conversion library does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Bi-directional conversion library, we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Bi-directional conversion library will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-2604480

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