A Generator Composition Approach for Aspect-Oriented DSLs ICMT 2016 - - PowerPoint PPT Presentation

a generator composition approach for aspect oriented dsls
SMART_READER_LITE
LIVE PREVIEW

A Generator Composition Approach for Aspect-Oriented DSLs ICMT 2016 - - PowerPoint PPT Presentation

A Generator Composition Approach for Aspect-Oriented DSLs ICMT 2016 Reiner Jung Robert Heinrich Wilhelm Hasselbring 5 st July 2016 Introduction Motivation Software development and evolution Domain, technology and environment changes


slide-1
SLIDE 1

A Generator Composition Approach for Aspect-Oriented DSLs

ICMT 2016 Reiner Jung Robert Heinrich Wilhelm Hasselbring 5st July 2016

slide-2
SLIDE 2

Introduction

Motivation

Software development and evolution

‚ Domain, technology and environment changes ‚ Addition and changes to requirements ③ Continuously growing complexity

Model-driven software development

‚ Provides: Specific views and models of software systems ‚ Requires: Model editors, evaluation tools, and code generators ③ Evolution provoke generator alterations

Reiner Jung 2 / 33

slide-3
SLIDE 3

Introduction

Common Component Modeling Example

(Rausch et al. 2011; Heinrich et al. 2015)

Reiner Jung 3 / 33

slide-4
SLIDE 4

Introduction

Common Component Modeling Example

Store Server Store Server Store Server Store Server

(Rausch et al. 2011; Heinrich et al. 2015)

Reiner Jung 3 / 33

slide-5
SLIDE 5

Introduction

Common Component Modeling Example

Store Server Store Server Store Server Store Server Store Server Store Server

(Rausch et al. 2011; Heinrich et al. 2015)

Reiner Jung 3 / 33

slide-6
SLIDE 6

Introduction

Common Component Modeling Example

Enterprise Server Database Store Server Store Server Store Server Store Server Store Server Store Server

(Rausch et al. 2011; Heinrich et al. 2015)

Reiner Jung 3 / 33

slide-7
SLIDE 7

Introduction

Modeling CoCoME

Source Model Target Code

IEnterpriseReporting IStoreManager IEnterpriseManager ICashDeskModel WebFrontend::UseCases WebService::CashDesk TradingSystem::Inventory WebService::Inventory :ServiceAdapter TradingSystem::CashDeskLine ICashDesk ICardReader IUserDisplay IPrinter IBarcodeScanner IExpressLight ICashBox IUserDisplayModel ICardReaderModel IExpressLightModel ICashBoxModel IBarcodeScannerModel IPrinterModel IStoreInventory AccountSaleEvent IReporting IStoreInventoryManager ServiceAdapter

System

Reiner Jung 4 / 33

slide-8
SLIDE 8

Introduction

Modeling CoCoME

Source Model Target Code

:ServiceAdapter WebService::Inventory :Store :Reporting :Enterprise

Repository

IEnterpriseReporting IStoreManager IEnterpriseManager ICashDeskModel WebFrontend::UseCases WebService::CashDesk TradingSystem::Inventory WebService::Inventory :ServiceAdapter TradingSystem::CashDeskLine ICashDesk ICardReader IUserDisplay IPrinter IBarcodeScanner IExpressLight ICashBox IUserDisplayModel ICardReaderModel IExpressLightModel ICashBoxModel IBarcodeScannerModel IPrinterModel IStoreInventory AccountSaleEvent IReporting IStoreInventoryManager ServiceAdapter

System

Reiner Jung 4 / 33

slide-9
SLIDE 9

Introduction

Modeling CoCoME

Source Model Target Code

:ServiceAdapter WebService::Inventory :Store :Reporting :Enterprise

Repository

IEnterpriseReporting IStoreManager IEnterpriseManager ICashDeskModel WebFrontend::UseCases WebService::CashDesk TradingSystem::Inventory WebService::Inventory :ServiceAdapter TradingSystem::CashDeskLine ICashDesk ICardReader IUserDisplay IPrinter IBarcodeScanner IExpressLight ICashBox IUserDisplayModel ICardReaderModel IExpressLightModel ICashBoxModel IBarcodeScannerModel IPrinterModel IStoreInventory AccountSaleEvent IReporting IStoreInventoryManager ServiceAdapter

System

package data entity TradingEnterprise { long id string name ProductSupplier[] productSuppliers } entity ProductSupplier { long id string name Product[] offers }

Data Types

Store[] stores

Reiner Jung 4 / 33

slide-10
SLIDE 10

Introduction

Modeling CoCoME

Source Model Target Code

:ServiceAdapter WebService::Inventory :Store :Reporting :Enterprise

Repository

package cocome import data.TradingEnterprise repository "cocome/model/cocome.repository" realize stateless TradingSystem.Inventory.Data.Enterprise { iface EnterpriseQueryIf

  • peration queryEnterpriseById {

return query TradingEnterprise "SELECT t FROM TradingEnterprise WHERE id=" + enterpriseId } }

Behavior

IEnterpriseReporting IStoreManager IEnterpriseManager ICashDeskModel WebFrontend::UseCases WebService::CashDesk TradingSystem::Inventory WebService::Inventory :ServiceAdapter TradingSystem::CashDeskLine ICashDesk ICardReader IUserDisplay IPrinter IBarcodeScanner IExpressLight ICashBox IUserDisplayModel ICardReaderModel IExpressLightModel ICashBoxModel IBarcodeScannerModel IPrinterModel IStoreInventory AccountSaleEvent IReporting IStoreInventoryManager ServiceAdapter

System

package data entity TradingEnterprise { long id string name ProductSupplier[] productSuppliers } entity ProductSupplier { long id string name Product[] offers }

Data Types

Store[] stores

Reiner Jung 4 / 33

slide-11
SLIDE 11

Introduction

Modeling CoCoME

Source Model Target Code

:ServiceAdapter WebService::Inventory :Store :Reporting :Enterprise

Repository

package cocome import data.TradingEnterprise repository "cocome/model/cocome.repository" realize stateless TradingSystem.Inventory.Data.Enterprise { iface EnterpriseQueryIf

  • peration queryEnterpriseById {

return query TradingEnterprise "SELECT t FROM TradingEnterprise WHERE id=" + enterpriseId } }

Behavior

IEnterpriseReporting IStoreManager IEnterpriseManager ICashDeskModel WebFrontend::UseCases WebService::CashDesk TradingSystem::Inventory WebService::Inventory :ServiceAdapter TradingSystem::CashDeskLine ICashDesk ICardReader IUserDisplay IPrinter IBarcodeScanner IExpressLight ICashBox IUserDisplayModel ICardReaderModel IExpressLightModel ICashBoxModel IBarcodeScannerModel IPrinterModel IStoreInventory AccountSaleEvent IReporting IStoreInventoryManager ServiceAdapter

System

use pcm on cocome "irl-examples/src/cocome.repository" advice TraceLogger () { before OperationBeforeEvent(time, signature, classname, signature) after OperationAfterEvent(time, signature, classname) } pointcut point class cocome.TradingSystem.Inventory.Data.Persistence aspect point : EntryLogger

Kieker - Monitoring

package data entity TradingEnterprise { long id string name ProductSupplier[] productSuppliers } entity ProductSupplier { long id string name Product[] offers }

Data Types

Store[] stores

Reiner Jung 4 / 33

slide-12
SLIDE 12

Introduction

Modeling CoCoME

Source Model Target Code

:ServiceAdapter WebService::Inventory :Store :Reporting :Enterprise

Repository

package cocome import data.TradingEnterprise repository "cocome/model/cocome.repository" realize stateless TradingSystem.Inventory.Data.Enterprise { iface EnterpriseQueryIf

  • peration queryEnterpriseById {

return query TradingEnterprise "SELECT t FROM TradingEnterprise WHERE id=" + enterpriseId } }

Behavior AspectJ

<?xml version="1.0" encoding="UTF-8" standalone="no"?> <aspectj> <weaver options=""/> <aspects> <aspect name="AbstractEntryLoggerAdvice0"/> <aspect name="AbstractEntryLoggerAdvice1"/> <concrete−aspect extends="AbstractEntryLoggerAdvice0" name="EntryLoggerAdvice0"> <pointcut expression="TradingSystem.Inventory.Data.Persistence" name="point"/> </concrete−aspect> </aspects> </aspectj>

JavaEE

package org.cocome.tradingsystem.inventory.data.enterprise; ... public final class EnterpriseQueryProvider implements IEnterpriseQuery { @Override public TradingEnterprise queryEnterpriseById(final long enterpriseId, final IPersistenceContext pctx) { final EntityManager em = __getEntityManager(pctx); return em.createQuery("SELECT te FROM TradingEnterprise te WHERE te.id" + enterpriseID, TradingEnterprise.class).getResultList(); }

JPA - Entity Beans

@Entity public class TradingEnterprise { private long id; private String name; private List<Store> stores; private List<ProductSupplier> productSuppliers; private @Transient boolean selected; public long getId() { return this.id; } public void setId(final long id) { this.id = id; }

IEnterpriseReporting IStoreManager IEnterpriseManager ICashDeskModel WebFrontend::UseCases WebService::CashDesk TradingSystem::Inventory WebService::Inventory :ServiceAdapter TradingSystem::CashDeskLine ICashDesk ICardReader IUserDisplay IPrinter IBarcodeScanner IExpressLight ICashBox IUserDisplayModel ICardReaderModel IExpressLightModel ICashBoxModel IBarcodeScannerModel IPrinterModel IStoreInventory AccountSaleEvent IReporting IStoreInventoryManager ServiceAdapter

System

use pcm on cocome "irl-examples/src/cocome.repository" advice TraceLogger () { before OperationBeforeEvent(time, signature, classname, signature) after OperationAfterEvent(time, signature, classname) } pointcut point class cocome.TradingSystem.Inventory.Data.Persistence aspect point : EntryLogger

Kieker - Monitoring

package data entity TradingEnterprise { long id string name ProductSupplier[] productSuppliers } entity ProductSupplier { long id string name Product[] offers }

Data Types

Store[] stores

Reiner Jung 4 / 33

slide-13
SLIDE 13

Introduction

Modeling CoCoME

Source Model Target Code

Generator

:ServiceAdapter WebService::Inventory :Store :Reporting :Enterprise

Repository

package cocome import data.TradingEnterprise repository "cocome/model/cocome.repository" realize stateless TradingSystem.Inventory.Data.Enterprise { iface EnterpriseQueryIf

  • peration queryEnterpriseById {

return query TradingEnterprise "SELECT t FROM TradingEnterprise WHERE id=" + enterpriseId } }

Behavior AspectJ

<?xml version="1.0" encoding="UTF-8" standalone="no"?> <aspectj> <weaver options=""/> <aspects> <aspect name="AbstractEntryLoggerAdvice0"/> <aspect name="AbstractEntryLoggerAdvice1"/> <concrete−aspect extends="AbstractEntryLoggerAdvice0" name="EntryLoggerAdvice0"> <pointcut expression="TradingSystem.Inventory.Data.Persistence" name="point"/> </concrete−aspect> </aspects> </aspectj>

JavaEE

package org.cocome.tradingsystem.inventory.data.enterprise; ... public final class EnterpriseQueryProvider implements IEnterpriseQuery { @Override public TradingEnterprise queryEnterpriseById(final long enterpriseId, final IPersistenceContext pctx) { final EntityManager em = __getEntityManager(pctx); return em.createQuery("SELECT te FROM TradingEnterprise te WHERE te.id" + enterpriseID, TradingEnterprise.class).getResultList(); }

JPA - Entity Beans

@Entity public class TradingEnterprise { private long id; private String name; private List<Store> stores; private List<ProductSupplier> productSuppliers; private @Transient boolean selected; public long getId() { return this.id; } public void setId(final long id) { this.id = id; }

IEnterpriseReporting IStoreManager IEnterpriseManager ICashDeskModel WebFrontend::UseCases WebService::CashDesk TradingSystem::Inventory WebService::Inventory :ServiceAdapter TradingSystem::CashDeskLine ICashDesk ICardReader IUserDisplay IPrinter IBarcodeScanner IExpressLight ICashBox IUserDisplayModel ICardReaderModel IExpressLightModel ICashBoxModel IBarcodeScannerModel IPrinterModel IStoreInventory AccountSaleEvent IReporting IStoreInventoryManager ServiceAdapter

System

use pcm on cocome "irl-examples/src/cocome.repository" advice TraceLogger () { before OperationBeforeEvent(time, signature, classname, signature) after OperationAfterEvent(time, signature, classname) } pointcut point class cocome.TradingSystem.Inventory.Data.Persistence aspect point : EntryLogger

Kieker - Monitoring

package data entity TradingEnterprise { long id string name ProductSupplier[] productSuppliers } entity ProductSupplier { long id string name Product[] offers }

Data Types

Store[] stores

Reiner Jung 4 / 33

slide-14
SLIDE 14

Introduction

Modeling CoCoME

Source Model Target Code

1

Generator

:ServiceAdapter WebService::Inventory :Store :Reporting :Enterprise

Repository

package cocome import data.TradingEnterprise repository "cocome/model/cocome.repository" realize stateless TradingSystem.Inventory.Data.Enterprise { iface EnterpriseQueryIf

  • peration queryEnterpriseById {

return query TradingEnterprise "SELECT t FROM TradingEnterprise WHERE id=" + enterpriseId } }

Behavior AspectJ

<?xml version="1.0" encoding="UTF-8" standalone="no"?> <aspectj> <weaver options=""/> <aspects> <aspect name="AbstractEntryLoggerAdvice0"/> <aspect name="AbstractEntryLoggerAdvice1"/> <concrete−aspect extends="AbstractEntryLoggerAdvice0" name="EntryLoggerAdvice0"> <pointcut expression="TradingSystem.Inventory.Data.Persistence" name="point"/> </concrete−aspect> </aspects> </aspectj>

JavaEE

package org.cocome.tradingsystem.inventory.data.enterprise; ... public final class EnterpriseQueryProvider implements IEnterpriseQuery { @Override public TradingEnterprise queryEnterpriseById(final long enterpriseId, final IPersistenceContext pctx) { final EntityManager em = __getEntityManager(pctx); return em.createQuery("SELECT te FROM TradingEnterprise te WHERE te.id" + enterpriseID, TradingEnterprise.class).getResultList(); }

JPA - Entity Beans

@Entity public class TradingEnterprise { private long id; private String name; private List<Store> stores; private List<ProductSupplier> productSuppliers; private @Transient boolean selected; public long getId() { return this.id; } public void setId(final long id) { this.id = id; }

IEnterpriseReporting IStoreManager IEnterpriseManager ICashDeskModel WebFrontend::UseCases WebService::CashDesk TradingSystem::Inventory WebService::Inventory :ServiceAdapter TradingSystem::CashDeskLine ICashDesk ICardReader IUserDisplay IPrinter IBarcodeScanner IExpressLight ICashBox IUserDisplayModel ICardReaderModel IExpressLightModel ICashBoxModel IBarcodeScannerModel IPrinterModel IStoreInventory AccountSaleEvent IReporting IStoreInventoryManager ServiceAdapter

System

use pcm on cocome "irl-examples/src/cocome.repository" advice TraceLogger () { before OperationBeforeEvent(time, signature, classname, signature) after OperationAfterEvent(time, signature, classname) } pointcut point class cocome.TradingSystem.Inventory.Data.Persistence aspect point : EntryLogger

Kieker - Monitoring

package data entity TradingEnterprise { long id string name ProductSupplier[] productSuppliers } entity ProductSupplier { long id string name Product[] offers }

Data Types

Store[] stores

Data Types Data Types

package data entity TradingEnterprise { long id string name Store[] stores ProductSupplier[] productSuppliers transient boolean selected } entity ProductSupplier { long id string name Product[] offers }

Reiner Jung 4 / 33

slide-15
SLIDE 15

Introduction

Modeling CoCoME

Source Model Target Code

2

Generator

:ServiceAdapter WebService::Inventory :Store :Reporting :Enterprise

Repository

package cocome import data.TradingEnterprise repository "cocome/model/cocome.repository" realize stateless TradingSystem.Inventory.Data.Enterprise { iface EnterpriseQueryIf

  • peration queryEnterpriseById {

return query TradingEnterprise "SELECT t FROM TradingEnterprise WHERE id=" + enterpriseId } }

Behavior AspectJ

<?xml version="1.0" encoding="UTF-8" standalone="no"?> <aspectj> <weaver options=""/> <aspects> <aspect name="AbstractEntryLoggerAdvice0"/> <aspect name="AbstractEntryLoggerAdvice1"/> <concrete−aspect extends="AbstractEntryLoggerAdvice0" name="EntryLoggerAdvice0"> <pointcut expression="TradingSystem.Inventory.Data.Persistence" name="point"/> </concrete−aspect> </aspects> </aspectj>

JavaEE

package org.cocome.tradingsystem.inventory.data.enterprise; ... public final class EnterpriseQueryProvider implements IEnterpriseQuery { @Override public TradingEnterprise queryEnterpriseById(final long enterpriseId, final IPersistenceContext pctx) { final EntityManager em = __getEntityManager(pctx); return em.createQuery("SELECT te FROM TradingEnterprise te WHERE te.id" + enterpriseID, TradingEnterprise.class).getResultList(); }

JPA - Entity Beans

@Entity public class TradingEnterprise { private long id; private String name; private List<Store> stores; private List<ProductSupplier> productSuppliers; private @Transient boolean selected; public long getId() { return this.id; } public void setId(final long id) { this.id = id; }

IEnterpriseReporting IStoreManager IEnterpriseManager ICashDeskModel WebFrontend::UseCases WebService::CashDesk TradingSystem::Inventory WebService::Inventory :ServiceAdapter TradingSystem::CashDeskLine ICashDesk ICardReader IUserDisplay IPrinter IBarcodeScanner IExpressLight ICashBox IUserDisplayModel ICardReaderModel IExpressLightModel ICashBoxModel IBarcodeScannerModel IPrinterModel IStoreInventory AccountSaleEvent IReporting IStoreInventoryManager ServiceAdapter

System

use pcm on cocome "irl-examples/src/cocome.repository" advice TraceLogger () { before OperationBeforeEvent(time, signature, classname, signature) after OperationAfterEvent(time, signature, classname) } pointcut point class cocome.TradingSystem.Inventory.Data.Persistence aspect point : EntryLogger

Kieker - Monitoring Data Types

package data entity TradingEnterprise { long id string name Store[] stores ProductSupplier[] productSuppliers transient boolean selected } entity ProductSupplier { long id string name Product[] offers }

Behavior

return from TradingEnterprise te where te.id=enterpriseId

Reiner Jung 4 / 33

slide-16
SLIDE 16

Introduction

Modeling CoCoME

Source Model Target Code

3

Generator

:ServiceAdapter WebService::Inventory :Store :Reporting :Enterprise

Repository

package cocome import data.TradingEnterprise repository "cocome/model/cocome.repository" realize stateless TradingSystem.Inventory.Data.Enterprise { iface EnterpriseQueryIf

  • peration queryEnterpriseById {

return query TradingEnterprise "SELECT t FROM TradingEnterprise WHERE id=" + enterpriseId } }

Behavior AspectJ

<?xml version="1.0" encoding="UTF-8" standalone="no"?> <aspectj> <weaver options=""/> <aspects> <aspect name="AbstractEntryLoggerAdvice0"/> <aspect name="AbstractEntryLoggerAdvice1"/> <concrete−aspect extends="AbstractEntryLoggerAdvice0" name="EntryLoggerAdvice0"> <pointcut expression="TradingSystem.Inventory.Data.Persistence" name="point"/> </concrete−aspect> </aspects> </aspectj>

JavaEE

package org.cocome.tradingsystem.inventory.data.enterprise; ... public final class EnterpriseQueryProvider implements IEnterpriseQuery { @Override public TradingEnterprise queryEnterpriseById(final long enterpriseId, final IPersistenceContext pctx) { final EntityManager em = __getEntityManager(pctx); return em.createQuery("SELECT te FROM TradingEnterprise te WHERE te.id" + enterpriseID, TradingEnterprise.class).getResultList(); }

JPA - Entity Beans

@Entity public class TradingEnterprise { private long id; private String name; private List<Store> stores; private List<ProductSupplier> productSuppliers; private @Transient boolean selected; public long getId() { return this.id; } public void setId(final long id) { this.id = id; }

IEnterpriseReporting IStoreManager IEnterpriseManager ICashDeskModel WebFrontend::UseCases WebService::CashDesk TradingSystem::Inventory WebService::Inventory :ServiceAdapter TradingSystem::CashDeskLine ICashDesk ICardReader IUserDisplay IPrinter IBarcodeScanner IExpressLight ICashBox IUserDisplayModel ICardReaderModel IExpressLightModel ICashBoxModel IBarcodeScannerModel IPrinterModel IStoreInventory AccountSaleEvent IReporting IStoreInventoryManager ServiceAdapter

System

use pcm on cocome "irl-examples/src/cocome.repository" advice TraceLogger () { before OperationBeforeEvent(time, signature, classname, signature) after OperationAfterEvent(time, signature, classname) } pointcut point class cocome.TradingSystem.Inventory.Data.Persistence aspect point : EntryLogger

Kieker - Monitoring Data Types

package data entity TradingEnterprise { long id string name Store[] stores ProductSupplier[] productSuppliers transient boolean selected } entity ProductSupplier { long id string name Product[] offers } return from TradingEnterprise te where te.id=enterpriseId

JavaEE

Reiner Jung 4 / 33

slide-17
SLIDE 17

Introduction

Challenges

Key challenges in generator development

‚ Domain and technology evolution ‚ Increasing complexity of generators ‚ Reusability of metamodels and generators

Experts Generator and DSL reuse are not applied by industry

Reiner Jung 5 / 33

slide-18
SLIDE 18

Introduction

Challenges

Key challenges in generator development

‚ Domain and technology evolution ‚ Increasing complexity of generators ‚ Reusability of metamodels and generators

Experts Generator and DSL reuse are not applied by industry

Reiner Jung 5 / 33

slide-19
SLIDE 19

Introduction

Contributions

GECO Approach

‚ Generator megamodel patterns (Jung et al. 2016) ‚ Generator fragment design

GECO Artifacts

‚ Instrumentation aspect and record languages (Jung et al. 2013) ‚ Generator composition language ‚ Software architecture evaluation (Jung et al. 2015)

Reiner Jung 6 / 33

slide-20
SLIDE 20

Foundations

Reiner Jung 7 / 33

slide-21
SLIDE 21

Foundations

Metamodel Partitions

Metamodel Structures

‚ Structure and typing Expressions Declaration Maps, e.g., Traces, Pointcuts

Type Named Type

name : String

Array Type

size : Integer

Feature

name : String

Record Type

* features base type type

(Jung et al. 2014)

Reiner Jung 8 / 33

slide-22
SLIDE 22

Foundations

Metamodel Partitions

Metamodel Structures

‚ Structure and typing ‚ Expressions Declaration Maps, e.g., Traces, Pointcuts

Expression Literal Variable Reference Simple Expression Assignment Operation

  • perator : String

* variable expression

  • perands

(Jung et al. 2014)

Reiner Jung 8 / 33

slide-23
SLIDE 23

Foundations

Metamodel Partitions

Metamodel Structures

‚ Structure and typing ‚ Expressions ‚ Declaration Maps, e.g., Traces, Pointcuts

Declaration

name : String

Variable Reference Type Variable Feature Record Type

* type feature variable

(Jung et al. 2014)

Reiner Jung 8 / 33

slide-24
SLIDE 24

Foundations

Metamodel Partitions

Metamodel Structures

‚ Structure and typing ‚ Expressions ‚ Declaration ‚ Maps, e.g., Traces, Pointcuts

Map Right Left Relation

* relationships

(Jung et al. 2014)

Reiner Jung 8 / 33

slide-25
SLIDE 25

Foundations

Metamodel Roles

System

Aspect-Oriented Modeling

(Jung et al. 2014)

Reiner Jung 9 / 33

slide-26
SLIDE 26

Foundations

Metamodel Roles

System Access Control base aspect

Aspect-Oriented Modeling

(Jung et al. 2014)

Reiner Jung 9 / 33

slide-27
SLIDE 27

Foundations

Metamodel Roles

System Access Control base aspect Monitoring base aspect

Aspect-Oriented Modeling

(Jung et al. 2014)

Reiner Jung 9 / 33

slide-28
SLIDE 28

Foundations

Metamodel Roles

System Access Control base aspect Monitoring base aspect Data

Aspect-Oriented Modeling View-Based Modeling

(Jung et al. 2014)

Reiner Jung 9 / 33

slide-29
SLIDE 29

Foundations

Metamodel Roles

System Access Control base aspect Monitoring base aspect Data dependent independent

Aspect-Oriented Modeling View-Based Modeling

(Jung et al. 2014)

Reiner Jung 9 / 33

slide-30
SLIDE 30

Foundations

Metamodel Roles

System Access Control base aspect Monitoring base aspect Data dependent independent

Aspect-Oriented Modeling View-Based Modeling

Behavior (Jung et al. 2014)

Reiner Jung 9 / 33

slide-31
SLIDE 31

Foundations

Metamodel Roles

System Access Control base aspect Monitoring base aspect Data dependent independent

Aspect-Oriented Modeling View-Based Modeling

Behavior independent dependent (Jung et al. 2014)

Reiner Jung 9 / 33

slide-32
SLIDE 32

Foundations

Megamodel Notation

Example Megamodel based on CoCoME Szenario

CoCoME Architecture (Bézivin et al. 2004; Favre 2004)

Reiner Jung 10 / 33

slide-33
SLIDE 33

Foundations

Megamodel Notation

Example Megamodel based on CoCoME Szenario

CoCoME Architecture System

conforms to

(Bézivin et al. 2004; Favre 2004)

Reiner Jung 10 / 33

slide-34
SLIDE 34

Foundations

Megamodel Notation

Example Megamodel based on CoCoME Szenario

CoCoME Architecture Repository

conforms to

CoCoME Component- Types System

conforms to

(Bézivin et al. 2004; Favre 2004)

Reiner Jung 10 / 33

slide-35
SLIDE 35

Foundations

Megamodel Notation

Example Megamodel based on CoCoME Szenario

CoCoME Architecture Repository

conforms to

CoCoME Component- Types System

conforms to

Target Model/Code Transformation (Bézivin et al. 2004; Favre 2004)

Reiner Jung 10 / 33

slide-36
SLIDE 36

The GECO Approach

Reiner Jung 11 / 33

slide-37
SLIDE 37

The GECO Approach

Generator Composition Pattern Candiates

A C D B 6 4 3 5 7 9 11 12 10 8 Model Transformation Reference 1 2 A C D B

Reiner Jung 12 / 33

slide-38
SLIDE 38

The GECO Approach

Generator Composition Pattern Candiates

A C D B 6 4 3 5 7 9 11 12 10 8 Model Transformation Reference 1 2 A C D B

Reiner Jung 12 / 33

slide-39
SLIDE 39

The GECO Approach

Generator Composition Pattern Candiates

A C D B 6 4 3 5 7 9 11 12 10 8 Model Transformation Reference 1 2 A C D B

Reiner Jung 12 / 33

slide-40
SLIDE 40

The GECO Approach

Generator Composition Pattern Candiates

A C D B 6 4 3 5 7 9 11 12 10 8 Model Transformation Reference 1 2 A C D B

Reiner Jung 12 / 33

slide-41
SLIDE 41

The GECO Approach

Generator Composition Megamodel Patterns

TBM Target Base Model SBM Source Base Model TAM Target Aspect Model SAM Source Aspect Model T Transformation Reference T

BM

P1

Simple

SBM TBM T

BM

T

AM

P2

Normal Aspect

SBM SAM TBM TAM T

BM

T

AM

P3

Inverted References

TBM TAM SAM SBM BM SAM BM' T

Merge

P4

Model Weaving

Reiner Jung 13 / 33

slide-42
SLIDE 42

The GECO Approach

Generator Composition Megamodel Patterns

TBM Target Base Model SBM Source Base Model TAM Target Aspect Model SAM Source Aspect Model T Transformation Reference T

BM

P1

Simple

SBM TBM T

BM

T

AM

P2

Normal Aspect

SBM SAM TBM TAM T

BM

T

AM

P3

Inverted References

TBM TAM SAM SBM BM SAM BM' T

Merge

P4

Model Weaving

Reiner Jung 13 / 33

slide-43
SLIDE 43

The GECO Approach

Generator Composition Megamodel Patterns

TBM Target Base Model SBM Source Base Model TAM Target Aspect Model SAM Source Aspect Model T Transformation Reference T

BM

P1

Simple

SBM TBM T

BM

T

AM

P2

Normal Aspect

SBM SAM TBM TAM T

BM

T

AM

P3

Inverted References

TBM TAM SAM SBM BM SAM BM' T

Merge

P4

Model Weaving

Reiner Jung 13 / 33

slide-44
SLIDE 44

The GECO Approach

Generator Composition Megamodel Patterns

TBM Target Base Model SBM Source Base Model TAM Target Aspect Model SAM Source Aspect Model T Transformation Reference T

BM

P1

Simple

SBM TBM T

BM

T

AM

P2

Normal Aspect

SBM SAM TBM TAM T

BM

T

AM

P3

Inverted References

TBM TAM SAM SBM BM SAM BM' T

Merge

P4

Model Weaving

Reiner Jung 13 / 33

slide-45
SLIDE 45

The GECO Approach

Generator Composition Megamodel Patterns

TBM Target Base Model SBM Source Base Model TAM Target Aspect Model SAM Source Aspect Model T Transformation Reference T

BM

P1

Simple

SBM TBM T

BM

T

AM

P2

Normal Aspect

SBM SAM TBM TAM T

BM

T

AM

P3

Inverted References

TBM TAM SAM SBM BM SAM BM' T

Merge

P4

Model Weaving

Reiner Jung 13 / 33

slide-46
SLIDE 46

The GECO Approach

Pattern P2 - Normal Aspect

TAM Target Aspect Model TBM Target Base Model TRM Trace Model SBM Source Base Model SAM Source Aspect Model

T

Transformation Reference

SBM TBM TBM SAM TAM TAM

Reiner Jung 14 / 33

slide-47
SLIDE 47

The GECO Approach

Pattern P2 - Normal Aspect

TAM Target Aspect Model TBM Target Base Model TRM Trace Model SBM Source Base Model SAM Source Aspect Model

T

Transformation Reference

SBM TBM TBM SAM TAM TAM

Reiner Jung 14 / 33

slide-48
SLIDE 48

The GECO Approach

Pattern P2 - Normal Aspect

TAM Target Aspect Model TBM Target Base Model TRM Trace Model SBM Source Base Model SAM Source Aspect Model

T

Transformation Reference

SBM TBM TBM SAM TAM TAM TRM

Reiner Jung 14 / 33

slide-49
SLIDE 49

The GECO Approach

Pattern P2 - Normal Aspect

TAM Target Aspect Model TBM Target Base Model TRM Trace Model SBM Source Base Model SAM Source Aspect Model

T

Transformation Reference

SBM TBM TBM SAM TAM TAM TRM

Reiner Jung 14 / 33

slide-50
SLIDE 50

The GECO Approach

Pattern P3 - Inverted References

TAM Target Aspect Model TBM Target Base Model TRM Trace Model SBM Source Base Model SAM Source Aspect Model

T

Transformation Reference JPM Join Point Model

SBM TBM TBM SAM TAM TAM

Reiner Jung 15 / 33

slide-51
SLIDE 51

The GECO Approach

Pattern P3 - Inverted References

TAM Target Aspect Model TBM Target Base Model TRM Trace Model SBM Source Base Model SAM Source Aspect Model

T

Transformation Reference JPM Join Point Model

SBM TBM TBM SAM TAM TAM TRM JPM

Reiner Jung 15 / 33

slide-52
SLIDE 52

The GECO Approach

Pattern P3 - Inverted References

TAM Target Aspect Model TBM Target Base Model TRM Trace Model SBM Source Base Model SAM Source Aspect Model

T

Transformation Reference JPM Join Point Model

SBM TBM TBM SAM TAM TAM TRM JPM

Reiner Jung 15 / 33

slide-53
SLIDE 53

The GECO Approach

CoCoME Case Study - Generator Megamodel

Repository System Palladio Component Model

Reiner Jung 16 / 33

slide-54
SLIDE 54

The GECO Approach

CoCoME Case Study - Generator Megamodel

Repository System Palladio Component Model DTL Behavior

data types data types

  • pera-

tions

Reiner Jung 16 / 33

slide-55
SLIDE 55

The GECO Approach

CoCoME Case Study - Generator Megamodel

Repository System Palladio Component Model DTL Behavior

data types data types

  • pera-

tions

EJB/Servlets Stubs TProtoCom

Reiner Jung 16 / 33

slide-56
SLIDE 56

The GECO Approach

CoCoME Case Study - Generator Megamodel

Repository System Palladio Component Model DTL Behavior

data types data types

  • pera-

tions

EJB/Servlets Stubs TProtoCom Java Snippets Entities TBehavior TDTL

entity classes methods

Reiner Jung 16 / 33

slide-57
SLIDE 57

The GECO Approach

CoCoME Case Study - Generator Megamodel

P2 - Normal Aspect

Repository System Palladio Component Model DTL Behavior EJB/Servlets Stubs TProtoCom Java Snippets Entities TBehavior TDTL

Reiner Jung 16 / 33

slide-58
SLIDE 58

The GECO Approach

CoCoME Case Study - Generator Megamodel

P2 - Normal Aspect

Repository System Palladio Component Model DTL Behavior EJB/Servlets Stubs TProtoCom Java Snippets Entities TBehavior TDTL

Reiner Jung 16 / 33

slide-59
SLIDE 59

The GECO Approach

CoCoME Case Study - Generator Megamodel

Repository System Palladio Component Model DTL Behavior

data types data types

  • pera-

tions

EJB/Servlets Stubs TProtoCom Java Snippets Entities TBehavior TDTL

entity classes methods

Classes EJB/Servlets TJW

entity classes

Classes Tjavac

entity classes

Tjavac

Reiner Jung 16 / 33

slide-60
SLIDE 60

The GECO Approach

CoCoME Case Study - Generator Megamodel

P4 - Weaving

Repository System Palladio Component Model DTL Behavior EJB/Servlets Stubs TProtoCom Java Snippets Entities TBehavior TDTL Classes EJB/Servlets TJW

entity classes

Classes Tjavac

entity classes

Tjavac

Reiner Jung 16 / 33

slide-61
SLIDE 61

The GECO Approach

CoCoME Case Study - Generator Megamodel

Repository System Palladio Component Model DTL Behavior

data types data types

  • pera-

tions

EJB/Servlets Stubs TProtoCom Java Snippets Entities TBehavior TDTL

entity classes methods

Classes EJB/Servlets TJW

entity classes

Classes Tjavac

entity classes

Tjavac IRL IAL

record types

  • perations

Reiner Jung 16 / 33

slide-62
SLIDE 62

The GECO Approach

CoCoME Case Study - Generator Megamodel

Repository System Palladio Component Model DTL Behavior

data types data types

  • pera-

tions

EJB/Servlets Stubs TProtoCom Java Snippets Entities TBehavior TDTL

entity classes methods

Classes EJB/Servlets TJW

entity classes

Classes Tjavac

entity classes

IRL IAL

record types

  • perations

Kieker Records Classes TIRL Tjavac Sensors Tsensor Taspect aspect.xml Tjavac,ajc

methods record types

Reiner Jung 16 / 33

slide-63
SLIDE 63

The GECO Approach

CoCoME Case Study - Generator Megamodel

P2 - Normal Aspect

Repository System Palladio Component Model DTL Behavior EJB/Servlets Stubs TProtoCom Java Snippets Entities TBehavior TDTL Classes EJB/Servlets TJW

entity classes

Classes Tjavac

entity classes

IRL IAL Kieker Records Classes TIRL Tjavac Sensors Tsensor Taspect aspect.xml Tjavac,ajc

Reiner Jung 16 / 33

slide-64
SLIDE 64

The GECO Approach

CoCoME Case Study - Generator Megamodel

P2 - Normal Aspect

Repository System Palladio Component Model DTL Behavior EJB/Servlets Stubs TProtoCom Java Snippets Entities TBehavior TDTL Classes EJB/Servlets TJW

entity classes

Classes Tjavac

entity classes

IRL IAL Kieker Records Classes TIRL Tjavac Sensors Tsensor Taspect aspect.xml Tjavac,ajc

Reiner Jung 16 / 33

slide-65
SLIDE 65

The GECO Approach

CoCoME Case Study - Generator Megamodel

Repository System Palladio Component Model DTL Behavior

data types data types

  • pera-

tions

EJB/Servlets Stubs TProtoCom Java Snippets Entities TBehavior TDTL

entity classes methods

Classes EJB/Servlets TJW

entity classes

Classes Tjavac

entity classes

IRL IAL

record types

  • perations

Kieker Records Classes TIRL Tjavac Sensors Tsensor Taspect aspect.xml Tjavac,ajc

methods record types

Tweb Classes

record types methods

web.xml Tjavac

Reiner Jung 16 / 33

slide-66
SLIDE 66

The GECO Approach

CoCoME Case Study - Generator Megamodel

7 2 P2 - Normal Aspect P4 - Weaving

Repository System Palladio Component Model DTL Behavior

data types data types

  • pera-

tions

EJB/Servlets Stubs TProtoCom Java Snippets Entities TBehavior TDTL

entity classes methods

Classes EJB/Servlets TJW

entity classes

Classes Tjavac

entity classes

IRL IAL

record types

  • perations

Kieker Records Classes TIRL Tjavac Sensors Tsensor Taspect aspect.xml Tjavac,ajc

methods record types

Tweb Classes

record types methods

web.xml Tjavac

Reiner Jung 16 / 33

slide-67
SLIDE 67

The GECO Approach

Internal Structure of Generator Fragments

Technical Dimension Semantic Dimension

Source Model Target Model Fragment

(Mens et al. 2006; Biehl 2010)

Reiner Jung 17 / 33

slide-68
SLIDE 68

The GECO Approach

Internal Structure of Generator Fragments

Technical Dimension Semantic Dimension

Source Model Target Model Fragment Fragment

Model Query Aggregation State Output Creation Control

(Mens et al. 2006; Biehl 2010)

Reiner Jung 17 / 33

slide-69
SLIDE 69

The GECO Approach

Internal Structure of Generator Fragments

Technical Dimension Semantic Dimension

Source Model Target Model Fragment Fragment Source Metamodel Target Metamodel

Model Query Aggregation State Output Creation Control

(Mens et al. 2006; Biehl 2010)

Reiner Jung 17 / 33

slide-70
SLIDE 70

The GECO Approach

Internal Structure of Generator Fragments

Technical Dimension Semantic Dimension

Source Model Target Model Fragment Fragment Source Metamodel Target Metamodel

Model Query Aggregation State Output Creation Control

(Mens et al. 2006; Biehl 2010)

Reiner Jung 17 / 33

slide-71
SLIDE 71

The GECO Approach

Internal Structure of Generator Fragments

Technical Dimension Semantic Dimension

Source Model Target Model Fragment Source Model Target Model Fragment Fragment Source Metamodel Target Metamodel

Model Query Aggregation State Output Creation Control Expressions Structure Evaluation Initialization Typing Control

(Mens et al. 2006; Biehl 2010)

Reiner Jung 17 / 33

slide-72
SLIDE 72

The GECO Approach

Internal Structure of Generator Fragments

Technical Dimension Semantic Dimension

Source Model Target Model Fragment Source Model Target Model Fragment Fragment Source Metamodel Target Metamodel

Model Query Aggregation State Output Creation Control Expressions Structure Evaluation Initialization Typing Control

(Mens et al. 2006; Biehl 2010)

Reiner Jung 17 / 33

slide-73
SLIDE 73

Evaluation

Reiner Jung 18 / 33

slide-74
SLIDE 74

Evaluation

Evaluation Design

Qualitative Evaluation with two case studies (based on GQM)

Evaluate the effect of GECO on Goal G1 the utility and program quality Goal G2 the evolvability Goal G3 the reusability

Reiner Jung 19 / 33

slide-75
SLIDE 75

Evaluation

Questions

Utility and program quality

(IS091; ISO11) ‚ effort spent on the development of features ‚ modularity of different generator implementations ‚ understandability of the implementations

Evolvability

(Rowe et al. 1998; Koziolek 2011) ‚ Change in modularity during the evolution ‚ Change in understandability during the evolution ‚ Effects on the changeability during evolution ‚ Change in stability during evolution

Reusability

(IS091; ISO11) ‚ modifiability of the generator implementations ‚ modularity of the generator implementations ‚ generality of the generator implementations

Reiner Jung 20 / 33

slide-76
SLIDE 76

Evaluation

Questions

Utility and program quality

(IS091; ISO11) effort spent on the development of features ‚ modularity of different generator implementations understandability of the implementations

Evolvability

(Rowe et al. 1998; Koziolek 2011) ‚ Change in modularity during the evolution Change in understandability during the evolution Effects on the changeability during evolution Change in stability during evolution

Reusability

(IS091; ISO11) modifiability of the generator implementations ‚ modularity of the generator implementations generality of the generator implementations

Reiner Jung 20 / 33

slide-77
SLIDE 77

Evaluation

Metrics

Modularity

(Allen 2002; Allen et al. 2007) ‚ Low complexity of the system ‚ Low coupling of modules of a system ‚ High inner module cohesion of a system

Reiner Jung 21 / 33

slide-78
SLIDE 78

Evaluation

CoCoME Case Study

Common Component Modeling Example

(Heinrich et al. 2015) ‚ Domain: Information system ‚ Source: PCM, data type, behavior and monitoring DSLs ‚ Target: Java EE and AspectJ ‚ Evaluation: Combination of existing and new generators ‚ ProtoCom

(Giacinto et al. 2013)

‚ Data types, behavior and monitoring

(Jung et al. 2013)

‚ Evolution steps (FBehavior): 4 ③ Test GECO’s feasibility for generator construction

Reiner Jung 22 / 33

slide-79
SLIDE 79

Evaluation

CoCoME Case Study – Behavior Evolution

Behavior Generator

  • 1. Basic functionality
  • 2. Stateless/-full components
  • 3. Java EE lifecycle functions
  • 4. Persistence support

Name Resolver Control Statement T ype Expression Structure

  • 650

700 750 800 LOC [count] 125 135 145 155 Edges [count] Revisions 1 2 3 4

  • LOC

Edges

Reiner Jung 23 / 33

slide-80
SLIDE 80

Evaluation

CoCoME Case Study – Behavior Evolution

Behavior Generator

  • 1. Basic functionality
  • 2. Stateless/-full components
  • 3. Java EE lifecycle functions
  • 4. Persistence support

Name Resolver Control Statement T ype Expression Structure

  • 500

700 900 Complexity/Coupling [bits] 0.040 0.042 0.044 Cohesion [ratio] Revisions 1 2 3 4

  • Complexity

Coupling Cohesion

  • 650

700 750 800 LOC [count] 125 135 145 155 Edges [count] Revisions 1 2 3 4

  • LOC

Edges

Reiner Jung 23 / 33

slide-81
SLIDE 81

Evaluation

CoCoME Case Study – Behavior Evolution

Behavior Generator

  • 1. Basic functionality
  • 2. Stateless/-full components
  • 3. Java EE lifecycle functions
  • 4. Persistence support

Name Resolver Control Statement T ype Expression Structure

  • 500

700 900 Complexity/Coupling [bits] 0.040 0.042 0.044 Cohesion [ratio] Revisions 1 2 3 4

  • Complexity

Coupling Cohesion

  • 650

700 750 800 LOC [count] 125 135 145 155 Edges [count] Revisions 1 2 3 4

  • LOC

Edges

Reiner Jung 23 / 33

slide-82
SLIDE 82

Evaluation

CoCoME Case Study – Behavior Evolution

Behavior Generator

  • 1. Basic functionality
  • 2. Stateless/-full components
  • 3. Java EE lifecycle functions
  • 4. Persistence support

Name Resolver Control Statement T ype Expression Structure

  • 500

700 900 Complexity/Coupling [bits] 0.040 0.042 0.044 Cohesion [ratio] Revisions 1 2 3 4

  • Complexity

Coupling Cohesion

  • 650

700 750 800 LOC [count] 125 135 145 155 Edges [count] Revisions 1 2 3 4

  • LOC

Edges

Reiner Jung 23 / 33

slide-83
SLIDE 83

Evaluation

CoCoME Case Study – Behavior Evolution

Behavior Generator

  • 1. Basic functionality
  • 2. Stateless/-full components
  • 3. Java EE lifecycle functions
  • 4. Persistence support

Name Resolver Control Statement T ype Expression Structure

  • 500

700 900 Complexity/Coupling [bits] 0.040 0.042 0.044 Cohesion [ratio] Revisions 1 2 3 4

  • Complexity

Coupling Cohesion

  • 650

700 750 800 LOC [count] 125 135 145 155 Edges [count] Revisions 1 2 3 4

  • LOC

Edges

Reiner Jung 23 / 33

slide-84
SLIDE 84

Evaluation

MENGES Case Study

New Generator for MENGES

(Goerigk et al. 2012) ‚ Domain: Embedded system for railway control centers ‚ Source: Nine DSLs covering different aspects and views ‚ Target: Single output model in PLCOpenXML for IEC61131-3 (IEC03) ‚ Evaluation: Comparison of generator implementations ‚ Original MENGES generator ‚ GECO-based generator ‚ Evolution steps: 14 ③ Test evolution effects of using GECO

Reiner Jung 24 / 33

slide-85
SLIDE 85

Evaluation

MENGES Case Study – Generator Comparison

  • 1

2 3 4 5 6 7 8 9 10 12 14

Revisions

2000 4000 6000 8000 10000

LOC [count]

  • MENGES

GECO

  • 1

2 3 4 5 6 7 8 9 10 11 12 13 14

Revisions

5000 10000 15000

Complexity [bits]

5000 10000 15000

Coupling [bits]

  • MENGES

Complexity Coupling GECO Complexity Coupling

MENGES GECO Ratio Lines of code 10816 7025 1.5396 Complexity 13921.88 6675.88 2.0854 Coupling 10983.81 5060.83 2.1704

Reiner Jung 25 / 33

slide-86
SLIDE 86

Evaluation

MENGES Case Study – Generator Comparison

Structure and Typing

  • 1

2 3 4 5 6 7 8 9 10 12 14

Revisions

2000 4000 6000 8000 10000

LOC [count]

  • MENGES

GECO

  • 1

2 3 4 5 6 7 8 9 10 11 12 13 14

Revisions

5000 10000 15000

Complexity [bits]

5000 10000 15000

Coupling [bits]

  • MENGES

Complexity Coupling GECO Complexity Coupling

MENGES GECO Ratio Lines of code 10816 7025 1.5396 Complexity 13921.88 6675.88 2.0854 Coupling 10983.81 5060.83 2.1704

Reiner Jung 25 / 33

slide-87
SLIDE 87

Evaluation

MENGES Case Study – Generator Comparison

Expressions and Statements

  • 1

2 3 4 5 6 7 8 9 10 12 14

Revisions

2000 4000 6000 8000 10000

LOC [count]

  • MENGES

GECO

  • 1

2 3 4 5 6 7 8 9 10 11 12 13 14

Revisions

5000 10000 15000

Complexity [bits]

5000 10000 15000

Coupling [bits]

  • MENGES

Complexity Coupling GECO Complexity Coupling

MENGES GECO Ratio Lines of code 10816 7025 1.5396 Complexity 13921.88 6675.88 2.0854 Coupling 10983.81 5060.83 2.1704

Reiner Jung 25 / 33

slide-88
SLIDE 88

Evaluation

MENGES Case Study – Generator Comparison

Refactoring and Communications

  • 1

2 3 4 5 6 7 8 9 10 12 14

Revisions

2000 4000 6000 8000 10000

LOC [count]

  • MENGES

GECO

  • 1

2 3 4 5 6 7 8 9 10 11 12 13 14

Revisions

5000 10000 15000

Complexity [bits]

5000 10000 15000

Coupling [bits]

  • MENGES

Complexity Coupling GECO Complexity Coupling

MENGES GECO Ratio Lines of code 10816 7025 1.5396 Complexity 13921.88 6675.88 2.0854 Coupling 10983.81 5060.83 2.1704

Reiner Jung 25 / 33

slide-89
SLIDE 89

Evaluation

MENGES Case Study – Generator Comparison

Improvment of Polymorphism

  • 1

2 3 4 5 6 7 8 9 10 12 14

Revisions

2000 4000 6000 8000 10000

LOC [count]

  • MENGES

GECO

  • 1

2 3 4 5 6 7 8 9 10 11 12 13 14

Revisions

5000 10000 15000

Complexity [bits]

5000 10000 15000

Coupling [bits]

  • MENGES

Complexity Coupling GECO Complexity Coupling

MENGES GECO Ratio Lines of code 10816 7025 1.5396 Complexity 13921.88 6675.88 2.0854 Coupling 10983.81 5060.83 2.1704

Reiner Jung 25 / 33

slide-90
SLIDE 90

Evaluation

MENGES Case Study – Generator Comparison

Timers and Template Improvements

  • 1

2 3 4 5 6 7 8 9 10 12 14

Revisions

2000 4000 6000 8000 10000

LOC [count]

  • MENGES

GECO

  • 1

2 3 4 5 6 7 8 9 10 11 12 13 14

Revisions

5000 10000 15000

Complexity [bits]

5000 10000 15000

Coupling [bits]

  • MENGES

Complexity Coupling GECO Complexity Coupling

MENGES GECO Ratio Lines of code 10816 7025 1.5396 Complexity 13921.88 6675.88 2.0854 Coupling 10983.81 5060.83 2.1704

Reiner Jung 25 / 33

slide-91
SLIDE 91

Evaluation

MENGES Case Study – Generator Comparison

Maintenance

  • 1

2 3 4 5 6 7 8 9 10 12 14

Revisions

2000 4000 6000 8000 10000

LOC [count]

  • MENGES

GECO

  • 1

2 3 4 5 6 7 8 9 10 11 12 13 14

Revisions

5000 10000 15000

Complexity [bits]

5000 10000 15000

Coupling [bits]

  • MENGES

Complexity Coupling GECO Complexity Coupling

MENGES GECO Ratio Lines of code 10816 7025 1.5396 Complexity 13921.88 6675.88 2.0854 Coupling 10983.81 5060.83 2.1704

Reiner Jung 25 / 33

slide-92
SLIDE 92

Evaluation

MENGES Case Study – Generator Comparison

Maintenance

  • 1

2 3 4 5 6 7 8 9 10 12 14

Revisions

2000 4000 6000 8000 10000

LOC [count]

  • MENGES

GECO

  • 1

2 3 4 5 6 7 8 9 10 11 12 13 14

Revisions

5000 10000 15000

Complexity [bits]

5000 10000 15000

Coupling [bits]

  • MENGES

Complexity Coupling GECO Complexity Coupling

MENGES GECO Ratio Lines of code 10816 7025 1.5396 Complexity 13921.88 6675.88 2.0854 Coupling 10983.81 5060.83 2.1704

Reiner Jung 25 / 33

slide-93
SLIDE 93

Related Work

Reiner Jung 26 / 33

slide-94
SLIDE 94

Related Work

Modeling and Code Generation

Aspect-oriented and view-based modeling

‚ Reusable aspect models (RAM) (Klein et al. 2007) ‚ Orthographic software modeling (OSM) (Atkinson et al. 2010)

Aspect-oriented code generation

(Mehmood et al. 2013) ‚ Theme/UML (Clarke et al. 2005) ‚ FDAF (Bennett et al. 2010) ‚ RAM-based (Kienzle et al. 2009; Kramer et al. 2011)

Reiner Jung 27 / 33

slide-95
SLIDE 95

Related Work

Transformation Modularization

Reuse and product lines

‚ Template-based transformations (Kapova et al. 2010) ‚ Genesys approach (Jörges 2013)

Modularization

‚ Genericity for model management operations (Wimmer et al. 2011) ‚ Factorization and composition (Sánchez Cuadrado et al. 2008)

  • f transformation

‚ Chaining of transformations (Vanhooff et al. 2006) ‚ Localized transformations (Etien et al. 2015)

Reiner Jung 28 / 33

slide-96
SLIDE 96

Related Work

Transformation Modularization

Reuse and product lines

‚ Template-based transformations (Kapova et al. 2010) ‚ Genesys approach (Jörges 2013)

Modularization

‚ Genericity for model management operations (Wimmer et al. 2011) ‚ Factorization and composition (Sánchez Cuadrado et al. 2008)

  • f transformation

‚ Chaining of transformations (Vanhooff et al. 2006) ‚ Localized transformations (Etien et al. 2015)

Reiner Jung 28 / 33

slide-97
SLIDE 97

Conclusion

Reiner Jung 29 / 33

slide-98
SLIDE 98

Conclusion

Contributions

Approach

‚ Generator composition megamodel patterns ‚ Internal modularization of generator fragments

Replication Package

‚ Sources and datasets

http://dx.doi.org/10.5281/zenodo.46552

‚ Software snapshots

http://dx.doi.org/10.5281/zenodo.47129

‚ MENGES sources can be accessed via b+m informatik AG

Reiner Jung 30 / 33

slide-99
SLIDE 99

Conclusion

Contributions

https://github.com/rju/geco-composition-language.git

Generator framework and composition tooling

https://github.com/rju/architecture-evaluation-tool.git

Architecture analysis tool

https://github.com/research-iobserve/

Generators used in CoCoME case study

Reiner Jung 31 / 33

slide-100
SLIDE 100

Conclusion

Future Work

Evaluation

‚ GECO used for modernization, e.g., ProtoCom ‚ Evaluating technology impact on megamodel patterns

Tool Development

‚ Integration of GECO generators in build systems ‚ Instrumentation aspect and record language ‚ IAL integration in Kieker ‚ IRL evolution, e.g., trace support

Reiner Jung 32 / 33

slide-101
SLIDE 101

Conclusion

Summary

GECO Approach http://www.oiloftrop.de/geco-approach/

‚ Generator composition megamodel patterns ‚ Internal modularization of generator fragments

Replication Package

‚ Sources and datasets

http://dx.doi.org/10.5281/zenodo.46552

‚ Software snapshots

http://dx.doi.org/10.5281/zenodo.47129

‚ MENGES sources can be accessed via b+m informatik AG

Resources https://github.com/

‚ Framework and tool rju/geco-composition-language.git ‚ Architecture analysis rju/architecture-evaluation-tool.git ‚ CoCoME DSLs research-iobserve ‚ Monitoring DSLs kieker-monitoring/instrumentation-languages

Reiner Jung 33 / 33

slide-102
SLIDE 102

References

Reiner Jung 34 / 33

slide-103
SLIDE 103

References

Bibliography I

Aizenbud-Reshef, Neta et al. (2005). “Operational Semantics for Traceability.” In: ECMDA Traceability Workshop. Nuremberg, Germany, 7–14. Allen, Edward B. (2002). “Measuring graph abstractions of software: an information-theory approach.” In: Software Metrics, 2002. Proceedings. Eighth IEEE Symposium on, pp. 182–193. DOI: 10.1109/METRIC.2002.1011337. Allen, Edward B. et al. (2007). “Measuring size, complexity, and coupling of hypergraph abstractions of software: An information-theory approach.”

  • English. In: Software Quality Journal 15.2, pp. 179–212. DOI:

10.1007/s11219-006-9010-3. Antoniol, Giuliano et al. (2002). “Recovering Traceability Links Between Code and Documentation.” In: IEEE Transactions on Software Engineering 28.10, pp. 970–983. DOI: 10.1109/TSE.2002.1041053.

Reiner Jung 35 / 33

slide-104
SLIDE 104

References

Bibliography II

Atkinson, Colin et al. (2010). “Orthographic Software Modeling: A Practical Approach to View-Based Development.” In: Evaluation of Novel Approaches to Software Engineering. Ed. by Leszek A. Maciaszek et al.

  • Vol. 69. Communications in Computer and Information Science. Springer,
  • pp. 206–219. DOI: 10.1007/978-3-642-14819-4_15.

Bennett, Jeannette et al. (2010). “Aspect-oriented model-driven skeleton code generation: A graph-based transformation approach.” In: Science of Computer Programming 75.8. Designing high quality system/software architectures, pp. 689–725. DOI: 10.1016/j.scico.2009.05.005. Bézivin, Jean et al. (2004). “On the Need for Megamodels.” In: Proceedings

  • f the OOPSLA/GPCE: Best Practices for Model-Driven Software

Development workshop, 19th Annual ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications,(2004). Vancouver,

  • Canada. URL: https://hal.archives-ouvertes.fr/hal-01222947.

Biehl, Matthias (2010). Literature Study on Model Transformations. Technical Report ISRN/KTH/MMK/R-10/07-SE. Stockholm, Sweden: Royal Institute of Technology.

Reiner Jung 36 / 33

slide-105
SLIDE 105

References

Bibliography III

Clarke, Siobhàn et al. (2005). Aspect-Oriented Analysis and Design. Addison-Wesley Professional. ISBN: 0321246748. Etien, Anne et al. (2015). “Localized model transformations for building large-scale transformations.” English. In: Software & Systems Modeling 14.3, pp. 1189–1213. DOI: 10.1007/s10270-013-0379-8. Favre, Jean-Marie (2004). “Foundations of Model (Driven) (Reverse) Engineering – Episode I: Story of The Fidus Papyrus and the Solarus.” In: Post-Proceedings of Dagstuhl seminar on model driven reverse engineering. Galvão, I. et al. (2007). “Survey of Traceability Approaches in Model-Driven Engineering.” In: Enterprise Distributed Object Computing Conference,

  • 2007. EDOC 2007. 11th IEEE International, pp. 313–313. DOI:

10.1109/EDOC.2007.42. Giacinto, Daria et al. (2013). “Towards Integrating Java EE into ProtoCom.” In: KPDAYS, pp. 69–78.

Reiner Jung 37 / 33

slide-106
SLIDE 106

References

Bibliography IV

Goerigk, Wolfgang et al. (2012). “Entwurf einer domänenspezifischen Sprache für elektronische Stellwerke.” In: Software Engineering. Ed. by Stefan Jähnichen et al. Vol. 198. LNI. GI, pp. 119–130. ISBN: 978-3-88579-292-5. Grammel, Birgit et al. (2010). “A generic traceability framework for facet-based traceability data extraction in model-driven software development.” In: Proceedings of the 6th ECMFA Traceability Workshop. ECMFA-TW ’10. Paris, France: ACM, pp. 7–14. DOI: 10.1145/1814392.1814394. Heinrich, Robert et al. (2015). “A Platform for Empirical Research on Information System Evolution.” In: The 27th International Conference on Software Engineering and Knowledge Engineering, SEKE 2015, Wyndham Pittsburgh University Center, Pittsburgh, PA, USA, July 6-8, 2015. KSI Research Inc. and Knowledge Systems Institute Graduate School,

  • pp. 415–420. DOI: 10.18293/SEKE2015-66.

IEC03 (2003). IEC EN 61131-3. Standard.

Reiner Jung 38 / 33

slide-107
SLIDE 107

References

Bibliography V

IS091 (1991). International Standard ISO/IEC 9126. Information technology: Software product evaluation: Quality characteristics and guidelines for their use. Standard. International Standards Organisation. ISO11 (2011). ISO/IEC 25010 - Systems and software engineering - Systems and software Quality Requirements and Evaluation (SQuaRE) - System and software quality models. Standard. International Standards Organisation. Jörges, Sven (2013). Construction and Evolution of Code Generators - A Model-Driven and Service-Oriented Approach. Vol. 7747. Lecture Notes in Computer Science. Springer, pp. 3–221. ISBN: 978-3-642-36126-5. Jouault, Frédéric (2005). “Loosely Coupled Traceability for ATL.” In: In Proceedings of the European Conference on Model Driven Architecture (ECMDA) workshop on traceability, pp. 29–37. Jung, Reiner et al. (2013). “Model-driven Instrumentation with Kieker and Palladio to Forecast Dynamic Applications.” In: KPDAYS, pp. 99–108.

Reiner Jung 39 / 33

slide-108
SLIDE 108

References

Bibliography VI

Jung, Reiner et al. (2014). “A Method for Aspect-oriented Meta-Model Evolution.” In: Proceedings of the 2Nd Workshop on View-Based, Aspect-Oriented and Orthographic Software Modelling. VAO ’14. York, UK: ACM, 19:19–19:22. DOI: 10.1145/2631675.2631681. Jung, Reiner et al. (2015). A Tool for Entropy-based Analysis of Design-time and Runtime Models. – (2016). “GECO: A Generator Composition Approach for Aspect-Oriented DSLs.” In: 9th International Conference on Model Transformation. (in prep). Kapova, Lucia et al. (2010). “Domain-specific templates for refinement transformations.” In: MDI ’10: First International Workshop on Model-Drive Interoperability. Oslo, Norway: ACM, pp. 69–78. ISBN: 978-1-4503-0292-0. DOI: 10.1145/1866272.1866282. Kienzle, Jörg et al. (2009). “Aspect-oriented multi-view modeling.” In:

  • AOSD. Ed. by Kevin J. Sullivan et al., pp. 87–98. ISBN: 978-1-60558-442-3.

Klein, Jacques et al. (2007). “Reusable Aspect Models.” In: 11th Workshop

  • n Aspect-Oriented Modeling, AOM at Models’07,

Reiner Jung 40 / 33

slide-109
SLIDE 109

References

Bibliography VII

Koziolek, Heiko (2011). “Sustainability Evaluation of Software Architectures: A Systematic Review.” In: Proceedings of the Joint ACM SIGSOFT Conference – QoSA and ACM SIGSOFT Symposium – ISARCS on Quality of Software Architectures – QoSA and Architecting Critical Systems – ISARCS. QoSA-ISARCS ’11. Boulder, Colorado, USA: ACM, pp. 3–12. DOI: 10.1145/2000259.2000263. Kramer, Max E. et al. (2011). “Mapping aspect-oriented models to aspect-oriented code.” In: Proceedings of the 2010 international conference on Models in software engineering. MODELS’10. Oslo, Norway: Springer, pp. 125–139. DOI: 10.1007/978-3-642-21210-9_12. Laitinen, Kari (1996). “Estimating Understandability of Software Documents.” In: SIGSOFT Software Engineering Notes 21.4, pp. 81–92. ISSN: 0163-5948. DOI: 10.1145/232069.232092.

Reiner Jung 41 / 33

slide-110
SLIDE 110

References

Bibliography VIII

Mehmood, Abid et al. (2013). “Aspect-oriented model-driven code generation: A systematic mapping study.” In: Information and Software Technology 55.2. Special Section: Component-Based Software Engineering (CBSE), 2011, pp. 395–411. ISSN: 0950-5849. DOI: 10.1016/j.infsof.2012.09.003. Mens, Tom et al. (2006). “A Taxonomy of Model Transformation.” In: Proc.

  • f the Int’l WS on Graph and Model Transformation. Vol. 152. Elsevier,
  • pp. 125–142.

Rausch, Andreas et al., eds. (2011). The Common Component Modelling Example (CoCoME). Vol. 5153. Lecture Notes in Computer Science. Springer. Rowe, David et al. (1998). “Defining Systems Evolvability - A Taxonomy of Change.” In: International Conference and Workshop: Engineering of Computer-Based Systems. Maale Hachamisha, Israel: IEEE Computer Society, pp. 45+.

Reiner Jung 42 / 33

slide-111
SLIDE 111

References

Bibliography IX

Saada, H. et al. (2013). “Recovering model transformation traces using multi-objective optimization.” In: Automated Software Engineering (ASE), 2013 IEEE/ACM 28th International Conference on, pp. 688–693. DOI: 10.1109/ASE.2013.6693134. Sánchez Cuadrado, Jesús et al. (2008). “Approaches for Model Transformation Reuse: Factorization and Composition.” In: Proceedings of the 1st International Conference on Theory and Practice of Model

  • Transformations. ICMT ’08. Zurich, Switzerland: Springer, pp. 168–182.

ISBN: 978-3-540-69926-2. DOI: 10.1007/978-3-540-69927-9_12. Vanhooff, Bert et al. (2006). “Towards a Transformation Chain Modeling Language.” English. In: Embedded Computer Systems: Architectures, Modeling, and Simulation. Ed. by Stamatis Vassiliadis et al. Vol. 4017. Lecture Notes in Computer Science. Springer, pp. 39–48. DOI: 10.1007/11796435_6. Wimmer, Manuel et al. (2011). “Reusing Model Transformations across Heterogeneous Metamodels.” In: ECEASST 50.

Reiner Jung 43 / 33

slide-112
SLIDE 112

Foundations

Reiner Jung 44 / 33

slide-113
SLIDE 113

Foundations

Metamodel Partitioning

Identifying Metamodel Partitions

  • 1. Find all root classes R

NT R nt NT eT ET et nT sT eT nT tT eT nT tT

  • 2. Form parts for all ri

R: Pi containsTG ri ri

  • 3. Detect overlapping parts Ok with n

R O Pi Pj i j n i j Pi Pj

  • 4. Remove the overlapping parts Ok, with m

O i n Pi Pi

m j

Ok

  • 5. Remove identified partitions Pi from graph
  • 6. Reiterate process with remaining graph

Reiner Jung 45 / 33

slide-114
SLIDE 114

Foundations

Metamodel Partitioning

Identifying Metamodel Partitions

  • 1. Find all root classes R Ď NT

R = t@nt P NT|@eT P ET, ((et, nT) P sT ^ (eT, nT) P tT) _ (eT, nT) R tTu

  • 2. Form parts for all ri

R: Pi containsTG ri ri

  • 3. Detect overlapping parts Ok with n

R O Pi Pj i j n i j Pi Pj

  • 4. Remove the overlapping parts Ok, with m

O i n Pi Pi

m j

Ok

  • 5. Remove identified partitions Pi from graph
  • 6. Reiterate process with remaining graph

Reiner Jung 45 / 33

slide-115
SLIDE 115

Foundations

Metamodel Partitioning

Identifying Metamodel Partitions

  • 1. Find all root classes R Ď NT

R = t@nt P NT|@eT P ET, ((et, nT) P sT ^ (eT, nT) P tT) _ (eT, nT) R tTu

  • 2. Form parts for all ri P R: Pi = containsTG(ri) Y triu
  • 3. Detect overlapping parts Ok with n

R O Pi Pj i j n i j Pi Pj

  • 4. Remove the overlapping parts Ok, with m

O i n Pi Pi

m j

Ok

  • 5. Remove identified partitions Pi from graph
  • 6. Reiterate process with remaining graph

Reiner Jung 45 / 33

slide-116
SLIDE 116

Foundations

Metamodel Partitioning

Identifying Metamodel Partitions

  • 1. Find all root classes R Ď NT

R = t@nt P NT|@eT P ET, ((et, nT) P sT ^ (eT, nT) P tT) _ (eT, nT) R tTu

  • 2. Form parts for all ri P R: Pi = containsTG(ri) Y triu
  • 3. Detect overlapping parts Ok with n = |R|

O = tPi X Pj|@i, j P [1 . . . n] ^ i ‰ j ^ Pi X Pj ‰ Hu

  • 4. Remove the overlapping parts Ok, with m

O i n Pi Pi

m j

Ok

  • 5. Remove identified partitions Pi from graph
  • 6. Reiterate process with remaining graph

Reiner Jung 45 / 33

slide-117
SLIDE 117

Foundations

Metamodel Partitioning

Identifying Metamodel Partitions

  • 1. Find all root classes R Ď NT

R = t@nt P NT|@eT P ET, ((et, nT) P sT ^ (eT, nT) P tT) _ (eT, nT) R tTu

  • 2. Form parts for all ri P R: Pi = containsTG(ri) Y triu
  • 3. Detect overlapping parts Ok with n = |R|

O = tPi X Pj|@i, j P [1 . . . n] ^ i ‰ j ^ Pi X Pj ‰ Hu

  • 4. Remove the overlapping parts Ok, with m = |O|

@i P [1 . . . n] P

1

i = Pi X ( m

ď

j=0

Ok)

  • 5. Remove identified partitions Pi from graph
  • 6. Reiterate process with remaining graph

Reiner Jung 45 / 33

slide-118
SLIDE 118

Foundations

Metamodel Partitioning

Identifying Metamodel Partitions

  • 1. Find all root classes R Ď NT

R = t@nt P NT|@eT P ET, ((et, nT) P sT ^ (eT, nT) P tT) _ (eT, nT) R tTu

  • 2. Form parts for all ri P R: Pi = containsTG(ri) Y triu
  • 3. Detect overlapping parts Ok with n = |R|

O = tPi X Pj|@i, j P [1 . . . n] ^ i ‰ j ^ Pi X Pj ‰ Hu

  • 4. Remove the overlapping parts Ok, with m = |O|

@i P [1 . . . n] P

1

i = Pi X ( m

ď

j=0

Ok)

  • 5. Remove identified partitions P

1

i from graph

  • 6. Reiterate process with remaining graph

Reiner Jung 45 / 33

slide-119
SLIDE 119

Foundations

Metamodel Partitioning

Identifying Metamodel Partitions

  • 1. Find all root classes R Ď NT

R = t@nt P NT|@eT P ET, ((et, nT) P sT ^ (eT, nT) P tT) _ (eT, nT) R tTu

  • 2. Form parts for all ri P R: Pi = containsTG(ri) Y triu
  • 3. Detect overlapping parts Ok with n = |R|

O = tPi X Pj|@i, j P [1 . . . n] ^ i ‰ j ^ Pi X Pj ‰ Hu

  • 4. Remove the overlapping parts Ok, with m = |O|

@i P [1 . . . n] P

1

i = Pi X ( m

ď

j=0

Ok)

  • 5. Remove identified partitions P

1

i from graph

  • 6. Reiterate process with remaining graph

Reiner Jung 45 / 33

slide-120
SLIDE 120

Foundations

Model Traceability

Model Traces

Model traces are a set of source and target nodes with a relation between them. (Aizenbud-Reshef et al. 2005)

Approaches (Galvão et al. 2007)

‚ Constructive ‚ TraceAddr adds trace model support to ATL (Jouault 2005) ‚ Reconstructive ‚ Heuristic (Grammel et al. 2010; Saada et al. 2013) ‚ Probabilistic (Antoniol et al. 2002) ‚ Property matching

Reiner Jung 46 / 33

slide-121
SLIDE 121

Approach

Reiner Jung 47 / 33

slide-122
SLIDE 122

Approach

Join-Point Computation

Shopping Cart Monitoring Aspect

Source Models Reiner Jung 48 / 33

slide-123
SLIDE 123

Approach

Join-Point Computation

Shopping Cart Monitoring Aspect

Target Models AspectJ Pointcuts Java Servlet call(void init (...)) || call(void service(...)) class Cart extends HTTPServlet { public void init (...) { ... } public void service (...) { ... } ... } Source Models Reiner Jung 48 / 33

slide-124
SLIDE 124

Approach

Join-Point Computation

Shopping Cart Monitoring Aspect

Target Models AspectJ Pointcuts Java Servlet call(void init (...)) || call(void service(...)) class Cart extends HTTPServlet { public void init (...) { ... } public void service (...) { ... } ... } Source Models Reiner Jung 48 / 33

slide-125
SLIDE 125

Approach

Join-Point Computation

Shopping Cart Monitoring Aspect

Target Models AspectJ Pointcuts Java Servlet class Cart method init

return type void parameter

. . . . . method service

return type void parameter

. . . . . Source Models Reiner Jung 48 / 33

slide-126
SLIDE 126

Approach

Join-Point Computation

Shopping Cart Monitoring Aspect

Target Models AspectJ Pointcuts Java Servlet class Cart method init

return type void parameter

. . . . . method service

return type void parameter

. . . . .

Trace Model

Source Models Reiner Jung 48 / 33

slide-127
SLIDE 127

Approach

Join-Point Computation

Shopping Cart Monitoring Aspect

Target Models AspectJ Pointcuts Java Servlet class Cart method init

return type void parameter

. . . . . method service

return type void parameter

. . . . .

Trace Model

Source Models Reiner Jung 48 / 33

slide-128
SLIDE 128

Approach

Join-Point Computation

Shopping Cart Monitoring Aspect

Target Models AspectJ Pointcuts Java Servlet class Cart method init

return type void parameter

. . . . . method service

return type void parameter

. . . . .

Trace Model

Source Models Reiner Jung 48 / 33

slide-129
SLIDE 129

Approach

Join-Point Computation

Shopping Cart Monitoring Aspect

Target Models AspectJ Pointcuts Java Servlet aspect call call class Cart method init

return type void parameter

. . . . . method service

return type void parameter

. . . . .

Trace Model

Source Models Reiner Jung 48 / 33

slide-130
SLIDE 130

Evaluation

Reiner Jung 49 / 33

slide-131
SLIDE 131

Evaluation

Interviews

Results

‚ Reuse not applied by practitioners ‚ GECO patterns and modularization ‚ Supportive for generator development ‚ Applicable to own generator development/evolution

Industry

‚ Interviewees 17 ‚ Experience range first year to senior engineer ‚ Agile/iterative development ‚ Evolution induced by customers and framework evolution

Research

‚ Interviewees 6 ‚ PhD candidates and postdoc researchers ‚ Agile/iterative development, limited maintenance ‚ Evolution induced by personal/project needs

Reiner Jung 50 / 33

slide-132
SLIDE 132

Evaluation

Metrics

Effort developer days per feature Modularity

(Allen 2002; Allen et al. 2007) ‚ Low complexity of the system ‚ Low coupling of modules of a system ‚ High inner module cohesion of a system

Understandability inverse of complexity

(Laitinen 1996)

Changeability

(ISO11) ‚ Low coupling of modules of a system ‚ High inner module cohesion of a system

Stability of the code base

(ISO11) ‚ Low coupling of modules of a system

Evaluation Measure properties for each revision

Reiner Jung 51 / 33

slide-133
SLIDE 133

Evaluation

Metric: Amount of Information in the System

1 2 3 4 5

1 2 Nodes Hyperedges Probability ˆ pl 1 101 1/5 2 110 1/5 3,5 001 2/5 4 010 1/5 Size(S) =

n

ÿ

i=1

(´ log2 ˆ pL(i)) Size(S) = 3 ˚ 2.322 + 2 ˚ 1.322 = 9.610bit Metric by Edward B. Allen Allen et al. 2007

Reiner Jung 52 / 33

slide-134
SLIDE 134

Evaluation

MENGES LOC and Modules

  • 2

3 4 5 6 7 8 9 10 11 12 13 14 Revisions 1000 3000 5000 LOC [count ∆]

  • 5

10 20 30 Modules [count ∆]

  • LOC Old

LOC New Modules Old Modules New

Reiner Jung 53 / 33

slide-135
SLIDE 135

Evaluation

MENGES LOC and Modules

  • 2

3 4 5 6 7 8 9 10 11 12 13 14 Revisions 200 600 1000 LOC [count ∆]

  • −2

1 2 3 4 5 Modules [count ∆]

  • LOC Old

LOC New Modules Old Modules New

Reiner Jung 53 / 33

slide-136
SLIDE 136

Evaluation

MENGES Coupling Delta

  • 2

3 4 5 6 7 8 9 10 11 12 13 14 2000 4000 Revisions Coupling [bits ∆]

  • Generators

Old New

Reiner Jung 54 / 33

slide-137
SLIDE 137

Evaluation

MENGES Coupling Delta

  • 2

3 4 5 6 7 8 9 10 11 12 13 14 200 600 1000 Revisions Coupling [bits ∆]

  • Generators

Old New

Reiner Jung 54 / 33

slide-138
SLIDE 138

Evaluation

MENGES Complexity Delta

  • 2

3 4 5 6 7 8 9 10 11 12 13 14 2000 4000 6000 Revisions Complexity [bits ∆]

  • Generators

Old New

Reiner Jung 55 / 33

slide-139
SLIDE 139

Evaluation

MENGES Complexity Delta

  • 2

3 4 5 6 7 8 9 10 11 12 13 14 200 600 1000 Revisions Complexity [bits ∆]

  • Generators

Old New

Reiner Jung 55 / 33

slide-140
SLIDE 140

Tooling

Reiner Jung 56 / 33

slide-141
SLIDE 141

Tooling

Architecture Analysis Tool

Java Graph Mapping

‚ Modules represent classes ‚ Nodes represent methods ‚ Edges represent ‚ method calls ‚ access to class features ‚ Java interfaces (modules) ‚ Framework classes (only when used) ‚ Ignore data type classes

Software Complexity Analysis

https://github.com/rju/architecture-evaluation-tool

Reiner Jung 57 / 33

slide-142
SLIDE 142

Tooling

Instrumentation Aspect Language

package demo import demo.EntryEvent import demo.ExtendedEntryEvent import demo.ExitEvent use pcm on cocome "irl-examples/src/cocome.repository" advice EntryLogger () { before EntryEvent(time, $signature) ExtendedEntryEvent(time, $signature, $classname) after ExitEvent(time, $signature) } pointcut point class cocome.TradingSystem.Inventory.Data.Persistence pointcut complex class cocome.TradingSystem.Inventory { Data.** exclude Data.Persistence.** } aspect point : EntryLogger aspect complex : EntryLogger

Reiner Jung 58 / 33

slide-143
SLIDE 143

Tooling

Instrumentation Record Language

package demo @author 'Reiner Jung' @since '1.5' entity ArrayExample { int [10] staticArray int [] dynamicArray int [10][5][][9] mixed string [][][6] stringMixed } template Event { long timestamp } template OperationSignature { string signature } entity EntryEvent : Event, OperationSignature entity ExitEvent : Event, OperationSignature entity ExtendedEntryEvent extends ExitEvent { string classSig }

Reiner Jung 59 / 33