SlideShare a Scribd company logo
1 of 26
Download to read offline
CS266 Software Reverse Engineering (SRE)
Reengineering and Reuse of Legacy Software
Teodoro (Ted) Cipresso, teodoro.cipresso@sjsu.edu
Department of Computer Science
San José State University
Spring 2015
The information in this presentation is taken from the thesis “Software reverse engineering education”
available at http://scholarworks.sjsu.edu/etd_theses/3734/ where all citations can be found.
2
Reengineering and Reuse of Legacy Software
Introduction, Motivation, and Considerations
 If good development practices were followed, legacy software is typically
composed of three layers [5]:
Layers of a well-structured legacy software application.
3
Reengineering and Reuse of Legacy Software
Introduction, Motivation, and Considerations
 Legacy applications that are not sufficiently componentized, such that their
general organization resembles the three layers, are not good candidates for
reengineering and reuse.
 The most widely accepted technique to reuse legacy application components is
that of Wrappering [5], where a new piece of code provides an interface to a
legacy application component or layer without requiring code changes to it.
 Typically, candidate applications should be well-structured such that the
business logic can be isolated, encapsulated, and made into reusable
components.
4
Reengineering and Reuse of Legacy Software
Introduction, Motivation, and Considerations
 Unless enough of an application's source code remains such that it's possible to
identify the names of reusable entry points (procedures) and their I/O data
structures, attempting to reuse the application may be difficult.
 While it is possible to learn the names of entry points that have been explicitly
exported by an application in the case of a DLL, the names don't indicate the
layout of the expected I/O data structures.
 One way to discover the entry points and I/O data structures in legacy machine
code is to read the source code of other applications which depend on it.
5
Reengineering and Reuse of Legacy Software
COBOL and “Legacy” Languages
 The COBOL programming language is most often associated with legacy
software applications.
 Normally, COBOL programs have a single entry point; additional “alternate”
entry points are rare.
 Legacy COBOL programs often include functional discriminators in their I/O
data structures.
Mapping legacy functional discriminators to an object-oriented design.
6
Reengineering and Reuse of Legacy Software
Reuse of Code in the Business Logic Layer
 In a real-world situation, we would be looking to reuse legacy components
whose machine code is the result of thousands of lines of high-level language
statements (COBOL) that implement a particular business process.
 Since our focus is more on reuse and reengineering of legacy code at a basic
level, it's not necessary to encumber ourselves with a very large program in
order to learn strategies for reuse and reengineering.
 Therefore we consider a small COBOL “calculator” that we wish to make
reusable from Java. This program is assumed to be something from the
business logic layer.
7
Reengineering and Reuse of Legacy Software
Sample COBOL Business Logic Component
01: ******************************************************************
02: ** Simple COBOL program that performs integer arithmetic **
03: ******************************************************************
04: IDENTIFICATION DIVISION.
05: PROGRAM-ID. 'SMPLCALC'.
06: DATA DIVISION.
07: WORKING-STORAGE SECTION.
08: 77 MSG-NUMERIC-OVERFLOW PIC X(25)
09: VALUE 'Numeric overflow occurred'.
10: 77 MSG-SUCCESSFUL PIC X(22)
11: VALUE 'Completed successfully'.
12: LINKAGE SECTION.
13: * Input/Output data structure
14: 01 SMPLCALC-INTERFACE.
15: 02 SI-OPERAND-1 PIC S9(9) COMP-5.
16: 02 SI-OPERAND-2 PIC S9(9) COMP-5.
17: 02 SI-OPERATION PIC X.
18: 88 DO-ADD VALUE '+'.
19: 88 DO-SUB VALUE '-'.
20: 88 DO-MUL VALUE '*'.
21: 02 SI-RESULT PIC S9(18) COMP-3.
22: 02 SI-RESULT-MESSAGE PIC X(128).
23: PROCEDURE DIVISION USING
24: BY REFERENCE SMPLCALC-INTERFACE.
25: MAINLINE SECTION.
26: * Perform requested arithmetic
8
Reengineering and Reuse of Legacy Software
Sample COBOL Business Logic Component
27: INITIALIZE SI-RESULT SI-RESULT-MESSAGE
28: EVALUATE TRUE
29: WHEN DO-ADD
30: COMPUTE SI-RESULT = SI-OPERAND-1 + SI-OPERAND-2
31: ON SIZE ERROR
32: PERFORM HANDLE-SIZE-ERROR
33: END-COMPUTE
34: WHEN DO-SUB
35: COMPUTE SI-RESULT = SI-OPERAND-1 - SI-OPERAND-2
36: ON SIZE ERROR
37: PERFORM HANDLE-SIZE-ERROR
38: END-COMPUTE
39: WHEN DO-MUL
40: COMPUTE SI-RESULT = SI-OPERAND-1 * SI-OPERAND-2
41: ON SIZE ERROR
42: PERFORM HANDLE-SIZE-ERROR
43: END-COMPUTE
44: END-EVALUATE
45: * Successful return
46: MOVE MSG-SUCCESSFUL TO SI-RESULT-MESSAGE
47: MOVE 2 TO RETURN-CODE
48: GOBACK
49: .
9
Reengineering and Reuse of Legacy Software
Modernizing Business Logic Components
 Many commercial tools support importing a COBOL data structure and
generating Java marshalling classes.
 These marshalling classes are intended to be used with the J2EE Connector
Architecture (JCA) where a Java application wrappers a legacy software
application.
Example JCA implementation for accessing a legacy application.
10
Reengineering and Reuse of Legacy Software
Modernizing Business Logic Components (cont’d)
 A popular alternative to using the JCA architecture to reengineer and reuse
legacy applications is to implement a Service Oriented Architecture (SOA).
 SOA components become capable of communicating without the tight and
fragile coupling of traditional binary interfaces because they are wrappered with
a platform-neutral interface such as XML and Web services.
 When XML is used as envisioned, all data, both of type character and numeric
are represented as printable text—completely divorced from any platform
specific representation or encoding.
11
Reengineering and Reuse of Legacy Software
Modernizing Business Logic Components (cont’d)
 The net effect of this is that two entities or programs can interact without
having to know the data structures that comprise each other's binary interface.
 Of course, the XML that is exchanged cannot be arbitrary, so industry standards
such as XML Schema (XSD), and Web Services Definition Language (WSDL) fill
this gap.
 A Web service is considered to be WS-I compliant, or generally interoperable, if
it meets many criteria, one of which is the use of XML for the input and output
of each operation exposed by service.
12
Reengineering and Reuse of Legacy Software
Software Reengineering/Reuse Exercise
 This particular requirement of WS-I where XML is the interoperable interface of
choice, sets the stage for a meaningful exercise.
 A Legacy Software Reengineering and Reuse Exercise was developed to
demonstrate wrapping a COBOL program so that is reusable from Java using
XML in a local environment.
 In the exercise, one is asked to create a language neutral XML interface to the
COBOL calculator program and invoke it from a Java program, which
incidentally makes it reusable from other Java programs.
13
Reengineering and Reuse of Legacy Software
Software Reengineering/Reuse Exercise (cont’d)
 Overview of the architecture for the exercise:
Architecture for legacy application reengineering and reuse from Java.
14
Reengineering and Reuse of Legacy Software
Software Reengineering/Reuse Exercise (cont’d)
 Steps in the reengineering and reuse exercise:
 Create an XML Schema which represents all of the data in the SMPLCALC-
INTERFACE COBOL data structure.
 Write a Java interface ISimpleCalculator.java for three computation types
supported by SMPLCALC.cbl.
 Write a Java class JSimpleCalculator.java that implements the interface
defined in ISimpleCalculator.java and provides a user interface.
 Use the Java command-line utility xjc, in combination with the XML
Schema, generate Java to XML marshalling code (JAXB).
15
Reengineering and Reuse of Legacy Software
Software Reengineering/Reuse Exercise (cont’d)
 Steps in the reengineering and reuse exercise (cont’d):
 Write a small C/C++ JNI program Java2CblXmlBridge.cpp which exports a
method Java2SmplCalc that:
 Invokes XML2CALC.cbl, passing the XML document received from
JSimpleCalculator.java.
 Returns the XML generated by XML2CALC.cbl to JSimpleCalculator.java.
16
Reengineering and Reuse of Legacy Software
Software Reengineering/Reuse Exercise (cont’d)
 Steps in the reengineering and reuse exercise (cont’d):
 Write a COBOL program XML2CALC.cbl:
 Marshalls XML from Java2CblXmlBridge.cpp into SMPLCALC-INTERFACE.
 Invokes SMPLCALC.cbl, passing SMPLCALC-INTERFACE by reference.
 Marshalls SMPLCALC-INTERFACE back to XML before returning to
Java2CblXmlBridge.cpp.
 Compile XML2CALC.cbl and link it with the object code for SMPLCALC.cbl
(SMPLCALC.obj).
17
Reengineering and Reuse of Legacy Software
Software Reengineering/Reuse Exercise (cont’d)
 Steps in the reengineering and reuse exercise (cont’d):
 Create a DLL to be loaded by JSimpleCalculator.java by compiling and
linking Java2CblXmlBridge.cpp with the object code for XML2CALC.cbl.
 Update JSimpleCalculator.java to use the JAXB marshalling code to
send/receive XML through the JNI layer and display the results.
18
Reengineering and Reuse of Legacy Software
Software Reengineering/Reuse Exercise (cont’d)
 Highlights of the solution code:
 SimpleCalculator.xsd
<element name="SI-OPERAND-1">
<simpleType>
<restriction base="integer">
<totalDigits value="9" />
</restriction>
</simpleType>
</element>
. . .
<element name="SI-OPERATION">
<simpleType>
<restriction base="string">
<enumeration value="+" />
<enumeration value="-" />
<enumeration value="*" />
</restriction>
</simpleType>
</element>
19
Reengineering and Reuse of Legacy Software
Software Reengineering/Reuse Exercise (cont’d)
 Highlights of the solution code (cont’d):
 ISimpleCalculator.java
20
Reengineering and Reuse of Legacy Software
Software Reengineering/Reuse Exercise (cont’d)
 Highlights of the solution code (cont’d):
 JSimpleCalculator.java
21
Reengineering and Reuse of Legacy Software
Software Reengineering/Reuse Exercise (cont’d)
 Highlights of the solution code (cont’d):
 JSimpleCalculator.java (cont’d)
22
Reengineering and Reuse of Legacy Software
Software Reengineering/Reuse Exercise (cont’d)
 Highlights of the solution code (cont’d):
 Java2CblXmlBridge.c
23
Reengineering and Reuse of Legacy Software
Software Reengineering/Reuse Exercise (cont’d)
 Highlights of the solution code (cont’d):
 XML2CALC.cbl
24
Results (cont’d)
Reengineering and Reuse of Legacy Software (cont’d)
 Sample run of solution code:
Figure 55. Reuse of COBOL from Java using JAXB, JNI, and COBOL XML Support.
25
Reengineering and Reuse of Legacy Software
Software Reengineering/Reuse Exercise (cont’d)
 Sample run of solution code:
Reuse of COBOL from Java using JAXB, JNI, and COBOL XML Support.
26

More Related Content

What's hot

Overlapping optimization with parsing through metagrammars
Overlapping optimization with parsing through metagrammarsOverlapping optimization with parsing through metagrammars
Overlapping optimization with parsing through metagrammarsIAEME Publication
 
Capital Investment Industrial Modeling Framework - IMPRESS
Capital Investment Industrial Modeling Framework - IMPRESSCapital Investment Industrial Modeling Framework - IMPRESS
Capital Investment Industrial Modeling Framework - IMPRESSAlkis Vazacopoulos
 
Binary code obfuscation through c++ template meta programming
Binary code obfuscation through c++ template meta programmingBinary code obfuscation through c++ template meta programming
Binary code obfuscation through c++ template meta programmingnong_dan
 
MAPPING SCDL/BPEL TO ADA FOR FORMAL VERIFICATION OF THE BEHAVIORAL PROPERTIES...
MAPPING SCDL/BPEL TO ADA FOR FORMAL VERIFICATION OF THE BEHAVIORAL PROPERTIES...MAPPING SCDL/BPEL TO ADA FOR FORMAL VERIFICATION OF THE BEHAVIORAL PROPERTIES...
MAPPING SCDL/BPEL TO ADA FOR FORMAL VERIFICATION OF THE BEHAVIORAL PROPERTIES...ijwscjournal
 
C Programming and Coding Standards, Learn C Programming
C Programming and Coding Standards, Learn C ProgrammingC Programming and Coding Standards, Learn C Programming
C Programming and Coding Standards, Learn C ProgrammingTonex
 
Prograamção Paralela Baseada em Componentes (Introduzido o Modelo #)
Prograamção Paralela Baseada em Componentes (Introduzido o Modelo #)Prograamção Paralela Baseada em Componentes (Introduzido o Modelo #)
Prograamção Paralela Baseada em Componentes (Introduzido o Modelo #)Heron Carvalho
 
C programming notes BATRACOMPUTER CENTRE IN Ambala CANTT
C programming notes BATRACOMPUTER CENTRE IN Ambala CANTTC programming notes BATRACOMPUTER CENTRE IN Ambala CANTT
C programming notes BATRACOMPUTER CENTRE IN Ambala CANTTBatra Centre
 
Cbt component based technology architectures
Cbt   component based technology architecturesCbt   component based technology architectures
Cbt component based technology architecturesSaransh Garg
 
Component based models and technology
Component based models and technologyComponent based models and technology
Component based models and technologySaransh Garg
 
Component based models and technology
Component based models and technologyComponent based models and technology
Component based models and technologyMayukh Maitra
 
Staroletov Design by Contract, verification of Cyber-physical systems
Staroletov Design by Contract, verification of Cyber-physical systemsStaroletov Design by Contract, verification of Cyber-physical systems
Staroletov Design by Contract, verification of Cyber-physical systemsSergey Staroletov
 
Objective of c in IOS , iOS Live Project Training Ahmedabad, MCA Live Project...
Objective of c in IOS , iOS Live Project Training Ahmedabad, MCA Live Project...Objective of c in IOS , iOS Live Project Training Ahmedabad, MCA Live Project...
Objective of c in IOS , iOS Live Project Training Ahmedabad, MCA Live Project...NicheTech Com. Solutions Pvt. Ltd.
 
Kroening et al, v2c a verilog to c translator
Kroening et al, v2c   a verilog to c translatorKroening et al, v2c   a verilog to c translator
Kroening et al, v2c a verilog to c translatorsce,bhopal
 
C notes by m v b reddy(gitam)imp notes all units notes 5 unit order
C notes by m v b  reddy(gitam)imp  notes  all units notes  5 unit orderC notes by m v b  reddy(gitam)imp  notes  all units notes  5 unit order
C notes by m v b reddy(gitam)imp notes all units notes 5 unit orderMalikireddy Bramhananda Reddy
 
MODEL DRIVEN ARCHITECTURE, CONTROL SYSTEMS AND ECLIPSE
MODEL DRIVEN ARCHITECTURE, CONTROL SYSTEMS AND ECLIPSEMODEL DRIVEN ARCHITECTURE, CONTROL SYSTEMS AND ECLIPSE
MODEL DRIVEN ARCHITECTURE, CONTROL SYSTEMS AND ECLIPSEAnže Vodovnik
 

What's hot (20)

Overlapping optimization with parsing through metagrammars
Overlapping optimization with parsing through metagrammarsOverlapping optimization with parsing through metagrammars
Overlapping optimization with parsing through metagrammars
 
Capital Investment Industrial Modeling Framework - IMPRESS
Capital Investment Industrial Modeling Framework - IMPRESSCapital Investment Industrial Modeling Framework - IMPRESS
Capital Investment Industrial Modeling Framework - IMPRESS
 
Binary code obfuscation through c++ template meta programming
Binary code obfuscation through c++ template meta programmingBinary code obfuscation through c++ template meta programming
Binary code obfuscation through c++ template meta programming
 
MAPPING SCDL/BPEL TO ADA FOR FORMAL VERIFICATION OF THE BEHAVIORAL PROPERTIES...
MAPPING SCDL/BPEL TO ADA FOR FORMAL VERIFICATION OF THE BEHAVIORAL PROPERTIES...MAPPING SCDL/BPEL TO ADA FOR FORMAL VERIFICATION OF THE BEHAVIORAL PROPERTIES...
MAPPING SCDL/BPEL TO ADA FOR FORMAL VERIFICATION OF THE BEHAVIORAL PROPERTIES...
 
C Programming and Coding Standards, Learn C Programming
C Programming and Coding Standards, Learn C ProgrammingC Programming and Coding Standards, Learn C Programming
C Programming and Coding Standards, Learn C Programming
 
Abc c program
Abc c programAbc c program
Abc c program
 
Prograamção Paralela Baseada em Componentes (Introduzido o Modelo #)
Prograamção Paralela Baseada em Componentes (Introduzido o Modelo #)Prograamção Paralela Baseada em Componentes (Introduzido o Modelo #)
Prograamção Paralela Baseada em Componentes (Introduzido o Modelo #)
 
Part 1
Part 1Part 1
Part 1
 
Pooling optimization problem
Pooling optimization problemPooling optimization problem
Pooling optimization problem
 
C programming notes BATRACOMPUTER CENTRE IN Ambala CANTT
C programming notes BATRACOMPUTER CENTRE IN Ambala CANTTC programming notes BATRACOMPUTER CENTRE IN Ambala CANTT
C programming notes BATRACOMPUTER CENTRE IN Ambala CANTT
 
Cbt component based technology architectures
Cbt   component based technology architecturesCbt   component based technology architectures
Cbt component based technology architectures
 
Component based models and technology
Component based models and technologyComponent based models and technology
Component based models and technology
 
Component based models and technology
Component based models and technologyComponent based models and technology
Component based models and technology
 
Staroletov Design by Contract, verification of Cyber-physical systems
Staroletov Design by Contract, verification of Cyber-physical systemsStaroletov Design by Contract, verification of Cyber-physical systems
Staroletov Design by Contract, verification of Cyber-physical systems
 
Objective of c in IOS , iOS Live Project Training Ahmedabad, MCA Live Project...
Objective of c in IOS , iOS Live Project Training Ahmedabad, MCA Live Project...Objective of c in IOS , iOS Live Project Training Ahmedabad, MCA Live Project...
Objective of c in IOS , iOS Live Project Training Ahmedabad, MCA Live Project...
 
Unit4
Unit4Unit4
Unit4
 
Kroening et al, v2c a verilog to c translator
Kroening et al, v2c   a verilog to c translatorKroening et al, v2c   a verilog to c translator
Kroening et al, v2c a verilog to c translator
 
Chiranjeevi_QA Engg.
Chiranjeevi_QA Engg.Chiranjeevi_QA Engg.
Chiranjeevi_QA Engg.
 
C notes by m v b reddy(gitam)imp notes all units notes 5 unit order
C notes by m v b  reddy(gitam)imp  notes  all units notes  5 unit orderC notes by m v b  reddy(gitam)imp  notes  all units notes  5 unit order
C notes by m v b reddy(gitam)imp notes all units notes 5 unit order
 
MODEL DRIVEN ARCHITECTURE, CONTROL SYSTEMS AND ECLIPSE
MODEL DRIVEN ARCHITECTURE, CONTROL SYSTEMS AND ECLIPSEMODEL DRIVEN ARCHITECTURE, CONTROL SYSTEMS AND ECLIPSE
MODEL DRIVEN ARCHITECTURE, CONTROL SYSTEMS AND ECLIPSE
 

Viewers also liked

Applying Anti-Reversing Techniques to Machine Code
Applying Anti-Reversing Techniques to Machine CodeApplying Anti-Reversing Techniques to Machine Code
Applying Anti-Reversing Techniques to Machine CodeTeodoro Cipresso
 
Why z/OS is a Great Platform for Developing and Hosting APIs
Why z/OS is a Great Platform for Developing and Hosting APIsWhy z/OS is a Great Platform for Developing and Hosting APIs
Why z/OS is a Great Platform for Developing and Hosting APIsTeodoro Cipresso
 
Make Your API Catalog Essential with z/OS Connect EE
Make Your API Catalog Essential with z/OS Connect EEMake Your API Catalog Essential with z/OS Connect EE
Make Your API Catalog Essential with z/OS Connect EETeodoro Cipresso
 
Innovate 2014: Get an A+ on Testing Your Enterprise Applications with Rationa...
Innovate 2014: Get an A+ on Testing Your Enterprise Applications with Rationa...Innovate 2014: Get an A+ on Testing Your Enterprise Applications with Rationa...
Innovate 2014: Get an A+ on Testing Your Enterprise Applications with Rationa...Teodoro Cipresso
 
Reversing and Patching Java Bytecode
Reversing and Patching Java BytecodeReversing and Patching Java Bytecode
Reversing and Patching Java BytecodeTeodoro Cipresso
 
Bitonic Sort in Shared SIMD Array Processor
Bitonic Sort in Shared SIMD Array ProcessorBitonic Sort in Shared SIMD Array Processor
Bitonic Sort in Shared SIMD Array ProcessorAsanka Dilruk
 
Identifying, Monitoring, and Reporting Malware
Identifying, Monitoring, and Reporting MalwareIdentifying, Monitoring, and Reporting Malware
Identifying, Monitoring, and Reporting MalwareTeodoro Cipresso
 
Introduction to Software Reverse Engineering
Introduction to Software Reverse EngineeringIntroduction to Software Reverse Engineering
Introduction to Software Reverse EngineeringTeodoro Cipresso
 

Viewers also liked (10)

Applying Anti-Reversing Techniques to Machine Code
Applying Anti-Reversing Techniques to Machine CodeApplying Anti-Reversing Techniques to Machine Code
Applying Anti-Reversing Techniques to Machine Code
 
Why z/OS is a Great Platform for Developing and Hosting APIs
Why z/OS is a Great Platform for Developing and Hosting APIsWhy z/OS is a Great Platform for Developing and Hosting APIs
Why z/OS is a Great Platform for Developing and Hosting APIs
 
Make Your API Catalog Essential with z/OS Connect EE
Make Your API Catalog Essential with z/OS Connect EEMake Your API Catalog Essential with z/OS Connect EE
Make Your API Catalog Essential with z/OS Connect EE
 
Innovate 2014: Get an A+ on Testing Your Enterprise Applications with Rationa...
Innovate 2014: Get an A+ on Testing Your Enterprise Applications with Rationa...Innovate 2014: Get an A+ on Testing Your Enterprise Applications with Rationa...
Innovate 2014: Get an A+ on Testing Your Enterprise Applications with Rationa...
 
Reversing and Patching Java Bytecode
Reversing and Patching Java BytecodeReversing and Patching Java Bytecode
Reversing and Patching Java Bytecode
 
Bitonic Sort in Shared SIMD Array Processor
Bitonic Sort in Shared SIMD Array ProcessorBitonic Sort in Shared SIMD Array Processor
Bitonic Sort in Shared SIMD Array Processor
 
Identifying, Monitoring, and Reporting Malware
Identifying, Monitoring, and Reporting MalwareIdentifying, Monitoring, and Reporting Malware
Identifying, Monitoring, and Reporting Malware
 
Introduction to Software Reverse Engineering
Introduction to Software Reverse EngineeringIntroduction to Software Reverse Engineering
Introduction to Software Reverse Engineering
 
Array Processor
Array ProcessorArray Processor
Array Processor
 
CO Module 5
CO Module 5CO Module 5
CO Module 5
 

Similar to Reengineering and Reuse of Legacy Software

Restructuring functions with low cohesion
Restructuring functions with low cohesionRestructuring functions with low cohesion
Restructuring functions with low cohesionAditya Kumar Ghosh
 
Software Engineering Fundamentals in Computer Science
Software Engineering Fundamentals in Computer ScienceSoftware Engineering Fundamentals in Computer Science
Software Engineering Fundamentals in Computer ScienceArti Parab Academics
 
Object Oriented Concepts and Principles
Object Oriented Concepts and PrinciplesObject Oriented Concepts and Principles
Object Oriented Concepts and Principlesdeonpmeyer
 
Function Overloading,Inline Function and Recursion in C++ By Faisal Shahzad
Function Overloading,Inline Function and Recursion in C++ By Faisal ShahzadFunction Overloading,Inline Function and Recursion in C++ By Faisal Shahzad
Function Overloading,Inline Function and Recursion in C++ By Faisal ShahzadFaisal Shehzad
 
379008-rc217-functionalprogramming
379008-rc217-functionalprogramming379008-rc217-functionalprogramming
379008-rc217-functionalprogrammingLuis Atencio
 
International Journal of Computational Engineering Research(IJCER)
 International Journal of Computational Engineering Research(IJCER)  International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER) ijceronline
 
IRJET- Generation of HTML Code using Machine Learning Techniques from Mock-Up...
IRJET- Generation of HTML Code using Machine Learning Techniques from Mock-Up...IRJET- Generation of HTML Code using Machine Learning Techniques from Mock-Up...
IRJET- Generation of HTML Code using Machine Learning Techniques from Mock-Up...IRJET Journal
 
186 devlin p-poster(2)
186 devlin p-poster(2)186 devlin p-poster(2)
186 devlin p-poster(2)vaidehi87
 
ABC Architecture A New Approach To Build Reusable And Adaptable Business Tie...
ABC Architecture  A New Approach To Build Reusable And Adaptable Business Tie...ABC Architecture  A New Approach To Build Reusable And Adaptable Business Tie...
ABC Architecture A New Approach To Build Reusable And Adaptable Business Tie...Joshua Gorinson
 
Phase Five Individual Project03-11-2016Revision .docx
Phase Five Individual Project03-11-2016Revision .docxPhase Five Individual Project03-11-2016Revision .docx
Phase Five Individual Project03-11-2016Revision .docxmattjtoni51554
 
Object-Oriented Application Frameworks
Object-Oriented Application FrameworksObject-Oriented Application Frameworks
Object-Oriented Application Frameworkskim.mens
 
Cocoa encyclopedia
Cocoa encyclopediaCocoa encyclopedia
Cocoa encyclopediaAlex Ali
 
Book management system
Book management systemBook management system
Book management systemSHARDA SHARAN
 
Probe Debugging
Probe DebuggingProbe Debugging
Probe DebuggingESUG
 

Similar to Reengineering and Reuse of Legacy Software (20)

Restructuring functions with low cohesion
Restructuring functions with low cohesionRestructuring functions with low cohesion
Restructuring functions with low cohesion
 
OO analysis_Lecture12.ppt
OO analysis_Lecture12.pptOO analysis_Lecture12.ppt
OO analysis_Lecture12.ppt
 
cost-estimation-tutorial
cost-estimation-tutorialcost-estimation-tutorial
cost-estimation-tutorial
 
Software Engineering Fundamentals in Computer Science
Software Engineering Fundamentals in Computer ScienceSoftware Engineering Fundamentals in Computer Science
Software Engineering Fundamentals in Computer Science
 
Object Oriented Concepts and Principles
Object Oriented Concepts and PrinciplesObject Oriented Concepts and Principles
Object Oriented Concepts and Principles
 
Function Overloading,Inline Function and Recursion in C++ By Faisal Shahzad
Function Overloading,Inline Function and Recursion in C++ By Faisal ShahzadFunction Overloading,Inline Function and Recursion in C++ By Faisal Shahzad
Function Overloading,Inline Function and Recursion in C++ By Faisal Shahzad
 
379008-rc217-functionalprogramming
379008-rc217-functionalprogramming379008-rc217-functionalprogramming
379008-rc217-functionalprogramming
 
Intro-Soft-Engg-2.pptx
Intro-Soft-Engg-2.pptxIntro-Soft-Engg-2.pptx
Intro-Soft-Engg-2.pptx
 
Mkl mic lab_0
Mkl mic lab_0Mkl mic lab_0
Mkl mic lab_0
 
International Journal of Computational Engineering Research(IJCER)
 International Journal of Computational Engineering Research(IJCER)  International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)
 
Software Reengineering
Software ReengineeringSoftware Reengineering
Software Reengineering
 
IRJET- Generation of HTML Code using Machine Learning Techniques from Mock-Up...
IRJET- Generation of HTML Code using Machine Learning Techniques from Mock-Up...IRJET- Generation of HTML Code using Machine Learning Techniques from Mock-Up...
IRJET- Generation of HTML Code using Machine Learning Techniques from Mock-Up...
 
186 devlin p-poster(2)
186 devlin p-poster(2)186 devlin p-poster(2)
186 devlin p-poster(2)
 
ABC Architecture A New Approach To Build Reusable And Adaptable Business Tie...
ABC Architecture  A New Approach To Build Reusable And Adaptable Business Tie...ABC Architecture  A New Approach To Build Reusable And Adaptable Business Tie...
ABC Architecture A New Approach To Build Reusable And Adaptable Business Tie...
 
Phase Five Individual Project03-11-2016Revision .docx
Phase Five Individual Project03-11-2016Revision .docxPhase Five Individual Project03-11-2016Revision .docx
Phase Five Individual Project03-11-2016Revision .docx
 
Object-Oriented Application Frameworks
Object-Oriented Application FrameworksObject-Oriented Application Frameworks
Object-Oriented Application Frameworks
 
Cocoa encyclopedia
Cocoa encyclopediaCocoa encyclopedia
Cocoa encyclopedia
 
X-2E Modernize
X-2E ModernizeX-2E Modernize
X-2E Modernize
 
Book management system
Book management systemBook management system
Book management system
 
Probe Debugging
Probe DebuggingProbe Debugging
Probe Debugging
 

Recently uploaded

Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLionel Briand
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...Akihiro Suda
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxRTS corp
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 

Recently uploaded (20)

Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 

Reengineering and Reuse of Legacy Software

  • 1. CS266 Software Reverse Engineering (SRE) Reengineering and Reuse of Legacy Software Teodoro (Ted) Cipresso, teodoro.cipresso@sjsu.edu Department of Computer Science San José State University Spring 2015 The information in this presentation is taken from the thesis “Software reverse engineering education” available at http://scholarworks.sjsu.edu/etd_theses/3734/ where all citations can be found.
  • 2. 2 Reengineering and Reuse of Legacy Software Introduction, Motivation, and Considerations  If good development practices were followed, legacy software is typically composed of three layers [5]: Layers of a well-structured legacy software application.
  • 3. 3 Reengineering and Reuse of Legacy Software Introduction, Motivation, and Considerations  Legacy applications that are not sufficiently componentized, such that their general organization resembles the three layers, are not good candidates for reengineering and reuse.  The most widely accepted technique to reuse legacy application components is that of Wrappering [5], where a new piece of code provides an interface to a legacy application component or layer without requiring code changes to it.  Typically, candidate applications should be well-structured such that the business logic can be isolated, encapsulated, and made into reusable components.
  • 4. 4 Reengineering and Reuse of Legacy Software Introduction, Motivation, and Considerations  Unless enough of an application's source code remains such that it's possible to identify the names of reusable entry points (procedures) and their I/O data structures, attempting to reuse the application may be difficult.  While it is possible to learn the names of entry points that have been explicitly exported by an application in the case of a DLL, the names don't indicate the layout of the expected I/O data structures.  One way to discover the entry points and I/O data structures in legacy machine code is to read the source code of other applications which depend on it.
  • 5. 5 Reengineering and Reuse of Legacy Software COBOL and “Legacy” Languages  The COBOL programming language is most often associated with legacy software applications.  Normally, COBOL programs have a single entry point; additional “alternate” entry points are rare.  Legacy COBOL programs often include functional discriminators in their I/O data structures. Mapping legacy functional discriminators to an object-oriented design.
  • 6. 6 Reengineering and Reuse of Legacy Software Reuse of Code in the Business Logic Layer  In a real-world situation, we would be looking to reuse legacy components whose machine code is the result of thousands of lines of high-level language statements (COBOL) that implement a particular business process.  Since our focus is more on reuse and reengineering of legacy code at a basic level, it's not necessary to encumber ourselves with a very large program in order to learn strategies for reuse and reengineering.  Therefore we consider a small COBOL “calculator” that we wish to make reusable from Java. This program is assumed to be something from the business logic layer.
  • 7. 7 Reengineering and Reuse of Legacy Software Sample COBOL Business Logic Component 01: ****************************************************************** 02: ** Simple COBOL program that performs integer arithmetic ** 03: ****************************************************************** 04: IDENTIFICATION DIVISION. 05: PROGRAM-ID. 'SMPLCALC'. 06: DATA DIVISION. 07: WORKING-STORAGE SECTION. 08: 77 MSG-NUMERIC-OVERFLOW PIC X(25) 09: VALUE 'Numeric overflow occurred'. 10: 77 MSG-SUCCESSFUL PIC X(22) 11: VALUE 'Completed successfully'. 12: LINKAGE SECTION. 13: * Input/Output data structure 14: 01 SMPLCALC-INTERFACE. 15: 02 SI-OPERAND-1 PIC S9(9) COMP-5. 16: 02 SI-OPERAND-2 PIC S9(9) COMP-5. 17: 02 SI-OPERATION PIC X. 18: 88 DO-ADD VALUE '+'. 19: 88 DO-SUB VALUE '-'. 20: 88 DO-MUL VALUE '*'. 21: 02 SI-RESULT PIC S9(18) COMP-3. 22: 02 SI-RESULT-MESSAGE PIC X(128). 23: PROCEDURE DIVISION USING 24: BY REFERENCE SMPLCALC-INTERFACE. 25: MAINLINE SECTION. 26: * Perform requested arithmetic
  • 8. 8 Reengineering and Reuse of Legacy Software Sample COBOL Business Logic Component 27: INITIALIZE SI-RESULT SI-RESULT-MESSAGE 28: EVALUATE TRUE 29: WHEN DO-ADD 30: COMPUTE SI-RESULT = SI-OPERAND-1 + SI-OPERAND-2 31: ON SIZE ERROR 32: PERFORM HANDLE-SIZE-ERROR 33: END-COMPUTE 34: WHEN DO-SUB 35: COMPUTE SI-RESULT = SI-OPERAND-1 - SI-OPERAND-2 36: ON SIZE ERROR 37: PERFORM HANDLE-SIZE-ERROR 38: END-COMPUTE 39: WHEN DO-MUL 40: COMPUTE SI-RESULT = SI-OPERAND-1 * SI-OPERAND-2 41: ON SIZE ERROR 42: PERFORM HANDLE-SIZE-ERROR 43: END-COMPUTE 44: END-EVALUATE 45: * Successful return 46: MOVE MSG-SUCCESSFUL TO SI-RESULT-MESSAGE 47: MOVE 2 TO RETURN-CODE 48: GOBACK 49: .
  • 9. 9 Reengineering and Reuse of Legacy Software Modernizing Business Logic Components  Many commercial tools support importing a COBOL data structure and generating Java marshalling classes.  These marshalling classes are intended to be used with the J2EE Connector Architecture (JCA) where a Java application wrappers a legacy software application. Example JCA implementation for accessing a legacy application.
  • 10. 10 Reengineering and Reuse of Legacy Software Modernizing Business Logic Components (cont’d)  A popular alternative to using the JCA architecture to reengineer and reuse legacy applications is to implement a Service Oriented Architecture (SOA).  SOA components become capable of communicating without the tight and fragile coupling of traditional binary interfaces because they are wrappered with a platform-neutral interface such as XML and Web services.  When XML is used as envisioned, all data, both of type character and numeric are represented as printable text—completely divorced from any platform specific representation or encoding.
  • 11. 11 Reengineering and Reuse of Legacy Software Modernizing Business Logic Components (cont’d)  The net effect of this is that two entities or programs can interact without having to know the data structures that comprise each other's binary interface.  Of course, the XML that is exchanged cannot be arbitrary, so industry standards such as XML Schema (XSD), and Web Services Definition Language (WSDL) fill this gap.  A Web service is considered to be WS-I compliant, or generally interoperable, if it meets many criteria, one of which is the use of XML for the input and output of each operation exposed by service.
  • 12. 12 Reengineering and Reuse of Legacy Software Software Reengineering/Reuse Exercise  This particular requirement of WS-I where XML is the interoperable interface of choice, sets the stage for a meaningful exercise.  A Legacy Software Reengineering and Reuse Exercise was developed to demonstrate wrapping a COBOL program so that is reusable from Java using XML in a local environment.  In the exercise, one is asked to create a language neutral XML interface to the COBOL calculator program and invoke it from a Java program, which incidentally makes it reusable from other Java programs.
  • 13. 13 Reengineering and Reuse of Legacy Software Software Reengineering/Reuse Exercise (cont’d)  Overview of the architecture for the exercise: Architecture for legacy application reengineering and reuse from Java.
  • 14. 14 Reengineering and Reuse of Legacy Software Software Reengineering/Reuse Exercise (cont’d)  Steps in the reengineering and reuse exercise:  Create an XML Schema which represents all of the data in the SMPLCALC- INTERFACE COBOL data structure.  Write a Java interface ISimpleCalculator.java for three computation types supported by SMPLCALC.cbl.  Write a Java class JSimpleCalculator.java that implements the interface defined in ISimpleCalculator.java and provides a user interface.  Use the Java command-line utility xjc, in combination with the XML Schema, generate Java to XML marshalling code (JAXB).
  • 15. 15 Reengineering and Reuse of Legacy Software Software Reengineering/Reuse Exercise (cont’d)  Steps in the reengineering and reuse exercise (cont’d):  Write a small C/C++ JNI program Java2CblXmlBridge.cpp which exports a method Java2SmplCalc that:  Invokes XML2CALC.cbl, passing the XML document received from JSimpleCalculator.java.  Returns the XML generated by XML2CALC.cbl to JSimpleCalculator.java.
  • 16. 16 Reengineering and Reuse of Legacy Software Software Reengineering/Reuse Exercise (cont’d)  Steps in the reengineering and reuse exercise (cont’d):  Write a COBOL program XML2CALC.cbl:  Marshalls XML from Java2CblXmlBridge.cpp into SMPLCALC-INTERFACE.  Invokes SMPLCALC.cbl, passing SMPLCALC-INTERFACE by reference.  Marshalls SMPLCALC-INTERFACE back to XML before returning to Java2CblXmlBridge.cpp.  Compile XML2CALC.cbl and link it with the object code for SMPLCALC.cbl (SMPLCALC.obj).
  • 17. 17 Reengineering and Reuse of Legacy Software Software Reengineering/Reuse Exercise (cont’d)  Steps in the reengineering and reuse exercise (cont’d):  Create a DLL to be loaded by JSimpleCalculator.java by compiling and linking Java2CblXmlBridge.cpp with the object code for XML2CALC.cbl.  Update JSimpleCalculator.java to use the JAXB marshalling code to send/receive XML through the JNI layer and display the results.
  • 18. 18 Reengineering and Reuse of Legacy Software Software Reengineering/Reuse Exercise (cont’d)  Highlights of the solution code:  SimpleCalculator.xsd <element name="SI-OPERAND-1"> <simpleType> <restriction base="integer"> <totalDigits value="9" /> </restriction> </simpleType> </element> . . . <element name="SI-OPERATION"> <simpleType> <restriction base="string"> <enumeration value="+" /> <enumeration value="-" /> <enumeration value="*" /> </restriction> </simpleType> </element>
  • 19. 19 Reengineering and Reuse of Legacy Software Software Reengineering/Reuse Exercise (cont’d)  Highlights of the solution code (cont’d):  ISimpleCalculator.java
  • 20. 20 Reengineering and Reuse of Legacy Software Software Reengineering/Reuse Exercise (cont’d)  Highlights of the solution code (cont’d):  JSimpleCalculator.java
  • 21. 21 Reengineering and Reuse of Legacy Software Software Reengineering/Reuse Exercise (cont’d)  Highlights of the solution code (cont’d):  JSimpleCalculator.java (cont’d)
  • 22. 22 Reengineering and Reuse of Legacy Software Software Reengineering/Reuse Exercise (cont’d)  Highlights of the solution code (cont’d):  Java2CblXmlBridge.c
  • 23. 23 Reengineering and Reuse of Legacy Software Software Reengineering/Reuse Exercise (cont’d)  Highlights of the solution code (cont’d):  XML2CALC.cbl
  • 24. 24 Results (cont’d) Reengineering and Reuse of Legacy Software (cont’d)  Sample run of solution code: Figure 55. Reuse of COBOL from Java using JAXB, JNI, and COBOL XML Support.
  • 25. 25 Reengineering and Reuse of Legacy Software Software Reengineering/Reuse Exercise (cont’d)  Sample run of solution code: Reuse of COBOL from Java using JAXB, JNI, and COBOL XML Support.
  • 26. 26