Title: RoleBased Metamodeling Language RBML
1Role-Based Metamodeling Language (RBML)
- Dae-Kyoo Kim
- Computer Science and Engineering Department
- Oakland University
2Outline
- What is a Design Pattern?
- Motivation of the RBML
- What is the RBML?
- RBML Approach
- Tool Support
- Publications
- Future Work
- Related Research Areas
3What is a Design Pattern?
- A design pattern describes solutions for
recurring design problems
- Benefits of using design patterns
- Help to produce high-quality systems by using
proven solutions
- Support cost-effective software development
4Typical Description of Design Patterns
- A description of a design pattern consists of two
parts
- Usage Context
- Usage guidelines, quality attributes, principles,
trade-offs, consequences
- Problem and solution descriptions
- Structure, participants, collaborations
- Typical examples
5Research Motivation
- What is the problem with current way of
describing design patterns?
- Patterns are informally described
- Informal pattern descriptions
- make it difficult to use design patterns
systematically
- For example, using informal descriptions it is
difficult to develop tools that enable systematic
pattern-based development
- can lead to ambiguity in communication
6How can we overcome these problems then?
- We need notations that can specify design
patterns precisely and practically
- As a solution we have developed a pattern
specification language called Role-Based
Metamodeling Language (RBML)
7RBML
- RBML is a language developed to specify design
patterns precisely and practically
- RBML is based on the Unified Modeling Language,
the standard for object-oriented modeling
- RBML is developed to facilitate use of patterns
exclusively for UML models
- RBML is capable of capturing both structural and
behavioral properties of patterns
8RBML
- RBML can be used to specify both problem and
solution space of a pattern
- RBML can be used to specify not only design
patterns but also domain-specific patterns
9Background UML Diagrams
Association
sd
Example
lifeline
Employee
Company
e1Employee
c1Company
Generalization
stockPrice()
Clerk
message
Class
Class Diagram
Sequence Diagram
10Background UML Metamodel
- UML metamodel defines syntax and semantics of UML
models at M1 level.
1
1
2..
1
11Background UML Infrastructure
12RBML Approach
- A pattern specification is defined as a family of
UML models
UML Metamodel
Is_specialized
Pattern Specification
defines
M2
defines
M1
Solution Models
UML Models
13RBML Pattern Specifications
- An RBML pattern specification defines solutions
of a pattern as a family of UML models using
roles
- A role defines properties of pattern
participants
- A pattern is specified using three types of
specifications each of which captures a different
perspective of the pattern
- Static Pattern Specifications (SPSs)
- Captures structural properties of a pattern
- Interaction Pattern Specifications (IPSs)
- Captures interaction behavior of a pattern
- Statemachine Pattern Specifications (SMPSs)
- Captures state-based behavior of a pattern
14Pattern Role
A pattern role is played by model elements at M1
pattern role
M2
defines a subclass of
Class Role Item
Class
plays
Instance of
defines a subset of instances of
M1
Car
15RBML Pattern Specification
- A pattern specification consists of three
components
- Abstract Syntax defines structure of the pattern
participants
- Metamodel-Level Constraints define
well-formedness rules in the abstract syntax
- Constraint Templates define model-level
constraints that are instantiated in the context
of a specific model
16Uses of RBML Pattern Specifications
- Three general uses
- As a design template to generate UML models
- As a compliance check point to verify existence
of patterns in UML models (also known as pattern
conformance checking)
- As a transformation specification to refactor a
non-pattern based model to a pattern based model
17Checking Conformance
- In this presentation, we are going to demonstrate
how an RBML pattern specification can be used to
check pattern conformance
18Observer Pattern
The figure shows an example of SPS that describes
the structure of the Observer design pattern
19Conforming Class Diagram
Kiln
bound_to
Class Role
1..
temp Int
Subject
pressure Int
ready Int
SubjectState Int 1..
attachTempObs(oTempObs)
Attach(obsvObserver) 1..
attachPressObs(oPressObs)
sub 1..
1..1
1..1
Association Role
obsPress
Observes
obsTemp
obs 1..1
Class Role
1..
Observer
PressObs
TempObs
ObserverState Int 1..1
currPress Int
currTemp Int
Update(subjSubject) 1..1
updatePress(kKiln)
updateTemp(kKiln)
SPS
Class Diagram
20SPS Conformance Rules
- The following conformance rules are used to check
conformance of a class diagram to an SPS
- Check realization multiplicities for classifiers
- Check structural conformance of classifiers
- Check metamodel-level constraints
- Check conformance of features
- Check realization multiplicities for features
- Check model-level constraints
- Check conformance of relationships
- Check metamodel-level constraints
- Check realization multiplicities for association
ends
21Interaction Pattern Specification (IPS)
The figure shows an example of IPS that describes
the interaction
behavior of the Observer pattern
22Conforming Sequence Diagram
sd
KilnInteraction
sKiln
t1TempObs
t2TempObs
mMonitor
notifyObs()
updateTemp(k)
logUpdateRecd(s)
StKilngetTemp()
updateTemp(k)
logUpdateRecd(s)
stKilngetTemp()
23IPS Conformance Rules
- The following conformance rules are used to check
conformance of a sequence diagram to an IPS
- Check conformance of lifelines
- Check classifiers corresponding to lifelines
- Check conformance of message
- Check operations corresponding to messages
- Check metamodel-level constraint
- Check conformance of message sequence
24State Machine Pattern Specification (SMPS)
The figure shows an
25Conforming Statechart
SubwayTurnstyle
PassBar
Alarm
Reset
Coin
Card
PassBar
Statechart Diagram
26SMPS Conformance Rules
- The following conformance rules are used to check
conformance of a statechart diagram to an SMPS
- Check realization multiplicities of states,
transitions, and triggers
- Check conformance of states
- Check metamodel-level constraints
- Check conformance of transitions
- Check metamodel-level constraints
- Check conformance of source and target states
- Check conformance of triggers
- Check metamodel-level constraints
- Check conformance of trigger template constraints
27Tool RBML Pattern Instantiator (RBML-PI)
- RBML-PI instantiates an RBML pattern
specification to generate UML class diagrams and
sequence diagrams that conform to the pattern
captured by the RBML specification - Developed as an add-in component to IBM Rational
Rose which is the industrial standard UML tool
- Developed in C
28Development Process Using RBML-PI
- Select an RBML pattern specification to use
- Provide application information to the tool to
determine the structure of the application being
built
- Instantiate the RBML specification to generate a
UML model
- Detail the generated model with
application-specific information to complete the
model
29Tool Demonstration
- The following slides demonstrate the RBML-PI
using the CheckIn-CheckOut (CICO) pattern to
build a library system by instantiating the CICO
pattern - The CICO pattern describes a solution to the
design problem of systems where items are checked
in and checked out
- Examples video rental systems, library systems,
vehicle rental systems
30CICO Domain Pattern SPS
31Instantiated Class Diagram for a Library System
32CICO CheckOut IPS
33Completed Class Diagram
multiple instantiations
additional features
generalization instantiation
34Instantiated Sequence Diagram for CheckOut
Scenario
35Completed Sequence Diagram for Reservation
Scenario
36Publications
- Development of the RBML and conformance rules
- Robert France, Dae-Kyoo Kim, Sudipto Ghosh, and
Eungee Song, A UML-Based Pattern Specification
Techniques,IEEE Transactions on Software
Engineering, 2004. - Robert France, Dae-Kyoo Kim, Eunjee Song, and
Sudipto Ghosh, Using Roles to Characterize Model
Families, Practical Foundations of Business and
System Specifications, Haim Kilov (Editor),
Kluwer Academic Publisher, August, 2003, ISBN
140201485 - Dae-Kyoo Kim, Robert France, Sudipto Ghosh, and
Eunjee Song, A Role-Based Metamodeling Approach
to Specifying Design Patterns, Proceedings of
27th IEEE Annual International Computer Software
and Applications Conference (COMPSAC), Dallas,
Texas, November, 2003. - Dae-Kyoo Kim, Robert France, Sudipto Ghosh, and
Eunjee Song, A UML-Based Metamodeling Language
to Specify Design Patterns, Proceedings of
Workshop on Software Model Engineering (WiSME)
with UML 2003, San Francisco, October, 2003.
37Publications
- Domain Pattern CheckIn-CheckOut (CICO) pattern
- Dae-Kyoo Kim, Robert France, and Sudipto Ghosh,
A UML-Based Language for Specifying
Domain-Specific Patterns, Journal of Visual
Languages and Computing, Special Issue on Domain
Modeling with Visual Languages, 2004. - Dae-Kyoo Kim, Robert France, Sudipto Ghosh,
Eunjee Song, Using Role-Based Modeling Language
(RBML) as Precise Characterizations of Model
Families, Proceedings of the 8th IEEE
International Conference on Engineering of
Complex Computer Systems (ICECCS), Greenbelt, MD,
December, 2002. - Pattern-Based Model Refactoring
- Robert France, Sudipto Ghosh, Eunjee Song,
Dae-Kyoo Kim, "A Metamodeling Approach to
Pattern-based Model Refactoring", IEEE Software,
Special Issue on Model Driven Development,
Vol.20, No.5, pp. 52-58 September/October 2003. - Eunjee Song, Robert France, Dae-Kyoo Kim, Sudipto
Ghosh, "Using Roles for Pattern-Based Model
Refactoring", In Proceedings of Workshop on
Critical Systems Development (CSDUML) with UML
2002, Dresden, Germany, September 30 - October 4,
2002.
38Publications
- Design aspects Access control policies (MAC,
RBAC, HAC)
- Indrakshi Ray, Na Li, Robert France, and Dae-Kyoo
Kim, Using UML to Visualize Role-Based Access
Control Constraints, In Proceedings of 9th ACM
Symposium on Access Control Models and
Technologies (SACMAT), Yorktown Heights, NY,
2004. - Dae-Kyoo Kim, Indrakshi Ray, Robert France, and
Na Li, Modeling Role-Based Access Control Using
Parameterized UML Models, In Proceedings of
Fundamental Approaches to Software Engineering
(FASE/ETAPS), Barcelona, Spain, 2004. - Indrakshi Ray, Na Li, Dae-Kyoo Kim, and Robert
France, Using Parameterized UML to Specify and
Compose Access Control Models, In Proceedings of
Conference on Integrity and Internal Control in
Information Systems (IICIS), Lausanne,
Switzerland, November, 2003. - Component-Based Development
- Dae-Kyoo Kim, Sudipto Ghosh, Robert France, and
Eunjee Song, Software Component Specification
Using Role-Based Modeling Language, In
Proceedings of 11th OOPSLA Workshop on Behavioral
Semantics Serving the Customer, Seattle,
Washington, November 4, 2002.
39Publications
- Requirements aspects NASA/Ames Research Center
- Jon Whittle, Joao Araujo, and Dae-Kyoo Kim,
Modeling and Validating Interaction Aspects in
UML Proceedings of Workshop on Aspect Oriented
Modeling with UML 2003, San Francisco, CA,
October 2003. - Joao Araujo, Jon Whittle, and Dae-Kyoo Kim,
Modeling, Composing and Validating
Scenario-Based Requirements with Aspects
Proceedings of Requirements Engineering 2004,
Kyoto, Japan, September, 2004. - Development of RBML-PI
- Dae-Kyoo Kim, Jon Whittle, and Robert France,
Generating Design Models from Pattern
Specification, Under work.
40Future Work
- State Machine Pattern Specification (SMPS)
- Composite states
- States with actions
- Triggers with actions
- Specification of non-functional properties
- Further development of RBML-PI
- Incorporating pattern properties
- Checking conformance
41Related Research Areas
- Pattern Finding
- Problem specifications can be used to find
patterns that can be used for a given UML model
- Pattern-Based Model Refactoring
- Aspect-Oriented Development
- Component-Based Development
- Specifying UML Profiles
42Discussion
http//www.secs.oakland.edu/kim2/
kim2_at_oakland.edu