Ontologies Reasoning Components Agents Simulations The KobrA2 Multi-View Component Model Driven...
-
Upload
ross-scott -
Category
Documents
-
view
217 -
download
0
Transcript of Ontologies Reasoning Components Agents Simulations The KobrA2 Multi-View Component Model Driven...
OntologiesReasoningComponentsAgentsSimulations
The KobrA2The KobrA2Multi-View Component Model Driven Multi-View Component Model Driven Software Engineering MethodologySoftware Engineering Methodology
Jacques Robin
OutlineOutline
1. History2. KobrA Goals and Principles3. Component Views4. Component Relationships5. Process6. Illustrative Case Studies
1. KWAPIF: a KobrA2 Web App Platform-Independent Framework2. A toy photo album web app, instance of KWAPIF3. KMASPIF: a KobrA2 Multi-Agent System Platform-Independent
Framework4. A toy penalty simulation MAS, instance of KMASPIF
KobrA: HistoryKobrA: History
KobrA1 German project lead by Prof. Colin Atkinson at FhG-IESE
(Fraunhofer-Gesellschaft, Institute of Experimental Software Engineering), Kaiserslautern, Germany
Resulted in publication of book "Component-Based Product Line Engineering with UML", Atkinson, C. and al., 2002, Addison-Wesley, 528 pages
Extended for component testing by European project Component+ involving 7 European academic and industrial research centers
Resulted in publication of book "Component-Based Software Testing with UML", Gross, H.B., 2004, Springer, 316 pages
Based on UML1.4, no OCL, no MOF
KobrA: HistoryKobrA: History
KobrA2: Brazilian-German project started in 2006, led by Profs. Colin
Atkinson, Universität Mannheim, and Jacques Robin, UFPE Goals:
Leverage lastest OMG standards: UML2, OCL2, MOF2 Support most mature levels of MDE allowing full code generation
by model transformation from fully refined Platform-Independent Models (PIMs)
Support full separation of concerns into complementary views of software component PIMs
KobrA
KobrA1 GoalsKobrA1 Goals
Component-Based Engineering (CBE)
Model-DrivenEngineering (MDE)
1
2
3Product-LineEngineering (PLE)
KobrA Principles:KobrA Principles:1. Separation of Concerns1. Separation of Concerns
Separate functionalities of whole software concerns into reusable components
For each component: Separate PIM from PSM from code Separate general product line framework model from specific
product application model Separate execution model from testing model Separate public specification from private, encapsulated realization Separate structural model from behavioral model from operational
models (operations link behavior to structure) Separate computational service aspects from data structure aspects Separate concept (class) model from instance (object) model
Separate software methodology into: prescribed or recommended artifacts, and prescribed or recommended process (i.e., constraints on tasks
producing these artifacts, including precedence)
Separation of ConcernsSeparation of Concerns
Process does not fix whether to move first left, front or down in this cube
Executability
Refinement/Nesting
Specificity
Instantiation
FrameworkEngineering
Implementation
Framework Application
Implementation
KobrA PrinciplesKobrA Principles
2. Multiple views: For each component, provide one view for each point in the
multi-dimensional space of separated concerns For each component, reconcile these views into a Single Unified
Model (SUM)
3. Leverage OMG standards: UML2 diagrams and OCL2 constraints and expressions for framework
and application PIMs MOF2 diagrams and OCL2 constraints to metamodel these framework
and application level diagrams and associated constraints UML2 diagrams and OCL2 constraints for software process modeling
4. Prescriptiveness KobrA strives to precisely prescribe, as much as possible for a general
purpose software engineering methodology, which UML2 and OCL2 model elements to use in each view of a KobrA component
SingleUnifiedModel
KobrA PrinciplesKobrA Principles
User only create and manipulate partial views of each KobrA component
These views are automatically transformed into a coherent Single Unified Model by model transformations
PartialView 1
PartialView 2
PartialView N
...
View 1 to SUM automated transformation
SUM to View 1 automated transformation
SUM to View 2 automated transformation
View 2 to SUM automated transformation
View N to SUM automated transformation
SUM to View N automated transformation
Metamodelconformanceverificationautomatedtransformations
KobrA PrinciplesKobrA Principles
5. Formally specified rules to automatically check: View-level well-formedness (i.e., conformance to prescribed
relationships among model elements within one view of one component)
Component-level well-formedness (i.e., conformance to prescribed relationships among model elements across different views of one component)
Assembly-level well-formedness (i.e., conformance to prescribed relationships among model elements across views of different components)
6. Parsimony Avoid as much as possible redundant model elements and views Choose a minimum model element and diagram subsets from
UML2, able to cover all the key aspects/concerns of a software component
KobrA PrinciplesKobrA Principles
7. Locality All KobrA Views and UML2 diagrams are local to a given
component stereotyped as the «subject» component of the view, and hence reusable "as is"; The whole PIM of the system is derivable from the union of all
these local models
8. Uniformity The sole first-class modeling entity deserving to possess its own
multiple views is the KobrA component All behaviorally complex entities are modeled as KobrA
components, including the system itself Only behaviorally trivial system entities are modeled as KobrA
classes, second-class modeling entity which structure and behavior are specified and realized in the views of their owning KobrA component
KobrA PrinciplesKobrA Principles
9. Top-down decomposition The realization of any KobrA component K potentially consist of an
assembly of finer-grained KobrA components, encapsulated in K and not directly visible outside of K
There is thus no fundamental difference between assembling existing components (i.e., engineering with reuse) and refining new components (i.e., engineering for reuse);
The root of this decomposition is the system being modeled; Its leaves are the common functionalities provided by the most
popular or standard API for the application domain at hand.
10. Component engineering/assembly driven process: Thus, driven by architecture, neither strictly by entities (like pure OO) nor by relationships (like E-R DB engineering), nor by functionalities (like use-case driven engineering); Hence, avoids RUP inherent conflict between being entitiy-driven
(objects) and functionality-driven (use-case).
Separate public specification from encapsulated realization
Realization as local assembly of finer-grained components Component engineering (for reuse) = component assembly (with
reuse)
KobrA PrinciplesKobrA Principles
Externalview point
Internalview point
Component
Realization
Specification
+ =+ =
KobrA Principles:KobrA Principles:Locality and Top-Down Locality and Top-Down
DecompositionDecompositionRun-time Hierarchy
set of modelsdefines
Traditionalapproaches
Development Time Description
“component of” relationship
KobrA(Principle of Locality)
KobrA Conformance RulesKobrA Conformance Rules
A
B
Consistency relationships
Refinement relationships
Contract relationship
KobrA Conformance RulesKobrA Conformance Rules
Clientship rules
Clientship +Containment rules
Clientship +Containment rules
Clientship +Containment rules
Containment rules
Cliensthiprules
Clientship rules
Specification of server component must match realization of client component
KobrA Principle:KobrA Principle:Creation Tree Driven ProcessCreation Tree Driven Process
In general, the client/server model leads to arbitrary graph of interconnected components
But, an arbitrary graph has numerous shortcomings as software structure: Neither model of composition/nesting, nor obvious development order
Tree based software structure has many advantages: Natural model of composition/nested Obvious development sequences Recursive definitions and activities Systematic All together resulting in improved quality and reusability
How to reconcile arbitrary client server graph with tree-based process? Solution: by projecting graph on creation tree
Every software entity must be created by exactly one other entity Every object-oriented system running today contains a creation tree An entity normally creates the things to which it has a strong composition
relationship
KobrA Component AssemblyKobrA Component Assembly
creates
acquires
A
B C
DE F G
H I1 I2
Client-Server Graph Projected on Creation Tree
KobrA2Views
KobrA2 Component ViewsKobrA2 Component Views
Specification
Structural
Operational
Behavioral
Class
Service Type
Instance
Service Type
Service Type
Protocol
Realization
Structural
Operational
Behavioral
Class
Service Type
Instance
Service Type
Service Type
Algorithmic
«merge»
KobrA2 Global Views:KobrA2 Global Views:Operational DependenciesOperational Dependencies
Automatically derived from the Operational and Algorithmic Views local to each component
Operation O1 depends on operation O2 iff: O2 is called in the OCL2 expression specifying the precondition,
body orpost-condition of O1 (operational view)
O2 is called in the Activity Diagram A specifying the method of O1 (algorithmic view)
O2 is called in the OCL2 expression specifying a guard or a local post-condition in the Activity Diagram A specifying the method of O1 (algorithmic view)
KobrA2 Global Views:KobrA2 Global Views:Component Class DependenciesComponent Class Dependencies
Automatically derived from the global operation dependency view and the local structural class views at each component
Component Class or (Data) Class C1 depends on Component Class or (Data) Class C2 iff: O1 operation C1, O2 operation C2 | O1 depends on O2, or C2 appears in the structural class service or type view of C1, or A associating C1 with C2, or C1 specializes C2
Specification Structural Class Service Specification Structural Class Service View: OverviewView: Overview
Specifies the local assembly connections of the subject component class
Shows: The name, public operation signatures and public attributes of:
subject component S0 the component or (data) classes G1,..., Gm that immediately generalize
S0 the components S1, ..., Sn providing S0's required services the components C1, ..., Cp that S0's creates before using as server
Generalization relationships from S0 to G1,...,Gm Stereotypes associations «acquires» from S0 to S1,...,Sn Stereotypes associations «creates» from S0 to C1,...,Cp Structural OCL constraints, i.e., classifier invariants and property
initialization, derivation and definitions, among the attributes or operation parameters of S0, G1,...Gm,S1,...,Sn, C1,...,Cp
Prototypical Specification Structural Prototypical Specification Structural Class Service ViewClass Service View
Specification Structural Class Type Specification Structural Class Type View: Reused UML2/OCL2 MetamodelView: Reused UML2/OCL2 Metamodel
0..1 ownedOperation *Operation
Property0..1 ownedAttribute *
AssociationmemberEnd
0..12..*
ParameterownedParameter *0..1
powerExtent *
Classifier Generalization
specific *
general *
GeneralizationSet
*
*0..1 powerType
PrimitiveType
InstanceSpecification
0..1
DataType
Enumeration EnumerationLiteral
ExpressionInOcl
Variable
bodyExpression0..1 contextVariable selfOwner 0..1
Constraint
Namespace
NamedElement
Element
0..1 context
* constrainedElement *
ownedRule *
ValueSpecification
OpaqueExpression
0..1 owningConstraint specification
OclExpressiontopExpression 0..1
TypedElement
Whole OCL2Metamodel
StructuredClassifier
EncapsulatedClassifier
Class(from StructuredClass)
Component
Class(from Kernel)
* *
/superClass
BehavioredClassifier
Class(from Reception)
Specification Structural Class Service Specification Structural Class Service View: Metamodel KobrA2 ExtensionView: Metamodel KobrA2 Extension
ComponentClass
(from Kernel) Association Class
(from Reception)
ClassComponentClassAcquires Creates
DataType
Numeric
DataType
PrimitiveType PrimitiveType Integer
UnlimitedNatural
Real
String
Boolean
Classifier (from Kernel)
Constraint
StructuralConstraint
Inv PropDef
Init
Derived
Property
context ownedRule
constrainedElement
constrainedElement
Specification Structural Class Type Specification Structural Class Type View: OverviewView: Overview
Defines the non-primitive data types used by the subject component class
Shows: The name, public operations signatures and public attributes of the
(data) classes and association classes that type the parameters of the public operations of the components or (data) classes that appear in the Specification Structural Class Service View of the subject component class
The generalizations and associations (including association classes, aggregations and compositions) among these (data) classes and association classes
The structural OCL constraints among the properties and operation parameters of these classes and association classes
The definition of the enumerations that type the parameters of the public operations of the component or (data) classes that appear in the Specification Structural Class Service View of the subject component class
Prototypical Specification Structural Prototypical Specification Structural Class Type ViewClass Type View
Specification Structural Class Type Specification Structural Class Type View: Reused UML2/OCL2 MetamodelView: Reused UML2/OCL2 Metamodel
0..1 ownedOperation *Operation
Property0..1 ownedAttribute *
AssociationmemberEnd
0..12..*
ParameterownedParameter *0..1
StructuredClassifier
EncapsulatedClassifier
Class(from StructuredClass)
Component
Class(from Kernel)
* *
/superClass
BehavioredClassifier
Class(from Reception)
powerExtent *
Classifier Generalization
specific *
general *
GeneralizationSet
*
*0..1 powerType
PrimitiveType
InstanceSpecification
0..1
DataType
Enumeration EnumerationLiteral
ExpressionInOcl
Variable
bodyExpression0..1 contextVariable selfOwner 0..1
Constraint
Namespace
NamedElement
Element
0..1 context
* constrainedElement *
ownedRule *
ValueSpecification
OpaqueExpression
0..1 owningConstraint specification
OclExpressiontopExpression 0..1
TypedElement
Whole OCL2Metamodel
AssociationClass
Specification Structural Class Type Specification Structural Class Type View: Metamodel KobrA2 ExtensionView: Metamodel KobrA2 Extension
ComponentClass
(from Kernel)Class
(from Reception)
ClassComponentClass
DataType
Numeric
DataType
PrimitiveType PrimitiveType Integer
UnlimitedNatural
Real
String
Boolean
Classifier (from Kernel)
Constraint
StructuralConstraint
Inv PropDef
Init
Derived
Property
context ownedRule
constrainedElement
constrainedElement
Specification Structural Instance Specification Structural Instance Service View: OverviewService View: Overview
Defines typical instantiation patterns of the Specification Structural Class Service View of the subject component class
Shows: «ComponentObject» stereotyped component object(s) O0
1,...,O0q1
instance(s) of subject component class S0 with their public slots
«ComponentObject» stereotyped component objects(s) S11,...,Sn
qn instances(s) of component classes S1,...,Sn providing the services requires by S0, with their public slots
«acquires» stereotyped links La11,...,Lan
qn instances of the «acquires» stereotyped associations between S0 and S1,...,Sn
«ComponentObject» stereotyped component objects(s) S11,...,Sn
qn instances(s) of component classes C1,...,Cp created by S0
«creates» stereotyped links Lc11,...,Lcp
qp instances of the «acquires» stereotyped associations between S0 and C1,...,Cp
Prototypical Specification Structural Prototypical Specification Structural Instance Service ViewInstance Service View
Specification Structural Instance Service Specification Structural Instance Service View: Reused UML2/OCL2 MetamodelView: Reused UML2/OCL2 Metamodel
InstanceSpecification
Slot ValueSpecification
OpaqueExpression
ExpressionInOclVariable
OclExpression
topExpression0..1
bodyExpression
0..1 contextVariable selfOwner 0..1
TypedElement
PackageableElement
owningInstance *
ElementNamedElement
0..1 owningSlot value *
StructuralFeatureProperty
FeatureClassifier(from Kernel) featuring
Classifier
* *
definingFeature
*
Specification Structural Instance Service Specification Structural Instance Service View: Metamodel KobrA2 ExtensionView: Metamodel KobrA2 Extension
InstanceSpecification
Link Object
ComponentObjectAcquiresLink CreatesLink
Specification Structural Instance Specification Structural Instance Type View: OverviewType View: Overview
Defines typical instantiation patterns of the Specification Structural Class Type View, of the subject component class
Shows: «ComponentObject» stereotyped instance specifications whose
classifying classifier are the component classes occurring in the Specification Structural Class Type View of the subject component class
Instance specifications whose classifier are the (data) classes occurring in the Specification Structural Class Type View of the subject component class
Instance specifications whose classifier are the association classes occurring in the Specification Structural Class Type View of the subject component class
Instance specifications whose classifier are the associations (not classes) occurring in the Specification Structural Class Type View of the subject component class
Prototypical Specification Structural Prototypical Specification Structural Instance Type ViewInstance Type View
Specification Structural Instance Specification Structural Instance Type View: Reused UML2/OCL2 Type View: Reused UML2/OCL2
MetamodelMetamodel
InstanceSpecification
Slot ValueSpecification
OpaqueExpression
ExpressionInOcl
Variable
OclExpression
topExpression0..1
bodyExpression
0..1 contextVariable selfOwner 0..1
0..1 resultVariable resultOwner 0..1
* parameterVariable varOwner 0..1
TypedElement
PackageableElement
owningInstance *
ElementNamedElement
0..1 owningSlot value *
StructuralFeatureProperty
FeatureClassifier
(from Kernel) featuringClassifier
* *
definingFeature
*
Same asSpecification
StructuralInstanceService
View
correct
Specification Structural Instance Specification Structural Instance Type View: Metamodel KobrA2 Type View: Metamodel KobrA2
ExtensionExtensionInstanceSpecification
Link Object
ComponentObjectObjectLink
Specification Operational Service Specification Operational Service View: OverviewView: Overview
Declaratively specifies the behavioral contracts between the component classes of the Specification Structural Class Service View of the subject component class
Shows: The OCL precondition, postcondition or body constraints of the
operations whose signatures are given in the Specification Structural Class Service View of the subject component class
PrototypicalPrototypicalSpecification Operational Service Specification Operational Service
ViewView context CC0::op01(in pa011:Cl2, inout p012:Boolean, out p013:Real):Cla
pre: qboe011body: qoe011
context CC0::op02(pa021:Set(Integer)):OrderedSet(Tuple(Integer,String)) pre: qboe021post: pboe021
context CC1::op11(pa111:Bag(Cla)):Sequence(String)pre: qboe111
context CC1::op12():CC2body: qoe121
context CC2::op21():Clbpost: pboe211
context Cla::opa1(in paa11:Cl2, inout paa12:Boolean, out paa13:Real):Clbpre: qboea11body: qoea11
context Cla::opa2(paa21:Set(Integer)):OrderedSet(Tuple(Integer,String) pre: qboea21post: pboea21
context Clb::opb1(pab11:Bag(Cla)):Sequence(String)pre: qboeb11
context Clb::opb2():CC1post: qboeb21
context Clc::opc1():Clapost: qboec11
Conventions: q: OCL query expression p: OCL postcondition expression b: OCL boolean expression oe: Ocl Expression CC: Component Class Cl: Class op: Operation pa: parameter
Specification Operational Service Specification Operational Service View: Reused UML2/OCL2 MetamodelView: Reused UML2/OCL2 Metamodel
Operation Constraint
Class(from Kernel)
ownedOperation
0..1 preContext precondition *
0..1 postContext
0..1 bodyContext
postcondition *
bodycondition *ValueSpecification
OpaqueExpression
ExpressionInOcl
owningConstraintspecification
Variable
OclExpressiontopExpression 0..1bodyExpression
0..1 contextVariable selfOwner 0..1
0..1 resultVariable resultOwner 0..1
* parameterVariable varOwner 0..1
TypedElement
Whole OCL2Metamodel
0..1
NamedElement
Element
0..1 context
* constrainedElement *
ownedRule*
Namespace
0..1
*
BehavioralFeature
Specification Operational Service Specification Operational Service View: Metamodel KobrA2 ExtensionView: Metamodel KobrA2 Extension
Constraint
Pre
OclExpression
Post
Operation
EffectOperation BehavioralConstraint PreExpPostExp
Specification Operational Type View: Specification Operational Type View: OverviewOverview
Declaratively specifies the behavioral contracts between the component classes, (data) classes and association classes of the Specification Structural Type View of the subject component class
Shows: The OCL precondition, postcondition or bodies constraints of
the operations whose signatures are given in the Specification Structural Type View of the subject component class
PrototypicalPrototypicalSpecification Operational Type ViewSpecification Operational Type View
context Cla::opa1(in paa11:Cl2, inout paa12:Boolean, out paa13:Real):Clbpre: qboea11body: qoea11
context Cla::opa2(paa21:Set(Integer)):OrderedSet(Tuple(String,Integer) pre: qboea21post: pboea21
context Clb::opb1(pab11:Bag(ACa)):Sequence(String)pre: qboeb11
context Clb::opb2():CC1post: qboeb21
context Clc::opc1():ACapost: qboec11
context ACA::opA1(in paA11:Cl2, inout paA12:Boolean, out paA13:Real):Clbpre: qboeA11body: qoeA11
context ACA::opA2(paA21:Set(Integer)):OrderedSet(Tuple(Integer,String)) pre: qboeA21post: pboeA21
context ACB::opB1(paB11:Bag(ACA)):Sequence(String)pre: qboeB11
context ACB::opB2():CC1post: qboeB21
context ACC::opC1():Clapost: qboeC11
Specification Operational Type View: Specification Operational Type View: Reused UML2/OCL2 MetamodelReused UML2/OCL2 Metamodel
Operation Constraint
Class(from Kernel)
ownedOperation
0..1 preContext precondition *
0..1 postContext
0..1 bodyContext
postcondition *
bodycondition *ValueSpecification
OpaqueExpression
ExpressionInOcl
owningConstraintspecification
Variable
OclExpressiontopExpression 0..1bodyExpression
0..1 contextVariable selfOwner 0..1
0..1 resultVariable resultOwner 0..1
* parameterVariable varOwner 0..1
TypedElement
Whole OCL2Metamodel
0..1
NamedElement
Element
0..1 context
* constrainedElement *
ownedRule
Namespace
*
0..1
*
BehavioralFeature
Same asSpecificationOperational
ServiceView
Specification Operational Type View: Specification Operational Type View: Metamodel KobrA2 ExtensionMetamodel KobrA2 Extension
Constraint
Pre
OclExpression
Post
Operation
EffectOperation BehavioralConstraint PreExpPostExp
Same asSpecificationOperational
ServiceView
Specification Behavioral Protocol Specification Behavioral Protocol View: OverviewView: Overview
Defines the external visible state transitions of the subject component class together with the restricted subset of its public operation that is available for invocation in each of these states
Contains a simple UML2 protocol state machine without: transition's operation post-conditions, for these are redundant with
the transition's target state invariant associated port or interface, for protocol state machines are
directly associated with components in KobrA2 states with embedded state machines multiple regions connection points
The sequence of operations on the state machine transitions represent the protocol to follow to satisfy the invocation contract of the services provided by the subject component class
PrototypicalPrototypicalSpecification Behavioral Protocol Specification Behavioral Protocol
ViewView
S1[qbe1]
[qb01] op01(pa011:(Real,Boolean)) /
S2[qbe2]
[qbe12] op12 (in pa121:Integer inout pa122:en122, out pa123:Seq(String) /
S3[qb3]
[qbe13] op13() /
psm1 {protocol}
[qbe3f] op3() / ebe3f[qbe2f] op2f(pa2f1:Cl1) / ebe2f
S0[qbe0]
[qbs0] op0() /
[qbe22] op22(pa221:CC2) /[qbe31] op3() /
[qbe32] op3() /
Specification Behavioral Protocol Specification Behavioral Protocol View: Reused UML2/OCL2 MetamodelView: Reused UML2/OCL2 Metamodel
StateMachine
ProtocolState
Machine
ProtocolTransition
State Operation
Constraint
Namespace
0..1PseudoState
kind: PseudoStateKind
FinalState
Transition RegionVertex* 0..1
source
target incoming
outgoing
guard0..1
stateInvariant 0..1
precondition0..1
0..1owningState
referred*
ValueSpecification
OpaqueExpression
ExpressionInOcl
specification
topExpression
ownedRule
0..1owningConstraint«enumeration»
PseudoStateKind
initial...
terminate
OclExpressionbodyExpression
0..1context
Specification Behavioral Protocol Specification Behavioral Protocol View: Metamodel KobrA2 ExtensionView: Metamodel KobrA2 Extension
ComponentClass
Class(from Reception) StateMachine
BehavioredClassifier
Behavior0..1 0..1
classifierBehavior
ProtocolStateMachine
ProtocolStateMachine
Region StatePseudo
StateProtocol
Transition Operation
Region ProtocolTransition
PseudoState
State Operation
Realization Structural Class Service Realization Structural Class Service View: OverviewView: Overview
Defines the internal component assembly that realize the services described in the Specification Structural Class Service View of the subject component
Shows: The private attributes and operation signatures of subject component class
S0 The name, public attributes and operation signatures of the component
classes and (data) classes N1,...,Nm nested inside (i.e., encapsulated) the subject component which assembly realize its public operations specified in the Specification Structural Class Service View
The stereotyped «nests» associations from S0 to N1,...,Nm The stereotyped «acquires» and «creates» associations among N1,...,Nm
«acquires» associations model clientship relationships between one nested component class and one nested (data) class or another nested component class
«creates» associations model creation relationships between one nested component class and one nested (data) class or another nested component class
The generalizations among N1,...,Nm The structural OCL constraints (i.e., classifier invariants as well as the
derivation rules, initial values and definitions of classifier properties)
Prototypical Realization Structural Prototypical Realization Structural Class Service ViewClass Service View
«nests»
Realization Structural Class Type Realization Structural Class Type View: Reused UML2/OCL2 MetamodelView: Reused UML2/OCL2 Metamodel
0..1 ownedOperation *Operation
Property0..1 ownedAttribute *
AssociationmemberEnd
0..12..*
ParameterownedParameter *0..1
powerExtent *
Classifier Generalization
specific *
general *
GeneralizationSet
*
*0..1 powerType
PrimitiveType
InstanceSpecification
0..1
DataType
Enumeration EnumerationLiteral
ExpressionInOclVariable
bodyExpression0..1 contextVariable selfOwner 0..1
0..1 resultVariable resultOwner 0..1
* parameterVariable varOwner 0..1
Constraint
Namespace
NamedElement
Element
0..1 context
* constrainedElement *
ownedRule *
ValueSpecification
OpaqueExpression
0..1 owningConstraint specification
OclExpressiontopExpression 0..1
TypedElement
Whole OCL2Metamodel
StructuredClassifier
EncapsulatedClassifier
Class(from StructuredClass)
Component
Class(from Kernel)
* *
/superClass
BehavioredClassifier
Class(from Reception)
PackageableElementpackagedElement
0..1 *
Realization Structural Class Service Realization Structural Class Service View: Metamodel KobrA2 ExtensionView: Metamodel KobrA2 Extension
ComponentClass
(from Kernel) Association Class
(from Reception)
ClassComponentClassAcquires Creates
DataType
Numeric
DataType
PrimitiveType PrimitiveType Integer
UnlimitedNatural
Real
String
Boolean
Classifier (from Kernel)
Constraint
StructuralConstraint
Inv PropDef
Init
Derived
Property
context
constrainedElement
constrainedElementownedRule
Nests
Realization Structural Class Type Realization Structural Class Type View: OverviewView: Overview
Is the Realization Structural Class Service View what the Specification Structural Class Type View is to the Specification Structural Class Service View
Defines the non-primitive data types used by either: the private operations of subject component class the internal assembly of the subject component class but not used neither by its public operation nor by its external
server components
Realization Structural Class Type Realization Structural Class Type View: OverviewView: Overview
Shows: The name, public operations signatures and public attributes of the
(data) classes and association classes that type the parameters of: the private operations of the subject component class the public operations of the component or (data) classes that appear in
the Realization Structural Class Service View of the subject component class
The generalizations and associations (including association classes, aggregations and compositions) among these (data) classes and association classes
The structural OCL constraints among the properties and operation parameters of these (data) classes and association classes
The definition of the enumerations that type the parameters of: the private operations of the subject component class the public operations of the component or (data) classes that appear in
the Realization Structural Class Service View of the subject component class
Prototypical Realization Structural Prototypical Realization Structural Class Type ViewClass Type View
Realization Structural Class Type Realization Structural Class Type View: Reused UML2/OCL2 MetamodelView: Reused UML2/OCL2 Metamodel
0..1 ownedOperation *Operation
Property0..1 ownedAttribute *
AssociationmemberEnd
0..12..*
ParameterownedParameter *0..1
powerExtent *
Classifier Generalization
specific *
general *
GeneralizationSet
*
*0..1 powerType
PrimitiveType
InstanceSpecification
0..1
DataType
Enumeration EnumerationLiteral
ExpressionInOclVariable
bodyExpression0..1 contextVariable selfOwner 0..1
0..1 resultVariable resultOwner 0..1
* parameterVariable varOwner 0..1
Constraint
Namespace
NamedElement
Element
0..1 context
* constrainedElement *
ownedRule *
ValueSpecification
OpaqueExpression
0..1 owningConstraint specification
OclExpressiontopExpression 0..1
TypedElement
Whole OCL2Metamodel
StructuredClassifier
EncapsulatedClassifier
Class(from StructuredClass)
Component
Class(from Kernel)
* *
/superClass
BehavioredClassifier
Class(from Reception)
PackageableElementpackagedElement
0..1 *
AssociationClass
Realization Structural Class Type Realization Structural Class Type View: Metamodel KobrA2 ExtensionView: Metamodel KobrA2 Extension
ComponentClass
(from Kernel)Class
(from Reception)
ClassComponentClass
DataType
Numeric
DataType
PrimitiveType PrimitiveType Integer
UnlimitedNatural
Real
String
Boolean
Classifier (from Kernel)
Constraint
StructuralConstraint
Inv PropDef
Init
Derived
Property
context ownedRule
constrainedElement
constrainedElement
Same asSpecification
StructuralClass Type
View
Realization Structural Instance Realization Structural Instance Service View: OverviewService View: Overview
Defines typical instantiation patterns of the Realization Structural Class Service View of the subject component class
Shows: «ComponentObject» stereotyped component object(s) O0
1,...,O0p
(with their private slots) instance(s) of subject component class S0
«ComponentObject» stereotyped component objects(s) NO11,...,NOq
r instances(s) of component classes N1,...,Nm (with their public slots) nested inside S0 and which assembly realizes the services provided by S0
«nests» stereotyped links Ln11,...,Lns
t instances of the «nests» stereotyped associations from S0 to N1,...,Nm
«acquires» stereotyped links La11,...,Lau
v instances of the «acquires» stereotyped associations among N1,...,Nm
«creates» stereotyped links Lc11,...,Lcw
x instances of the «creates» stereotyped associations between S0 and C1,...,Cp
Prototypical Realization Structural Prototypical Realization Structural Instance Service ViewInstance Service View
«creates»
RealizationRealization Structural Instance Structural Instance Service View: Reused UML2/OCL2 Service View: Reused UML2/OCL2
MetamodelMetamodel
InstanceSpecification
Slot ValueSpecification
OpaqueExpression
ExpressionInOcl
Variable
OclExpression
topExpression0..1
bodyExpression
0..1 contextVariable selfOwner 0..1
0..1 resultVariable resultOwner 0..1
* parameterVariable varOwner 0..1
TypedElement
PackageableElement
owningInstance *
ElementNamedElement
0..1 owningSlot value *
StructuralFeatureProperty
FeatureClassifier
(from Kernel) featuringClassifier
* *
definingFeature
*
Same asSpecification
StructuralInstanceService
View
RealizationRealization Structural Instance Structural Instance Service View: Metamodel KobrA2 Service View: Metamodel KobrA2
ExtensionExtensionInstanceSpecification
Link Object
ComponentObjectAcquiresLink CreatesLinkNestsLink
Realization Structural Instance Type Realization Structural Instance Type View: OverviewView: Overview
Defines typical instantiation patterns of the Realizatioon Structural Class Type View, of the subject component class
Shows: «ComponentObject» stereotyped instance specifications whose
classifier are the component classes occurring in the Realization Structural Class Type View of the subject component class
Instance specifications whose classifier are the (data) classes occurring in the Realization Structural Class Type View of the subject component class
Instance specifications whose classifier are the association classes occurring in the Realization Structural Class Type View of the subject component class
Instance specifications whose classifier are the associations (not classes) occurring in the Realization Structural Class Type View of the subject component class
Prototypical Realization Structural Prototypical Realization Structural Instance Type ViewInstance Type View
Realization Structural Instance Type Realization Structural Instance Type View: Reused UML2/OCL2 MetamodelView: Reused UML2/OCL2 Metamodel
InstanceSpecification
Slot ValueSpecification
OpaqueExpression
ExpressionInOcl
Variable
OclExpression
topExpression0..1
bodyExpression
0..1 contextVariable selfOwner 0..1
0..1 resultVariable resultOwner 0..1
* parameterVariable varOwner 0..1
TypedElement
PackageableElement
owningInstance *
ElementNamedElement
0..1 owningSlot value *
StructuralFeatureProperty
FeatureClassifier
(from Kernel) featuringClassifier
* *
definingFeature
*
Same asSpecification
StructuralInstanceService
View
Realization Structural Instance Type Realization Structural Instance Type View: Metamodel KobrA2 ExtensionView: Metamodel KobrA2 Extension
InstanceSpecification
Link Object
ComponentObject
Realization Operational Service View: Realization Operational Service View: OverviewOverview
Declaratively specifies the behavioral contracts between the component classes of the Realization Structural Class Service View of the subject component class
Shows: The OCL precondition, postcondition or body constraints of the
operations whose signatures are given in the Specification Realization Class Service View of the subject component class
PrototypicalPrototypical Realization Operational Service View Realization Operational Service View
context CC0::op01(in pa011:Cl2, inout p012:Boolean, out p013:Real):Clapre: qboe011body: qoe011
context CC0::op02(pa021:Set(Integer)):OrderedSet(Tuple(Integer,String)) pre: qboe021post: pboe021
context CC1::op11(pa111:Bag(Cla)):Sequence(String)pre: qboe111
context CC1::op12():CC2post: qboe121
context CC2::op21():Clbpost: qboe211
context Cla::opa1(in paa11:Cl2, inout paa12:Boolean, out paa13:Real):Clbpre: qboea11body: qoea11
context Cla::opa2(paa21:Set(Integer)):OrderedSet(Tuple(Integer,String) pre: qboea21post: pboea21
context Clb::opb1(pab11:Bag(Cla)):Sequence(String)pre: qboeb11
context Clb::opb2():CC1post: qboeb21
context Clc::opc1():Clapost: qboec11
Conventions: q: OCL query expression p: OCL postcondition expression b: OCL boolean expression oe: Ocl Expression CC: Component Class Cl: Class op: Operation pa: parameter
Realization Operational Service View: Realization Operational Service View: Reused UML2/OCL2 MetamodelReused UML2/OCL2 Metamodel
Operation Constraint
Class(from Kernel)
ownedOperation
0..1 preContext precondition *
0..1 postContext
0..1 bodyContext
postcondition *
bodycondition *ValueSpecification
OpaqueExpression
ExpressionInOcl
owningConstraintspecification
Variable
OclExpressiontopExpression 0..1bodyExpression
0..1 contextVariable selfOwner 0..1
0..1 resultVariable resultOwner 0..1
* parameterVariable varOwner 0..1
TypedElement
Whole OCL2Metamodel
0..1
NamedElement
Element
0..1 context
* constrainedElement *
ownedRule*
Namespace
0..1
*
BehavioralFeature
Same asSpecificationOperational
ServiceView
Realization Operational Service View: Realization Operational Service View: Metamodel KobrA2 ExtensionMetamodel KobrA2 Extension
Constraint
Pre
OclExpression
Post
Operation
EffectOperation BehavioralConstraint PreExpPostExp
Same asSpecificationOperational
ServiceView
Realization Operational Type View: Realization Operational Type View: OverviewOverview
Declaratively specifies the behavioral contracts between the component classes, (data) classes and association classes of the Realization Structural Type View of the subject component class
Shows: The OCL precondition, postcondition or bodies constraints of
the operations whose signatures are given in the Realization Structural Type View of the subject component class
PrototypicalPrototypical Realization Operational Type View Realization Operational Type View
context Cla::opa1(in paa11:Cl2, inout paa12:Boolean, out paa13:Real):Clbpre: qboea11body: qoea11
context Cla::opa2(paa21:Set(Integer)):OrderedSet(Tuple(String,Integer) pre: qboea21post: pboea21
context Clb::opb1(pab11:Bag(ACa)):Sequence(String)pre: qboeb11
context Clb::opb2():CC1post: qboeb21
context Clc::opc1():ACapost: qboec11
context ACA::opA1(in paA11:Cl2, inout paA12:Boolean, out paA13:Real):Clbpre: qboeA11body: qoeA11
context ACA::opA2(paA21:Set(Integer)):OrderedSet(Tuple(Integer,String)) pre: qboeA21post: pboeA21
context ACB::opB1(paB11:Bag(ACA)):Sequence(String)pre: qboeB11
context ACB::opB2():CC1post: qboeB21
context ACC::opC1():Clapost: qboeC11
Realization Operational Type View: Realization Operational Type View: Reused UML2/OCL2 MetamodelReused UML2/OCL2 Metamodel
Operation Constraint
Class(from Kernel)
ownedOperation
0..1 preContext precondition *
0..1 postContext
0..1 bodyContext
postcondition *
bodycondition *ValueSpecification
OpaqueExpression
ExpressionInOcl
owningConstraintspecification
Variable
OclExpressiontopExpression 0..1bodyExpression
0..1 contextVariable selfOwner 0..1
0..1 resultVariable resultOwner 0..1
* parameterVariable varOwner 0..1
TypedElement
Whole OCL2Metamodel
0..1
NamedElement
Element
0..1 context
* constrainedElement *
ownedRule*
Namespace
0..1
*
BehavioralFeature
Same asSpecificationOperational
ServiceView
AssociationClass
Realization Operational Type View: Realization Operational Type View: Metamodel KobrA2 ExtensionMetamodel KobrA2 Extension
Constraint
Pre
OclExpression
Post
Operation
EffectOperation BehavioralConstraint PreExpPostExp
Same asSpecificationOperational
ServiceView
Realization Behavioral Algorithmic Realization Behavioral Algorithmic View: OverviewView: Overview
Defines the algorithms for each operation O1,...,Om appearing the subject component's Realization Structural Class Service View
Contains m x n simple UML2 activity diagrams, where n is the average number of activity diagrams needed to fully specify the algorithms implemented by O1,...,Om
Prototypical Algorithmic ViewPrototypical Algorithmic View
Prototypical Algorithmic ViewPrototypical Algorithmic View
Realization Behavioral Algorithmic Realization Behavioral Algorithmic View: Reused UML2/OCL2 MetamodelView: Reused UML2/OCL2 Metamodel
ControlFlow
ObjectFlow
FinalNode
InitialNode
ActivityFinalNode
FlowFinalNode
ForkNode
JoinNode
MergeNode
DecisionNode
CallBehaviorAction
*
edge
0..1Activity
ActivityGroup
ActivityEdge
ActivityNode
* node
0..1
inActivity 0..1
group * containedNode*
inGroup
*
source
target
incoming *
outcoming *
inGroup
*
containedEdge*
* Behavior
Pin
ActivityParameter
Node
Parameter
*
InputPin
OutputPin*
CallAction
isSynchronous:Boolean
result
0..1
CallOperationAction
Operation
*
0..1
target
ObjectNode
ControlNode
ExecutableNode
Action
InvocationAction
0..1
* argument
Realization Behavioral Algorithmic Realization Behavioral Algorithmic View: Reused UML2/OCL2 MetamodelView: Reused UML2/OCL2 Metamodel
target outcoming *
edge*
0..1Activity
ActivityPartition
ActivityEdge
ActivityNode
node*
0..1
inActivity 0..1
partition *node *inPartition
*
source incoming *
inPartition
*
* edge
0..1
ValueSpecification
OpaqueExpression
guard
ExpressionInOcl OclExpressiontopExpression
0..1
bodyExpression
*
Classifier
Class(from Kernel)
Behavior
context
* 0..1*ownedRule
Namespace
context
0..1
ActionConstraint
owningConstraintspecification localPostcondition
* 0..10..1
ExecutableNode
constrainedElement
Realization Behavioral Algorithmic Realization Behavioral Algorithmic View: Reused UML2/OCL2 MetamodelView: Reused UML2/OCL2 Metamodel
ActivityGroup
InterruptibleActivityRegion
ActivityEdge
ActivityNode
interrupts interruptibleRegion nodeinterruptingEdge
0..1* * *
NamedElement
RedefinableElement
ElementExcecutable
NodeExceptionHandler
ObjectNode
protectedNodehandler
*
exceptionInput
Classifier
**handlerBody
exceptionType 1..* Action
ExecutableNode
RaiseException
Action
Pin
InputPinexception
0..1
Corrigir layout para evitar repetção de ExecutableNode
Realization Behavioral Algorithmic Realization Behavioral Algorithmic View: Reused UML2/OCL2 MetamodelView: Reused UML2/OCL2 Metamodel
ActivityGroup
InterruptibleActivityRegion
ActivityEdge
ActivityNode
interrupts interruptibleRegion nodeinterruptingEdge
0..1* * *
NamedElement
RedefinableElement
ElementExcecutable
NodeExceptionHandler
ObjectNode
protectedNodehandler
*
exceptionInput
Classifier
**handlerBody
exceptionType 1..* Action
ExecutableNode
RaiseException
Action
Pin
InputPinexception
0..1
Realization Behavioral Algorithmic Realization Behavioral Algorithmic View: Metamodel KobrA2 ExtensionView: Metamodel KobrA2 Extension
Action CallBehaviorAction CallOperationAction RaisedExceptionAction
ActionInOcl CallSubActivityAction CallOperationAction RaisedExceptionAction ExceptionHandler
ObjectFlowExceptionHandler
KobrA2 ProcessKobrA2 Process
ModelSpecificationView
sv
ModelRealizationView
rv
«localPostcondition» a=subject.isAbstract()
a
ModelComponent
[a=true]
[a=false]
KobrA2 ProcessKobrA2 ProcessModelSpecificationView
Model Class Service View
csv
csvnpt
«localPostcondition» csvnpt = csv.packagedElement->select(oclIsKindOf(Parameter)).type->reject(oclIsKindOf(PrimitiveType)
Model OperationalType View
otv[else][csvnop->IsEmpty()]
«decisionInput» There is some
component objectconnection patternof specific interest [no]
[yes] Model InstanceService View
isv «decisionInput»There is some object connection
pattern of specific interest
[yes]
[no]
Model InstanceType View
Model OperationalService View
osv
[no]
[yes]
«decisionInput» No operation of csv can be specified declaratively
Model ClassType View
[else]
[csvnpt->IsEmpty()] ctvpop
ctv
«localPostcondition»let pe = ctv.packagedElement, ctvop = pe->select(oclIsKindOf(Operation)), csvop = csv-> select(oclIsKindOf(Operation))in ctvnop = ctvop - csvop
itv
sv
«ComponentObject»C02a:CC2
a1C02a= v1C02a
Prototypical Specification Structural Prototypical Specification Structural Instance Service ViewInstance Service View
«subject»«ComponentObject»
C01a:CC1
a1C01a = v1C01a
«ComponentObject»CO3a:CC3
«acquiresLink»
«ComponentObject»CO3b:CC3
«subject»«ComponentObject»
C01b:CC1
a1C01b = v1C01b
«acquiresLink»
«acquiresLink»
«createssLink»
«ComponentObject»C02b:CC2
a1C02a = v1C02b
«createssLink»
lC03aC01a
lC02aC01a
lC02nC01a
«ComponentObject»C02c:CC2
«createssLink»lC01bC02a