21
Software Engineering Integration For Flexible Automation Systems AutomationML Models (in EMF and EA) for Modelers and Software Developers Emanuel Mätzler Institute of Software Technology and Interactive Systems Vienna University of Technology Christian Doppler Laboratory

Christian Doppler Laboratory - · PDF file– Xtext for textual concrete syntax ( – AmlText (https: ... Mappings between the behavioral modeling parts of AML PLCopen XML

  • Upload
    vuhanh

  • View
    221

  • Download
    3

Embed Size (px)

Citation preview

Page 1: Christian Doppler Laboratory -  · PDF file– Xtext for textual concrete syntax (  – AmlText (https: ... Mappings between the behavioral modeling parts of AML PLCopen XML

Software Engineering Integration For Flexible Automation Systems

AutomationML Models (in EMF and EA)for Modelers and Software Developers

Emanuel MätzlerInstitute of Software Technology and Interactive Systems

Vienna University of Technology

Christian Doppler Laboratory

Page 2: Christian Doppler Laboratory -  · PDF file– Xtext for textual concrete syntax (  – AmlText (https: ... Mappings between the behavioral modeling parts of AML PLCopen XML

Introduction Modeling Language Engineering

From Data Exchange Format to Modeling Language– Background on Modeling Language Engineering– Interactive session with Eclipse Modeling Framework

Model Transformation EngineeringFrom AutomationML to Enterprise Architect (EA)– Background on Model Transformations– Interactive session with the EA AML Engineer Plugin

Conclusions

Outline

Page 3: Christian Doppler Laboratory -  · PDF file– Xtext for textual concrete syntax (  – AmlText (https: ... Mappings between the behavioral modeling parts of AML PLCopen XML

Introduction

Identified needsa. A large number of heterogeneous models is involved in systems engineering

Need for process support

b. A wide variety of models in systems engineering come from different disciplines Need for management Need for customized integration for concrete application scenarios Vision: encompassing various viewpoints to get a better understanding

At TU Wien we have the expertise a. To develop software tools the model driven way (AutomationML Hub example)b. To deal with a large number of heterogeneous software and systems models

Page 4: Christian Doppler Laboratory -  · PDF file– Xtext for textual concrete syntax (  – AmlText (https: ... Mappings between the behavioral modeling parts of AML PLCopen XML

Model Exchange: AML as Common Format

AutomationML (AML)

Emerging standard for tool dataexchange

Foundation for harmonizing engineering data coming from a heterogeneous tool network by means of a unified format and data model

= domain = tool = doc

overall system design

mechanical engineering

electricalengineering

softwareengineering

Industry 4.0

Page 5: Christian Doppler Laboratory -  · PDF file– Xtext for textual concrete syntax (  – AmlText (https: ... Mappings between the behavioral modeling parts of AML PLCopen XML

How to get from Data to Models?

Data Exchange vs. Modeling Languages

Page 6: Christian Doppler Laboratory -  · PDF file– Xtext for textual concrete syntax (  – AmlText (https: ... Mappings between the behavioral modeling parts of AML PLCopen XML

Anatomy of modeling languages

6

Although languages have, in general, divergent orientations and application fields, they still share a common language definition structure

Semantics

Abstract Syntax

Serialization Syntax Concrete Syntax

Formal languages

Meaning of the language elementsLanguage elements,

i.e., grammar

Notation of the language elements

Persistency and model exchange

Page 7: Christian Doppler Laboratory -  · PDF file– Xtext for textual concrete syntax (  – AmlText (https: ... Mappings between the behavioral modeling parts of AML PLCopen XML

Anatomy of modeling languages

7

Semantics: Defines the meaning of the language concepts How language concepts are interpreted

Abstract syntax: Defines the language concepts and how these concepts can be combined (~ grammar) However, it does not define the notation or meaning of the

concepts Concrete syntax: Notation to illustrate the language

concepts intuitively 2 ways: textual or graphical (or mixture)

Serialization syntax: For persistent storage and model exchange between tools XML, proprietary format, …

Page 8: Christian Doppler Laboratory -  · PDF file– Xtext for textual concrete syntax (  – AmlText (https: ... Mappings between the behavioral modeling parts of AML PLCopen XML

AutomationML family is defined by a set of XML Schemas Systematic metamodel creation process

– Step 1: Generative approach to produce initial Ecore-based metamodel– Step 2: Refactorings for improving language design

Resulting metamodels– are complete and correct with respect to XML Schemas– allow to import/export data from/to XML data

A. Schauerhuber, M. Wimmer, E. Kapsammer, W. Schwinger, W. Retschitzegger: Bridging WebML to Model-Driven Engineering: From DTDs to MOF. IET Software 1(3), 2007.

AML Metamodel

AML Model

AML XSDs

conformsTo

EcoreXSD

AML XML

Correspondences

conformsTo

conformsTo

conformsTo

Metamodel Transformation

implies

implies

Model Transformation

Language Engineering via Metamodeling

Page 9: Christian Doppler Laboratory -  · PDF file– Xtext for textual concrete syntax (  – AmlText (https: ... Mappings between the behavioral modeling parts of AML PLCopen XML

Language Engineering via MetamodelingFirst Interactive session

Reqirements– Eclipse Modeling Framework (https://eclipse.org/modeling/emf/)– AutomationML Metamodel (https://github.com/amlModeling)– Xtext for textual concrete syntax (https://eclipse.org/Xtext)– AmlText

(https://github.com/patrickneubauer/XMLText/tree/master/AUTOMATIONML)

AML Metamodel

AML Model

AML XSDs

conformsTo

EcoreXSD

AML XML

Correspondences

conformsTo

conformsTo

conformsTo

Metamodel Transformation

implies

implies

Model Transformation

conforms to

Page 10: Christian Doppler Laboratory -  · PDF file– Xtext for textual concrete syntax (  – AmlText (https: ... Mappings between the behavioral modeling parts of AML PLCopen XML

Interactive Session (1/2)

Page 11: Christian Doppler Laboratory -  · PDF file– Xtext for textual concrete syntax (  – AmlText (https: ... Mappings between the behavioral modeling parts of AML PLCopen XML

Model TransformationsPattern

K. Czarnecki, S. Helsen. Feature-based survey of model transformation approaches. IBMSystems Journal 45(3), pages 621-646, 2006.

Transformation Implementation

Model

Metamodel

Model

Metamodel

TransformationEngine

writesreadsex

ecut

es

«con

form

sTo»

«con

form

sTo»

Trace Modellinkslinks

writes

Page 12: Christian Doppler Laboratory -  · PDF file– Xtext for textual concrete syntax (  – AmlText (https: ... Mappings between the behavioral modeling parts of AML PLCopen XML

SysML is a graphical modeling language standardized by OMG for the development of large-scale, complex, and multi-disciplinary systems in a model-based approach.

It provides modeling concepts for representing the requirements, structure, and behavior of a systems.

Captures the overall design of a system on a high level of abstraction and traces this design to the discipline-specific models

Model Transformations: AML and SysMLTwo Unrelated Modeling Standards

Page 13: Christian Doppler Laboratory -  · PDF file– Xtext for textual concrete syntax (  – AmlText (https: ... Mappings between the behavioral modeling parts of AML PLCopen XML

Additions to UML for Requirements and Properties Requirement: SysML provides

modeling constructs to represent text-based requirements and relate them to other modeling elements.

Constraints and Parametric Diagram (constraint analysis)

Customization of UML for structural modeling through Classes and Composite Structures Block derives from

CompositeStructures::Class

UML

SysMLUML4SysML

RequirementsProperties

DeploymentsInteractions Classes

CompositeStructuresActivitiesStateMachines

Model Transformations: AML and SysMLSysML in a Nutshell

Page 14: Christian Doppler Laboratory -  · PDF file– Xtext for textual concrete syntax (  – AmlText (https: ... Mappings between the behavioral modeling parts of AML PLCopen XML

Model Exchange: AML as Common FormatCase Study: Six Axes Robot

Page 15: Christian Doppler Laboratory -  · PDF file– Xtext for textual concrete syntax (  – AmlText (https: ... Mappings between the behavioral modeling parts of AML PLCopen XML

Class Diagram(s)Composite Structure Diagram(s)

Block Definition Diagrams (BDs)Internal Block Diagrams (IBDs)

Tree-based view

«represented by»

Commonalities and differences between the structural modeling sublanguages of AML (CAEX) and SysML (Block Diagrams)

AML metamodel and profiles for UML and SysML Transformations between AML and SysML (UML/SysML already available)

Model Transformations: AML and SysMLFrom AutomationML to Enterprise Architect and Back again: Example

Page 16: Christian Doppler Laboratory -  · PDF file– Xtext for textual concrete syntax (  – AmlText (https: ... Mappings between the behavioral modeling parts of AML PLCopen XML

Model Transformations: AML and SysMLFrom AutomationML to Enterprise Architect and Back again: Example

Block Definition Diagram AML Editor Tree

Transformation Engine

Rule«block»

RuleRule

InternalElement

MDG

built-in

Page 17: Christian Doppler Laboratory -  · PDF file– Xtext for textual concrete syntax (  – AmlText (https: ... Mappings between the behavioral modeling parts of AML PLCopen XML

Model Transformations: AML and SysMLFrom AutomationML to Enterprise Architect and Back again: Example

AML Editor Tree

MDG4

Export

Import

Page 18: Christian Doppler Laboratory -  · PDF file– Xtext for textual concrete syntax (  – AmlText (https: ... Mappings between the behavioral modeling parts of AML PLCopen XML

Model Transformations: AML and SysMLFrom AutomationML to Enterprise Architect and Back again: Example

AML Editor Tree

MDG4

Page 19: Christian Doppler Laboratory -  · PDF file– Xtext for textual concrete syntax (  – AmlText (https: ... Mappings between the behavioral modeling parts of AML PLCopen XML

MDG4

Aut

omat

ionM

Lfo

rIm

port/

Exp

ort

Model Transformations: AML, SysML and UMLSecond Interactive session: From AutomationML to EA and Back again

Reqirements– Enterprise Architect (http://www.sparxsystems.de/uml/download-trial/)– AML Plugin for EA (Prototype: http://www.sysml4industry.org/?page_id=266)

Page 20: Christian Doppler Laboratory -  · PDF file– Xtext for textual concrete syntax (  – AmlText (https: ... Mappings between the behavioral modeling parts of AML PLCopen XML

Interactive Session (2/2)

Page 21: Christian Doppler Laboratory -  · PDF file– Xtext for textual concrete syntax (  – AmlText (https: ... Mappings between the behavioral modeling parts of AML PLCopen XML

Model-Driven Engineering is beneficial to Represent modeling languages Derive tool support Bridging different languages Providing different surface languages for one abstract language

Resulting modeling tools are Open and extensible Model management support is available out-of-the-box based on common

metamodeling language Modeling tools are usable in combination based on model exchange Modeling tools allow for a mixture of modeling languages leading to multi-

paradigm modeling approaches

Next steps Mappings between the behavioral modeling parts of AML PLCopen XML

and SysML Activity Diagrams and State Machines Generative usage of AML models by defining code generator chains Analytical usage of AML models by transforming them to formal domains

Conclusions and Future Work