Metamodeling and method engineering MetaCASE example: MetaEdit - PowerPoint PPT Presentation

1 / 33
About This Presentation
Title:

Metamodeling and method engineering MetaCASE example: MetaEdit

Description:

MetaEdit delivers immediately the method to your team ... Scrollbars. 17 2004 JPT. Hints and tips for designing concepts. Focus first on domain semantics ... – PowerPoint PPT presentation

Number of Views:103
Avg rating:3.0/5.0
Slides: 34
Provided by: juhapekka
Category:

less

Transcript and Presenter's Notes

Title: Metamodeling and method engineering MetaCASE example: MetaEdit


1
Metamodeling and method engineering MetaCASE
example MetaEdit
  • Juha-Pekka Tolvanen
  • 22.3.2004
  • Lecture 7 MetaCASE example MetaEdit
  • Contents
  • Metamodel and model architecture
  • Tool architecture
  • Metamodeling principles
  • Steps for implementing own method
  • MetaEdit Method Workbench tools
  • Updating and maintaining metamodels

2
Model architecture in MetaEdit
  • GOPRR
  • Method(ology)
  • Concepts
  • Rules
  • Symbols
  • Reports
  • Product specifications

Metametamodel
Object
Relationship
Property
Graph
Role
Metamodel
Object X
Object Y
InstanceOf
InstanceOf
InstanceOf
Model
Object X customer
Relationship instance
InstanceOf
System in operation
Customer instance
3
MetaEdit method engineering tools
MetaEdit (model)
Method Workbench (metamodel)
4
Apply in software production
  • MetaEdit delivers immediately the method to your
    team (editors, reports, multi-user,
    multi-platform, etc)
  • Prototype your design refine and iterate

5
Architecture integrated CASE and metaCASE
  • Windows
  • Linux
  • Solaris
  • HP-UX

Method Workbench
6
General metamodeling principles
  • On which level one should solve a specific
    problem?
  • Domain/modeling language usually fixed, but
    modifications may still be possible (like new
    domain rules etc.)
  • Metamodel and reports many various solutions
    usually possible, easy to change
  • Platform usually fixed and hard to change
  • There are often many ways to solve a specific
    problem
  • Good results may require solutions and changes on
    more than one level (e.g. change in metamodel may
    require change in reports)
  • As MetaEdit provides flexible metamodeling tool
    support, dont hesitate to experiment (but
    remember to backup first)

7
Identifying the domain concepts 1/2
  • How to identify concepts of a domain-specific
    modeling language (DSM)?
  • DSL is a bridge between domain and platform ? DSM
    must reflect both worlds
  • Identifying concepts from the problem domain
  • Results usually with domain-related abstractions,
    procedures, etc.
  • Problem may not discover important technical
    details (thus it is important to take a look at
    the platform side also)

8
Identifying the domain concepts 2/2
  • Identifying concepts from platform
  • Results usually with technical concepts like
    programming language constructs, data structures,
    etc.
  • Problem DSM may become transparent, reflecting
    more target platform than domain
  • thus it is important to take a look at the
    problem domain side also

9
Steps for implementing DSM
Rules
Generators
3
4
1
2
Concepts
Symbols
10
1. Design domain concepts
  • Identify domain concepts
  • Map domain concepts accurately to modeling
    concepts
  • Concentrate on semantics!
  • Enter the concepts in the forms

11
Metamodeling concepts of GOPRR
  • Concepts
  • Graph
  • Object
  • Property
  • Role
  • Relationship
  • MetaEdit has own tool for each metamodeling
    concept

12
Metamodeling tools
  • Own tool for each concept and their properties
  • Graph tool composes objects, relationships and
    roles together

13
Object, Role Relationship Tool
  • Define properties
  • Name field shows the types name
  • Ancestor field shows the supertype
  • Properties list shows the properties
  • Local name of the property
  • Name of the property type
  • Data type of the property typeand whether the
    property has
  • Unique values within this object
  • Layout dialog (optional)
  • Symbol definition
  • Change acceptance by request

14
Property tool
  • Choose data type widget
  • Boolean, string, text, number, collection, GORR
    types
  • Can refer to (collection of) objectssupertype
    allows all subtypes
  • Define list values
  • fixed list with default value
  • overridable list with predefined values, but own
    are allowed
  • editable list with predefined and own new values
    are added to the list for future selection

15
Graph Tool
  • Object Tool plus
  • Content types
  • Bindings of contents
  • Constraints for bindings
  • Explosions decompositions

16
Dialog Editor
  • Define dialog layouts for property editing
  • Location of buttons, fields, labels
  • Size of buttons, fields, labels
  • Scaling factors for fields
  • Window size (min/max/default)
  • Scrollbars

17
Hints and tips for designing concepts
  • Focus first on domain semantics
  • Drawing and/or inspecting sample models is
    usually a good starting point
  • Add extensions for software production later
  • Reflect to output (e.g. generated code)
  • Keep in mind the end-user (user-friendliness)
  • When starting to metamodel with MetaEdit, always
    remember to choose default project to the
    metamodel!

18
2. Define domain rules
  • Define semantics and rules as they exist in the
    domain
  • Examples of rule types
  • Start state may not be directly connected with
    end state
  • Start state may may be in at most 1 transition
    relationship
  • State may have substates
  • Actions are reused from class
  • etc.

19
Metamodeling rules of GOPRR
  • Bindings between concepts
  • Constraints
  • Max 1 connection
  • Uniqueness
  • Binary or n-ary relationships
  • Links between models
  • Explosion
  • Decomposition
  • Reuse
  • Non-property
  • Property sharing

20
Bindings Tool
  • What may be involved in each relationship type
  • Role types(first is from role)
  • For each role type, object types(supertype
    allows all subtypes)
  • Cardinality role repetition
  • Minimum (values 0,1,2,)0 optional role1
    obligatory
  • Maximum (values 1,2,3,,N)N infinity

21
Constraints Tool
  • Stop object being in too many bindings
  • Two views
  • Text view of all constraints
  • Edit a constraint in a form
  • Each object of this type
  • may only be X times
  • in this kind of relationship / role
  • E.g. each Start state may only be in one
    Transition

22
Explosions Decompositions Tools
  • Define which object types have subgraphs
  • Explosion
  • Relationships and roles too
  • Instance graph specific
  • Many explosions for one object
  • Decomposition
  • Only objects
  • Same in all instance graphs
  • One decomposition for one object
  • Often same type as parent graph

23
Hints and tips for choosing rules
  • Do not implement in the beginning too
    restrictive-sounding rules
  • Use the method first to find relevant rules
  • Parts of the rules can be in metamodel (active)
    and parts of the rules can be checked by reports
    (passive)
  • Passive report-based rules should be implemented
    in the end when the metamodel is stable

24
3. Draw symbols (notation)
  • Draw symbols for your concepts with Symbol Editor
  • Graphical behavior in modeling tools is provided
    automatically
  • Note that symbols are used also in documentation
    (Word, HTML) and in matrixes

25
Symbol Editor
  • Symbols contain
  • Shapes and colours
  • Bitmaps
  • Line widths
  • Font styles
  • Text wrapping
  • Alignment
  • Conditional elements
  • Report labels
  • Symbol library
  • Condition for symbol elements
  • Property, wildcard to match 1 char, 0..N
    chars
  • For any shape or property label

26
Text Formatting
  • Font settings, text alignment, wrapping
  • Normally wrap everything but collection property
    labels
  • Font size (14 ? Windows default!)
  • Colors, lines types, line width, symbol filling
  • Conditional symbols

27
Hints and tips for drawing symbols
  • Symbols are very important to end-users
  • End-users could define them to get method better
    accepted
  • Define notation to illustrate the corresponding
    domain concepts natural visualization
  • You may provide different representations of the
    symbol
  • E.g. simple and full
  • Use conditional symbol elements
  • Create symbol elements based on report output
    (i.e. running generator)
  • Note that different representations makes the
    modeling also more complex
  • Connection points can be set differently
  • Default, round an element, centre, adding extra
    points
  • Different point via ports

28
4. Implement generators (reports)
  • Reports access conceptual design data in models
    and generate textual ASCII output (on screen or
    to files)
  • You may use reports for various purposes
  • Creating configuration data
  • Generating code
  • Documenting
  • Checking
  • Review
  • etc.

29
Report Browser
  • Reports allow to access design data
  • Loop through the design elements within the
    model, extract information from them and print it
    out
  • Report definitions are always associated with one
    graph type
  • Uses own reporting language
  • Can have external calls

30
Hints and tips for making reports
  • Inspect samples of required outputs and related
    model instances
  • Implement reports by designing report structure
  • Consider reuse or report definitions with a type
    hierarchy
  • Implement stable parts and non-properties first
    into subreports
  • Implement output sorting and file writing last
  • Test reports with the sample models
  • You may (re)use available predefined reports

31
Updating and maintaining metamodel 1/2
  • Problem How to change a metamodel that is used
    in production?
  • Metamodel modifications affect all the models
    where the metamodel element (type) is used
  • Non-destructive
  • Inform developers on metamodel changes, if
    necessary. You may use reports to highlight the
    model items influences
  • Check model changes (based on metamodel change)
    in separate project
  • Login and open only the type project and your
    test project
  • Working with these projects do not affect the
    others
  • Commit only when everything is ready as the
    changes propagates to others when committed

32
Updating and maintaining metamodel 2/2
  • How to organise metamodel changes?
  • Not a big deal in single-user environment
    changes are distributed as patches
  • In multi-user environment
  • Small changes can be done in production
    environment
  • exclusive metamodeling rights
  • metamodeling done off business-hours
  • A separate metamodeling environment for large
    changes
  • Suspend server, take backup, metamodel and
    restore backup if something went wrong
  • or use single-user environment
  • Always backup before metamodeling

33
Metamodeling task Family tree
  • Download MetaEdit
  • Youll receive instructions later by email
  • Make the tutorial of Family tree
  • Includes a step-by-step exercise on how to
    implement a modeling language and then how to use
    it
  • Sections 1-4 5.3 takes 2 hours
  • Send generated HTML-page to jpt_at_cs.jyu.fi
  • After implementing the metamodel, make sample
    model and run the generator you made in C 5.3
  • Zip the generated HTML files and use your name as
    file name
Write a Comment
User Comments (0)
About PowerShow.com