Class Model Normalization
Outperforming Formal Concept Analysis approaches with AOC-posets
A. Miralles, G. Molla
Tetis/IRSTEA, France
M. Huchard, C. Nebut
LIRMM, CNRS & Université de Montpellier, France
L. Deruelle, M. Derras
Berger Levrault, France
12th International Conference on Concept Lattices and their Applications Clermont-Ferrand, 2015 october, 13-16
Context: Information systems, software engineering
Class models, inheritance hierarchies
I Capture domain knowledge
I Focus on classification and reuse Normal form
I No redundancy
I All abstractions are created
I All specialization links are present
I Most compact structure with these properties
Context
Existing approaches
I Formal Concept Analysis (FCA) (Ganter and Wille, 1999) Galois lattices (Barbut and Monjardet, 1970)
I Flatcharacteristics (Godin et al., 1993)
I Hierarchicalcharacteristics (Godin et al., 1993)
I Relational Concept Analysis (RCA) (Huchard et al., 2007)
I Reifiedcharacteristics (Roume et al., 2004)
I ExploratoryRCA (Dolques et al., 2015; Miralles et al., 2015)
I Question: Difference in using concept latticesversus
AOC-posets in class model normalization with RCA from the designer point of view (effort in post-analysis)
Normalization: initial class model
Normalization: class model in normal form
Relational Concept Analysis for class model normalization
Relational Context Family Dataset
I Several entity categories (OA-contexts): classes, attributes, operations, roles, associations, etc.
I Relations between entities (OO-contexts): hasAttribute, hasRole, hasOperation, hasTypeEnd, etc.
Relational Concept Analysis for class model normalization
Principle
I Build one concept lattice for each entity category
I Iterate on lattice construction and integration of relational attributes (encoding OO-contexts) in OA-contexts
I Until a fix-point or a chosen step
I Results can be observed at any step (in our case study: step 6)
Object-Attribute contexts
Kclass RainGauge Anemometer Rainfall Wind RainReport
Krole measuredRainfall measuredWind storedRainfall
RG::measuredRainfall ×
RR::storedRainfall ×
A::measuredWind ×
Koperation print MC MCWA MCWSWD PstoredRF
RR::print × ×
R::printinfo × × ×
W::printinfo × × ×
Kattribute tubeHeight measureInterval precision measuringDate codeQuality waterAmount windStrength windDirection period number int real
RG::tubeHeight ×
A::measureInterval ×
A::precision ×
R::measuringDate ×
W::measuringDate ×
R::codeQuality × × ×
W::codeQuality × × ×
R::waterAmount ×
W::windStrength ×
W::windDirection ×
RR::period ×
Object-Object contexts
hasAttribute RG::tubeHeight A::measureInterval A::precision R::measuringDate W::measuringDate R::codeQuality W::codeQuality R::waterAmount W::windStrength W::windDirection RR::period
RainGauge ×
Anemometer × ×
Rainfall × × ×
Wind × × × ×
RainReport ×
hasRole RG::measuredRainfall RR::storedRainfall A::measuredWind
RainGauge ×
Anemometer ×
Rainfall Wind
RainReport ×
hasOperation RR::print R::printinfo W::printinfo RainGauge
Anemometer
Rainfall ×
Wind ×
RainReport ×
hasTypeEnd Rainfall Wind
RG::measuredRainfall ×
RR::storedRainfall ×
A::measuredWind ×
All concept lattices
Detail on class lattice and attribute lattice
Concept lattice
WithO the described entities, Athe characteristics
#concepts: in lattice≤2min(|O|,|A|)
Concept_Device_1
recommendedHeight windVaneDimension Concept_Device_3
Concept_Device_6 vaneType VaneAnemometer
Concept_Device_7 plateDimension PlateAnemometer
Concept_Device_4
Concept_Device_8 tubeLength PitotAnemometer Concept_Device_5
cupNumber CupAnemometer
Concept_Device_2 Concept_Device_0
Classes empty of attribute and method declarations
AOC-poset
WithO the described entities, Athe characteristics
#concepts: in AOC-poset≤ |O|+|A|
Concept_Device_1 recommendedHeight
Concept_Device_5 cupNumber CupAnemometer
Concept_Device_6 vaneType VaneAnemometer
windVaneDimension Concept_Device_3
Concept_Device_8 tubeLength PitotAnemometer Concept_Device_7
plateDimension PlateAnemometer
Some domain concepts may be lost, but no class empty of declaration
Question
Difference in using concept latticesversus AOC-posets in class model normalization with RCA from the designer point of view (effort in post-analysis)
Case study: Concept lattice versus AOC-poset
Assessing the reduction in #concepts
UML Models #classes #attrib. #roles #assoc. #op. #elements
Pesticides V00 34 118 45 45 12 254
Pesticides V01 66 149 51 51 14 331
Pesticides V02 75 119 39 39 12 284
Pesticides V03 73 121 35 35 12 276
Pesticides V04 108 206 61 61 17 453
Pesticides V05 136 270 74 74 17 571
Pesticides V06 134 266 74 74 17 565
Pesticides V07 114 171 62 62 17 426
Pesticides V08 121 169 65 65 17 437
Pesticides V09 126 174 65 65 5 435
Pesticides V10 126 174 66 66 5 437
Pesticides V11 170 183 86 86 5 530
Pesticides V12 172 186 90 90 5 543
Pesticides V13 170 185 94 94 5 548
Pesticides V14 171 186 95 95 5 552
Java Models #classes #attrib. #roles #assoc. #elements
Chapter dist C01 37 95 36 36 204
Chapter dist C02 112 290 187 187 776
Chapter dist C04 223 829 496 496 2444
Chapter dist C08 282 1633 1032 1032 3979
Meta-model used in case study
Dashed relation useless in Java
Results on Pesticides models: Lattice
34 to 172 classes (254 to 571 model elements) Step 6: 165% to253%of new classes
→208 to 344potential new factorization classes to be analyzed
Results on Pesticides models: AOC-poset
34 to 172 classes (254 to 571 model elements) Step 6: 52% to132%of new classes
→89 to45 potential new factorization classes to be analyzed
Results on Pesticides models
#New class concepts in lattice#New class concepts in AOC−poset Low variation: between 1 and 6 %
Results on Java models: Lattice
Results on Java models: AOC-poset
Results on Java models
Lattice (S5/6)
#class # model elements # new classes % new classes
Dist 1 37 204 4 11 %
Dist 2 112 776 69 62%
Dist 4 223 2044 2346 1052 %
Dist 8 282 3979 43656 15481 %
AOC-poset (S5/6)
#class # model elements # new classes % new classes
Dist 1 37 204 3 8%
Dist 2 112 776 49 44 %
Dist 4 223 2044 208 93 %
Dist 8 282 3979 453 161 %
Results on Java models
#New class concepts in lattice#New class concepts in AOC−poset
Conclusion/Perspectives
Conclusion
I Concept lattices and AOC-posets give two different consistent normal forms from a thematic point of view
I two different UML models
I AOC-posets size is more acceptable for analysis by an expert
I UML models:
I results show that the technique is valuable
I from version to version, the model has been improved by the designer, including natural generalization, explaining low difference between lattice and AOC-poset
I Java models: re-work is needed, the meta-model used seems too complex
I Java enumerations have been introduced as classes which brings extra complexity
Conclusion/Perspectives
Perspectives
I Analyze differences between Concept lattice and AOC-poset from a thematic and UML (with consequences on associations) points of view
I Work on methodological aspects
I Exploration
I Guiding metrics
I Model rebuilding at each step for controlling normalization process (accept/reject/modify)
Questions?
Data: UML Pesticides models (IRSTEA), Java source code (Berger Levrault)
Tools: Objecteering modules1, RCAexplore2, Talend workflow3, Java packages
Ack.: Xavier Dolques, ICube, ENGEES, Strasbourg (RCAexplore)
1http://www.objecteering.com/
2http://dolques.free.fr/rcaexplore.php
3http://www.talend.com/