Special Topics in Domain Specific Languages CS 6937931C Spring 2004 Mo, We, Fr 10:10 11:00 CH 430 - PowerPoint PPT Presentation

Loading...

PPT – Special Topics in Domain Specific Languages CS 6937931C Spring 2004 Mo, We, Fr 10:10 11:00 CH 430 PowerPoint presentation | free to view - id: 9e516-NDA1Z



Loading


The Adobe Flash plugin is needed to view this content

Get the plugin now

View by Category
About This Presentation
Title:

Special Topics in Domain Specific Languages CS 6937931C Spring 2004 Mo, We, Fr 10:10 11:00 CH 430

Description:

... to prove properties of visual languages likes soudness ... It facilitates the formal reasoning about visual languages and their properties. Examples: ... – PowerPoint PPT presentation

Number of Views:50
Avg rating:3.0/5.0
Slides: 31
Provided by: dami120
Category:

less

Write a Comment
User Comments (0)
Transcript and Presenter's Notes

Title: Special Topics in Domain Specific Languages CS 6937931C Spring 2004 Mo, We, Fr 10:10 11:00 CH 430


1
Special Topics in Domain Specific Languages
CS 693/793-1C Spring 2004Mo, We, Fr 1010
1100 CH 430

2
DSVL
  • DSLs offer to users more appropriate notations
    and abstractions.
  • In many application domains visual notations are
    preferred by domain users as they are often most
    intuitive representation of the problem.
  • Domain-Specific Visual Languages (DSVLs)

3
DSVL
  • Visual Languages Research Community
  • http//web.engr.oregonstate.edu/burnett/vpl.html
  • M. Burnett. Visual Programming. Encyclopedia of
    Electrical and Electronics Engineering, 1999.
  • Visual programming is programming in which more
    than one dimension is used to convey semantics.
  • Multi-dimensional object or relationship is a
    token and the collection of one or more such
    tokens is a visual expression.
  • When a programming languages syntax includes
    visual expressions than a programming language is
    a visual programming language (VPL).

4
DSVL
  • Workshops on Domain Specific Visual Languages at
    OOPSLA01, OOPLSA02, GPCE03
  • 1st DSVL workshop at OOPSLA 2001 in Tampa Bay,
    Florida http//www.isis.vanderbilt.edu/oopsla2k1/
  • 2nd DSVL workshop at OOPSLA 2002 in Seattle,
    Washington http//www.cis.uab.edu/info/OOPSLA-DSVL
    2/
  • 3rd DSVL workshop at GPCE 2003 in Erfurt, Germany
    http//www.cis.uab.edu/info/GPCE-DSVL3/

5
DSVL
  • Visual programming research in the beginning
    proceeds in two directions
  • Visual approaches to traditional programming
    languages (executable flowcharts),
  • New approaches such as programming by
    demonstration.
  • Many of these early systems had advantages that
    seemed exciting and intuitive when demonstrated
    with toy programs, but run into difficult
    problems when attempts were made to extend them
    to more realistically-sized programs.

6
DSVL
  • To overcome these problems, visual programming
    researchers
  • began to develop ways to use visual programming
    for only selected parts of software development
    (eg. GUI layout),
  • applied VP to specific domains development of
    domain-specific visual programming systems.
  • The original challenge, to develop VPLs with
    enough power and generality to address any
    programming problems, is still ongoing area of
    research.

7
DSVL
  • The overall goal of VPLs is to strive for
    improvements in programming language design.
  • The most common specific VPLs goals are
  • to make programming more accessible to some
    particular audience,
  • to improve correctness with which people perform
    programming tasks,
  • to improve the speed with which people perform
    programming tasks.

8
DSVL
  • VPLs can be classified into different paradigms
  • Constraint-based languages
  • Data-flow languages
  • Form-based and spreadsheet-based languages
  • Functional languages
  • Imperative languages
  • Logic languages
  • Object-Oriented languages
  • Programming-by-demonstration languages (Watch
    What I Do)
  • Rule-based languages

9
DSVL
  • VPLs for different purposes
  • General-purpose languages
  • Database languages
  • Image-processing languages
  • Scientific visualization languages
  • User-interface generation languages
  • Languages for programming web-based applications
  • Languages for education

10
DSVL
  • VPL examples
  • Forms/3 is based on the spreadsheet concept.
    Boxes are created which contain formulas, taking
    values from other boxes.
  • (http//web.engr.oregonstate.edu/burnett/Forms3/f
    orms3.html)
  • R. Pandey, M. Burnett, "Is It Easier to Write
    Matrix Manipulation Programs Visually or
    Textually? An Empirical Study", 1993 IEEE
    Symposium on Visual Languages, pp. 344-351, 1993.

11
DSVL
  • VPL examples
  • Prograph is a commercial visual language in which
    the programmer draws data-flow diagrams to create
    the program

12
DSVL
  • VPL examples
  • Prograph

13
DSVL
  • VPL examples
  • CLARITY is a complete functional language in the
    style of ML
  • (http//www.clarity-support.com/)

14
DSVL
  • VPL examples
  • Stagecast Creator create simulations by
    demonstration
  • http//www.stagecast.com/movies/Spotlight.html

15
DSVL
  • How to design and develop VLs?
  • Many different formalisms for the specification
    of visual languages have been investigated, such
    as
  • positional grammars,
  • relation grammars,
  • unification grammars,
  • attributed multiset grammars,
  • graph grammars, etc.

16
DSVL
  • Several formalisms can be mapped into Constraint
    Multiset Grammars (CMGs)
    K. Marriott, B. Meyer. On the Classification
    of Visual Languages by Grammar Hierarchies.
    Journal of Visual Languages and Computing (1997)
    8, 375-402.
  • CMGs are rewrite systems for multisets of typed
    objects. Spatial relations are handled by
    defining arithmetic constraints on object
    attributes.
  • A distinguishing feature of CMGs is that they can
    either be regarded as normal rewrite systems or
    as a special form of constraint logic program (a
    parsing algorithm for CMGs is a variant of
    bottom-up deriavtion for constraint logic
    programs).

17
DSVL
  • In CMGs each production has the form
  • x X1, ..., Xn
  • where exists Y1, ..., Ym where
  • C and v E
  • Non-terminal x can be rewritten to the multiset
    X1, ..., Xn if the sentence contains symbols Y1,
    ..., Ym (the context) such that the attributes of
    these symbols satisfy the constraint C. v denotes
    the vector of attributes of x whose values are
    defined by the vector expression E over
    attributes of other objects in the production.

18
DSVL
  • An example of CMG production
  • TR transition Aarrow, Ttext
  • where exists Rstate, Sstate where
  • T.midpoint close_to A.midpoint,
  • R.radius distance(A.startpoint,
    R.midpoint),
  • S.radius distance(A.endpoint,
    S.midpoint),
  • and TR.from R.name,
  • TR.to S.name,
  • TR.labelT.string.

19
DSVL
  • Positional Grammars (PGs)
    G.Costagliola, S.Orefice, G.
    Polese, G. Tortora, M. Tucci. Automatic parser
    generation for pictorial languages. IEEE
    Symposium on Visual Languages, pp. 306-313, 1993.
  • PGs are rewrite systems working on sets of
    symbols which are located at a position on some
    grid.
  • PG production has the form
  • A -gt x1R1x2R2 ... Rm-1xm
  • where A is a non-terminal, xi is a terminal or
    non-terminal and Ri is a spatial relation of the
    form (dx, dy) indicating that xi1 must be found
    at the position (adx, bdy) if xi is located at
    (a, b).

20
DSVL
  • PG production of the form
  • A -gt x1R1x2R2 ... Rm-1xm
  • Can be mapped to CMG production of the form
  • A x1, ..., xm
  • where
  • p(dx1, dy1, x1.x, x1.y, x2.x, x2.y),
  • ...
  • p(dxm-1, dym-1, xm-1.x, xm-1.y, xm.x, xm.y)
  • and A.x x1.x,
  • A.y x1.y.

21
DSVL
  • Layered Graph Grammars (LGGs)
    J. Rekers, A. Schurr . Defining and
    Parsing Visual Languages with Layered Graph
    Grammars. Journal of Visual Languages and
    Computing, Vol. 8, No. 1, pp. 27-55, 1997.
  • For a user of a visual language, the two most
    important aspects of a visual program are its
    physical layout (what the user sees and
    mnipulates), and its meaning (what the user
    expresses with it). Any implementation of the
    language has to maintain the correspondence
    between these two aspects.
  • The Abstract Syntax Graph (ASG) reflects the
    internal structure of the diagram. Nodes and
    edges corresponds to language construct, but do
    not determine how these constructs looks like.
    This representation contains just everything
    necessary to interpret the diagram.

22
DSVL
  • Physical layout of a visual program is built up
    from some predefined graphical objects.
  • Spatial Relations Graph (SRG) is an intermediate
    structure that represent the pictorial structure
    of the diagram.
  • An example ER diagram
  • Since ASG and SRG representation of a visual
    sentence are both graphs a graph grammars can be
    used to define what graphs are correct, and
    specifes how such graphs may be constructed.
  • An example Graph Grammar for ER diagrams

23
DSVL
  • Context-free Graph Grammar productions (where
    every left-hand side consists of a single
    non-terminal node) are too restrictive.
  • Context-sensitive Graph Grammars (in which both
    left and right hand side of a production are
    graphs) are hard to efficiently parsed.
  • Layered Graph Grammars (in which the left-hand
    side of every production must be
    lexico-graphically smaller than its right-hand
    side) are good compromise.

24
DSVL
  • G (V, E, lv, le, s, t) is a graph over two
    given label sets lv and le with
  • V(G)V and E(G)E are finite sets of vertices and
    edges
  • lv(G) V -gt lv and le(G)E-gtle are their labeling
    functions
  • s(G) E-gtV and t(G)E-gtV assign each edge its
    source and target
  • A graph grammar production p(L,R) is a tuple of
    graphs over the same alphabets of vertex and edge
    labels lv and le.
  • Lhs(p)L and Rhs(p)R
  • Some other restrictions are applied.

25
DSVL
  • All these formalism is about the syntax of visual
    languages!
  • The effective use of visual languages requires a
    precise understanding of their meaning.
  • It is not possible to prove properties of visual
    languages likes soudness of transformation rules
    or correctness results without having a formal
    language definition.
  • Currently, there is no general framework avilable
    for the semantics specifications of visual
    languages.

26
DSVL
  • M. Erwig. Abstract Syntax and Semantics of Visual
    Languages. J. Vis. Lang. Comput. 9(5) 461-483,
    1998.
  • The need for abstract syntax of VL is identified.
  • A textual language L is a set over an alphabet A
    (L?A). The symbols of any sentence w ? L are
    only related to each other by a linear ordering.
  • A sentence (or diagram or picture) p of visual
    language VL over an alphabet A consists of a set
    of symbols of A that are related by several
    relationships r1, ..., rn R. So, the picture
    p is given by a pair (s, r) where s ? A is the
    set of symbols of the picture and r ? s ? R ? s
    gives the relationship that holds in p.

27
DSVL
  • In other words, p is nothing but a directed graph
    with edge labels drawn from R, and a visual
    language is simply a set of such graphs.
  • Abstract syntax of VL need not be concerned with
    all the details that concrete syntax
    specifications has to care about (abstract from
    the choice of icons or symbols, and geometric
    details).
  • Lets forget about structural information and
    consider a picture just as a directed, labeled
    multi-graph where the nodes represents objects
    and edges represent relationship between objects
    (graph grammars).

28
DSVL
  • This framework allows a logical as well as a
    denotational approach to visual semantics.
  • It facilitates the formal reasoning about visual
    languages and their properties.
  • Examples
  • Euler diagrams
  • VEX (visual notation for lambda calculus)
  • Another approach how to specify DSVL is described
    in
  • R. Esser, J. Janneck. A Framework for Defining
    Domain-Specific Visual Languages. 1st DSVL
    workshop. (optional reading)

29
DSVL
  • Can be visual language environment (VL editor,VL
    compiler, ...) automatically generated from
    formal specifications of visual language?
  • VLCC A Compiler-Compiler for Visual Languages
  • http//www.dmi.unisa.it/people/costagliola/www/hom
    e/ricerca/vlcc/vlcc.htm

30
DSVL
  • G. Costagliola, V. Deufemia, F. Ferrucci, C.
    Gravino. Exploiting XPG for Visual Languages
    Definition, Analysis and Development. Electronic
    Notes in Theoretical Computer Science, Vol. 82,
    No. 3, LDTA03, 2003. (optional reading)
  • G. Costagliola, V. Deufemia, F. Ferrucci, C.
    Gravino. Using extended positional grammars to
    develop visual modeling languages. SEKE 2002, pp.
    201-208.
About PowerShow.com