Method for input and output of structures for the Java language

Electrical computers and digital processing systems: multicomput – Computer-to-computer data routing – Least weight routing

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C717S152000

Reexamination Certificate

active

06298389

ABSTRACT:

FIELD OF THE INVENTION
The present invention relates generally to interprocess communication between processes created that use different programming languages. More specifically, the present invention includes a method and apparatus for input, output and manipulation of structures within processes created using languages that do not support structures.
BACKGROUND OF THE INVENTION
Interprocess communication, or IPC, is a general term for techniques that allow software processes to exchange information. By exchanging information, software processes cooperate to perform tasks. Functionally, the use of IPC offers a number of advantages over more traditional monolithic programming models. These advantages include ease of implementation, component reusability, and encapsulation of information. This combination of advantages has resulted in the widespread use of IPC.
Over time, IPC techniques have been adapted to meet the demands of increasingly sophisticated programming environments. Many of these adaptations have attempted to make IPC techniques easier for programmers to use. In spite of this evolution, there are still cases where programmers find the use of IPC techniques to be difficult or error prone. One of these cases arises when programmers attempt to use IPC techniques to send and receive structures within processes created using programming languages that do not provide support for structures. In more detail, high-level languages, such as C, C++ or Pascal, typically allow programmers to group data into aggregates known as structures. In practice, programmers typically use structures to compartmentalize or group related data. This allows related data to be manipulated as a single entity. Thus, for example, a structure might include data describing a hardware device, or data describing an employee record. Because structures contain related data, it is natural for cooperating processes to exchange structures using IPC.
Some high-level languages, namely Java, do not allow data to be grouped into structures. As a result, programmers find it difficult to program Java processes to receive and manipulate structures sent by other processes using IPC. The lack of support for structures also makes it difficult to program Java processes to send structures to other processes using IPC. The unfortunate result is that it is difficult to construct systems where Java-based processes cooperate with processes implemented using more traditional languages, such as C or C++. Since heterogeneous systems of this type are often useful, there exists a need for languages, like Java, to send, receive and manipulate structures.
SUMMARY OF THE INVENTION
The present invention includes a method and apparatus that allows languages to send, receive and manipulate structures defined by other languages. Structurally, the present invention includes a preprocessor and a runtime library. The preprocessor accepts, as input, source code written in a high-level language, such as C or C++. The preprocessor produces, as output, a series of Java source code modules.
Each Java source module output by the preprocessor includes a Java class. Each class corresponds to one of the structures defined in the preprocessor input. The preprocessor maintains this correspondence by naming each class to match the name of the corresponding structure definition. Each class functions as a description of the structure that it is named after. To perform this function, each class includes a series of static integers. One of these static integers is preferably given the reserved name structlen. The structlen static integer included in a class is initialized to be equal to the size of structure that the class is named after. Each of the remaining static integers included in a class is named after one of the elements included in the structure that the class is named after. Each of these static integers is initialized to equal the byte offset of the structure element that it is named after.
The classes are emitted by the preprocessor function as descriptions of the structures included in the C or C++ input file. As classes, these descriptions are available within Java programs. In this way, the present invention provides a method for generating descriptions of C and C++ structures with descriptions available within Java programs. Importantly, the descriptions provided by the preprocessor include the size of each structure and the offset of each element within the structures. These values are available as constants and may be used by programmers creating Java programs.
The present invention also includes a runtime library. The runtime library includes an inbuf Java class. The inbuf class includes a series of methods each designed to read a built-in Java type, such as an integer or character, from a byte array. Each method accepts an argument telling the method the offset within the byte array that the read of the built-in type is to be performed.
Programmers create Java programs to receive, manipulate and send C++ structures using the runtime library and the classes provided by the preprocessor. To receive a C or C++ structure, a programmer configures a Java program to call a standard Java IPC method. The received structure is then stored as a byte array. To access a structure element within the byte array, the programmer configures the Java program to call the appropriate inbuf method. Thus, if an integer value is to be accessed, the programmer configures the Java program to call the inbuf method for reading integers. The programmer specifies the offset of the desired element within the byte array using the description of the element included in the appropriate class provided by the preprocessor.
Advantages of the invention will be set forth, in part, in the description that follows and, in part, will be understood by those skilled in the art from the description or may be learned by practice of the invention. The advantages of the invention will be realized and attained by means of the elements and combinations particularly pointed out in the appended claims and equivalents.


REFERENCES:
patent: 5361350 (1994-11-01), Conner et al.
patent: 5493680 (1996-02-01), Danforth
patent: 5675801 (1997-10-01), Lindsey
patent: 5732257 (1998-03-01), Atkinson et al.
patent: 5884083 (1999-03-01), Royce et al.
(Digital Cat) “C2J, A C + + to Java translator”. www.javacats.com/US/search/rid00000279.html, Sep. 20, 1996.*
Jaworski, Jamie. “JAVA Developer's Guide”, 1996.*
Ber Elliot Joel. “Java-Lex: A lexical analyzer generator for Java”, Aug. 15, 1996.*
Gibello, Pierre-Yves. “ZQL: a Java SQL parser”, Mar. 1998.*
Laffra, Chris. “Advanced Java”. pp. 253-262 Sep. 1996.*
Aho, Alfred V., Ravi Sethi, Jeffrey D. Ullman. “Compilers: Principles, Techniques, and Tools”. Chap. 9, Code Generation; p. 513-528, 1986.*
Kochan, Stephen G.. “Programming in C, Revised Edition”. pp. 369-371, 1988.*
“Orbix for Java White Paper”. IONA Technologies Ltd., p. 1-14, Feb. 1996.*
Eckel, Bruce. “C + +Idiom”, pp. 1-15, Jul. 1993.

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 for input and output of structures for the Java language 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 for input and output of structures for the Java language, we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Method for input and output of structures for the Java language will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-2611812

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