26
1 7 th Workshop on SEERE, Risan, 2007 NOREX: A Distributed Reengineering Environment Dr. Radu Marinescu NOREX A Distributed Reengineering Environment Radu Marinescu LOOSE Research Group Politehnica University of Timişoara [email protected] loose.upt.ro

1 7 th Workshop on SEERE, Risan, 2007 NOREX: A Distributed Reengineering Environment Dr. Radu Marinescu NOREX A Distributed Reengineering Environment Radu

  • View
    216

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 1 7 th Workshop on SEERE, Risan, 2007 NOREX: A Distributed Reengineering Environment Dr. Radu Marinescu NOREX A Distributed Reengineering Environment Radu

17th Workshop on SEERE, Risan, 2007

NOREX: A Distributed Reengineering Environment

Dr. Radu Marinescu

NOREX

A Distributed Reengineering

EnvironmentRadu Marinescu

LOOSE Research Group Politehnica University of Timişoara

[email protected]

loose.upt.ro

Page 2: 1 7 th Workshop on SEERE, Risan, 2007 NOREX: A Distributed Reengineering Environment Dr. Radu Marinescu NOREX A Distributed Reengineering Environment Radu

27th Workshop on SEERE, Risan, 2007

NOREX: A Distributed Reengineering Environment

Dr. Radu Marinescu

Generic Reengineering Environment

Page 3: 1 7 th Workshop on SEERE, Risan, 2007 NOREX: A Distributed Reengineering Environment Dr. Radu Marinescu NOREX A Distributed Reengineering Environment Radu

37th Workshop on SEERE, Risan, 2007

NOREX: A Distributed Reengineering Environment

Dr. Radu Marinescu

iPlasma: Example of Reeng. Environment

Model Extractors

MCC / FAST Memoria / Recoder

ModelsHisMo MEMORIA Membrain

build

Analyses

MetricsDetection Strategies

CodeDuplication

Data-flowAnalyses

use

Front-end

INSIDER

integrate

Page 4: 1 7 th Workshop on SEERE, Risan, 2007 NOREX: A Distributed Reengineering Environment Dr. Radu Marinescu NOREX A Distributed Reengineering Environment Radu

47th Workshop on SEERE, Risan, 2007

NOREX: A Distributed Reengineering Environment

Dr. Radu Marinescu

Four Layers of Metamodeling Architecture

Layer

Meta Meta Model

Meta Model

Model

User Objects

Description

Defines the core ingredients sufficient for defining languages for specifying meta-models

Defines a language for specifying Models

Defines a language to describe an information domain.

Describes a specific situation in an information domain.

Example

(CDIF) MetaEntity, MetaAttribute(MOF) Class, MofAttribute

(UML) Class, Attribute, Association(Database) Table, Column, Row

Student, Course, enrolledin

Student#3, Course#5,Student#3.enrolledin.Course#5

Page 5: 1 7 th Workshop on SEERE, Risan, 2007 NOREX: A Distributed Reengineering Environment Dr. Radu Marinescu NOREX A Distributed Reengineering Environment Radu

57th Workshop on SEERE, Risan, 2007

NOREX: A Distributed Reengineering Environment

Dr. Radu Marinescu

The power of going Meta-Meta...

Page 6: 1 7 th Workshop on SEERE, Risan, 2007 NOREX: A Distributed Reengineering Environment Dr. Radu Marinescu NOREX A Distributed Reengineering Environment Radu

67th Workshop on SEERE, Risan, 2007

NOREX: A Distributed Reengineering Environment

Dr. Radu Marinescu

Concepts Entities

Examples: color , drawArea() , GraphicFigure, lrg.drawing.figures etc

Entities can be described by an Entity Type Examples:

variable, method, class, package

Entities have Properties … and their Entity Type knows how to “compute” them Examples:

variable color is a protected attribute method drawArea() has a 25 lines of code class GraphicFigure is abstract etc.

Entity Types belong to a Containment Hierarchy Entities contain groups of other entities Ex: a class contains methods and attributes

Page 7: 1 7 th Workshop on SEERE, Risan, 2007 NOREX: A Distributed Reengineering Environment Dr. Radu Marinescu NOREX A Distributed Reengineering Environment Radu

77th Workshop on SEERE, Risan, 2007

NOREX: A Distributed Reengineering Environment

Dr. Radu Marinescu

Containment Hierarchy

Page 8: 1 7 th Workshop on SEERE, Risan, 2007 NOREX: A Distributed Reengineering Environment Dr. Radu Marinescu NOREX A Distributed Reengineering Environment Radu

87th Workshop on SEERE, Risan, 2007

NOREX: A Distributed Reengineering Environment

Dr. Radu Marinescu

Relations

Entity Entity Type

dictionaries

PropertyComputer

GroupBuilder

FilteringRule

ResultEntity

GroupEntity

* ** *

Page 9: 1 7 th Workshop on SEERE, Risan, 2007 NOREX: A Distributed Reengineering Environment Dr. Radu Marinescu NOREX A Distributed Reengineering Environment Radu

97th Workshop on SEERE, Risan, 2007

NOREX: A Distributed Reengineering Environment

Dr. Radu Marinescu

retrieve

look-upin dictionary

do you knowCBO property?

Computing of Properties

ViewUI(Entity)“CBO”

?class

(EntityType)

PropertyComputers

CBO29.0

(ResultEntity)

numerical(EntityType)

Page 10: 1 7 th Workshop on SEERE, Risan, 2007 NOREX: A Distributed Reengineering Environment Dr. Radu Marinescu NOREX A Distributed Reengineering Environment Radu

10

7th Workshop on SEERE, Risan, 2007

NOREX: A Distributed Reengineering Environment

Dr. Radu Marinescu

(GroupEntity)

(GroupEntity)

applyFiltermodel package

Filters

retrieve

look-upin dictionary

package(EntityType)

FilteringRules

model package

Page 11: 1 7 th Workshop on SEERE, Risan, 2007 NOREX: A Distributed Reengineering Environment Dr. Radu Marinescu NOREX A Distributed Reengineering Environment Radu

11

7th Workshop on SEERE, Risan, 2007

NOREX: A Distributed Reengineering Environment

Dr. Radu Marinescu

How do our tools collaborate?

Page 12: 1 7 th Workshop on SEERE, Risan, 2007 NOREX: A Distributed Reengineering Environment Dr. Radu Marinescu NOREX A Distributed Reengineering Environment Radu

12

7th Workshop on SEERE, Risan, 2007

NOREX: A Distributed Reengineering Environment

Dr. Radu Marinescu

Only data exchange

Page 13: 1 7 th Workshop on SEERE, Risan, 2007 NOREX: A Distributed Reengineering Environment Dr. Radu Marinescu NOREX A Distributed Reengineering Environment Radu

13

7th Workshop on SEERE, Risan, 2007

NOREX: A Distributed Reengineering Environment

Dr. Radu Marinescu

• Different programming languages• Different meta-models• Different front-ends

Why?

Page 14: 1 7 th Workshop on SEERE, Risan, 2007 NOREX: A Distributed Reengineering Environment Dr. Radu Marinescu NOREX A Distributed Reengineering Environment Radu

14

7th Workshop on SEERE, Risan, 2007

NOREX: A Distributed Reengineering Environment

Dr. Radu Marinescu

NOREXDistributed collaborative reengineering

Our solution

Page 15: 1 7 th Workshop on SEERE, Risan, 2007 NOREX: A Distributed Reengineering Environment Dr. Radu Marinescu NOREX A Distributed Reengineering Environment Radu

15

7th Workshop on SEERE, Risan, 2007

NOREX: A Distributed Reengineering Environment

Dr. Radu Marinescu

Features

• Language independent• Distributed• Community focused

Page 16: 1 7 th Workshop on SEERE, Risan, 2007 NOREX: A Distributed Reengineering Environment Dr. Radu Marinescu NOREX A Distributed Reengineering Environment Radu

16

7th Workshop on SEERE, Risan, 2007

NOREX: A Distributed Reengineering Environment

Dr. Radu Marinescu

Distributed collaboration

Page 17: 1 7 th Workshop on SEERE, Risan, 2007 NOREX: A Distributed Reengineering Environment Dr. Radu Marinescu NOREX A Distributed Reengineering Environment Radu

17

7th Workshop on SEERE, Risan, 2007

NOREX: A Distributed Reengineering Environment

Dr. Radu Marinescu

What you do

• Declare your meta-model (in MOF)• Decouple the tool’s services• Specify your services

Page 18: 1 7 th Workshop on SEERE, Risan, 2007 NOREX: A Distributed Reengineering Environment Dr. Radu Marinescu NOREX A Distributed Reengineering Environment Radu

18

7th Workshop on SEERE, Risan, 2007

NOREX: A Distributed Reengineering Environment

Dr. Radu Marinescu

Clients and Servers

Clients have the data model model is “shaped” by a client-specific meta-model

Servers have the processors

reengineering analyses (e.g metrics, visualizations etc) assume another meta-model accesses to meta-model are expressed as

command objects

Page 19: 1 7 th Workshop on SEERE, Risan, 2007 NOREX: A Distributed Reengineering Environment Dr. Radu Marinescu NOREX A Distributed Reengineering Environment Radu

19

7th Workshop on SEERE, Risan, 2007

NOREX: A Distributed Reengineering Environment

Dr. Radu Marinescu

Encapsulate model in command objectspublic int NoPM(MMClass aClass) {int publicCount = 0;for(MMMethod aMethod : aClass.getMethods()) if(aMethod.isPublic()) publicCount++;return publicCount;}

public int NoPM(Object aClass, CollectionCommand methodsCom, BooleanCommand isPublicCom) {int publicCount = 0;for(Object aMethod : methodsCom.execute(aClass)) if(isPublicCom.execute(aMethod)) publicCount++;return publicCount;}

Page 20: 1 7 th Workshop on SEERE, Risan, 2007 NOREX: A Distributed Reengineering Environment Dr. Radu Marinescu NOREX A Distributed Reengineering Environment Radu

20

7th Workshop on SEERE, Risan, 2007

NOREX: A Distributed Reengineering Environment

Dr. Radu Marinescu

Create a NOREX Service

Service Manifesto specifies the entity on which the service runs specifies the command objects that need to be

provided

Page 21: 1 7 th Workshop on SEERE, Risan, 2007 NOREX: A Distributed Reengineering Environment Dr. Radu Marinescu NOREX A Distributed Reengineering Environment Radu

21

7th Workshop on SEERE, Risan, 2007

NOREX: A Distributed Reengineering Environment

Dr. Radu Marinescu

Configuring a service to run

Do the mapping between the two meta-models translate client’s into

servers’ meta-models “Lazy” approach

I don’t translate the whole meta-model, but only what is needed for the analysis

I do it only once stored in a dictionary

Page 22: 1 7 th Workshop on SEERE, Risan, 2007 NOREX: A Distributed Reengineering Environment Dr. Radu Marinescu NOREX A Distributed Reengineering Environment Radu

22

7th Workshop on SEERE, Risan, 2007

NOREX: A Distributed Reengineering Environment

Dr. Radu Marinescu

Creating Service Object

Page 23: 1 7 th Workshop on SEERE, Risan, 2007 NOREX: A Distributed Reengineering Environment Dr. Radu Marinescu NOREX A Distributed Reengineering Environment Radu
Page 24: 1 7 th Workshop on SEERE, Risan, 2007 NOREX: A Distributed Reengineering Environment Dr. Radu Marinescu NOREX A Distributed Reengineering Environment Radu

24

7th Workshop on SEERE, Risan, 2007

NOREX: A Distributed Reengineering Environment

Dr. Radu Marinescu

Results are Transparent

Page 25: 1 7 th Workshop on SEERE, Risan, 2007 NOREX: A Distributed Reengineering Environment Dr. Radu Marinescu NOREX A Distributed Reengineering Environment Radu

25

7th Workshop on SEERE, Risan, 2007

NOREX: A Distributed Reengineering Environment

Dr. Radu Marinescu

NOREX is not a toy...

Page 26: 1 7 th Workshop on SEERE, Risan, 2007 NOREX: A Distributed Reengineering Environment Dr. Radu Marinescu NOREX A Distributed Reengineering Environment Radu

26

7th Workshop on SEERE, Risan, 2007

NOREX: A Distributed Reengineering Environment

Dr. Radu Marinescu

NOREX

A Distributed Reengineering

EnvironmentRadu Marinescu

LOOSE Research Group Politehnica University of Timişoara

[email protected]

loose.upt.ro