From COBOL to Models: an MDE framework to extract business logic out of legacy COBOL systems

Post on 10-May-2015

1.797 views 0 download

Tags:

Transcript of From COBOL to Models: an MDE framework to extract business logic out of legacy COBOL systems

1

© 2009 IBM Corporation

Extracting Business Rules from COBOL:A Model-Based Framework

Valerio Cosentino - IBM, AtlanMod, INRIA & EMN, Nantes - valerio.cosentino@fr.ibm.comJordi Cabot - AtlanMod, INRIA & EMN, Nantes - jordi.cabot@mines-nantes.frPatrick Albert – IBM - albertpa@fr.ibm.comPhilippe Bauquel – IBM - bauquel.p@fr.ibm.comJacques Perronnet – IBM - jacques_perronnet@fr.ibm.com

WCRE 2013, Koblenz, Germany – 14-17 October

2 © 2009 IBM Corporation

Outline

Introduction– Problem– Running example

Framework overview– Model Discovery– Business Term Identification– Business Rule Identification– Business Rule Representation

Early validation Conclusion & future work

3 © 2009 IBM Corporation

Problem

4 © 2009 IBM Corporation

Problem

5 © 2009 IBM Corporation

Problem

6 © 2009 IBM Corporation

Problem

Poor/outdated system documentation

7 © 2009 IBM Corporation

Problem

Poor/outdated system documentation The original developers/business analysts may have left the

organization

8 © 2009 IBM Corporation

Problem

Poor/outdated system documentation The original developers/business analysts may have left the

organization Business rules spread in the source code

9 © 2009 IBM Corporation

Problem

Understanding and evolving the business policies together with the corresponding business rules is not trivial

10 © 2009 IBM Corporation

Problem

Understanding and evolving the business policies together with the corresponding business rules is not trivial

Specially true for legacy systems

11 © 2009 IBM Corporation

COBOL

Largely used:– 200 billion lines of code in existence– 70%-75% of business and transaction systems– 90% of global financial transactions

12 © 2009 IBM Corporation

COBOL

Largely used:– 200 billion lines of code in existence– 70%-75% of business and transaction systems– 90% of global financial transactions

Shortage of COBOL developers:– Study on 357 Information Technology professionals

– 46% says they already notice a shortage– 50% says the average age is > 45– 22% says the age is > 55

13 © 2009 IBM Corporation

Running exampleBag

Money

Is open

Need Quantity

Price

Business rules in the program:–If the shop is open, then the customer can buy products–If a product P is needed, then the customer buys P–If the client has enough money, then he can buy products–If the client has enough room in his bag, he can buy products–If a product is available, then it may be bought–If a product is bought, its quantity is decreased by one

14 © 2009 IBM Corporation

Running example Rule embedded in the code:

if a product is bought, its quantity is decreased by one

15 © 2009 IBM Corporation

Running example Rule embedded in the code:

if a product is bought, its quantity is decreased by one

16 © 2009 IBM Corporation

Running example Rule embedded in the code:

if a product is bought, its quantity is decreased by one

17 © 2009 IBM Corporation

Running example Rule embedded in the code:

if a product is bought, its quantity is decreased by one

18 © 2009 IBM Corporation

Framework overview

Model Driven Engineering:– Modular framework– Internal/external representation of BRs– Traceability between rules and source code– Mature tools available for model manipulations, visualizations

and transformations (e.g., ATL, Xtext, ...)

19 © 2009 IBM Corporation

COBOL Model Discovery

20 © 2009 IBM Corporation

Business Term Identification

Manually: the user selects the variables Automatically: heuristic-based strategy

21 © 2009 IBM Corporation

Business Term Identification

Manually: the user selects the variables Automatically: heuristic-based strategy

1) Statements are separated in groups:– Conditional– Computational– ...

22 © 2009 IBM Corporation

Business Term Identification

Manually: the user selects the variables Automatically: heuristic-based strategy

1) Statements are separated in groups:– Conditional– Computational– ...

2) Variables in statements are classified in:– Condition– Index– Source– Target

23 © 2009 IBM Corporation

Business Term Identification

Manually: the user selects the variables Automatically: heuristic-based strategy

– all target variables in computational statements– all variables in conditional statements– ...

24 © 2009 IBM Corporation

Business Rule Identification

25 © 2009 IBM Corporation

Business Rule Identification – Rule Discovery Rule Fragment Identification:

26 © 2009 IBM Corporation

Business Rule Identification – Rule Discovery Rule Fragment Identification:

27 © 2009 IBM Corporation

Business Rule Identification – Rule Discovery Rule Fragment Identification:

28 © 2009 IBM Corporation

Business Rule Identification – Rule Discovery Rule Context Identification:

29 © 2009 IBM Corporation

Business Rule Representation

30 © 2009 IBM Corporation

Business Rule Representation – Vocabulary Extraction

Optional and manual step

31 © 2009 IBM Corporation

Business Rule Representation – Visualization

Text-based visualization

32 © 2009 IBM Corporation

Business Rule Representation – Visualization

Text-based visualization

33 © 2009 IBM Corporation

Business Rule Representation – Visualization

Graph-based visualization

34 © 2009 IBM Corporation

Business Rule Representation – Visualization

Graph-based visualization

35 © 2009 IBM Corporation

Business Rule Representation – Visualization

Graph-based visualization

36 © 2009 IBM Corporation

Early validation

Does the framework find complete business rules? Are the extracted rules understandable?

37 © 2009 IBM Corporation

Early validation

Does the framework find complete business rules? Are the extracted rules understandable?

Analysis of an IBM COBOL application:– 14 programs– 130 variables– 6500 lines of code

4 internal IBM COBOL experts:– They knew the application– They analysed the business rules generated by our framework

38 © 2009 IBM Corporation

Early validation

Does the framework find complete business rules? Are the extracted rules understandable?

Analysis of an IBM COBOL application:– 14 programs– 130 variables– 6500 lines of code

4 internal IBM COBOL experts:– They knew the application– They analysed the business rules generated by our framework

The framework is able to identify the complete business rules– But some extracted rules include technical knowledge

39 © 2009 IBM Corporation

Conclusion and future work

MDE benefits:– Modular framework– Internal/external representation of BRs– Traceability between rules and source code

40 © 2009 IBM Corporation

Conclusion and future work

MDE benefits:– Modular framework– Internal/external representation of BRs– Traceability between rules and source code

Future work:– Complete the early validation on a real system– Extract and unify the rules buried in other layers (presentation,

data, logic)

41 © 2009 IBM Corporation

Questions