Method and apparatus for a cross-platform translator from VB.net to java

a cross-platform translator and java technology, applied in the field of methods and apparatus for a cross-platform translator from vb.net to java, can solve the problems of impracticality of translating translators, lack of grappling with the abundance and complexity of platform differences, and focusing on language features with modestness

Inactive Publication Date: 2009-01-29
ADAMS MEGAN
View PDF3 Cites 43 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Benefits of technology

[0039]The translation method and apparatus in accordance with the embodiments of the present invention generate a complete object oriented interface to the target platform for the source program. The translation interfaces directory contains definitions for all types and services used but not declared by the source program. These type definitions will contain method definitions, some of which are fully implemented methods and some of which are not fully implemented (meaning they are without method bodies). The translation method and apparatus in accordance with the embodiments of the present invention will have its own built-in mapping of source platform to target platform functionality. When that mapping applies, the platform functionality will be fully implemented in method definitions in the classes in the translation interface directory. When no mapping applies, the translation interface directory will contain a stub (without a method body) for the service in the appropriate class. This is a flexible and robust approach that can handle unpredictable and incompatible changes in the source and target platform definition. This functionality also allows the translation method and apparatus to handle in a robust and flexible fashion the translation of specific user coded source classes without requiring that the whole user coded application containing those specific classes, with all their referenced types, be translated. This supports code reuse of individual user coded classes across platforms.

Problems solved by technology

Prior art translators have focused on language features with modest results (VB2Java, for example) but have not grappled with the abundance and complexity of differences in platform.
The sheer complexity of the platforms themselves has made it impractical to implement translators which understand each platform in such detail that they can translate functionality from one platform to another in an automatic, transparent, and robust fashion.
One difficulty which has contributed to this being an insurmountable problem is that the differences between platforms are not static.
They can change with any platform release, meaning that any platform definitions which the translator might assume are inherently unstable.
Therefore, manual translation is required in whole or in part when moving source code to a different platform, and this in practice prevents code reuse completely for a wide class of applications.
Some translators of the prior art do not analyze the types or do any type checking.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and apparatus for a cross-platform translator from VB.net to java
  • Method and apparatus for a cross-platform translator from VB.net to java
  • Method and apparatus for a cross-platform translator from VB.net to java

Examples

Experimental program
Comparison scheme
Effect test

example 1

[0087]

1 Class Class123 Sub Sub14   Dim Obj1 As New UndeclaredType15   Obj1.function1(Timer( ))6   Dim IntValue As Integer = Timer( )7 End Sub8 End Class

[0088]In this example, function1 is an undeclared function because the definition of the class which contains the function, UndeclaredType1, is not available in the source which is input to the translation method. Thus the signature of function1 is unknown. Line 5: ‘Obj1.function1(Timer( ))’ has the effect of putting the parameter to function1 into the same unknown type set as the return type of Timer( ). That is, the parameter to function1 and the return type of Timer( ) are in the same unknown type set.

[0089]In one embodiment of the translation method of the present invention, the translate controller (120) controls the setting of the phase. During the type dependency phase of the translate controller of the invention (210), the unknown type sets are constructed for all objects of unknown type. For one embodiment of the translation...

example 2

[0103]

1 Class Class12 Sub Main3  Name1.method14  Name2.item1 = Name1.method15  Dim Name3 As Object = Name4.Name5.Name66  Dim Name7 As Object = new Name87 End Sub8 End Class

[0104]All of the names in Example 2 except Name3 and Name7 are undeclared. In one embodiment of translation method the present invention, ‘fixup undeclared name’ determines valid kinds for the undeclared names. Specifically, it determines that Name1 is a class name (980), method1 is a method name (970), Name2 is a class name (980), item1 is a setter name (940), Name4 is a namespace, Name5 is a class (980), Name6 is a method (970), and Name8 is a class (990). (Note that FIG. 9 does not break out the identification of namespaces, as namespaces are encountered as part of type names, and their processing is folded into the processing of type names.) The translation method of the present invention will generate the source code for classes Name1, Name2, Name4.Name5, and Name8, into the translation interfaces directory (...

example 3

[0105]

1 class Class1 { 2   public static void main(String[ ] args) { 3     Name1.method1( ); 4     Name2.set_item1(Name1.method1( )); 5     Object Name3 = Name4.Name5.Name6( ); 6     Object Name7 = new Name8 ( ); 7   } 8 }

[0106]Recall that the analysis of the expression by one embodiment of the translation method of the present invention is performed through three steps, where the first step is the translation of each operand (430, 450). The preceding discussion details the first step. The preceding discussion has shown how ‘translate operand’ first calls ‘get symbol’ for the operand (500) and then does any needed fixups (510). After any needed fixups have been performed, ‘translate operand’ formats the operand into the expression result and returns the symbol for the operand. Now the presentation of the first step of expression analysis for one embodiment of the translation method of the present invention, operand translation, is complete.

[0107]Referring again to FIG. 4, for one em...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

A method and system for translating source code in one logically distinct object oriented language on one platform into another object oriented language on another platform. This includes the translation of the classes and statements in the original source. It also includes the creation of object oriented interfaces for all types and services used in the source code whose definitions are not provided. Once the source code classes are translated, a complete object oriented interface to the target platform is generated. Type inference analysis is performed on the input source code in order to infer types for undeclared services and to infer type hierarchies for undeclared types. Type inference analysis is utilized to generate object oriented interfaces for all types and services used in the source code whose definitions are not available. The method and system also have the capability of generating, on an as needed basis, specific bridge classes which support bridging the platform differences between the target and the source platform.

Description

CROSS-REFERENCE TO RELATED PATENT APPLICATION[0001]This application relates to U.S. Provisional Patent Application No. 60 / 959,027 filed on Jul. 9, 2007, entitled Method and Apparatus for a Cross-Platform Translator from VB.Net to Java, the content of which is hereby incorporated herein in its entirety by this reference.BACKGROUND OF THE INVENTION[0002]1. Field of the Invention[0003]The method and apparatus of this invention relate generally to the translation of one logically distinct object oriented language on one platform into another object oriented language on another platform. More specifically, the method and apparatus relate to a system and process for translating computer programs in a language having the attributes VB.Net 2003 on the platform .Net into computer programs having the attributes of Java (1.4.2) on the Java platform.REFERENCES[0004]1. U.S. Pat. No. 4,374,408 Bowles, et al. February 1983. Multi-pass system and method for source to source code translation[0005]2....

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(United States)
IPC IPC(8): G06F9/45
CPCG06F8/51
Inventor ADAMS, MEGAN
Owner ADAMS MEGAN
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products