SlideShare a Scribd company logo
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

PDF
IRJET- Lost: The Horror Game
PPTX
New Standard for Widely Used Software
PDF
Improving Consistency of UML Diagrams and Its Implementation Using Reverse En...
PDF
Csit77404
PDF
Prakash resume
PDF
Student Industrial Training Presentation Slide
DOC
PPT
ASPECT ORIENTED PROGRAMING(aop)
IRJET- Lost: The Horror Game
New Standard for Widely Used Software
Improving Consistency of UML Diagrams and Its Implementation Using Reverse En...
Csit77404
Prakash resume
Student Industrial Training Presentation Slide
ASPECT ORIENTED PROGRAMING(aop)

What's hot (10)

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

Similar to IRJET - From C to JAVA (20)

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

More from IRJET Journal (20)

PDF
Enhanced heart disease prediction using SKNDGR ensemble Machine Learning Model
PDF
Utilizing Biomedical Waste for Sustainable Brick Manufacturing: A Novel Appro...
PDF
Kiona – A Smart Society Automation Project
PDF
DESIGN AND DEVELOPMENT OF BATTERY THERMAL MANAGEMENT SYSTEM USING PHASE CHANG...
PDF
Invest in Innovation: Empowering Ideas through Blockchain Based Crowdfunding
PDF
SPACE WATCH YOUR REAL-TIME SPACE INFORMATION HUB
PDF
A Review on Influence of Fluid Viscous Damper on The Behaviour of Multi-store...
PDF
Wireless Arduino Control via Mobile: Eliminating the Need for a Dedicated Wir...
PDF
Explainable AI(XAI) using LIME and Disease Detection in Mango Leaf by Transfe...
PDF
BRAIN TUMOUR DETECTION AND CLASSIFICATION
PDF
The Project Manager as an ambassador of the contract. The case of NEC4 ECC co...
PDF
"Enhanced Heat Transfer Performance in Shell and Tube Heat Exchangers: A CFD ...
PDF
Advancements in CFD Analysis of Shell and Tube Heat Exchangers with Nanofluid...
PDF
Breast Cancer Detection using Computer Vision
PDF
Auto-Charging E-Vehicle with its battery Management.
PDF
Analysis of high energy charge particle in the Heliosphere
PDF
A Novel System for Recommending Agricultural Crops Using Machine Learning App...
PDF
Auto-Charging E-Vehicle with its battery Management.
PDF
Analysis of high energy charge particle in the Heliosphere
PDF
Wireless Arduino Control via Mobile: Eliminating the Need for a Dedicated Wir...
Enhanced heart disease prediction using SKNDGR ensemble Machine Learning Model
Utilizing Biomedical Waste for Sustainable Brick Manufacturing: A Novel Appro...
Kiona – A Smart Society Automation Project
DESIGN AND DEVELOPMENT OF BATTERY THERMAL MANAGEMENT SYSTEM USING PHASE CHANG...
Invest in Innovation: Empowering Ideas through Blockchain Based Crowdfunding
SPACE WATCH YOUR REAL-TIME SPACE INFORMATION HUB
A Review on Influence of Fluid Viscous Damper on The Behaviour of Multi-store...
Wireless Arduino Control via Mobile: Eliminating the Need for a Dedicated Wir...
Explainable AI(XAI) using LIME and Disease Detection in Mango Leaf by Transfe...
BRAIN TUMOUR DETECTION AND CLASSIFICATION
The Project Manager as an ambassador of the contract. The case of NEC4 ECC co...
"Enhanced Heat Transfer Performance in Shell and Tube Heat Exchangers: A CFD ...
Advancements in CFD Analysis of Shell and Tube Heat Exchangers with Nanofluid...
Breast Cancer Detection using Computer Vision
Auto-Charging E-Vehicle with its battery Management.
Analysis of high energy charge particle in the Heliosphere
A Novel System for Recommending Agricultural Crops Using Machine Learning App...
Auto-Charging E-Vehicle with its battery Management.
Analysis of high energy charge particle in the Heliosphere
Wireless Arduino Control via Mobile: Eliminating the Need for a Dedicated Wir...

Recently uploaded (20)

PPTX
Internet of Things (IOT) - A guide to understanding
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPTX
UNIT 4 Total Quality Management .pptx
PDF
737-MAX_SRG.pdf student reference guides
PDF
composite construction of structures.pdf
PPTX
Current and future trends in Computer Vision.pptx
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
additive manufacturing of ss316l using mig welding
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
web development for engineering and engineering
PPTX
Artificial Intelligence
PDF
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
PDF
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
PPT
Mechanical Engineering MATERIALS Selection
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
Internet of Things (IOT) - A guide to understanding
Embodied AI: Ushering in the Next Era of Intelligent Systems
UNIT 4 Total Quality Management .pptx
737-MAX_SRG.pdf student reference guides
composite construction of structures.pdf
Current and future trends in Computer Vision.pptx
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
additive manufacturing of ss316l using mig welding
Operating System & Kernel Study Guide-1 - converted.pdf
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
web development for engineering and engineering
Artificial Intelligence
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
Mechanical Engineering MATERIALS Selection
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
CYBER-CRIMES AND SECURITY A guide to understanding
Model Code of Practice - Construction Work - 21102022 .pdf
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx

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.