SlideShare a Scribd company logo
1 of 2
Download to read offline
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 07 Issue: 04 | Apr 2020 www.irjet.net p-ISSN: 2395-0072
© 2020, IRJET | Impact Factor value: 7.34 | ISO 9001:2008 Certified Journal | Page 1864
From C to JAVA
Farhana Kausar1, Karthik G S2
1Assistance Professor, Atria Institute of Technology, Visvesvaraya Technological University, Bangalore
2Student, Atria Institute of Technology, Visvesvaraya Technological University, Bangalore
---------------------------------------------------------------------***----------------------------------------------------------------------
Abstract - As per current business needs and rapid
growth in Automation, it became necessary for industries
to provide migration solutions to client as early and
more efficiently as possible to cope up with competition
in market. For this purpose a method has been proposed
for constructing JAVA programs from C programs. IBM
mainframe programs, which written in language such as
C, is automatically translated into equivalent JAVA
programs. Our method features the documentation of
translation process. Not only the translation, but the
correspondence between source C program and resulting
JAVA program is produced as document. This helps in
reducing the overhead of manually rewriting the entire C
code into JAVA language.
Key Words: Migration, Modernization
1. INTRODUCTION
This paper proposes a method of migrating C
programs to equivalent JAVA programs, which focuses
on generating supplementary information to
understand the resulting JAVA programs and the
translation process. JAVA programs with high flexibility
are generated through intermediate representation
extracted from the given C codes. Also, the comments in
the C programs, that hold useful information to
understand the program like, how the programs should
be used, the motive of each part of code, etc., are placed
at thecorrect position of the resulting Java programs.
Migration is basically shifting from one place to
other or changing from one form to another. But, if we
relate this concept to programming, code migration
would be changing code from one programming
language to another. Thus, our paper presents the idea
for changing the code from C to Java. Although IT
industry is growing rapidly, there are few organizations
those are stuck to mainframe systems. Mainframe
system uses programming languages like C, COBOL, etc.
These organizations are thinking to shift towards more
widely used and flexible languages like JAVA. So, if they
get a tool which would readily convert them the code
from one language to another, then that would be very
beneficial to them in terms of time and efforts as well.
An automation tool based on the proposed
method is implemented in Java, which has successfully
converted some C programs into working JAVA
programs.
2. BASIC IDEA
Fig -1: Translation Process
Thus, in order to get the code translated from C to
Java, we have divided the approach into two phases. In
the very first phase, program in C language will be
converted into CPPlanguage.Thisisbecausemanyof the
syntaxes of C and CPP are similar, for example, the
looping statements, the decision making statements etc.
are similar in both C and CPP.
In second phase, the program in CPP language will
be converted into JAVA. Converting CPP code into JAVA
will be somewhat easier as features of both CPP and
JAVA like classes, objects, inheritance etc. are similar.
Thus, we can get the C code converted intoJAVA.
The paper proposes approachto convert/translate the
given source program from C to JAVA. But, if we try to
convert code directly into java, then it might be difficult
since, C is procedure oriented language and JAVA is
Object Oriented language.
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 07 Issue: 04 | Apr 2020 www.irjet.net p-ISSN: 2395-0072
© 2020, IRJET | Impact Factor value: 7.34 | ISO 9001:2008 Certified Journal | Page 1865
3. IMPLEMENTATION
Fig 2. Flow of Implementation
The main goal of the approach is to exploit the power of
data mining and genetic algorithms in aiding source
code migration. The genetic algorithm is capable of
learning complex mappings that exist between classes,
methods and API usages between two languages. For
example, the source code for outputting a string to the
consolescreenin C is,
printf(“Hello World!”);
The corresponding statement in JAVA
is System.out.println(“Hello World!”);
For example, when printf word is found in any of the
statements from input C program, then that word will
be search against its replacement in JAVA, which will be
System.out.println. Once the corresponding keyword is
found, then it will be replaced. Similarly, the entire code
is searched line by line and the output is appended line
by line into a paragraph. Thus, the resulting code is
converted JAVA program.
4. CONCLUSIONS
A Genetic Algorithm based approach was
proposed for the problem of translation of the given
source program from one language to another. The
technological changes take place so drasticallythatmany
more migration projects are likely to come up and hence
the development of an effective system for such
migration goes important. The developed system has the
problem of mapping from C to JAVA as C belong to
procedure oriented paradigm, and JAVA belong to object
oriented paradigm. More efforts need to be taken for
migration between different paradigms (as from C to
JAVA).
Also, the proposed system can be applied to
applications that are freely available in order to
improve the functionality of resultant outcomes. Along
with this, there can be advancement in Computer
Science field like improvement in neural networks and
natural computations can be applied as it is mandatory
that no efforts should be left in order to improve the
efficiency of translation tasks.
REFERENCES
[1] Daisuke Fujiwara and Nagisa Ishiura, “Reverse
Engineering from Mainframe Assembly to C Codes
in Legacy Migration”, IIAI International Congress
on Advance Applied Informatics,IEEE,2016.
[2] Andrea Fornaia and Emiliano Tramontana, “Is My
Code Easy to Port? Using Taint Analysis to Evaluate
and Asist Code Portability”, International
Conference on Enabling Tehnologies, IEEE, 2017.
[3] S. Geetha and Dr. K. Iyankutti, “A Genetic Algorithm
Based Source Code Mining Approach for Language
Migration”, International Journal on Recent and
Innovation Trends in Computing and
Communication, Vol:2, ISSN:2321-8169,August
2014.
[4] Suvam Mukharjee and Tamal Chakrabarti,
“Automatic Algorithm Specification to Source Code
Translation”, Indian Journal of Computer Science
and Engineering (IJCSE), Vol:2, ISSN:0976-
5166,Apr-May 2011.
[5] Zhong, Hao, Thummalapenta, Suresh, Xie, Tao,
Zhang, Lu, Wang, Qing, Mining API mapping for
language migration, Proceedings of the 32nd
ACM/IEEE International Conference on Software
Engineering, Volume 1, 2010.

More Related Content

What's hot

Iwsm2014 application of function points to software based on open source - ...
Iwsm2014   application of function points to software based on open source - ...Iwsm2014   application of function points to software based on open source - ...
Iwsm2014 application of function points to software based on open source - ...
Nesma
 
Resume electronics engineer with 8 months experience updated may 9 - copy
Resume   electronics engineer with 8 months experience updated may 9 - copyResume   electronics engineer with 8 months experience updated may 9 - copy
Resume electronics engineer with 8 months experience updated may 9 - copy
PRAJAKTA SHENDAGE
 
Automation _C#.Net_4.2yrs
Automation _C#.Net_4.2yrsAutomation _C#.Net_4.2yrs
Automation _C#.Net_4.2yrs
arunkumar hm
 
Resume lukeman hakkimsheikalavudeen
Resume   lukeman hakkimsheikalavudeenResume   lukeman hakkimsheikalavudeen
Resume lukeman hakkimsheikalavudeen
lukemanHakkim
 

What's hot (10)

Iwsm2014 application of function points to software based on open source - ...
Iwsm2014   application of function points to software based on open source - ...Iwsm2014   application of function points to software based on open source - ...
Iwsm2014 application of function points to software based on open source - ...
 
Resume electronics engineer with 8 months experience updated may 9 - copy
Resume   electronics engineer with 8 months experience updated may 9 - copyResume   electronics engineer with 8 months experience updated may 9 - copy
Resume electronics engineer with 8 months experience updated may 9 - copy
 
2014 IEEE JAVA SOFTWARE ENGINEERING PROJECT Repent analyzing the nature of id...
2014 IEEE JAVA SOFTWARE ENGINEERING PROJECT Repent analyzing the nature of id...2014 IEEE JAVA SOFTWARE ENGINEERING PROJECT Repent analyzing the nature of id...
2014 IEEE JAVA SOFTWARE ENGINEERING PROJECT Repent analyzing the nature of id...
 
Automation _C#.Net_4.2yrs
Automation _C#.Net_4.2yrsAutomation _C#.Net_4.2yrs
Automation _C#.Net_4.2yrs
 
Resume lukeman hakkimsheikalavudeen
Resume   lukeman hakkimsheikalavudeenResume   lukeman hakkimsheikalavudeen
Resume lukeman hakkimsheikalavudeen
 
RESUME
RESUMERESUME
RESUME
 
C#.NET_4_ years
C#.NET_4_ yearsC#.NET_4_ years
C#.NET_4_ years
 
An Investigation Of EXtreme Programming Practices
An Investigation Of EXtreme Programming PracticesAn Investigation Of EXtreme Programming Practices
An Investigation Of EXtreme Programming Practices
 
Full stack component of software and middleware for quantum machine
Full stack component of software and middleware for quantum machineFull stack component of software and middleware for quantum machine
Full stack component of software and middleware for quantum machine
 
Animation Framework with Internationalization (I18n)
Animation Framework with Internationalization (I18n)Animation Framework with Internationalization (I18n)
Animation Framework with Internationalization (I18n)
 

Similar to IRJET - From C to JAVA

Portable Code Compiler
Portable Code CompilerPortable Code Compiler
Portable Code Compiler
ijtsrd
 
A VNF modeling approach for verification purposes
A VNF modeling approach for verification purposesA VNF modeling approach for verification purposes
A VNF modeling approach for verification purposes
IJECEIAES
 

Similar to IRJET - From C to JAVA (20)

IRJET- Online Compiler for Computer Languages with Security Editor
IRJET-  	  Online Compiler for Computer Languages with Security EditorIRJET-  	  Online Compiler for Computer Languages with Security Editor
IRJET- Online Compiler for Computer Languages with Security Editor
 
LANGUAGE TRANSLATOR APP
LANGUAGE TRANSLATOR APPLANGUAGE TRANSLATOR APP
LANGUAGE TRANSLATOR APP
 
IRJET - Optical Character Recognition and Translation
IRJET -  	  Optical Character Recognition and TranslationIRJET -  	  Optical Character Recognition and Translation
IRJET - Optical Character Recognition and Translation
 
IRJET- Online Programming Assessment and Evaluation Platform in Education System
IRJET- Online Programming Assessment and Evaluation Platform in Education SystemIRJET- Online Programming Assessment and Evaluation Platform in Education System
IRJET- Online Programming Assessment and Evaluation Platform in Education System
 
MACHINE LEARNING AUTOMATIONS PIPELINE WITH CI/CD
MACHINE LEARNING AUTOMATIONS PIPELINE WITH CI/CDMACHINE LEARNING AUTOMATIONS PIPELINE WITH CI/CD
MACHINE LEARNING AUTOMATIONS PIPELINE WITH CI/CD
 
IRJET- Cross-Platform Supported E-Learning Mobile Application
IRJET- Cross-Platform Supported E-Learning Mobile ApplicationIRJET- Cross-Platform Supported E-Learning Mobile Application
IRJET- Cross-Platform Supported E-Learning Mobile Application
 
DFA CREATOR AND STRING TESTER
DFA CREATOR AND STRING TESTERDFA CREATOR AND STRING TESTER
DFA CREATOR AND STRING TESTER
 
Recent Trends in Translation of Programming Languages using NLP Approaches
Recent Trends in Translation of Programming Languages using NLP ApproachesRecent Trends in Translation of Programming Languages using NLP Approaches
Recent Trends in Translation of Programming Languages using NLP Approaches
 
A Review On Chatbot Design And Implementation Techniques
A Review On Chatbot Design And Implementation TechniquesA Review On Chatbot Design And Implementation Techniques
A Review On Chatbot Design And Implementation Techniques
 
PCE Connect
PCE ConnectPCE Connect
PCE Connect
 
IRJET- An Sla-Aware Cloud Coalition Formation Approach for Virtualized Networks.
IRJET- An Sla-Aware Cloud Coalition Formation Approach for Virtualized Networks.IRJET- An Sla-Aware Cloud Coalition Formation Approach for Virtualized Networks.
IRJET- An Sla-Aware Cloud Coalition Formation Approach for Virtualized Networks.
 
IRJET - A Review on Chatbot Design and Implementation Techniques
IRJET -  	  A Review on Chatbot Design and Implementation TechniquesIRJET -  	  A Review on Chatbot Design and Implementation Techniques
IRJET - A Review on Chatbot Design and Implementation Techniques
 
Design and Monitoring Performance of Digital Properties
Design and Monitoring Performance of Digital PropertiesDesign and Monitoring Performance of Digital Properties
Design and Monitoring Performance of Digital Properties
 
Portable Code Compiler
Portable Code CompilerPortable Code Compiler
Portable Code Compiler
 
Computer-Aided Design of Raft Foundation using Excel VBA and FORTRAN
Computer-Aided Design of Raft Foundation using Excel VBA and FORTRANComputer-Aided Design of Raft Foundation using Excel VBA and FORTRAN
Computer-Aided Design of Raft Foundation using Excel VBA and FORTRAN
 
Online java compiler with security editor
Online java compiler with security editorOnline java compiler with security editor
Online java compiler with security editor
 
A VNF modeling approach for verification purposes
A VNF modeling approach for verification purposesA VNF modeling approach for verification purposes
A VNF modeling approach for verification purposes
 
IRJET- Deep Web Searching (DWS)
IRJET- Deep Web Searching (DWS)IRJET- Deep Web Searching (DWS)
IRJET- Deep Web Searching (DWS)
 
IRJET- Online Programming Environment
IRJET- Online Programming EnvironmentIRJET- Online Programming Environment
IRJET- Online Programming Environment
 
IRJET-Towards a Methodology for the Development of Plug-In
IRJET-Towards a Methodology for the Development of Plug-InIRJET-Towards a Methodology for the Development of Plug-In
IRJET-Towards a Methodology for the Development of Plug-In
 

More from IRJET Journal

More from IRJET Journal (20)

TUNNELING IN HIMALAYAS WITH NATM METHOD: A SPECIAL REFERENCES TO SUNGAL TUNNE...
TUNNELING IN HIMALAYAS WITH NATM METHOD: A SPECIAL REFERENCES TO SUNGAL TUNNE...TUNNELING IN HIMALAYAS WITH NATM METHOD: A SPECIAL REFERENCES TO SUNGAL TUNNE...
TUNNELING IN HIMALAYAS WITH NATM METHOD: A SPECIAL REFERENCES TO SUNGAL TUNNE...
 
STUDY THE EFFECT OF RESPONSE REDUCTION FACTOR ON RC FRAMED STRUCTURE
STUDY THE EFFECT OF RESPONSE REDUCTION FACTOR ON RC FRAMED STRUCTURESTUDY THE EFFECT OF RESPONSE REDUCTION FACTOR ON RC FRAMED STRUCTURE
STUDY THE EFFECT OF RESPONSE REDUCTION FACTOR ON RC FRAMED STRUCTURE
 
A COMPARATIVE ANALYSIS OF RCC ELEMENT OF SLAB WITH STARK STEEL (HYSD STEEL) A...
A COMPARATIVE ANALYSIS OF RCC ELEMENT OF SLAB WITH STARK STEEL (HYSD STEEL) A...A COMPARATIVE ANALYSIS OF RCC ELEMENT OF SLAB WITH STARK STEEL (HYSD STEEL) A...
A COMPARATIVE ANALYSIS OF RCC ELEMENT OF SLAB WITH STARK STEEL (HYSD STEEL) A...
 
Effect of Camber and Angles of Attack on Airfoil Characteristics
Effect of Camber and Angles of Attack on Airfoil CharacteristicsEffect of Camber and Angles of Attack on Airfoil Characteristics
Effect of Camber and Angles of Attack on Airfoil Characteristics
 
A Review on the Progress and Challenges of Aluminum-Based Metal Matrix Compos...
A Review on the Progress and Challenges of Aluminum-Based Metal Matrix Compos...A Review on the Progress and Challenges of Aluminum-Based Metal Matrix Compos...
A Review on the Progress and Challenges of Aluminum-Based Metal Matrix Compos...
 
Dynamic Urban Transit Optimization: A Graph Neural Network Approach for Real-...
Dynamic Urban Transit Optimization: A Graph Neural Network Approach for Real-...Dynamic Urban Transit Optimization: A Graph Neural Network Approach for Real-...
Dynamic Urban Transit Optimization: A Graph Neural Network Approach for Real-...
 
Structural Analysis and Design of Multi-Storey Symmetric and Asymmetric Shape...
Structural Analysis and Design of Multi-Storey Symmetric and Asymmetric Shape...Structural Analysis and Design of Multi-Storey Symmetric and Asymmetric Shape...
Structural Analysis and Design of Multi-Storey Symmetric and Asymmetric Shape...
 
A Review of “Seismic Response of RC Structures Having Plan and Vertical Irreg...
A Review of “Seismic Response of RC Structures Having Plan and Vertical Irreg...A Review of “Seismic Response of RC Structures Having Plan and Vertical Irreg...
A Review of “Seismic Response of RC Structures Having Plan and Vertical Irreg...
 
A REVIEW ON MACHINE LEARNING IN ADAS
A REVIEW ON MACHINE LEARNING IN ADASA REVIEW ON MACHINE LEARNING IN ADAS
A REVIEW ON MACHINE LEARNING IN ADAS
 
Long Term Trend Analysis of Precipitation and Temperature for Asosa district,...
Long Term Trend Analysis of Precipitation and Temperature for Asosa district,...Long Term Trend Analysis of Precipitation and Temperature for Asosa district,...
Long Term Trend Analysis of Precipitation and Temperature for Asosa district,...
 
P.E.B. Framed Structure Design and Analysis Using STAAD Pro
P.E.B. Framed Structure Design and Analysis Using STAAD ProP.E.B. Framed Structure Design and Analysis Using STAAD Pro
P.E.B. Framed Structure Design and Analysis Using STAAD Pro
 
A Review on Innovative Fiber Integration for Enhanced Reinforcement of Concre...
A Review on Innovative Fiber Integration for Enhanced Reinforcement of Concre...A Review on Innovative Fiber Integration for Enhanced Reinforcement of Concre...
A Review on Innovative Fiber Integration for Enhanced Reinforcement of Concre...
 
Survey Paper on Cloud-Based Secured Healthcare System
Survey Paper on Cloud-Based Secured Healthcare SystemSurvey Paper on Cloud-Based Secured Healthcare System
Survey Paper on Cloud-Based Secured Healthcare System
 
Review on studies and research on widening of existing concrete bridges
Review on studies and research on widening of existing concrete bridgesReview on studies and research on widening of existing concrete bridges
Review on studies and research on widening of existing concrete bridges
 
React based fullstack edtech web application
React based fullstack edtech web applicationReact based fullstack edtech web application
React based fullstack edtech web application
 
A Comprehensive Review of Integrating IoT and Blockchain Technologies in the ...
A Comprehensive Review of Integrating IoT and Blockchain Technologies in the ...A Comprehensive Review of Integrating IoT and Blockchain Technologies in the ...
A Comprehensive Review of Integrating IoT and Blockchain Technologies in the ...
 
A REVIEW ON THE PERFORMANCE OF COCONUT FIBRE REINFORCED CONCRETE.
A REVIEW ON THE PERFORMANCE OF COCONUT FIBRE REINFORCED CONCRETE.A REVIEW ON THE PERFORMANCE OF COCONUT FIBRE REINFORCED CONCRETE.
A REVIEW ON THE PERFORMANCE OF COCONUT FIBRE REINFORCED CONCRETE.
 
Optimizing Business Management Process Workflows: The Dynamic Influence of Mi...
Optimizing Business Management Process Workflows: The Dynamic Influence of Mi...Optimizing Business Management Process Workflows: The Dynamic Influence of Mi...
Optimizing Business Management Process Workflows: The Dynamic Influence of Mi...
 
Multistoried and Multi Bay Steel Building Frame by using Seismic Design
Multistoried and Multi Bay Steel Building Frame by using Seismic DesignMultistoried and Multi Bay Steel Building Frame by using Seismic Design
Multistoried and Multi Bay Steel Building Frame by using Seismic Design
 
Cost Optimization of Construction Using Plastic Waste as a Sustainable Constr...
Cost Optimization of Construction Using Plastic Waste as a Sustainable Constr...Cost Optimization of Construction Using Plastic Waste as a Sustainable Constr...
Cost Optimization of Construction Using Plastic Waste as a Sustainable Constr...
 

Recently uploaded

Final DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manualFinal DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manual
BalamuruganV28
 
Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..
MaherOthman7
 

Recently uploaded (20)

Working Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdfWorking Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdf
 
5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...
 
Worksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxWorksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptx
 
Augmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxAugmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptx
 
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)
 
Artificial Intelligence in due diligence
Artificial Intelligence in due diligenceArtificial Intelligence in due diligence
Artificial Intelligence in due diligence
 
SLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptxSLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptx
 
Maximizing Incident Investigation Efficacy in Oil & Gas: Techniques and Tools
Maximizing Incident Investigation Efficacy in Oil & Gas: Techniques and ToolsMaximizing Incident Investigation Efficacy in Oil & Gas: Techniques and Tools
Maximizing Incident Investigation Efficacy in Oil & Gas: Techniques and Tools
 
Final DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manualFinal DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manual
 
engineering chemistry power point presentation
engineering chemistry  power point presentationengineering chemistry  power point presentation
engineering chemistry power point presentation
 
Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..
 
Research Methodolgy & Intellectual Property Rights Series 1
Research Methodolgy & Intellectual Property Rights Series 1Research Methodolgy & Intellectual Property Rights Series 1
Research Methodolgy & Intellectual Property Rights Series 1
 
Passive Air Cooling System and Solar Water Heater.ppt
Passive Air Cooling System and Solar Water Heater.pptPassive Air Cooling System and Solar Water Heater.ppt
Passive Air Cooling System and Solar Water Heater.ppt
 
Basics of Relay for Engineering Students
Basics of Relay for Engineering StudentsBasics of Relay for Engineering Students
Basics of Relay for Engineering Students
 
Dynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptxDynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptx
 
15-Minute City: A Completely New Horizon
15-Minute City: A Completely New Horizon15-Minute City: A Completely New Horizon
15-Minute City: A Completely New Horizon
 
Autodesk Construction Cloud (Autodesk Build).pptx
Autodesk Construction Cloud (Autodesk Build).pptxAutodesk Construction Cloud (Autodesk Build).pptx
Autodesk Construction Cloud (Autodesk Build).pptx
 
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
 
What is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, FunctionsWhat is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, Functions
 

IRJET - From C to JAVA

  • 1. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 07 Issue: 04 | Apr 2020 www.irjet.net p-ISSN: 2395-0072 © 2020, IRJET | Impact Factor value: 7.34 | ISO 9001:2008 Certified Journal | Page 1864 From C to JAVA Farhana Kausar1, Karthik G S2 1Assistance Professor, Atria Institute of Technology, Visvesvaraya Technological University, Bangalore 2Student, Atria Institute of Technology, Visvesvaraya Technological University, Bangalore ---------------------------------------------------------------------***---------------------------------------------------------------------- Abstract - As per current business needs and rapid growth in Automation, it became necessary for industries to provide migration solutions to client as early and more efficiently as possible to cope up with competition in market. For this purpose a method has been proposed for constructing JAVA programs from C programs. IBM mainframe programs, which written in language such as C, is automatically translated into equivalent JAVA programs. Our method features the documentation of translation process. Not only the translation, but the correspondence between source C program and resulting JAVA program is produced as document. This helps in reducing the overhead of manually rewriting the entire C code into JAVA language. Key Words: Migration, Modernization 1. INTRODUCTION This paper proposes a method of migrating C programs to equivalent JAVA programs, which focuses on generating supplementary information to understand the resulting JAVA programs and the translation process. JAVA programs with high flexibility are generated through intermediate representation extracted from the given C codes. Also, the comments in the C programs, that hold useful information to understand the program like, how the programs should be used, the motive of each part of code, etc., are placed at thecorrect position of the resulting Java programs. Migration is basically shifting from one place to other or changing from one form to another. But, if we relate this concept to programming, code migration would be changing code from one programming language to another. Thus, our paper presents the idea for changing the code from C to Java. Although IT industry is growing rapidly, there are few organizations those are stuck to mainframe systems. Mainframe system uses programming languages like C, COBOL, etc. These organizations are thinking to shift towards more widely used and flexible languages like JAVA. So, if they get a tool which would readily convert them the code from one language to another, then that would be very beneficial to them in terms of time and efforts as well. An automation tool based on the proposed method is implemented in Java, which has successfully converted some C programs into working JAVA programs. 2. BASIC IDEA Fig -1: Translation Process Thus, in order to get the code translated from C to Java, we have divided the approach into two phases. In the very first phase, program in C language will be converted into CPPlanguage.Thisisbecausemanyof the syntaxes of C and CPP are similar, for example, the looping statements, the decision making statements etc. are similar in both C and CPP. In second phase, the program in CPP language will be converted into JAVA. Converting CPP code into JAVA will be somewhat easier as features of both CPP and JAVA like classes, objects, inheritance etc. are similar. Thus, we can get the C code converted intoJAVA. The paper proposes approachto convert/translate the given source program from C to JAVA. But, if we try to convert code directly into java, then it might be difficult since, C is procedure oriented language and JAVA is Object Oriented language.
  • 2. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 07 Issue: 04 | Apr 2020 www.irjet.net p-ISSN: 2395-0072 © 2020, IRJET | Impact Factor value: 7.34 | ISO 9001:2008 Certified Journal | Page 1865 3. IMPLEMENTATION Fig 2. Flow of Implementation The main goal of the approach is to exploit the power of data mining and genetic algorithms in aiding source code migration. The genetic algorithm is capable of learning complex mappings that exist between classes, methods and API usages between two languages. For example, the source code for outputting a string to the consolescreenin C is, printf(“Hello World!”); The corresponding statement in JAVA is System.out.println(“Hello World!”); For example, when printf word is found in any of the statements from input C program, then that word will be search against its replacement in JAVA, which will be System.out.println. Once the corresponding keyword is found, then it will be replaced. Similarly, the entire code is searched line by line and the output is appended line by line into a paragraph. Thus, the resulting code is converted JAVA program. 4. CONCLUSIONS A Genetic Algorithm based approach was proposed for the problem of translation of the given source program from one language to another. The technological changes take place so drasticallythatmany more migration projects are likely to come up and hence the development of an effective system for such migration goes important. The developed system has the problem of mapping from C to JAVA as C belong to procedure oriented paradigm, and JAVA belong to object oriented paradigm. More efforts need to be taken for migration between different paradigms (as from C to JAVA). Also, the proposed system can be applied to applications that are freely available in order to improve the functionality of resultant outcomes. Along with this, there can be advancement in Computer Science field like improvement in neural networks and natural computations can be applied as it is mandatory that no efforts should be left in order to improve the efficiency of translation tasks. REFERENCES [1] Daisuke Fujiwara and Nagisa Ishiura, “Reverse Engineering from Mainframe Assembly to C Codes in Legacy Migration”, IIAI International Congress on Advance Applied Informatics,IEEE,2016. [2] Andrea Fornaia and Emiliano Tramontana, “Is My Code Easy to Port? Using Taint Analysis to Evaluate and Asist Code Portability”, International Conference on Enabling Tehnologies, IEEE, 2017. [3] S. Geetha and Dr. K. Iyankutti, “A Genetic Algorithm Based Source Code Mining Approach for Language Migration”, International Journal on Recent and Innovation Trends in Computing and Communication, Vol:2, ISSN:2321-8169,August 2014. [4] Suvam Mukharjee and Tamal Chakrabarti, “Automatic Algorithm Specification to Source Code Translation”, Indian Journal of Computer Science and Engineering (IJCSE), Vol:2, ISSN:0976- 5166,Apr-May 2011. [5] Zhong, Hao, Thummalapenta, Suresh, Xie, Tao, Zhang, Lu, Wang, Qing, Mining API mapping for language migration, Proceedings of the 32nd ACM/IEEE International Conference on Software Engineering, Volume 1, 2010.