430 likes | 524 Views
Migrating Legacy Procedural System towards Object-Oriented Paradigm Département d’informatique et de recherche opérationnelle Université de Montréal Laboratoire de génie logiciel. Content of the Presentation Research Objective Legacy Dilemma Migration Approaches
E N D
Migrating Legacy Procedural System towards Object-Oriented Paradigm Département d’informatique etde recherche opérationnelleUniversité de Montréal Laboratoire de génie logiciel Séminaire GÉLO, Montréal, le 17 avril 2002
Content of the Presentation • Research Objective • Legacy Dilemma • Migration Approaches • Semi/full-automatic Techniques • Progressive Approach & Migration Model • Migration Risk Analysis (continue…) Séminaire GÉLO, Montréal, le 17 avril 2002
Design Recovery • Rule-based Class Recovery • Migration Process Workflow Automation • Migration Programmer Assessment Model 11. Subject and Target System Quality Comparison 12. Conclusion Séminaire GÉLO, Montréal, le 17 avril 2002
Research Objectives • Reveal the pertinent issues concerned with legacy procedural system evolution • Provide a comprehensive solution to migrate legacy system towards object technology • Provide tools and automatic techniques to support such a solution. Séminaire GÉLO, Montréal, le 17 avril 2002
What is a Legacy Application? Characteristics: • Vital to corporation • Vast former investment & mission critical • Represent substantial business knowledge • Old & Large : 10-25 years, 100K - 1M LOC • Poorly understood: personnel turn-over • Resistant to change Séminaire GÉLO, Montréal, le 17 avril 2002
The Legacy Dilemma • Crucial to organization, while suffering inflexibility to changing business, market and end-user needs • Old, complex and heavily modified from the original designs by years of maintenance • Inaccessible of the original developers and system documentation is out-of-date or nonexistent • Cost of replacement is prohibitively expensive • Result: enormous maintenance costs (Major issue) Séminaire GÉLO, Montréal, le 17 avril 2002
Why Migrate to O-O Paradigm? Major benefits from OO technology • Data & control encapsulation: largely reduce the complexity of subject procedural system • Feature strong modularity: increase evolvabiltiy to ease understanding, reuse and maintenance Why migrating? • Re-design large OO systems is prohibitive in both time and cost. Séminaire GÉLO, Montréal, le 17 avril 2002
The Migration Difficulties • Human Factor • Software maintainers opt to completely rewrite application rather than attempt to adapt it to a new paradigm by hand. • Program Factor • Legacy systems have been evolved & modified over an extended period of time thus largely increase the complexity of understanding Séminaire GÉLO, Montréal, le 17 avril 2002
Migration Approaches • COREM [Gall & Klösch]. • Legacy Wrapping[Lucia et al.] • Automatic Technique Aid Approach (intensive interests) • Concept Lattice • Genetic algorithm • Concept clustering …. Séminaire GÉLO, Montréal, le 17 avril 2002
COREM approach Séminaire GÉLO, Montréal, le 17 avril 2002
( Continue..) • Characteristic: use additional domain knowledge. • Result: involvement of domain expert • Advantage: the results are more reliable. • Disadvantage: • Domain expertise is not always available • Cost may be very high. Séminaire GÉLO, Montréal, le 17 avril 2002
(ii) Legacy wrapping approach The identified “legacy objects” are encapsulated into object wrappers and new OO system use existing resources through the wrapper’s interface. Séminaire GÉLO, Montréal, le 17 avril 2002
(iii) Automatic Technique Aid Approach(intensive interests) Séminaire GÉLO, Montréal, le 17 avril 2002
Object Identification • Finding objects in legacy systems is a key step in migrating towards OO paradigm • Object technology is an enabler for componentization : splitting a large application into reusable components • Intensive research work have been done to support the automation of object identification Séminaire GÉLO, Montréal, le 17 avril 2002
Semi/full-automatic Techniques • Metric-based: similarity/concept clustering, type-based cohesion, delta-IC • Concept-based: Galois lattice analysis • Graph-based: strongly connected component • Genetic algorithm: derive better solutions starting from a set of initial solutions • Program slicing … Séminaire GÉLO, Montréal, le 17 avril 2002
The Issues of Object Identification • Legacy systems greatly vary in source language, application domain,etc. • Difficult to select the best-suited identification approach for the legacy system at hand. • Automatic technique tends to be too fine-grained, strict recover criteria makes it lack of flexibility for vague concepts Séminaire GÉLO, Montréal, le 17 avril 2002
Incremental Approach & Migration Model • Full-size progressive migration approach • allows subject system to run with no downtime • provides a flexible management means to large migration projects • Seed growing incremental migration approach • OO target application skeleton • Function-based decomposition Séminaire GÉLO, Montréal, le 17 avril 2002
(i) Full-size progressive migration approach Séminaire GÉLO, Montréal, le 17 avril 2002
Example: the Decomposition of SGA-C System The Decomposition of SGA-C System Séminaire GÉLO, Montréal, le 17 avril 2002
(ii) Seed growing incremental migration approach Séminaire GÉLO, Montréal, le 17 avril 2002
Migration Model (Reverse Direction) Séminaire GÉLO, Montréal, le 17 avril 2002
Migration Model (Forward direction) Séminaire GÉLO, Montréal, le 17 avril 2002
Migration Risk Analysis • Measured in probability of failure by the end of migration time frame. • Migration strategy failure: inadequate consideration of migration requirement, environment integration, migration process, legacy knowledge mining • Inadequate reverse & reengineering tool support • Risk factors: resources, migration plan, human, technology, inner&outer environment, disaster event…. Séminaire GÉLO, Montréal, le 17 avril 2002
Migration Project Risk Prediction Séminaire GÉLO, Montréal, le 17 avril 2002
Design Recovery: levels of abstraction • Application: concepts, business rules, policies • Function: logical and functional specifications,non-functional requirements • Structure • Data and control flow, dependency graphs • Structure and subsystem charts • Architectures • AST’s Séminaire GÉLO, Montréal, le 17 avril 2002
Data Dependency Design Recovery • Legacy modularization based on user defined data structure • Model (legacy source code file) works as container of its data • User defined data structure dependency reflects its container dependency Séminaire GÉLO, Montréal, le 17 avril 2002
Interest: a personal finance system (92 files, 28 kloc) Séminaire GÉLO, Montréal, le 17 avril 2002
Behavior Tracing & Component Mining • The incapability of source code-based approach: statically analyzing, pre-defined visualization mode • Fixed execution scope will high-light legacy function module • Reveal the relation between high level source code and the system behavior, thus reflect the real components • Shortage: the incomplete tracing set Séminaire GÉLO, Montréal, le 17 avril 2002
Behavior tracing: structure & component mining Séminaire GÉLO, Montréal, le 17 avril 2002
A piece of automatically modified source code 1. write in file "WatchFile" line: cf_init() 2. The daemon thread will detect the length variation of WatchFile, then it'll get the line: cf_init(), and seach in reporsitory, find out the definition is: configuration:cf_init(void). 3. daemon thread will write a new line in file: BehaviorTrace. Firstly add x spaces, such number of spaces x is written in file SpaceFile; secondly, write: configuration:cf_init(void ). 4. daemon thread increase the number written in SpaceFile with 3. cf_init(); decrease 3 from the number written in SpaceFile cf_read_config_file(); cf_show(); Séminaire GÉLO, Montréal, le 17 avril 2002
Result behavior record: Main.c: main(int arc=$,;char ** argv=&) Main.c: parse_argument(int arc=$; char **argv=$;Glist **filelist=$) Configuration.c: cf_init() configuration.c : cf_set_rootdir(char *dir($)) configuration.c: UDT inconfig($) configuration.c: clear_autoload() Utility.c: ut_quoat_word(char *word=$) Color.c: show_color(int value=$) Color.c: ……… ………. Séminaire GÉLO, Montréal, le 17 avril 2002
Capacity of Behavior tracing • Legacy system decomposition: mining functional component, subsystem structure; grouping models, routines, user defined data structure based on their cooperation • Common service component business logic recovery • Dynamic metric collection: eg. to a certain system function request, the number of routine calls, involved models, routines, data structures, etc. Séminaire GÉLO, Montréal, le 17 avril 2002
Rule based Class Recovery Model (RCR): Séminaire GÉLO, Montréal, le 17 avril 2002
Rules are distilled & defined by expertise • Expressed both in natural language and semantic operational format (SOF) • SOF can be “understood” and executed by automatic class mining machine. • Eg. “Each UDT is a candidate class”, in SOF, expressed as: ( UDT | Class) • “Routine that references the 3-variables is candidate method of that class”, in SOF, expressed as: ( Routine, 3-variable | Method, Class) Séminaire GÉLO, Montréal, le 17 avril 2002
A rule from case study: • For a global U_variable, if its data type is a simple UDT, we can look at it as an object entity; if its data type is a combination of UDTs, we look at itself as a representation of another higher level class candidate, this class is constituted by its compositional UDT. • A good example is an array of a UDT: “Account” is a UDT, a global U_variable is an array of type “Account”, thus it forms another concept: a new class candidate: AccountList. Séminaire GÉLO, Montréal, le 17 avril 2002
Rule Sreened by Statistic Study • 25 participants use 11 suggested rules (case study) • Record the usage of rules in each “human discovered” class • Record new rules that created by human in study • Build usage apportion pie-chart, refine those mostly used rules, create algorithms according to these widely accept rules to find class automaiclly Séminaire GÉLO, Montréal, le 17 avril 2002
Migration Process Workflow Automation • Describes the flow of information and monitors the performance of each work • Migration process teamwork automatic arrangement • Incremental migration project progress control Séminaire GÉLO, Montréal, le 17 avril 2002
Migration Workflow Diagram Séminaire GÉLO, Montréal, le 17 avril 2002
Migration Workflow Components • Workflow Definition Tool: supports the capture of the migration process definition • Workflow Engine: performs the management of the workflow processes execution, sequences the various activities • Workflow Monitoring: monitors the status of workflow processes, dynamically configures the runtime controller in a progressive migration project Séminaire GÉLO, Montréal, le 17 avril 2002
Migration Programmer Assessment • Maintenance programmer quality factors • Personal maturity level (easy-going, initiative, cooperative, conscientious, discipline, like migration task … • Technical maturity level (skills, learning ability, … • Calibration: fuzzy concept Séminaire GÉLO, Montréal, le 17 avril 2002
Migration Programmer Quality Assessment Model: Séminaire GÉLO, Montréal, le 17 avril 2002
Subject and Target System Comparison • Function matching • Quality comparison • Mainly interested in understandability and maintenabiltiy (Complexity) • Procedural system quality • OO system quality • Result comparison Séminaire GÉLO, Montréal, le 17 avril 2002
Conclusion ---Thank your! Séminaire GÉLO, Montréal, le 17 avril 2002