System and method for multiple entry point access to an object

Data processing: software development – installation – and managem – Software program development tool – Programming language

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C717S165000, C709S241000

Reexamination Certificate

active

06427231

ABSTRACT:

This invention relates to a computer programming language construct, and a system and method for using such construct.
BACKGROUND OF INVENTION
Many computer languages used for program development are so-called static languages, in which most of the information about objects is discarded during compilation, so programs cannot be modified without recompilation. Dynamic languages, on the other hand, are much more flexible and allow certain actions to be taken at runtime that could not be accomplished with a static language. A popular example of a dynamic language is Common Lisp (CL). In addition, there is a strong trend toward object-oriented dynamic languages, which include Common Lisp Object System (CLOS) and Dylan as examples.
Some object-oriented languages generally provide generic function constructs. Generic functions are a class of objects used for performing actions, and correspond generally to functions and procedures of other languages. Generic functions typically contain multiple methods. Such methods typically contain a typed argument list and a code body. In Dylan, for example, a generic function contains a number of methods. When you call a generic function with certain arguments, the generic function uses the classes and identities of the arguments to determine which of the multiple methods to call. This process is called method dispatch.
When a programmer defines a method, he or she specifies the classes or identities of the arguments appropriate for the method. This is called specializing the method. The types in the argument list are called the specializers of the method. A method can only be called with arguments that match the specializers of the argument list. In the most common case, the specializer is a class, and the corresponding argument must be a general instance of the class. When the specializers of a method match a set of arguments, the method is said to be applicable to the arguments. When the generic function is called, the arguments are compared to the specializers of all the methods in the generic function. The method with the most appropriate specializers is run.
In a dynamic language, the type of an object being called is generally not known at compile time. Therefore, the code to call a functional object must be compiled in such a way as to work for all types of functions. This is typically done by having all functional objects entered in the same way, by having a single entry point at a fixed offset which is the same for all types of functional objects. When the compiler is compiling a function call, it will arrange to enter the object at that fixed offset.
CL has three types of functional objects: generic functions, ordinary functions and methods. An ordinary function cannot be added to a generic function. A method cannot be invoked outside of a generic function, except in the very restricted context of method combination, and then only using specialized syntax. A side from these restrictions, ordinary functions and methods provide the same functionality to the user; hence, the distinction between them is an unnecessary complication of the language.
SUMMARY OF INVENTION
An object of the invention is a new language construct that simplifies the language semantics of a dynamic language.
Another object is a language construct for generic functions and methods that simplifies invocation of these objects.
In accordance with an aspect of the present invention, a novel construct for a method object is provided. By constructing the method object in accordance with the invention, it allows a functional object in a dynamic language to be efficiently used as both a directly-invoked function and as a method in a generic function. This allows a language to combine the two concepts, simplifying the language semantics.
In essence, a single method object is created that can be directly invoked as well as invoked when a generic function is called, by providing multiple entry points to the method object.
In a preferred embodiment, the method object construct of the invention comprises a header, a method-information (meth-info) field of fixed size at a fixed offset from the header and including as information the offset of the method body, a function prolog (fn-prolog) field of variable size at a fixed offset from the meth-info field, and finally the method body of variable size. The method object can have multiple entry points, at the fixed offset of the fn-prolog field, or at the offset of the method body as determined by computation.
The multiple entry points allows the passing of more information on generic function dispatch, or the avoidance of certain tasks deemed unnecessary. As one example, entering the function at a first point may involve type-checking of function arguments and certain bookkeeping activities, whereas entry to the same method at a second point may avoid or by-pass type-checking and bookkeeping tasks.
The above and further objects, details and advantages of the present invention will become apparent from the following detailed description of preferred embodiments thereof, when read in conjunction with the accompanying drawings.


REFERENCES:
patent: 4675810 (1987-06-01), Gruner et al.
patent: 4868745 (1989-09-01), Patton et al.
patent: 5226161 (1993-07-01), Khoyi et al.
patent: 5261080 (1993-11-01), Khoyi et al.
patent: 5297284 (1994-03-01), Jones et al.
patent: 0 546 684 (1993-06-01), None
J. F. Peters, III, “Compleat C”, 1986, pp. 297-339.*
Patrick Henry Winston, “LISP”, 1989, pp 175-180.*
George F. Luger, William A. Stubblefield, Artificial Intelligence and the Design of Expert Systems, pp. 515-524.
The Benjamin/Cummings Publishing Company, 1989.
Dylan, An Object-Oriented Dynamic Language, Apple Computer Eastern Research and Technology, pp. 1-167, 1992.
Object-Oriented Programming in Common LISP, Sonya E. Keene A Programmer's Guide to CLOS, pp. 8, 9, 66-115, 1989.

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

System and method for multiple entry point access to an object does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with System and method for multiple entry point access to an object, we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and System and method for multiple entry point access to an object will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-2879091

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