Presentation is loading. Please wait.

Presentation is loading. Please wait.

Programming Language Translation

Similar presentations


Presentation on theme: "Programming Language Translation"— Presentation transcript:

1 Programming Language Translation
Jamie McAtamney

2 Introduction Purpose: to write a fully functional translator
C to Java Hasn’t been done before Java has some advantages over C Scope: as wide as possible All the “basics” Will attempt to translate modules Might not get to graphics

3 Background Lack of similar research
Jazillian pay-per-program translation company Terekhov & Verhoef’s article on translation difficulties Sources of inspiration

4 Methodology Approach Read up on differences between C and Java
Make everything modular Add modules for different translations Have “translate()” methods to coordinate everything Cover most common aspects first, not just simplest

5 Methodology Translation algorithm Tokenization Keyword search-replace
Keywords and punctuation Keyword search-replace Ex: char* → String Context-sensitive search Ex: printf(“\n”); → System.out.println();

6 Methodology Timeline Currently on tokenization
Problems writing in C Step 1: Whole-line translation Step 2: Primitive types Step 3: Input/output Step 4: Structs → Classes Step 5: Modules Step 6: ???

7 Methodology Testing & Analysis Reading in old C programs
More structure than functionality testing Mostly debugging so far

8 Methodology Problems: C tokenizer didn’t work
Translator moved C → Java Limited test base Few basic structures Not always direct analogs

9 Progress Preliminary Results Program works Full-line translation works
Search-replace will work; not yet implemented Still working on it at this point

10 Progress Analysis Too early to draw conclusions
No visuals No “degrees” of success No major changes in initial plan/hypothesis No great new insights/ideas yet Everything’s on track


Download ppt "Programming Language Translation"

Similar presentations


Ads by Google