Beyond Annotations: A Proposal for Extensible Java XJ - PowerPoint PPT Presentation

1 / 9
About This Presentation
Title:

Beyond Annotations: A Proposal for Extensible Java XJ

Description:

Aims: to provide a tailored language; to support mixed languages; ... Integration: IDEs; Analysis Tools. Modularity: clear definition of syntax and semantics. ... – PowerPoint PPT presentation

Number of Views:45
Avg rating:3.0/5.0
Slides: 10
Provided by: dcsK7
Category:

less

Transcript and Presenter's Notes

Title: Beyond Annotations: A Proposal for Extensible Java XJ


1
Beyond AnnotationsA Proposal for Extensible
Java(XJ)
  • Tony Clark, Thames Valley University
  • Paul Sammut, HSBC
  • James Willans, Ceteva
  • tony.clark_at_tvu.ac.uk
  • www.ceteva.com/home/tony.html

2
Domain Specific Languages
  • Aims to provide a tailored language to support
    mixed languages language evolution.
  • Pros declarative maintenance reuse
    verification
  • Cons specialist skills no standard technology
    lack of integration.
  • Technologies macros pre-processing
    roll-your-own chained calls.

3
DSLs Technology Problems
  • Communication distributing new languages.
  • Integration IDEs Analysis Tools.
  • Modularity clear definition of syntax and
    semantics.
  • DSL Types Internal and External.
  • Syntax (concrete and abstract) standard
    extension mechanisms.

4
DSLs An OO Proposal
  • Syntax Classes
  • Modular class-based language constructs.
  • Conservative extends base language.
  • Fully Integrated static dynamic IDE.
  • Standardized syntax extension AST manipulation
    static processing execution.

5
Syntax Classes DSL Architecture
package p.q import language java.syntax.grammar
class mylang implements java.syntax.AST ...
_at_grammar // language definition
import language p.q.mylang class C void
m(...) ... _at_mylang //
Syntax and semantics defined // by class
mylang.
  • modular.
  • nesting.
  • conservative.
  • standard.

6
Example DSL Constructs
public VectorltIntegergt add1(VectorltIntegergt nums)
return _at_Cmp(x 1) int x lt- nums

_at_Reader CallReader map(SVCL,ServiceCall)
4-18CustomerName 19-23CustomerID
24-27CallTypeCode 28-35DataOfCallString
end map(USGE,Usage) 4-8CustomerID
9-22CustomerName 30-30Cycle
31-36ReadDate end do ServiceCall Usage
_at_EntityBean Order persistAs "ORDER_TABLE"
private int id persistAs "ORDER_ID" (get,set)
private int address persistAs "SHIPPING_ADDRESS"
(get,set)
7
Syntax Classes Technologies
  • Grammars basic library synthesizes abstract
    syntax various languages possible.
  • AST interface factories types eval compile
  • Quasi-quotes working with concrete/abstract
    syntax ltogt.m(ltagt,1)
  • Language import _at_ grammar .

8
Review
  • Implemented in XMF commercial tool open-source
    (www.ceteva.com)
  • Superlanguages book (www.ceteva.com/docs/Superlan
    guages.pdf)
  • DSLs require standard technology.
  • Open up Java to define new languages.
  • Issues language interaction IDE support
    analysis tool requirements.

9
Statement
  • New languages and constructs can/should implement
    a standard interface to facilitate program
    analysis.
Write a Comment
User Comments (0)
About PowerShow.com