Upload
javier-munoz
View
1.119
Download
0
Embed Size (px)
Citation preview
Javier Muñoz – Miguel Llacer{jmunoz,mllacer}@prodevelop.es
Prodevelop
MOSKitt Infrastructure to ManageMOSKitt Infrastructure to ManageTransformations and TraceabilityTransformations and Traceability
Contents• Goals
• Selecting Transformations
• Configuring Transformations
• Executing Transformations
• Editing Traces
• Synchronizing
• Conclusions
Goals
• MOSKitt is a MDSD tool
• Model Transformations are key on MDSD
• MOSKitt needs infrastructure to support Model Transformations functionality• Invocation
• Configuration
• Traceability
• Synchronization,
• etc.
Goals
• A common scenario in MDSD tools:
• Transform UML2 model into DB model
• Configure transformation
• E.g.: ¿How to transform inheritances? ¿Which classes must be transformed and wich not?
• Tweak (or create) traces between models
• Keep models synchronized
• Changes on UML2 trigger DB model updates
Goals
• A common scenario in MDSD tools:
Selecting aTransformation
Configuring theTransformation
Executing theTransformation
Editing Traces
Synchronizingon modifications
Goals
• A common scenario in MDSD tools:
Selecting aTransformation
Configuring theTransformation
Executing theTransformation
Editing Traces
Synchronizingon modifications
Selecting a Transformation
• Two mechanisms:
Contextual Menu
TransformationsView
Selecting a Transformation
• How to register a transformation?
• Define in a plug-in an extension to es.cv.gvcase.trmanager.transformation
• Implement a class that extends es.cv.gvcase.trmanager.Transformation
• Extension properties
• Trasformation unique identifier
• Name
• Transformation kind identifier
• Priority
• Package
• Priority
• Implementing class
• Input/Output resources
• File extension
• Configuration producer class
Selecting a Transformation
• Transformation interfacepublic boolean inputsValid(HashMap<String, TransformedResource> inputs, List<String>
errorList)
• return value: are the input models valid to apply the transformation?
• inputs: a hash map where keys are the input argument names and values reference the resource:
TransformedResource
getName()
getPath()
• errorList: a list of strings that describe the execution result. t is shown to users.
public boolean transform(HashMap<String, TransformedResource> inputs, HashMap<String, TransformedResource> outputs, List<String> errorList)
• return value: was the transformation carried out ok?
• inputs: a hash map where keys are the input argument names and values reference the resource
• outputs: a hash map where keys are the output argument names and values reference the resource.
• errorList: a list of strings that describe the execution result. t is shown to users.
Goals
• A common scenario in MDSD tools:
Selecting aTransformation
Configuring theTransformation
Executing theTransformation
Editing Traces
Synchronizingon modifications
Configuring the Transformation
• Goal: support the transformations configuration process
• Based on FEFEM infraestructure
• Rules Catalog MM & Configuration MM• Rules: what can be configured for transformation T?
• Configuration: which are the selected options when transforming model M with transformation T?
• Configuration model is automatically generated: • transformation declared in extension point
Configuring the Transformation
Model X
ConfigurationInitializer
TransformationT
ModelOutput
Config.of Model X for
Transf. T
Rules Catalogfor Transf. T
Configuring the Transformation
Goals
• A common scenario in MDSD tools:
Selecting aTransformation
Configuring theTransformation
Executing theTransformation
Editing Traces
Synchronizingon modifications
Executing the Transformation
• Wizard to executed the transformation
1.- Select Parameters
2.- Configure
3.- Validateinputs
4.- Show results
Executing the Transformation
UML Model“X.uml”
UML2DBTransformation
DB Model“Y.sqlschema”
Config.of Model M.uml forTransf. UML2DB
Traces between“X.uml” and
“Y.sqlschema”
Goals
• A common scenario in MDSD tools:
Selecting aTransformation
Configuring theTransformation
Executing theTransformation
Editing Traces
Synchronizingon modifications
Editing Traces
• Trace Generation:
• Based on AMW metamodel (with modifications)
• Traced Models
- n models
- no input/output semantic
• Traced Links
- links between arbitrary elements
¡¡Automatic generation of traces is a transformation responsibility!!
Editing Traces
• Traces Editor:
• Based on FEFEM
Trace Links
Traced Elements
Goals
• A common scenario in MDSD tools:
Selecting aTransformation
Configuring theTransformation
Executing theTransformation
Editing Traces
Synchronizingon modifications
Synchronizing on modifications
UML Model“X.uml”
DB Model“Y.sqlschema”
Traces between“X.uml” and
“Y.sqlschema”
1.- on changein input
2.- updatetraced models
Synchronization infrastructure
• Based on a listener that listens model changes
• Traces between models are required
• How to implement a Synchronizer?
• Define an extension to es.cv.gvcase.modelsync.core.Listener
• Implement a class that extends es.cv.gvcase.modelsync.core.listener.Synchronizer
• just one method: elementChanged()
Synchronization
• When IN model is modified, the synchronizer creates a differences model
• ATL transformation must be implemented to generate a new differences model
• What modifications must be applied to OUT model?
Synchronization
• Finally, another ATL transformation applies updates:
• updates OUT model
• updates Traces model
Conclusions• Technological Infrastructure:
• From Eclipse: ATL, AMW, EMFCompare
• From MOSKitt:
• Transformation Registry
• Transformations Configuration
• Models Traceability and Synchronization
• It's in practice!!
• Future:• Feedback & evolution
• New functionalities? Sync. on demand?
Javier Muñoz – Miguel Llacer{jmunoz,mllacer}@prodevelop.es
Prodevelop
MOSKitt Infrastructure to ManageMOSKitt Infrastructure to ManageTransformations and TraceabilityTransformations and Traceability