Aspectj paradigm model a basis for multi paradigm design for aspectj
This presentation is the property of its rightful owner.
Sponsored Links
1 / 31

AspectJ Paradigm Model A Basis for Multi-Paradigm Design for AspectJ PowerPoint PPT Presentation


  • 83 Views
  • Uploaded on
  • Presentation posted in: General

GCSE 2001. AspectJ Paradigm Model A Basis for Multi-Paradigm Design for AspectJ. Valentino Vrani ć [email protected] Department of Computer Science and Engineering Faculty of Electrical Engineering and Information Technology Slovak University of Technology in Bratislava.

Download Presentation

AspectJ Paradigm Model A Basis for Multi-Paradigm Design for AspectJ

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Aspectj paradigm model a basis for multi paradigm design for aspectj

GCSE 2001

AspectJ Paradigm ModelA Basis for Multi-Paradigm Design for AspectJ

Valentino Vranić

[email protected]

Department of Computer Science and Engineering

Faculty of Electrical Engineering and Information Technology

Slovak University of Technology in Bratislava


Presentation overview

Presentation Overview

  • Multi-paradigm design

  • Feature modeling

  • Multi-paradigm design with feature modeling

  • AspectJ paradigm model

  • Transformational analysis

  • An example: Text editing buffers

  • Conclusions


Multi paradigm design mpd

Multi-Paradigm Design (MPD)

  • MPD for C++ (J. O. Coplien)

  • Programming paradigms:

    • Large-scale paradigms

    • Small-scale paradigms

  • Scope, commonality, variability, and relationship (SCVR) analysis

  • Transformational analysis


Transformational analysis in mpd

Transformational Analysis in MPD

Variability tables (from application domain SCVR analysis)

Domain D1 (main commonality of D1)

Parameters of Variation

Meaning

Domain

Binding

Default

P1

Generalization of P1

(values P1 can take)

(default value for P1)

Family table (from solution domain SCVR analysis)

Commonality

Variability

Binding

Instantiation

Language Mechanism


Feature modeling

Feature Modeling

  • A conceptual modeling technique

Feature diagrams

  • directed trees with edge decorations

  • root = concept,other nodes = features

  • common and variable features

  • variation points

Other information

  • Semantic description

  • Rationale

  • Constraints

  • Default dependency rules

  • Binding mode

  • Instantiation


Mpd with feature modeling

MPD with Feature Modeling

  • Feature models instead of tables and informal description

  • Both feature modeling and SCVR analysis are based on commonalities and variabilities

  • SCVR analysis and feature modeling:

    • scope  concept

    • commonality  common feature

    • variability  variable feature

    • relationship  feature diagrams hierarchy


Mpd and mpd with feature modeling

MPDandMPD with Feature Modeling

Parameters of Variation

Meaning

Domain

Binding

Default

variation point

semantic description, rationale

alternative features

binding mode

default dependency rules

Commonality

Variability

Binding

Instantiation

Language Mechanism

common feature

variable feature

binding mode

additional information

concept

Variability table

Domain D1 (main commonality of D1 concept)

Family table


Aspectj paradigm model

AspectJ Paradigm Model


Aspectj paradigm model class paradigm

AspectJ Paradigm Model: Class Paradigm


Aspectj paradigm model aspect paradigm

AspectJ Paradigm Model: Aspect Paradigm


Transformational analysis

Transformational Analysis

  • Prerequisites:

    • Solution domain feature model

    • Application domain feature model

  • Matching of application domain feature model nodes with the solution domain feature model nodes

    • Points to the paradigms to be used for application domain structures

    • Two nodes match if they conceptually represent the same thing


Matching the nodes

Matching the Nodes

1. Select a node F from the application domain feature model

2. Try to match F’s children with the children of some node P that represents a paradigm in the solution domain feature model

3. If a match has been found for all of the F’s children, then F matches with P

4. A paradigm that represented by P should be used to implement feature F


The process of transformational analysis

The Process of Transformational Analysis

  • Find the matching for all of the nodes in the application domain feature model

  • Try to match the application domain nodes with the paradigms of “higher order” — the paradigms based on other paradigms (inheritance and overloading in AspectJ)

  • Translate the results of the transformational analysis into the code:

    • directly

    • through a specific design method pointed to by MPD


An example text editing buffers

An Example: Text Editing Buffers

  • Represent a state of a file being edited

  • Employ different working set management schemes

  • Use different character sets

  • Load and save the contents into a file

  • Maintain a record of the number of lines and characters, cursor position, etc.


Aspectj paradigm model a basis for multi paradigm design for aspectj

File

read

write

name

name

status

status

contents

contents


Aspectj paradigm model a basis for multi paradigm design for aspectj

Working Set Management DC

whole file

whole page

LRU fixed


Aspectj paradigm model a basis for multi paradigm design for aspectj

  • Feature diagrams alone do not fully determine the code skeleton

  • What other sources are there?

  • Variability dependency graphs

  • Other information in feature model


Variability dependency graph

Variability Dependency Graph

File

Character Set

Text Editing Buffer

Debugging Code

Working Set Management


Aspectj paradigm model a basis for multi paradigm design for aspectj

class TextBuffer {

public:

yield(...) {...};

replace(...) {...};

loadFile(...) {...};

saveFile(...) {...};

private:

int numLines, numChars, curPosition;

. . .

}

class WholeFileTextBuffer extends TextBuffer {

public:

WholeFileTextBuffer(File f, CharacterSet c) {...};

yield(...) {...};

replace(...) {...};

. . .

}

. . .


Aspectj paradigm model a basis for multi paradigm design for aspectj

class File {

public:

Status readFile(String name, TextBuffer buff) {...}

Status writeFile(String name, TextBuffer buff) {...}

. . .

}

class UnixFile extends File {

. . .

}

. . .

aspect DebuggingCode {

. . .

}

aspect WorkingSetDebug extends DebuggingCode {

. . .

}

aspect WholeFileDebug extends WorkingSetDebug {

. . .

}

. . .


Conclusions

Conclusions

  • A new representation for the solution and application domain in MPD

    • Based on feature modeling

    • Involves a new transformational analysis

  • AspectJ paradigm model

  • Further research:

    • Noting of the transformational analysis results

    • Incorporating the MPD’s negative variability tables and variability dependency graphs

    • Relationship between the MPD and generative programming


  • Login