48
Institute for Software Integrated Systems Vanderbilt University Copyright © Vanderbilt University/ISIS 2007 GME Basics Janos Mathe Zoltán Molnár Help-desk: gme-users list at http://list.isis.vanderbilt.edu

GME Basics

  • Upload
    trista

  • View
    64

  • Download
    1

Embed Size (px)

DESCRIPTION

GME Basics. Janos Mathe Zolt án Molnár Help-desk: gme-users list at http://list.isis.vanderbilt.edu. Recap. UML concepts Classes Associations Aggregation/Composition Generalization/Inheritance Additional concepts Constraints. Recap. UML concepts Classes Associations - PowerPoint PPT Presentation

Citation preview

Page 1: GME Basics

Institute for Software Integrated SystemsVanderbilt University

Copyright © Vanderbilt University/ISIS 2007

GME Basics

Janos MatheZoltán Molnár

Help-desk: gme-users list at http://list.isis.vanderbilt.edu

Page 2: GME Basics

Recap

UML concepts Classes Associations Aggregation/Composition Generalization/Inheritance

Additional concepts Constraints

Page 3: GME Basics

Recap

UML concepts Classes Associations Aggregation/Composition Generalization/Inheritance

Additional concepts Constraints

Page 4: GME Basics

Defining a DSMLL = < C, A, S, MS, MC>

Language component Sign Explanation

Concrete Syntax C Notation for representing modelsUsing the elements of MetaGME: UML extended with stereotypes and OCL

Abstract Syntax A OntologyThe (important) concepts of a domain and their relations

Parsing Mc Mapping the concepts of A to the concepts of CCreating the concepts in A by using the concepts available in MetaGME

Semantic Domain S Semantics describes meaning of the modelsThere can be multiple valid semantics

Semantic Mapping Ms Mapping the concepts of A to SUsually means writing an interpreter using GME’s BON/MON interfaces to traverse the models

Page 5: GME Basics

Defining a DSMLL = < C, A, S, MS, MC>

Language component Sign Explanation

Concrete Syntax C Notation for representing modelsUsing the elements of MetaGME: UML extended with stereotypes and OCL

Abstract Syntax A OntologyThe (important) concepts of a domain and their relations

Parsing Mc Mapping the concepts of A to the concepts of CCreating the concepts in A by using the concepts available in MetaGME

Semantic Domain S Semantics describes meaning of the modelsThere can be multiple valid semantics

Semantic Mapping Ms Mapping the concepts of A to SUsually means writing an interpreter using GME’s BON/MON interfaces to traverse the models

Page 6: GME Basics

Concrete Syntax for DSMLs in GME

Page 7: GME Basics

April 21, 2023 7

Directory structure

GME.exe Main application

ModelMigrate.exe XSLT (XML) based external model upgrader & transformer

Interfaces folder Mga.idl useful when writing COM Interpreters (low-level) Gme.idl useful when creating scripts

SDK folder BON folder

BonImpl.h useful when writing BON Interpreters (high-level) CreateNewComponent.exe

creates new interpreter skeletons

Paradigms folder MetaGME folder (metamodel and paradigm for metamodeling) SF folder (sample Signalflow metamodel/paradigm)

Doc folder Tutorials folder

Page 8: GME Basics

April 21, 2023 8

Basic terms 1.

Folders (container)

First Class Objects (FCO): Atom (atomic object) Model (container) Set (aggregation) Connection (association) Reference (pointer, proxy)

Attributes User-defined properties of FCOs

Aspects User-defined views of models

Annotations Textboxes inside models, provide visual aid

Page 9: GME Basics

Defining a DSMLL = < C, A, S, MS, MC>

Language component Sign Explanation

Concrete Syntax C Notation for representing modelsUsing the elements of MetaGME: UML extended with stereotypes and OCL

Abstract Syntax A OntologyThe (important) concepts of a domain and their relations

Parsing Mc Mapping the concepts of A to the concepts of CCreating the concepts in A by using the concepts available in MetaGME

Semantic Domain S Semantics describes meaning of the modelsThere can be multiple valid semantics

Semantic Mapping Ms Mapping the concepts of A to SUsually means writing an interpreter using GME’s BON/MON interfaces to traverse the models

Page 10: GME Basics

April 21, 2023 10

Things to Register GME Paradigms GME Components/Interpreters into Windows registry (system or user)

Object Registry in GME Information stored inside GME objects (FCOs) Object preferences Object position

File types (extensions) Binary project/model file: .mga XML project/model file: .xme Binary paradigm file: .mta XML paradigm file: .xmp

Basic terms 2.

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE project SYSTEM "mga.dtd"><project […] metaname=“SF“>

<?xml version="1.0"?><!DOCTYPE paradigm SYSTEM "edf.dtd"><paradigm name="SF“ […]

Page 11: GME Basics

April 21, 2023 11

MetaInterpretation

MetaGME interpreter

Metamodel(model in MetaGME

paradigm)

Rootfolder

Page 12: GME Basics

April 21, 2023 12

MetaInterpretation

Project/model createdin MetaGME (aka. Metamodel)

paradigm (SF.mga)

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE project SYSTEM "mga.dtd"><project […] metaname=“MetaGME“><name>SF</name>

<?xml version="1.0"?><!DOCTYPE paradigm SYSTEM "edf.dtd"><paradigm name="SF“ […]

Paradigm (SF.xmp)

User initiatedtranslation

Sample sentence with the words metamodel and paradigm:Q: “I interpreted my metamodel with MetaGME interpreter and I got the error message that my paradigm can’t be registered.”A: “Please check the Console Window for details about errors during interpretation.”

Page 13: GME Basics

April 21, 2023 13

Registering paradigms 1.

Page 14: GME Basics

April 21, 2023 14

Registering paradigms 2.

Currently registered

Systemwide = for all users

Add new paradigm

Page 15: GME Basics

April 21, 2023 15

Upgrading

To a new metamodel/paradigm version Reason: Users can change their language definition as

they wish, GME has no chance of being able to sort out obsolete elements, doing replacements, …

Binary model files might be accepted Export XML and Import XML might work ModelMigrate tool (XSLT based transformations) GReAT recommended for complex model

transformations

To a new GME version Binary model files might be accepted (definitely not in

case of major modifications to the internal datamodel) Export XML and Import XML must work Total Recompilation of user-written components

(interpreters) needed

Page 16: GME Basics

April 21, 2023 16

Graphical User Interface

Page 17: GME Basics

April 21, 2023 17

Starting from empty project

Right clickfor Context

menu

Top-level elements

that can be inserted

Page 18: GME Basics

April 21, 2023 18

Exploring models

Double clicked

‘MyCompound’ model opened

Page 19: GME Basics

April 21, 2023 19

Exploring models

Double click a Model to see its

internals

Page 20: GME Basics

April 21, 2023 20

Navigation

BackForward

Home (model opened first)

Cycle Aspects for current/all model(s)

Close model(s): current/all/all but current

Show next window

Page 21: GME Basics

April 21, 2023 21

Add new parts by Drag&Drop from palette

Page 22: GME Basics

April 21, 2023 22

Add new partsthrough Context menu

Page 23: GME Basics

April 21, 2023 23

Result

Page 24: GME Basics

April 21, 2023 24

Context aware UI elements

Selected element

Context sensitive pallette

Attributes of selected

element

Page 25: GME Basics

April 21, 2023 25

Selected element

Attributes of selected element

Attributes of ‘Primitive’ defined in the metamodel

Page 26: GME Basics

April 21, 2023 26

Legal Parts allowed in currently opened model (Compound)

Currently opened model

Properties of the currently opened model

Page 27: GME Basics

April 21, 2023 27

Legal Parts allowed in currently opened model (Compound)

Currently opened model

Properties of the currently opened model

Metamodel portion where parts of

‘Compound’ are defined

Page 28: GME Basics

April 21, 2023 28

Selected and currently opened model

Properties of selected element

Currently opened model

Properties of the currently opened model

KindName Aspect

Page 29: GME Basics

April 21, 2023 29

Operational modes

Edit (^1)

Connect (^2)

Disconnect (^3)

Set Mode (^4)

Zoom (^5)

Presentation (^6)

Non-sticky Connect (^7)

Non-sticky Disconnect (^8)

Page 30: GME Basics

April 21, 2023 30

Connectingin Connection Mode

Select source while mouse pointer is black

Select destination while mouse pointer is white

Step 1

Step 2

Done

Select Connection Mode

Page 31: GME Basics

April 21, 2023 31

Connect through Context MenuStep 1: select Source

Page 32: GME Basics

April 21, 2023 32

Connect through Context Menu Step 2: select Destination

Page 33: GME Basics

April 21, 2023 33

Connect through Context Menu Done

Page 34: GME Basics

April 21, 2023 34

Connection removal

In Disconnect mode Point & click on a connection

In Edit mode Select ‘Delete’ from a connection’s context menu Select ‘Disconnect all’ in a source/destination

object’s context menu (deletes all connections!)

In TreeBrowser Select connection and delete it Note: Connections are shown in TreeBrowser only if

the ‘Display Connections’ option is turned on in ‘Tree Browser Options’ dialog, accessible from the TreeBrowser’s context menu

Page 35: GME Basics

April 21, 2023 35

Type inheritance

Type, Subtype, Instance A model created from scratch is a type Explicit and implicit derivation/instantiation A deep copy preserving the linkage In subtypes:

New objects can be added Attributes can be modified Objects cannot be deleted

In instances: Attributes can be modified

Only root models can be explicitly derived or instantiated to avoid multiple dependency chains

Similar to prototype/clone technique Enables model reuse, maintainability Utilized in libraries

Page 36: GME Basics

April 21, 2023 36

EngineT

ABST

V6I

CarT

ABSXST

V6I

Cool CarST

ABSXjI

V6I

My CarI

ABSiI

V6I

A CarI

T TypeST SubType I Instance Aggregation Dependency Secondary Dep.

Type Inheritance (dependency chain)

Page 37: GME Basics

April 21, 2023 37

InstanceOfSubTypeOf

CarT

Cool CarST

My CarI

A CarI

EngineT

V6I

V6I

V6I

V6I

ABST

ABSXST

ABSXjI

ABSiI

Type Inheritance (dependency chain) 2.

Page 38: GME Basics

April 21, 2023 38

Keyboard shortcuts Ctrl + 1..8 : switch between modes Ctrl + Z, Ctrl + U : Undo/Redo Ctrl + F : Search TreeBrowser

Enter : show fco for Models it shows a model’s internals

Shift + Enter: show fco in parent shows every fco (models too) in its parent

TAB: jump to search combo box Ctrl + TAB: cycling

cycle through Aggregate, Inheritance, Meta Pages F2: rename active element

View Enter: show model (down in hier.) or follow reference Backspace: show parent model (up in hier.) A: cycle through Attribute/Preferences/Property pages for selected element Numpad +/-: zoom in / out by 5% TAB: cycle through aspects for active model Z/X: back / forward Ctrl + B : jump to browser (as Locate command does) Ctrl + I : jump to Object Inspector (attribute panel)

Object Inspector (Attribute Panel) CTRL + D: restore default value of an attribute

Page 39: GME Basics

April 21, 2023 39

Drag & Drop

Drag & drop for FCOs within Treebrowser from Treebrowser to models and vice versa among models

Drag & drop modifiers: None move Ctrl copy Ctrl + Shift create a reference Alt instance Alt + Shift subtype

Drag & Drop for Files Paradigm file (.mta, .xmp) gets registered (only if no

project is open) .mga project file is opened .xme project file is imported

Page 40: GME Basics

Defining a DSMLL = < C, A, S, MS, MC>

Language component Sign Explanation

Concrete Syntax C Notation for representing modelsUsing the elements of MetaGME: UML extended with stereotypes and OCL

Abstract Syntax A OntologyThe (important) concepts of a domain and their relations

Parsing Mc Mapping the concepts of A to the concepts of CCreating the concepts in A by using the concepts available in MetaGME

Semantic Domain S Semantics describes meaning of the modelsThere can be multiple valid semantics

Semantic Mapping Ms Mapping the concepts of A to SUsually means writing an interpreter using GME’s BON/MON interfaces to traverse the models

Page 41: GME Basics

Recap

UML concepts Classes Associations Aggregation/Composition Generalization/Inheritance

Additional concepts Constraints

Page 42: GME Basics

Example - Binary Tree

Page 43: GME Basics

April 21, 2023 47

ConstraintsParadigm-, project- and model-specific

constraints

Expressed in Object Constraint Language (OCL) v1.4 part of UML

Evaluate Constraints On events

OnCloseModel OnConnected etc.

On user request On the current model On the whole project Only selected constraints Only on selected objects

Page 44: GME Basics

April 21, 2023 48

Constraints 2.

Priority Context Detailed error

reporting Automatic syntax

check

Page 45: GME Basics

April 21, 2023 49

Miscellaneous features

Search Tool Regular expression based Useful to find all references to an object also

Aspect Synchronization Object position synchronization

External Editor attribute editing

Table Editor Model Libraries Console window scripting

Python/Perl/JavaScript/VBScript 3 predefined variables:

gme implements IGMEOLEApp (gme.idl) it implements IGMEOLEIt (gme.idl) project implements IMgaProject (mga.idl)

SDK/CreateNewComponent.exe Creates empty interpreter/add-on skeletons

Page 46: GME Basics

Tricks

Connecting nodes time efficiently Pasting Icons

Page 47: GME Basics

Quiz

What's GME? What is it good for? What does metamodeling mean? What are models good for? What is an interpreter good for?

Page 48: GME Basics

Quiz - Answers

What does metamodeling mean? Capturing the core concepts and the rules of a domain on the

right level of abstractions in metamodels Using these metamodels to enforce the creation of valid

domain models What's GME?

Metaprogrammable graphical model builder What is it good for?

Create visual Domain-Specific Modeling Languages (DSMLs) Create a customized modeling environment that allows

domain experts to build models of the domain What are models good for?

They provide a centralized view What is an interpreter good for?

They allow the information to be extracted from models so that code, documentation, etc. can be generated