Slide 1 - The University of Texas at Dallas

Evaluating Off-The-Shelf
Architectural Components
Kendra Cooper
Lawrence Chung
Weimin Ma
[email protected] [email protected] [email protected]
The Component-Aware Technology (CAT) Lab.
Department of Computer Science
The University of Texas at Dallas
An Example:
Home Appliance Control System (HACS)
What do I need ???
What is the type of
HACS Controller?
What is the type of
AC Controller?
Evaluating Home Appliance Control System
(HACS) Components
Specifier
How to effectively evaluate components, simple and composite?
UML Class Diagram as Model of Software Components
Figure 1: Results for matching and ranking OTS components
Figure 2: UML class diagram model of component set 1
Figure 3: UML class diagram model of component set
4
Outline
A Scenario for Using Software Components
Similarity Measure

The Notion of Distance

The Notion of Criteria
Criteria-Based User Query
Evaluation of Components

Evaluation of Simple Components
(E.g., Evaluate AC Controller;
Evaluate HACS Controller)

Evaluation of Relationships

Evaluation of Composite Components
Conclusions
A Scenario for Using Software Components
2. Is there an AC Controller with feature
“Set Temp”?
3. Component set 3>>4>{1, 2}
Searching …
1. I need AC Controller with feature “Set Temp” &
HACS Controller with feature “Check Status”.
4. Is there a HACS Controller with feature
“Check Status”?
Component
Sets/Vendors
1,2
negotiate
Evaluator
Specifier
5. Component set 3>>4>>1>>2
6. Do HACS Controller and AC
Controller fit together well?
User
7. Component set {2, 3}>>{1, 4}
8. How well do the component sets match?
9. A possible ranking: 3>>{4, 2}>>1
>>: better match
3,4
Evaluator
Similarity Measure: The Notion of Distance
Simple Component:
Composite Component:
Distance is 1.
?
Distance is 1.
Distance is 2.
Distance is 1.
?
Distance is 2.
Distance is 1.
?
Distance is 0.
Distance is 3.
Distance is 1.
No context consideration.
Criterion a: number of figures.
Criterion b: number & shape of figures.
Criterion a: number of figures.
Criterion b: number & shape of figures.
Type of relationship & number of extra intermediaries
Criteria are necessary for software component evaluation!
Similarity Measure: The Notion of Criteria
Criteria-Based User Query

Unstructured user query:
I want a HACS system whose
HACS controller has feature “Check Status”
and AC controller has feature “Set Temp”.

Using the criteria and through communication, the specifier can turn it into
criteria-based structure (à la Case-Based Reasoning):
Sub-query 1:
(Class Name) AC Controller
(Attribute) Temperature
(Operation) setTemperature
Sub-query 2:
(Class Name) HACS Controller
(Attribute) Status
(Operation) checkStatus
(Association)
Evaluation of Components for “AC Controller”
Based on Case-based Scheme
Sub-query 1:
(Class Name) AC Controller
(Attribute) Temperature
(Operation) setTemperature
S_m: 1 - (½ + 1 + 0)/3
= 0.5.
Component Set 1:
(Class Name) AC
Conditioner
(Attribute) temp
(Operation)
S_m: 1 – (½ + 1 + 1)/3 =
0.167.
S_m: 1- (½ + 1 + 0)/3
= 0.5.
S_m: 1 - (1 + 1 + 1)/3
= 0.
Component Set 2:
(Class Name) AC
Conditioner
(Attribute) temp
(Operation)
Component Set 4:
(Class Name) Temperature
Controller
(Attribute) temperature
(Operation) setTemperature
Component Set 3:
(Class Name) AC Controller
(Attribute) temperature
(Operation) settemp
Criteria
Figure 2: UML class diagram model of component set 1
Sim_component_set (“AC Controller”, component set 1)
= 1-
 [ priority ´ X %_m(i)]
 priority
i
i in feature, AC" Controller, component set 1
i
i in feature, AC Controller, component set 1
Evaluation of Components for “HACS Controller”
Based on Case-based Scheme
Sub-query 2:
(Class Name) HACS Controller
(Attribute) Status
(Operation) checkStatus
S_m: 1 – (½ + 0 + ¼)/3
= 0.75.
Component Set 1:
(Class Name) System
Control
(Attribute)
(Operation) getHistory
S_m: 1 – (1 + 0 + 0)/3 =
0.667.
Component Set 4:
(Class Name) HACS Controller
(Attribute)
(Operation)
S_m: 1 – (½ + 0 + 0)/3 =
0.833.
S_m: 1 – (½ + 0 + 1)/3 =
0.5.
Component Set 2:
(Class Name) System
Control
(Attribute)
(Operation)
Component Set 3:
(Class Name) HACS
Interaction Device
(Attribute)
(Operation) checkstatus
Figure 2: UML class diagram model of component set 1
Criteria
Sim_component_set (“AC Controller”, component set 1)
= 1-
 [ priority ´ X %_m(i)]
 priority
i
i in feature, AC" Controller, component set 1
i
i in feature, AC Controller, component set 1
Evaluation of Relationship between Components
Sub-query 1 and Sub-query 2
Distance: 2
Distance: 2
Component Set 1:
(# of Relationships) 2
(Relationship Type) {1 Association, 1 generalization}
Distance: 0
Component Set 2:
(# of Relationships) 1
(Relationship Type) {1 association}
Distance: 0
Component Set 4:
(# of Relationships) 2
(Relationship Type) {1 association, 1 generalization}
Criteria
Component Set 3:
(# of Relationships) 1
(Relationship Type) {1 association}
Figure 2: UML class diagram model of component set 1
Figure 3: UML class diagram model of component set 4
Evaluation of Composite Components
Similarity (Component Set 1):
0.75
Similarity (AC Controller)
0.5
Similarity (HACS Controller)
0.75
Similarity (relationship)
1
between AC-HACS) + Sim(HACS Controller))/
Sim (Component _ Set _ 1) = (Sim(AC Controller) + Sim(Relationship
/
.(#component+#relationships),
.
. .
where Sim(Relationship between AC-HACS) = (#extra-relationships+#relationship-mismatch)/
(#relationship-in-query+#possible-relationship-attributes)
= (0.5+2/2+0.75)/(2+1) = 0.75
Component Sets/Vendors = {1, 2, 3, 4}
Ranking of “AC Controller”: 3 >> 4>> {1, 2}
Ranking of “HACS Controller”: 3>> 4>> 1>> 2
Ranking of relationship between components: {2, 3} >> {4, 1}
Ranking of component sets for user’s query: 3>>{4, 2, 1}
? 3>>{4, 2}>>1
Conclusions
Contributions
Technique for evaluating architectural components using UML class diagrams
Hierarchy of criteria for component evaluation
Cased-based scheme for similarity-based evaluation.
Future Work
Refinements of distance and criteria (context information).
Multiple evaluation schemes (e.g., AHP/MCDM, fuzzy case-based reasoning)
Application to a suite of UML diagrams