+ All Categories
Home > Documents > Introduction to OpenArchitectureWare...1. Create/edit grammar 2. Generate artefacts 3. Set...

Introduction to OpenArchitectureWare...1. Create/edit grammar 2. Generate artefacts 3. Set...

Date post: 05-Apr-2020
Category:
Upload: others
View: 3 times
Download: 0 times
Share this document with a friend
23
Introduction to OpenArchitectureWare ICT 1 Dr. Neil Loughran [email protected] 20 th April 2009
Transcript
Page 1: Introduction to OpenArchitectureWare...1. Create/edit grammar 2. Generate artefacts 3. Set properties to false on first generation Close configuration instance ICT 17 4. Create configuration

Introduction to

OpenArchitectureWare

ICT 1

Dr. Neil Loughran

[email protected]

20th April 2009

Page 2: Introduction to OpenArchitectureWare...1. Create/edit grammar 2. Generate artefacts 3. Set properties to false on first generation Close configuration instance ICT 17 4. Create configuration

Objective

� To give some insights into an alternative model transformation approach i.e. OpenArchitectureWare

� Not intended to make you an expert#� I do not cover all aspects involved

� UML models only briefly covered

� Nothing here relating to GMF

ICT 2

� Nothing here relating to GMF

� Benefit for student projects involving textual DSL creation using Eclipse plug-ins!

Page 3: Introduction to OpenArchitectureWare...1. Create/edit grammar 2. Generate artefacts 3. Set properties to false on first generation Close configuration instance ICT 17 4. Create configuration

Introduction

� OpenArchitectureWare (oAW)

� A suite of modelling tools

� Uses EMF at the core

� Allows integration of other EMF based tools

� GMF

� EMF

ICT 3

� EMF

� Kermeta

� MOFScript

� Pure::Variants

� Etc.

� Also integration of general purpose languages such as Java.

Page 4: Introduction to OpenArchitectureWare...1. Create/edit grammar 2. Generate artefacts 3. Set properties to false on first generation Close configuration instance ICT 17 4. Create configuration

Primary Elements

XText(T2M) Xtend(M2M) Xpand(M2T)

ICT 4

Xweave(AO-M2M)Check

(constraints)

Workflow

(sequencing)

Page 5: Introduction to OpenArchitectureWare...1. Create/edit grammar 2. Generate artefacts 3. Set properties to false on first generation Close configuration instance ICT 17 4. Create configuration

Xtext

� Domain specific languages� Language which model a particular application domain (e.g. SQL, spreadsheet

formula, Graphviz, etc.)

� Raise the abstraction level from GPL (e.g. Java) to DSL

� Think in terms of Smart Home abstractions (e.g. sensors, power management, lighting, heating, etc.)

� DSLs can be textual or graphical.

� Complex to develop and time consuming

� Text to model

ICT 5

� Text to model� Generates a meta-model for your domain

� Also creates a parser and common defaults for errors and so forth

� Xtext provides the means to develop an editor using a BNF-like syntax� Targets Eclipse

� Can be also be independent of Eclipse

Page 6: Introduction to OpenArchitectureWare...1. Create/edit grammar 2. Generate artefacts 3. Set properties to false on first generation Close configuration instance ICT 17 4. Create configuration

Xtext Grammar

ICT 6

Page 7: Introduction to OpenArchitectureWare...1. Create/edit grammar 2. Generate artefacts 3. Set properties to false on first generation Close configuration instance ICT 17 4. Create configuration

Xtext Editor using the Grammar

ICT 7

Page 8: Introduction to OpenArchitectureWare...1. Create/edit grammar 2. Generate artefacts 3. Set properties to false on first generation Close configuration instance ICT 17 4. Create configuration

Xtend

� Model transformation language

� OCL like expression language used throughout oAW

� Can be used in constraint checks, model transformations and generators

� Add “methods” to meta types (Java calls are possible if necessary)

ICT 8

� Add “methods” to meta types (Java calls are possible if necessary)

� Tool support (syntax highlighting, code completion, debugger)

Page 9: Introduction to OpenArchitectureWare...1. Create/edit grammar 2. Generate artefacts 3. Set properties to false on first generation Close configuration instance ICT 17 4. Create configuration

Complex Xtend

ICT 9

Page 10: Introduction to OpenArchitectureWare...1. Create/edit grammar 2. Generate artefacts 3. Set properties to false on first generation Close configuration instance ICT 17 4. Create configuration

Simple Xtend

ICT 10

Page 11: Introduction to OpenArchitectureWare...1. Create/edit grammar 2. Generate artefacts 3. Set properties to false on first generation Close configuration instance ICT 17 4. Create configuration

Xpand

ICT 11

Page 12: Introduction to OpenArchitectureWare...1. Create/edit grammar 2. Generate artefacts 3. Set properties to false on first generation Close configuration instance ICT 17 4. Create configuration

Check

context Type ERROR "Duplicate type detected: " + this.name :

� An OCL like constraint language

� Provides dynamic constraint support in IDE

� Allows both errors and warning to be specified

ICT 12

context Type ERROR "Duplicate type detected: " + this.name :

allElements().typeSelect(Type).select(e|e.name == this.name).size ==1;

context Type WARNING “Features should be larger than one character”:

name.size>1;

Page 13: Introduction to OpenArchitectureWare...1. Create/edit grammar 2. Generate artefacts 3. Set properties to false on first generation Close configuration instance ICT 17 4. Create configuration

Workflow

� Defines the order of operations

� Invoke components

� Invoke transformations

� Invoke other workflows

� Example

ICT 13

� Example

Page 14: Introduction to OpenArchitectureWare...1. Create/edit grammar 2. Generate artefacts 3. Set properties to false on first generation Close configuration instance ICT 17 4. Create configuration

Contrast with other technologies

OAW Language Related Approaches

Xtext Textual Concrete Syntax (TCS)

Xtend Atlas Transformation Language (ATL)

Kermeta

ICT 14

Kermeta

Xpand MOFScript, Model2Text, JET, VTL, Frames,

Check OCL

Page 15: Introduction to OpenArchitectureWare...1. Create/edit grammar 2. Generate artefacts 3. Set properties to false on first generation Close configuration instance ICT 17 4. Create configuration

Advanced Features

� Multiple model files

� UML2 Adapter

� Recipes

� Aspect-Oriented transformation

� Grammar reuse?

ICT 15

� Grammar reuse?

Page 16: Introduction to OpenArchitectureWare...1. Create/edit grammar 2. Generate artefacts 3. Set properties to false on first generation Close configuration instance ICT 17 4. Create configuration

Example:Language for Workflow Modelling

Orchestration part

Services and timing part

ICT 16

Page 17: Introduction to OpenArchitectureWare...1. Create/edit grammar 2. Generate artefacts 3. Set properties to false on first generation Close configuration instance ICT 17 4. Create configuration

General Procedure for Development of

Textual DSL using oAW

1. Create/edit

grammar

2. Generate

artefacts

3. Set properties

to false on first

generation

Close configuration

instance

ICT 17

4. Create

configuration

instance

5. Test correctness

Of grammar in

editor

6. Alter Check files

and create templates

7. Add images and labels

(requires restart of instance)

Page 18: Introduction to OpenArchitectureWare...1. Create/edit grammar 2. Generate artefacts 3. Set properties to false on first generation Close configuration instance ICT 17 4. Create configuration

Using oAW with UML models

� So far only covered development of textual languages

� oAW also has support for UML2 models

� All oAW languages (i.e. Xtend, Xpand et al) able to access

UML models

ICT 18

Page 19: Introduction to OpenArchitectureWare...1. Create/edit grammar 2. Generate artefacts 3. Set properties to false on first generation Close configuration instance ICT 17 4. Create configuration

Using oAW with UML2 Models

� First you need to install the UML2 feature from eclipse.org:

http://download.eclipse.org/tools/uml2/updates/site-interim.xml

� The oAW uml2adapter is available from the oAW update site:

http://www.openarchitectureware.org/updatesite/milestone/site.xml

� Configure workflow (example fragment)

ICT 19

� Hint: General practice is to use an existing UML2 project in oAW and adapt to suit your needs!! (check oAW site for these projects!)

Page 20: Introduction to OpenArchitectureWare...1. Create/edit grammar 2. Generate artefacts 3. Set properties to false on first generation Close configuration instance ICT 17 4. Create configuration

Open Points

� Why use a textual modelling language?

� Expressivity

� Speed?

� Quicker to develop meta-models using text! (e.g Text2UML)

� Conciseness

� Why use a graphical modelling language?

ICT 20

� Why use a graphical modelling language?

� Provide overview

� Hide complexity

� Cases for hybrid?

� Use textual for some parts of the language, graphical for other?

� Example for SOA

� express locations of services using text

� express order using UML activity diagrams

Page 21: Introduction to OpenArchitectureWare...1. Create/edit grammar 2. Generate artefacts 3. Set properties to false on first generation Close configuration instance ICT 17 4. Create configuration

Summary

� oAW is a modelling tool suite for T2M, M2M, M2T

� Provides a workflow and constraints language

� Generates the Java for an Eclipse plug in

� Can be utilised with UML2 models

� Integrates with general purpose languages i.e. Java

ICT 21

� Integrates with general purpose languages i.e. Java

Page 22: Introduction to OpenArchitectureWare...1. Create/edit grammar 2. Generate artefacts 3. Set properties to false on first generation Close configuration instance ICT 17 4. Create configuration

Useful Sites for oAW

� Contact me for workflow language example and this [email protected]

� Download sites

� Update site

http://www.openarchitectureware.org/updatesite/milestone/site.xml

� Complete distribution

ICT 22

http://oaw.itemis.com/openarchitectureware/language=en/2837/downloads

� oAW Documentationhttp://www.openarchitectureware.org/pub/documentation/4.3.1/html/contents/

� Video Tutorialshttp://www.openarchitectureware.org/staticpages/index.php/oaw_screencasts

� Forumhttp://www.openarchitectureware.org/forum/?menu=Forum

Page 23: Introduction to OpenArchitectureWare...1. Create/edit grammar 2. Generate artefacts 3. Set properties to false on first generation Close configuration instance ICT 17 4. Create configuration

Questions?

ICT 23

Questions?


Recommended