Top Banner
 Software Language Evolution Sander Vermolen Eelco Visser This research was supported by NWO/JACQUARD project 638.001.610, MoDSE: Model-Driven Software Evolution.
51

Software Language Evolution

Jul 13, 2015

Download

Documents

Sander Vermolen
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Software Language Evolution

   

Software Language Evolution

Sander VermolenEelco Visser

This research was supported by NWO/JACQUARD project638.001.610, MoDSE: Model­Driven Software Evolution.

Page 2: Software Language Evolution

   

Page 3: Software Language Evolution

   

Data Models

Page 4: Software Language Evolution

   

Page 5: Software Language Evolution

   

Page 6: Software Language Evolution

   

Username :: varcharemail :: tinytext

Pagetitle :: varcharauthor Usercontent :: text

Page 7: Software Language Evolution

   

Username bob email  [email protected]

Pagetitle "The first page"content  "Hello world"author bob

Page 8: Software Language Evolution

   

Version history

Page 9: Software Language Evolution

   

Username :: varcharemail :: tinytext

Pagetitle :: varcharcontent :: textauthor User

Username :: varcharemail :: tinytext

Pagetitle :: varchar

Revisionpage PagerevisionText :: textauthor User

Page 10: Software Language Evolution

   

Username bob email  b.johnson@...

Page 1title "The first page"content  "Hello world"author bob

Username bob email  b.johnson@...

Page 1title "The first page"

Revision 1page {page 1}revisionText "Hello world"author bob

Page 11: Software Language Evolution

   

Coupled Data Evolution

Page 12: Software Language Evolution

   

...

$dbh->bz_add_column('attachments', 'submitter_id', {TYPE => 'INT3', NOTNULL => 1}, 0);$dbh->bz_rename_column('bugs_activity', 'when', 'bug_when');_add_bug_vote_cache(); _update_product_name_definition(); _add_bug_keyword_cache();$dbh->bz_add_column('profiles', 'disabledtext', {TYPE => 'MEDIUMTEXT', NOTNULL => 1}, '');_populate_longdescs(); _update_bugs_activity_field_to_fieldid();

if (!$dbh->bz_column_info('bugs', 'lastdiffed')) {$dbh->bz_add_column('bugs', 'lastdiffed', {TYPE =>'DATETIME'});$dbh->do('UPDATE bugs SET lastdiffed = NOW()');

}

_add_unique_login_name_index_to_profiles(); $dbh->bz_add_column('profiles', 'mybugslink', {TYPE => 'BOOLEAN', NOTNULL => 1, DEFAULT => 'TRUE'});_update_component_user_fields_to_ids();$dbh->bz_add_column('bugs', 'everconfirmed', {TYPE => 'BOOLEAN', NOTNULL => 1}, 1);

$dbh->bz_add_column('products', 'maxvotesperbug', {TYPE => 'INT2', NOTNULL => 1, DEFAULT => '10000'});

$dbh->bz_add_column('products', 'votestoconfirm', {TYPE => 'INT2', NOTNULL => 1}, 0);_populate_milestones_table();$dbh->bz_alter_column('bugs', 'target_milestone', {TYPE => 'varchar(20)', NOTNULL => 1, DEFAULT => "'---'"});$dbh->bz_alter_column('milestones', 'value', {TYPE => 'varchar(20)', NOTNULL => 1});_add_products_defaultmilestone();

if (!$dbh->bz_index_info('cc', 'cc_bug_id_idx') || !$dbh->bz_index_info('cc', 'cc_bug_id_idx')->{TYPE}) {$dbh->bz_drop_index('cc', 'cc_bug_id_idx');$dbh->bz_add_index('cc', 'cc_bug_id_idx', {TYPE => 'UNIQUE', FIELDS => [qw(bug_id who)]});

}if (!$dbh->bz_index_info('keywords', 'keywords_bug_id_idx') || !$dbh->bz_index_info('keywords', 'keywords_bug_id_idx')->{TYPE}) {

$dbh->bz_drop_index('keywords', 'keywords_bug_id_idx');$dbh->bz_add_index('keywords', 'keywords_bug_id_idx', {TYPE => 'UNIQUE', FIELDS => [qw(bug_id

keywordid)]});}

...

Page 13: Software Language Evolution

   

EvolvingData Models

Page 14: Software Language Evolution

   

Page 15: Software Language Evolution

   

add or remove entity

change name of entity

change type of set

8 Basic Transformations

add or remove property

change name of property

change type of property

Page 16: Software Language Evolution

   

addRevision

page Pageauthor User

addrevisionText :: text

Page 17: Software Language Evolution

   

Page 18: Software Language Evolution

   

at Entity Revision  /  Property pageadd revisionText :: text

RevisionrevisionText :: text

Page 19: Software Language Evolution

   

RevisionrevisionText :: text

at Entity Revision  /  Property pageadd revisionText :: textfrom page.content

Page 20: Software Language Evolution

   

at Entity Pageadd Revision

at Entity Revision  /  Property pageadd revisionText :: textfrom page.content

;

Page 21: Software Language Evolution

   

EvolvingData Models

8 Basic transformations

Syntax for the transformations

Positioning language

Specify data model evolutions

Page 22: Software Language Evolution

   

DataMigration

Page 23: Software Language Evolution

   

Page 24: Software Language Evolution

   

Technical Domain

WebDSL

Stratego/XT

JavaJava Persistence API

Object Transformation Library

Page 25: Software Language Evolution

   

transform (Page) to (Page) {DropAttribute("author");

}

at Entity Pageremove author

Page 26: Software Language Evolution

   

transform (Page) to (Revision) {AddAttribute("revisionText", 

getPage().getContent() )}

at Entity Revision  /  Property pageadd revisionText :: textfrom page.content

Page 27: Software Language Evolution

   

More abstract transformations

Type conversions

Java type generation

But wait, there’s more!

Page 28: Software Language Evolution

   

DataMigration

Page 29: Software Language Evolution

   

HeterogeneousCoupled Evolution

Page 30: Software Language Evolution

   

Page 31: Software Language Evolution

   

Page 32: Software Language Evolution

   

Horizontal GeneralizationDomain

Page 33: Software Language Evolution

   

Page 34: Software Language Evolution

   

Lists

More types

Abstract types

Page 35: Software Language Evolution

   

Vertical GeneralizationConformance level

Page 36: Software Language Evolution

   

Heterogeneous Coupled Evolution 

ofSoftware Languages

Software Data

Evolving Software LanguageData Model

Page 37: Software Language Evolution

   

A GenericArchitecture

Page 38: Software Language Evolution

   

Page 39: Software Language Evolution

   

Page 40: Software Language Evolution

   

Page 41: Software Language Evolution

   

Domain Specific Transformation Language 

(DSTL)

Transformation Interpreter

Software Migration

Page 42: Software Language Evolution

   

Stratego

SDF SDF

Page 43: Software Language Evolution

   

Entity* ­> DataM

Lists

"add" Entity    ­> LocalTransformation"remove"        ­> LocalTransformation

[...]

Page 44: Software Language Evolution

   

Id "::" Type ­> Prop

Lexicals

"substitute" Id ­> LocalTransformation

''...''

Page 45: Software Language Evolution

   

"int" ­> Type"bool" ­> TypeId ­> Type"set of" Type ­> Type

Multiple productions

"substitute" Type ­> LocalTransformation

­>*

Page 46: Software Language Evolution

   

"at" APath LocalTransformation ­> Transformation

Type checking .../...

Page 47: Software Language Evolution

   

Software Language Evolution

Generic architectureDSTL generationEvolution interpreter generationAutomatic migration

Application to data models

Heterogeneous coupled evolution

Page 48: Software Language Evolution

   

Software Language Evolution

This research was supported by NWO/JACQUARD project638.001.610, MoDSE: Model­Driven Software Evolution.

Page 49: Software Language Evolution

   

Page 50: Software Language Evolution

   

Present & Future

Evolution detection

Validation

Usability

Abstractions

Page 51: Software Language Evolution

   

Related work

Focus on single domain

Meta modeling[7, 23, 17, 10]

DSLs[23]

Data base schemas[15,4,2,8,1]