Implementing Language Extensions with Model Transformations - PowerPoint PPT Presentation

1 / 17
About This Presentation
Title:

Implementing Language Extensions with Model Transformations

Description:

Outline The Role of Languages in MDE; Language Elements; Language Extensions; Examples: ... Compose transformation definitions by applying a transformation; ... – PowerPoint PPT presentation

Number of Views:79
Avg rating:3.0/5.0
Slides: 18
Provided by: kurt2156
Category:

less

Transcript and Presenter's Notes

Title: Implementing Language Extensions with Model Transformations


1
Implementing Language Extensions with Model
Transformations Ivan Kurtev Software
Engineering Group University of Twente the
Netherlands
2
Outline
  • The Role of Languages in MDE
  • Language Elements
  • Language Extensions
  • Examples
  • Language composition
  • Abstract syntax extension
  • Conclusions

3
Use of Languages in MDE
  • Languages for expressing models
  • Meta-modeling modeling of languages
  • Transformation languages

Can we use MDE techniques to solve language
design problems?
4
Language Elements
  • Concrete Syntax
  • Related to parsing
  • Textual, visual
  • Abstract Syntax (L)
  • Defines the structures represented by the
    concrete syntax
  • Semantics
  • Semantic Domain (D)
  • Semantic Mapping (M)
  • M L -gt D

5
Language Extensions
  • Syntax Extensions
  • Extensible grammars
  • Extensible parsers
  • Macro definitions
  • Semantic Extensions
  • Modular attribute grammars
  • Monads
  • Action semantics
  • Language Composition
  • Involves syntax and semantic extensions

6
Language Elements in MDA Terms (1)
  • Concrete Syntax ?
  • Abstract Syntax (L)
  • Defined as a meta-model
  • Semantics
  • Semantic Domain (D) a model
  • Semantic Mapping (M) a model transformation
  • M L -gt D

7
Language Elements in MDA Terms (2)
  • How can MDA techniques be used for language
    design tasks?
  • What do we gain (do we do better than the current
    techniques) ?
  • How are traditional problems solved in MDA?
  • Language reuse
  • Language composition
  • Language extension

8
Example 1 Composing XML Languages
  • Application-specific XML processing

XMLDocument
DOM Parser
Processing Code
DOM Tree
Application Objects
Transformation
  • Transformation from XML document to application
    objects
  • XML Language Composition
  • Concrete syntax composition is solved
  • Semantic mapping composition of transformations
  • Semantic domain software composition
  • Application hybrid XML languages and compound
    documents

9
Transformation Pattern for XML Processing
  • Schema-less processing based on DOM
  • Schema-based processing an XML schema and DOM
    are available

10
Structure of XML Applications
  • Separation of concerns
  • Syntax (schema)
  • Processing logic (transformation specification)
  • Application classes (semantic domain)

11
Example (1)
  • Processing of a subset of SMIL timing module
  • Source schema

ltattribute namebegin typestring/gt ltattribute
nameend typestring/gt ltattribute namedur
typestring/gt ltattribute nametimeContainer
typestring/gt
  • Example of a timed document

lta timeContainerseq begin1 dur20gt ltb
timeContainerpar dur10gt ltc
timeContainernone dur10/gt ltd
timeContainernone dur10/gt lt/bgt lte
timeContainernone dur10/gt lt/agt
SMIL Synchronized Multimedia Integration
Language
12
Example (2)
  • Target Application Classes

13
Composition of XML Languages
  • A new language may be composed with the timing
    module
  • New processor is obtained via
  • Composing target application classes (software
    composition)
  • Composing transformation definitions (based on
    the transformation language constructs)

14
Example 2 Abstract Syntax Extensions
  • Problem
  • what if a transformation language does not
    support required compositional operators?
  • Possible Solutions
  • Compose transformation definitions by applying a
    transformation
  • Extend the transformation language with new
    constructs
  • Example
  • Extending the abstract syntax of a language

15
Example 2 Implementation
  • Extended syntax is transformed to the initial
    syntax

16
Sequential Composition of Extensions
17
Conclusions
  • Examples of applicability of MDA techniques
  • Composition of XML languages
  • Abstract syntax extension
  • Open Questions
  • Are model transformations suitable for defining
    semantic mappings?
  • For which type of languages?
  • Scalability in case of language composition?
  • Comparison to other techniques (attribute
    grammars, action semantics,)
Write a Comment
User Comments (0)
About PowerShow.com