SlideShare une entreprise Scribd logo
1  sur  22
Télécharger pour lire hors ligne
Extracting Business
Rules and Removing
Duplication With IRIS
Wei Wu, École Ploytechnique de Montéal
Stéphane Vaucher, Benchmark Consulting
Outline








Business Rule (BR)
Problem
Previous Works
BR Extraction
Detect Duplication
Examples
TODO
Business Rule




Business rules (BRs) are statements that prevent,
cause, or suggest business activities to happen.
- The GUIDE Business Rules Project
Example:


If the driver age under 25, car rent rate is $80 per
day, otherwise, it is $60 per day.
Business Rule


OMG Semantics of Business Vocabulary and
Business Rules (SBVR)
Conceptual Model
Business Rule



Rule: If the driver age under 25, car rent rate is
$80 per day, otherwise, it is $60 per day.
Term:
Driver age
 Car rent rate




Fact:
The driver age under 25
 Set car rent rate to $80
 Set car rent rate to $60

Problem







Written by business analysts
Implemented in business systems
Documents and implementations are not well
synchronized
Actual BRs are only in the source code
No reliable way to extract them
Previous Works










Erik Putrycz and Anatol W. Kark, Recovering Business Rules from Legacy
Source Code, the Proceedings of The International RuleML Symposium on
Rule Interchange and Applications (RuleML-2007), 2007
Harry M. Sneed, Extracting Business Logic from existing COBOL programs
as a basis for Redevelopment, Proceedings of the 9th International Workshop
on Program Comprehension (IWPC’01), 2001
Huang et al., Business Rule Extraction from Legacy Code, COMPSAC '96
Proceedings of the 20th Conference on Computer Software and Applications,
1996
Harry M. Sneed and Katalin Erdos, Extracting Business Rules from Source
Code, WPC '96 Proceedings of the 4th International Workshop on Program
Comprehension, 1996
Softwareminingʹs BRE Toolkit,
http://www.softwaremining.com/services/Business_Rule_Extraction.jsp
Limitations






Not KDM based - Language specific
Not distinguish business and non-business
variable.
Need manually-identified variable-of-interest
Not handle duplication
Term Unit Extraction


DB Related DataElements
ColumnSet – ItemUnit
 ColumnSet – InDataRelations – DataModel –
DataElements
 DataModel – DataAction - DataElement




DB Related DataElements - TermUnit
Identify DB-related Actions


ActionElements




InReads and InWrites of DB Related DataElements

Top-level Conditions







if(no-db-realted-Data){
if(db-related-data1){
if(db-related-data2){
}
}
if(db-related-data3){
}





}
Identify Top-level Condition




Condition not dominated by any condition which
accesses DB-realted DataElement
To detect not-top-level conditions





Get basic-block (BB) of each condition
Get all the dominators of the BB
Get the InFlow of the first ActionElement of each dominator
If the InFlow is TrueFlow or FalseFlow and the condition of
the Flows accesses some DB related DataElement
RuleUnit Extraction 2-1








Create RuleUnit for the TrueFlow (FlaseFlow)
of each top-level condition
Put the condition to the implementation list of
the RuleUnit
Create a FactUnit for the condition
Create a ConceptualRole for the FactUnit and
put it to the ConceptualElement list of the Rule
Unit
RuleUnit Extraction 2-2










Create a FactUnit for each ActionElement in the
branch
Create a ConceptualRole for the FactUnit and put it to
the ConceptualElement list of the Rule Unit
Create a normalized ID for the RuleUnit based on all
its ConceptualRoles
If there’s another RuleUnit with the same ID, just add
the implementation list to that RuleUnit.
Otherwise, add the RuleUnit to the Conceptual Model
ActionElement Normalization


Intermediate Presentation
Left - OutReads
 Operator - Type
 Right – OutReads




Conditions
NNF
 DNF

ActionElement Normalization


Alphabetical Normalization
b == a
->
 b<a
->
 d>c && b<a ->


a == b
a>b
a>b && c<d
Examples


BR:






















121810
121810
121810
121810
121810
012211
121810
121810
121810
121810
121810
012211
121810
121810
121810
121810
121810
121810
121810
121810

EVALUATE SQLSTATE
02443500
WHEN SQL-OK
02443600
IF WORK-HV-TXL-CLS-WASH-SALE-AMT >= 0
02443700
IF WORK-HV-TXL-CLS-RECORD-DEL-SW = 'N' AND 02443800
TAXL-TRANS-TYPE-NO = 930
02443900
PERFORM RECALCULATE-AVG-WASH-QTY
02444000
SET PROCESS-AVG-WASH
02444100
TO TRUE
02444200
ELSE
02444300
IF WORK-HV-TXL-CLS-RECORD-DEL-SW = 'Y' AND 02444400
(TAXL-TRANS-TYPE-NO = 500 OR 600)
02444500
PERFORM RECALCULATE-AVG-WASH-QTY
02444600
SET PROCESS-AVG-WASH
02444700
TO TRUE
02444800
END-IF
02444900
END-IF
02445000
END-IF
02445100
WHEN OTHER
02445200
PERFORM ERROR-AVG-WASH
02445300
END-EVALUATE.
Examples


Duplicated






080306
091906
091906
080306
080306

IF HV-TXL-MST-OPEN-DATE IS LESS THAN
00862200
WORK-TAXL-UPDT-DIV-EX-DT-DB2 OR 00862300
HV-TXL-MST-OPEN-DATE IS EQUAL TO DF-NINES-DATE
00862400
PERFORM UPDATE-LIQUIDATION-PAYMENT
00862500
END-IF
00862600
IF TAXL-QTY IS NOT EQUAL TO ZERO
00862700
PERFORM FETCH-ROW-TXL-OPEN-FIFO
00862800
END-IF

080306
091906
091906
080306
080306

IF HV-TXL-MST-OPEN-DATE IS LESS THAN
00869400
WORK-TAXL-UPDT-DIV-EX-DT-DB2 OR 00869500
HV-TXL-MST-OPEN-DATE IS EQUAL TO DF-NINES-DATE
00869600
PERFORM UPDATE-LIQUIDATION-PAYMENT
00869700
END-IF
00869800
IF TAXL-QTY IS NOT EQUAL TO ZERO
00869900
PERFORM FETCH-ROW-TXL-OPEN-FIFO
00870000
END-IF













Examples








Data ActionElements: 2,084
Code ActionElements: 47,699
IF conditions: 2,724
DB related ActionElements: 12,195
DB related IF conditions is 621
Top-level if conditions is 591
ActionElements in BRs are 2,038
Ongoing Works




Compute the percentage of the ActionElements
involved in BRs
Compare with using graph matching techniques
to identify duplicated or similar BRs
Future Works








Get feedback from business people
Multi-objective way to detect duplicated or
similar BRs
Peephole Optimization
Remove irrelevant ActionElements
(Usedef/Defuse)
Inter-procedural analysis
Thank You!

Extracting Business
Rules and Removing
Duplications With IRIS

Contenu connexe

Similaire à 130214 wei wu - extracting business rules and removing duplication with iris

Rules Programming tutorial
Rules Programming tutorialRules Programming tutorial
Rules Programming tutorial
Srinath Perera
 
Towards Automating Security Compliance Value Chain_FSE15_2June_submitted_final
Towards Automating Security Compliance Value Chain_FSE15_2June_submitted_finalTowards Automating Security Compliance Value Chain_FSE15_2June_submitted_final
Towards Automating Security Compliance Value Chain_FSE15_2June_submitted_final
Smita S. Ghaisas
 
Tibco business events ( be ) online & corporate training by virtualnuggets
Tibco business events ( be ) online & corporate training by virtualnuggetsTibco business events ( be ) online & corporate training by virtualnuggets
Tibco business events ( be ) online & corporate training by virtualnuggets
psrani
 
PricingEngine_v2.5
PricingEngine_v2.5PricingEngine_v2.5
PricingEngine_v2.5
Wei Zhang
 
Drools Presentation for Tallink.ee
Drools Presentation for Tallink.eeDrools Presentation for Tallink.ee
Drools Presentation for Tallink.ee
Anton Arhipov
 
5(re dfd-erd-data dictionay)
5(re dfd-erd-data dictionay)5(re dfd-erd-data dictionay)
5(re dfd-erd-data dictionay)
randhirlpu
 

Similaire à 130214 wei wu - extracting business rules and removing duplication with iris (20)

Flex 360 Rules Engine
Flex 360 Rules EngineFlex 360 Rules Engine
Flex 360 Rules Engine
 
Flex 360 Rules Engine
Flex 360 Rules EngineFlex 360 Rules Engine
Flex 360 Rules Engine
 
Obey The Rules: Implementing a Rules Engine in Flex
Obey The Rules: Implementing a Rules Engine in FlexObey The Rules: Implementing a Rules Engine in Flex
Obey The Rules: Implementing a Rules Engine in Flex
 
A Model-Based Approach for Extracting Business Rules out of Legacy Informatio...
A Model-Based Approach for Extracting Business Rules out of Legacy Informatio...A Model-Based Approach for Extracting Business Rules out of Legacy Informatio...
A Model-Based Approach for Extracting Business Rules out of Legacy Informatio...
 
Rules Programming tutorial
Rules Programming tutorialRules Programming tutorial
Rules Programming tutorial
 
Alexandria ACM Student Chapter | Specification & Verification of Data-Centric...
Alexandria ACM Student Chapter | Specification & Verification of Data-Centric...Alexandria ACM Student Chapter | Specification & Verification of Data-Centric...
Alexandria ACM Student Chapter | Specification & Verification of Data-Centric...
 
Towards Automating Security Compliance Value Chain_FSE15_2June_submitted_final
Towards Automating Security Compliance Value Chain_FSE15_2June_submitted_finalTowards Automating Security Compliance Value Chain_FSE15_2June_submitted_final
Towards Automating Security Compliance Value Chain_FSE15_2June_submitted_final
 
X-Analysis Application Process Mapping
X-Analysis Application Process MappingX-Analysis Application Process Mapping
X-Analysis Application Process Mapping
 
License DSL translation in COMPAS framework
License DSL translation in COMPAS frameworkLicense DSL translation in COMPAS framework
License DSL translation in COMPAS framework
 
Unit 2 analysis and software requirements
Unit 2 analysis and software requirementsUnit 2 analysis and software requirements
Unit 2 analysis and software requirements
 
Tibco business events ( be ) online & corporate training by virtualnuggets
Tibco business events ( be ) online & corporate training by virtualnuggetsTibco business events ( be ) online & corporate training by virtualnuggets
Tibco business events ( be ) online & corporate training by virtualnuggets
 
Sap grc process control 10.0
Sap grc process control 10.0Sap grc process control 10.0
Sap grc process control 10.0
 
PricingEngine_v2.5
PricingEngine_v2.5PricingEngine_v2.5
PricingEngine_v2.5
 
Business rules
Business rulesBusiness rules
Business rules
 
Drools Presentation for Tallink.ee
Drools Presentation for Tallink.eeDrools Presentation for Tallink.ee
Drools Presentation for Tallink.ee
 
Elcio Grassia Presidente do SCC LATAM
Elcio Grassia Presidente do SCC LATAMElcio Grassia Presidente do SCC LATAM
Elcio Grassia Presidente do SCC LATAM
 
Next generation business automation with the red hat decision manager and red...
Next generation business automation with the red hat decision manager and red...Next generation business automation with the red hat decision manager and red...
Next generation business automation with the red hat decision manager and red...
 
5(re dfd-erd-data dictionay)
5(re dfd-erd-data dictionay)5(re dfd-erd-data dictionay)
5(re dfd-erd-data dictionay)
 
software requirement and architecture.pdf
software requirement and architecture.pdfsoftware requirement and architecture.pdf
software requirement and architecture.pdf
 
Supply Chain Council
Supply Chain CouncilSupply Chain Council
Supply Chain Council
 

Plus de Ptidej Team

Plus de Ptidej Team (20)

From IoT to Software Miniaturisation
From IoT to Software MiniaturisationFrom IoT to Software Miniaturisation
From IoT to Software Miniaturisation
 
Presentation
PresentationPresentation
Presentation
 
Presentation
PresentationPresentation
Presentation
 
Presentation
PresentationPresentation
Presentation
 
Presentation by Lionel Briand
Presentation by Lionel BriandPresentation by Lionel Briand
Presentation by Lionel Briand
 
Manel Abdellatif
Manel AbdellatifManel Abdellatif
Manel Abdellatif
 
Azadeh Kermansaravi
Azadeh KermansaraviAzadeh Kermansaravi
Azadeh Kermansaravi
 
Mouna Abidi
Mouna AbidiMouna Abidi
Mouna Abidi
 
CSED - Manel Grichi
CSED - Manel GrichiCSED - Manel Grichi
CSED - Manel Grichi
 
Cristiano Politowski
Cristiano PolitowskiCristiano Politowski
Cristiano Politowski
 
Will io t trigger the next software crisis
Will io t trigger the next software crisisWill io t trigger the next software crisis
Will io t trigger the next software crisis
 
MIPA
MIPAMIPA
MIPA
 
Thesis+of+laleh+eshkevari.ppt
Thesis+of+laleh+eshkevari.pptThesis+of+laleh+eshkevari.ppt
Thesis+of+laleh+eshkevari.ppt
 
Thesis+of+nesrine+abdelkafi.ppt
Thesis+of+nesrine+abdelkafi.pptThesis+of+nesrine+abdelkafi.ppt
Thesis+of+nesrine+abdelkafi.ppt
 
Medicine15.ppt
Medicine15.pptMedicine15.ppt
Medicine15.ppt
 
Qrs17b.ppt
Qrs17b.pptQrs17b.ppt
Qrs17b.ppt
 
Icpc11c.ppt
Icpc11c.pptIcpc11c.ppt
Icpc11c.ppt
 
Icsme16.ppt
Icsme16.pptIcsme16.ppt
Icsme16.ppt
 
Msr17a.ppt
Msr17a.pptMsr17a.ppt
Msr17a.ppt
 
Icsoc15.ppt
Icsoc15.pptIcsoc15.ppt
Icsoc15.ppt
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Dernier (20)

Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

130214 wei wu - extracting business rules and removing duplication with iris