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

41
1 © 2009 IBM Corporation Extracting Business Rules from COBOL: A Model-Based Framework Valerio Cosentino - IBM, AtlanMod, INRIA & EMN, Nantes - [email protected] Jordi Cabot - AtlanMod, INRIA & EMN, Nantes - [email protected] Patrick Albert – IBM - [email protected] Philippe Bauquel – IBM - [email protected] Jacques Perronnet – IBM - [email protected] WCRE 2013, Koblenz, Germany – 14-17 October

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

Page 1: 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 - [email protected] Cabot - AtlanMod, INRIA & EMN, Nantes - [email protected] Albert – IBM - [email protected] Bauquel – IBM - [email protected] Perronnet – IBM - [email protected]

WCRE 2013, Koblenz, Germany – 14-17 October

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

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

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

3 © 2009 IBM Corporation

Problem

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

4 © 2009 IBM Corporation

Problem

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

5 © 2009 IBM Corporation

Problem

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

6 © 2009 IBM Corporation

Problem

Poor/outdated system documentation

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

7 © 2009 IBM Corporation

Problem

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

organization

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

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

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

9 © 2009 IBM Corporation

Problem

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

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

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

Page 11: From COBOL to Models: an MDE framework to extract business logic out of legacy COBOL 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

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

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

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

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

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

14 © 2009 IBM Corporation

Running example Rule embedded in the code:

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

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

15 © 2009 IBM Corporation

Running example Rule embedded in the code:

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

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

16 © 2009 IBM Corporation

Running example Rule embedded in the code:

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

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

17 © 2009 IBM Corporation

Running example Rule embedded in the code:

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

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

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, ...)

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

19 © 2009 IBM Corporation

COBOL Model Discovery

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

20 © 2009 IBM Corporation

Business Term Identification

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

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

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– ...

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

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

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

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– ...

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

24 © 2009 IBM Corporation

Business Rule Identification

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

25 © 2009 IBM Corporation

Business Rule Identification – Rule Discovery Rule Fragment Identification:

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

26 © 2009 IBM Corporation

Business Rule Identification – Rule Discovery Rule Fragment Identification:

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

27 © 2009 IBM Corporation

Business Rule Identification – Rule Discovery Rule Fragment Identification:

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

28 © 2009 IBM Corporation

Business Rule Identification – Rule Discovery Rule Context Identification:

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

29 © 2009 IBM Corporation

Business Rule Representation

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

30 © 2009 IBM Corporation

Business Rule Representation – Vocabulary Extraction

Optional and manual step

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

31 © 2009 IBM Corporation

Business Rule Representation – Visualization

Text-based visualization

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

32 © 2009 IBM Corporation

Business Rule Representation – Visualization

Text-based visualization

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

33 © 2009 IBM Corporation

Business Rule Representation – Visualization

Graph-based visualization

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

34 © 2009 IBM Corporation

Business Rule Representation – Visualization

Graph-based visualization

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

35 © 2009 IBM Corporation

Business Rule Representation – Visualization

Graph-based visualization

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

36 © 2009 IBM Corporation

Early validation

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

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

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

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

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

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

39 © 2009 IBM Corporation

Conclusion and future work

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

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

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)

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

41 © 2009 IBM Corporation

Questions