• No results found

M3: an open model for measuring source code artifacts

N/A
N/A
Protected

Academic year: 2022

Share "M3: an open model for measuring source code artifacts"

Copied!
28
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

Software Analysis And Transformation

M : an Open Model for

Measuring Code Artifacts

Anastasia Izmaylova, Paul Klint, Ashim Shahi, Jurgen Vinju

SWAT

Centrum Wiskunde & Informatica (CWI)

3

(2)

OSSMETER:

FP7 STREP Project: Automated Measurement and Analysis of Open Source Software.

(3)

OSSMETER Objectives

Objectives

• Get insight in source code quantity & quality

• Get insight into programmer activity

Means

• Measure source code

• Measure source code

version“deltas”

(4)

SWAT & Rascal

• Software exploration,

transformation, generation, visualization, specification:

software *-ation :-)

• Domain specific languages

• Analyzing software

• Teaching Evolution @ UvA et al.

• Rascal is a DSL

• Lab infra-structure

• “one stop shop”

• Safe & simple

(5)

Domain analysis

Source Code

Models

Descriptions

Generation Extraction

Formalization Visualization

Transformation

Conversion Analysis

Input

Abstraction

Output

Extract

Analyze

S

Ynthesize

EASY

(6)

Research

Tools

Software

Meta Tool one-stop-shop

(7)

OSSMETER: EU FP7 STREP Project on Automated Measurement and Analysis of Open Source Software.

(8)

Challenges

variety of languages & metrics:

reuse, consistency and scale

precision vs. efficiency deep vs. shallow

constraints vs. types vs. CFGs vs. RegEx

(9)

M3

Code M3 Metric

Extract

Measure Analyze

[inspired by FAMIX, SOUL, and others]

(10)

M3

• Language-parametrized meta-model for source code metrics on

syntax and semantics

Code M3 Metric

Extract

Measure Analyze

[inspired by FAMIX, SOUL, and others]

(11)

M3

• Language-parametrized meta-model for source code metrics on

syntax and semantics

• General & simple

Code M3 Metric

Extract

Measure Analyze

[inspired by FAMIX, SOUL, and others]

(12)

M3

• Language-parametrized meta-model for source code metrics on

syntax and semantics

• General & simple

Formal

Code M3 Metric

Extract

Measure Analyze

[inspired by FAMIX, SOUL, and others]

(13)

M3

• Language-parametrized meta-model for source code metrics on

syntax and semantics

• General & simple

Formal

Detailed

Code M3 Metric

Extract

Measure Analyze

[inspired by FAMIX, SOUL, and others]

(14)

M3 = URI + Relations + Trees

(15)

M3 = URI + Relations + Trees

Locations

java+class://java/util/List

(16)

M3 = URI + Relations + Trees

Language agnostic core

containment loc ⨯ loc declarations loc ⨯ loc

use loc ⨯ loc

sorts Exp, Stat,

Locations

java+class://java/util/List

(17)

Language specific extension inheritance loc ⨯ loc

invocation loc ⨯ loc overriding loc ⨯ loc

sig If, Add,While

M3 = URI + Relations + Trees

Language agnostic core

containment loc ⨯ loc declarations loc ⨯ loc

use loc ⨯ loc

sorts Exp, Stat,

Locations

java+class://java/util/List

(18)

Language specific extension inheritance loc ⨯ loc

invocation loc ⨯ loc overriding loc ⨯ loc

sig If, Add,While

M3 = URI + Relations + Trees

Language agnostic core

containment loc ⨯ loc declarations loc ⨯ loc

use loc ⨯ loc

sorts Exp, Stat,

Locations

java+class://java/util/List

Extra cto r

(19)

Language specific extension inheritance loc ⨯ loc

invocation loc ⨯ loc overriding loc ⨯ loc

sig If, Add,While

M3 = URI + Relations + Trees

Language agnostic core

containment loc ⨯ loc declarations loc ⨯ loc

use loc ⨯ loc

sorts Exp, Stat,

Locations

java+class://java/util/List

Extra cto r M etri cs

(20)

Java code

M3 Model

LOC

PHP code C code

CC LCOM

...

Managing variety by uniformity

Caveat: details matter!

Uniformity helps reuse but does not guarantee it

(21)

M3 context

(22)

version 1

M3 1

metrics 1

version

2 version 3

metrics 2 metrics 3

...

metrics ...

Representing evolution

M3 2 M3 3 M3 ...

M3 enables comparability and safe composition

measure churn, growth, spikes, degradation, etc.

(23)

version 1

M3 1

delta 1 delta 2 ...

complete M3

Incremental model extraction

M3 delta M3 delta M3 ...

(24)

Key design elements

Textual values

(25)

Key design elements

URI = Qualified Names

and Hyperlinks

(26)

Key design elements

Relations = query and elaborate

reachable = m@containment+

m@invocations += m@invocations o m@overrides

subtypes = m@extends + m@implements

(27)

Key design elements

algebraic data-types are great for ASTs

[pattern matching for open dispatch: term rewriting “inside”]

(28)

Rascal/M3… the point?

• Rascal - CWI SWAT’s lab

• OSSMETER - open source quality platform

Diversity

• Lots of languages

• Lots of metrics

• Simple, extensible model, immutable/formal

• Caveat emptor & feedback/use welcome

Referenties

GERELATEERDE DOCUMENTEN

Publisher’s PDF, also known as Version of Record (includes final page, issue and volume numbers) Please check the document version of this publication:.. • A submitted manuscript is

The item numbers of real mono's and welding assemblies as used in the assembly drawing and the parts l i s t are equal to the last two digits of the concerning drawing number....

The parameters for amplitude, damping, phase and frequency for each simulated signal were chosen in the following way: first, meaningful parameters were estimated from a set of 98

publiceren van software voor sommige partijen ook een negatieve impact kan hebben (software die openbaar gemaakt is en hergebruikt mag worden hoeft niet opnieuw geschreven te

Dat betekent dat als je kennis nodig hebt, je zelf je weg moet zoeken tot je iemand gevonden hebt die je verder kan helpen hetgeen en dat kost veel tijd en moeite (wat een barrière

Despite the scale and complexity a lot of information could be extracted from the real-world data. Of the methods developed in chapter 3 only the cluster analysis and the Bass

De bedrijfsmodellen die zijn bedacht om de ontwikkeling en implementatie van OSS commercieel te exploiteren, bestaan bij maar één recht. Dit recht houdt in dat er waarde aan

OSSMETER has been developed as an extensible cloud-based platform through which users can register, discover and compare OSS projects, but which can also be extended in order to