Any opinions, findings, conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of UKEssays.com.
The most important quality of software reengineering is to improve or transformation of an existing software system so that it can be understood, controlled and user-friendly. Software is used to replace high software maintenance cost of the legacy systems. So software reengineering is more beneficial for recovering and reusing existing software assets, putting high software maintenance costs under control. It also establishes a base for future software evolution. There are several software reengineering process such as reverse engineering, re-documentation, restructuring, source code translation and forward reengineering. So we used software reengineering through source code translation process.
For doing software reengineering through source code conversion there are several conversion tools, these tools used to translate a code written in one language to another language. We decided to convert software developed in C++ language into java language because java more suitable for internet, more reliable, platform independent etc.There are various source code translation tools such as Tangible software solution In, Ephedra; novo soft’s C2J++, C2J and so on. We used tangible software solution Inc tool to convert a source code written in C++ language into java programming language. It has been found that java based source code is much better than C++. There are several reason for that such as less execution time as well less complexity.
The essence of software reengineering is to reuse the existing code of legacy system because the original expense of developing the logic and the component of the software should not be wasted. In this Dissertation software reengineering through source code translation is used. The experimental results are better. As explanation in java language specification, java is related to C and C++ but there are some important and noticeable differences that pose some problems in a migration from C++ to Java. The biggest difference is that C++ is not a complete object oriented language as that of java.
Java is the platform independent programming language means it does not need specific platform for run.So it is very hard problem to translate a C++ code into a java code because there is no any specific tool that can convert a given C++ code into java code without any manual work because both the syntax and semantics is required to convert. We also used to change the paradigm which is necessary to move from C++ to java.
KEY POINTS OF REENGINEERING
During our dissertation work we have concluded the following key points of software reengineering:
- The objective of reengineering is to improve the structure of the system to make it easier to understand and to maintain.
- Source code translation is the automated conversion of the program written in one language to another language.
- Reverse engineering is the process of extract the system design and identification from its source code.
- Program modularization include regeneration to group connected items.
- Data reengineering may be necessary because of the inconsistent data management.
CODE MIGRATION STRATEGIES: C++ TO JAVA
In this chapter we will discuss about various efforts which are used by us during analysis of C++ to java conversion using Tangible Software Solution Inc converter. To validate Tangible Software Solution Inc approach, we conclude several case studies by selecting typical C++ source code for migration in java language. We also analyzed that readability of java language developed manually is very easy than original C++ code but readability of java converted code by this tool is not perfect because its Line of Code (LOC) is too large in comparison to original C++ source code as well as manually java converted code. During the conversion from C++ source code into java code, we wrote a lot of C++ programs in last chapter. We wrote various types of C++ programs as a regression test suite to test aspects of transliteration. To validate the correctness of real program, we chose a stand-alone monopoly Air-ticket software package.
We choose C++ to Java migration because we know that java language become an accepted standard for wide range of development needs now-a-days. Software as well as web developer found it necessary to convert the applications they have written in older programming language such as C++ to Java. There are various language conversion tools like Tangible Software Solution Inc, C2J++, Ephedra etc. Novosoft’s C2J++ converts a given C++ code to its equivalent java classes while other given tool converts any given C++ source code into java code. With the help of these tools it is possible to convert any C ++ code into java code and this conversion with the help of these tools is not very difficult. If any software developer uses these tools then he/she can save both time as well as resources. He/she can get a project done rapid and without retaining someone to rewrite an application, which is the last option, if the reengineering cost is too large. We can also choose to rewrite or to redevelop if the number of the faulty components (objects) is more than 50%. A tangible software solution Inc converter translates a C++ code to a java code or java classes.
The amount of time it takes to translate the given C++ source code into java code depends on numbers of factors including your hardware as well as size of the original C++ source code. Expected conversion is not directly proportional to Line of Code (LOC) used to develop C++ code but it depends on the nature of C++ program. For the large applications we expect that the conversion time of Tangible software solution Inc tool is about two minutes.
Now we will discuss about the conversion of various type of C++ program into java and what type of difficulties have came during conversion with the help of Tangible software solution Inc conversion tool.
We will also discuss these criteria with the help of some case studies base on C++ to java conversion as follows:
PROGRAM STRUCTURE IMPROVEMENT
Whenever we decided to reengineer given software instead of maintenance, we have the following improvement in the structure of this software:
- Maintenance moves to corrupt the structure of a program. It becomes difficult and difficult to understand.
- Program may be axiomatically restructured to eliminate unconditional branches.
- The conditions may be cleared to make them more comprehensible.
The conditions may be simplified as follows:
Complex condition given by following expression:
If not ( A>B and (C
And the simplified condition may be expressed as:
If ( A <= B and ( C >= D or E > F) ……
DIFFERENCE BETWEEN C++ & JAVA
The major difference between C++ and Java is the hardware platform for which these programming languages are compiled. C++ programs are usually compiled to the native machine language of a computer, while Java programs are compiled by the Java Virtual Machine (JVM), a virtual hardware platform running on top of a concrete hardware platform.
The JVM checks all type conversions and storage accesses for their safety and security and imposes conservative restrictions on these operations.
All C and C++ compilers implement a stage of compilation known as the preprocessor. The preprocessor basically performs an intelligentsearch and replace on identifiers that have been declared using the #define or#typedef directives.
Java does not have a preprocessor. Constant data members are used in place of the #define directive and class definitions are used in lieu of the #typedef directive, however there is no substitute for macros, which canbe useful. The Java approach to defining constants and namingtypes of data structures is probably conceptually simpler for the programmer.Java will bounds check arrays toprevent this from happening, of course with alittle extra runtime cost.
QUALITY OF GENERATED CODE
Whenever we convert a C++ source code to a java code with the help of Tangible software solution Inc converter or manually then we see that the quality of generated code improved definitely. We also analyzed the converted code with respect to its readability and performance of newly converted code. However Tangible software solution Inc tool is unable to convert the whole given software developed in the C++ language into java code at a time but it is suitable to convert a given C++ code to equivalent java classes and after doing some manual work on these converted java classes with the help of Tangible software solution Inc conversion tool, we can found the resultant java code. We also analyzed that this code is more maintainable in comparison to given original C++ source code. The most important feature of java language is that it is totally platform independent language while C++ language does not have this feature. If any software/program code is platform independent it means it can run on any system having different operating system that is if any java code is developed using window operating system then it can also run on different systems having different operating systems such like Linux as well as UNIX operating system easily.
There are following main factors which are improved after conversion:
- Conformance and integration
If we take out a subjective point of view then code generated by Ephedra conversion tool having less manual work in comparison to its competitor for large scale automated translation of source code by Tangible software solution Inc, but main problem related to Ephedra is its availability. Ephedra is not open source code so mainly is not used for academics. Before using this tool we have to need its license so we decided to do our work with Tangible software solution Inc conversion tool which is open source software. However we converted our project developed in C++ language into java language with the help of this tool but actually we have not been able to gather any final result without some manual work on this generated code.
- Conformance and Integration
To integrate the large volume of the source code written in C++ into the java program is the primary goal of Ephedra but it is very difficult with the help of Tangible software solution Inc because Tangible software solution Inc translator storage management scheme is incompatible with that regular java programs. The main reason is that Tangible software solution Inc does not use regular java data types and classes. So the generated code does not provide the interface with manually written java source code. On the other hand Ephedra uses the regular java data types and classes. So, the generated code provides the interface with manually written java source code.
We should have remembered that arrays and the pointers are the part of interfaces to the generated code. So, the software reengineers should have a basic knowledge of Ephedra but a deep knowledge is not required if he/ she dies not work with it. A software engineer can also add the required functionality after reviewing the source code to ensure that the desired effects are achieved.
The performance of a tool also depends on the pointer mapping scheme used as explained above. The code converted using the first mapping scheme was about 5 times slower than the original C++ code for spring algorithm and about 10 times slower for Sugiyama algorithm. With the help of our translation code we conclude that the experiments on the second mapping scheme produced code that run about 30% faster than code produced with the first mapping scheme.
Cite This Work
To export a reference to this article please select a referencing stye below:
Related ServicesView all
DMCA / Removal Request
If you are the original writer of this essay and no longer wish to have your work published on the UKDiss.com website then please: