Enhanced source code translator from procedural programming...

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

C717S136000, C717S137000, C717S142000

Reexamination Certificate

active

06523171

ABSTRACT:

TECHNICAL FIELD
This invention relates to writing of computer programs in source code and more particularly to a process for automatically translating programs written using a procedural programming language into programs written using an object oriented programming language.
BACKGROUND ART
In computer programs written using a procedural language, the programmer specifies an explicit sequences of steps to follow to produce a result. Variables, first defined in the program, are used in the steps of the procedural language. The drawbacks of a procedural language is that the code produced is very specific to the physical implementation of the data processed and very specific to the view the user has of this data. This has a huge impact on the user's workload in maintaining these programs and further limits program reuse.
Object oriented (OO) languages have been created to overcome the drawbacks of procedural languages. The starting point is to build a user's model by creating “objects.” These objects are “data structures” encapsulated with a set or routines called “methods” which operate on the data. An Object has “attributes.” An example would be the attribute employee number (5 digits) of an employee object. An access method could be “get employee.” Operations on the data can only be performed via these methods. Objects having similar behavior (this is the observable effect of performing a method) can be grouped in the same “class.” A class is an object definition describing a category of objects and an object is an instance of a class. Classes are arranged in a class hierarchy: it must be possible to create classes and subclasses and let objects in a subclass “inherit” eveything from their super classes. In an object-oriented developed application, objects use the services of other objects, which in turn use the service of other objects and so on.
In programming using object oriented languages, a programmer's first task is to design a model of basic business objects along with how they interact with each other in order to provide the functions which are requested by the end user.
Because the model is independent of the location of the data or the data base structure, the main advantage of OO languages is the reusability of code. Reusable code in an OO system are “black boxes,” the only thing that needs to be understood when using the code is their interfaces, not their implementation. Well designed classes and the structure of the class hierarchy will be a major factor determining the reusability of objects. Other advantages of the OO languages are the correctness and the maintainability of the code. OO software development cuts cost, shortens development time, and lowers maintenance cost.
For all the advantages of OO programming languages, many existing applications or part of applications written in procedural languages need to be translated into an OO language. When done manually this represents a huge amount of work as the first step will consist first in designing the data structure (objects, classes) corresponding to the application executed by the procedural language code. The design phase cannot be accomplished from the unique procedural code but from an initial functional analysis of the application which is not always available.
Known translators of the prior art first perform a lexical analysis of the input source code. The stream of characters making up the source code is read one at a time and grouped into tokens, word-like pieces such as keywords, identifiers, and punctuation. The translators of the prior art then perform the syntactical analysis, discovering the structure of strings which is described by a grammar. VB2Java is such a translator, which translates Visual Basic to Java. The common language translators working at lexical and syntactical level leave a high percentage of manual rework to complete the translation. With prior art translators, each variable of the procedural language code is mapped to a class attribute, the result of the translation being one single class per source code program The resulting code, even if it can be compiled by a OO language compiler, provides a simplified OO model and thus limits the capability of code reuse and flexibility. This is particularly the case when the initial language to be translated has higher semantic capabilities. The meaning of the language is given by its semantics. The study of meaning and changes of meaning is performed by a semantic analysis. Current translators knowing only the language syntactical grammar fail in translating towards languages having more complex semantics. This implies that when the target language is an OO language, the objects resulting to higher levels of semantics are not identified, meaning that there is no code reuse and thus benefit to translating into an OO language.
SUMMARY OF THE INVENTION
In brief, it is an object of the invention to provide a method to translate a procedural source code to Object Oriented (OO) source code characterized in that it comprises the steps of:
1. defining the patterns of the procedural source code according to the semantic grammar of said procedural language;
2. performing a lexical and syntactical reading of the procedural source code and determining the sequences of instructions in procedural source code corresponding to the identified patterns;
3. identifying new objects, attributes, access methods to objects or access methods to attributes identified in said sequences and storing them in an Object Dictionary; and
4. for each said sequence of source code, if not yet existing, creating a new type of OO classes, and new OO source code classes using the objects of said Object Dictionary.
With the translator of the invention, once the source code programs of an application are translated a complete object model is also generated; it allows reuse of code, use of distributed architecture and flexibility.


REFERENCES:
patent: 5678039 (1997-10-01), Hinks et al.
patent: 5761511 (1998-06-01), Gibbons et al.
patent: 5878385 (1999-03-01), Bralich et al.
patent: 5953526 (1999-09-01), Day et al.
patent: 6032993 (2000-02-01), Andrews et al.
patent: 6072953 (2000-06-01), Cohen et al.
patent: 6145120 (2000-11-01), Highland
patent: 6145121 (2000-11-01), Levy et al.
patent: 6158045 (2000-12-01), You
patent: 6182281 (2001-01-01), Nackman et al.
patent: 6269475 (2001-05-01), Farrell et al.
patent: 6346945 (2002-02-01), Mansurov et al.
patent: 6366664 (2002-04-01), Pullen et al.
patent: 6438573 (2002-08-01), Nilson
Auslander et al. “Fast, effective dynamic compilation”, ACM PLDI, 1996, pp 149-159.*
Hsieh et al, “Java bytecode to native code translation: the caffeine prototype and preliminary results”, IEEE, 1996 pp 90-97.*
Cox et al, “Produce: A tool for translating smalltalk-80 to objective C”, ACM OOPSLA, 1987, pp 423-429.*
Buddrus et al, “Cappuccino- A C++ to Java Translator”, ACM, 1998, pp 660-665.

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

Enhanced source code translator from procedural programming... does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Enhanced source code translator from procedural programming..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Enhanced source code translator from procedural programming... will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-3160695

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