Sumant Tambe, et. al LEESA DSPD 2008 An Embedded Declarative Language for Hierarchical Object Structure Traversal Sumant Tambe* Aniruddha Gokhale Vanderbilt.

Slides:



Advertisements
Similar presentations
Presented by: Thabet Kacem Spring Outline Contributions Introduction Proposed Approach Related Work Reconception of ADLs XTEAM Tool Chain Discussion.
Advertisements

Automated Analysis and Code Generation for Domain-Specific Models George Edwards Center for Systems and Software Engineering University of Southern California.
ModelicaXML A Modelica XML representation with Applications Adrian Pop, Peter Fritzson Programming Environments Laboratory Linköping University.
Institute For Software Integrated Systems Vanderbilt University Applications of Model Integrated Computing to The Synchronous Language Signal Ethan Jackson.
An framework for model-driven product design and development using Modelica Adrian Pop, Olof Johansson, Peter Fritzson Programming Environments Laboratory.
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 580 Artificial Intelligence Problem Spaces and Search Fall 2008 Jingsong.
Using the Vanderbilt Generic Modeling Environment (GME) to Address SOA QoS Sumant Tambe Graduate Intern, Applied Research, Telcordia Technologies Inc.
Whole Platform Tesi di Dottorato di: RICCARDO SOLMI Università degli Studi di Bologna Facoltà di scienze matematiche, fisiche e naturali Corso di Dottorato.
Generative Programming. Generic vs Generative Generic Programming focuses on representing families of domain concepts Generic Programming focuses on representing.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
Basic Concepts The Unified Modeling Language (UML) SYSC System Analysis and Design.
UNIT-V The MVC architecture and Struts Framework.
Type-Directed, Whitespace-Delimited Parsing for Embedded DSLs Cyrus Omar School of Computer Science Carnegie Mellon University [GlobalDSL13] Benjamin ChungAlex.
Extensible Type-Driven Parsing for Embedded DSLs in Wyvern Cyrus Omar Benjamin Chung Darya Kurilova Ligia Nistor Alex Potanin (Victoria University of Wellington)
Design Patterns Introduction. What is a Design Pattern?  A technique to repeat designer success.  Borrowed from Civil and Electrical Engineering domains.
Sumant Tambe, et. al LEESA DSPD 2008 An Embedded Declarative Language for Hierarchical Object Structure Traversal Sumant Tambe* Aniruddha Gokhale Vanderbilt.
Xactium xDSLs Run Models Not Code Tony Clark
Lesley Bross, August 29, 2010 ArcGIS 10 add-in glossary.
Zhonghua Qu and Ovidiu Daescu December 24, 2009 University of Texas at Dallas.
Yu Sun 1, Zekai Demirezen 1, Marjan Mernik 2, Jeff Gray 1, Barret Bryant 1 1 Department of Computer and Information Sciences, University of Alabama at.
XML and its applications: 4. Processing XML using PHP.
Introduction to XSLT By Ed Rosenthal And Dave Pion.
Chapter 1 Introduction Dr. Frank Lee. 1.1 Why Study Compiler? To write more efficient code in a high-level language To provide solid foundation in parsing.
ITCS 6010 SALT. Speech Application Language Tags (SALT) Speech interface markup language Extension of HTML and other markup languages Adds speech and.
Introduction to MDA (Model Driven Architecture) CYT.
A REFACTORING TOOL FOR DESIGN PATTERNS WITH MODEL TRANSFORMATIONS Zekai Demirezen Yasemin Topaloğlu Ege University Department of Computer Engineering
INTERPRETING IMPERATIVE PROGRAMMING LAGUAGES IN EXTENSIBLE STYLESHEET LANGUAGE TRANSFORMATIONS (XSLT) Authors: Ruhsan Onder Assoc.
Intro. to XML & XML DB Bun Yue Professor, CS/CIS UHCL.
Building Tools by Model Transformations in Eclipse Oskars Vilitis, Audris Kalnins, Edgars Celms, Elina Kalnina, Agris Sostaks, Janis Barzdins Institute.
I T & S A e r o s p a c eD e f e n c e THALES Research & Technology THALES recommendations for the final OMG standard on Query / Views / Transformations.
RELATIONAL FAULT TOLERANT INTERFACE TO HETEROGENEOUS DISTRIBUTED DATABASES Prof. Osama Abulnaja Afraa Khalifah
UDM An Infrastructure for Implementing Domain-Specific Modeling Languages Endre Magyari, Arpad Bakay, Andras Lang, Tamas Paka, Attila Vizhanyo, Aditya.
Copyright © 2007 Addison-Wesley. All rights reserved.1-1 Reasons for Studying Concepts of Programming Languages Increased ability to express ideas Improved.
Model-Driven Engineering for Development-Time QoS Validation of Component-based Software Systems James Hill, Sumant Tambe & Aniruddha Gokhale Vanderbilt.
A Little Language for Surveys: Constructing an Internal DSL in Ruby H. Conrad Cunningham Computer and Information Science University of Mississippi.
Generative Programming. Automated Assembly Lines.
L10 - April 12, 2006copyright Thomas Pole , all rights reserved 1 Lecture 10: Software Assets and Text: Ch. 8: Language Anatomy and Ch 9: Families.
GPCE'04, Vancouver 1 Towards a General Template Introspection Library in C++ István Zólyomi, Zoltán Porkoláb Department of Programming Languages and Compilers.
INRIA - LaBRICharles Consel Jan-06 1 Domain-Specific Software Engineering Charles Consel Phoenix Research Group LaBRI /INRIA-Futurs January 2006.
Grid programming with components: an advanced COMPonent platform for an effective invisible grid © 2006 GridCOMP Grids Programming with components. An.
Sheet 1 DocEng’03, Grenoble, November 2003 Model Driven Architecture based XML Processing Ivan Kurtev, Klaas van den Berg University of Twente, the Netherlands.
Towards the better software metrics tool motivation and the first experiences Gordana Rakić Zoran Budimac.
December 4, ICSSEA’03 The SmartTools Software Factory The MDA approach and Generative programming for Software Development:
Visual Specification of a DSL Processor Debugger Tamás Mészáros and Tihamér Levendovszky Budapest University of Technology and Economics.
Sumant Tambe, et. al LEESA DSL / 21 LEESA: Embedding Strategic and XPath-like Object Structure Traversals in C++ Sumant Tambe Aniruddha Gokhale.
Weaving a Debugging Aspect into Domain-Specific Language Grammars SAC ’05 PSC Track Santa Fe, New Mexico USA March 17, 2005 Hui Wu, Jeff Gray, Marjan Mernik,
User Profiling using Semantic Web Group members: Ashwin Somaiah Asha Stephen Charlie Sudharshan Reddy.
Dom and XSLT Dom – document object model DOM – collection of nodes in a tree.
OOPSLA workshop on Domain-Specific Visual Languages 1 Juha-Pekka Tolvanen, Steven Kelly, Jeff Gray, Kalle Lyytinen.
Visualization Four groups Design pattern for information visualization
The Visitor Pattern (Behavioral) ©SoftMoore ConsultingSlide 1.
ANU comp2110 Software Design lecture 8 COMP2110 Software Design in 2004 lecture 8 Software Architecture 1 of 2 (design, lecture 3 of 6) Goal of this small.
Towards A QoS Modeling and Modularization Framework for Component-based Systems Sumant Tambe* Akshay Dabholkar Aniruddha Gokhale Amogh Kavimandan (Presenter)
Fault-tolerance for Component-based Systems – An Automated Middleware Specialization Approach Sumant Tambe* Akshay Dabholkar Aniruddha Gokhale Abhishek.
4 th Workshop for TAO and CIAO July 16, 2004 MOF-Compliant Modeling of Middleware Jeff Parsons & Matt Emerson ISIS Vanderbilt University Nashville, TN.
FUNCTIONAL PROGRAMING AT WORK - HASKELL AND DOMAIN SPECIFIC LANGUAGES Dr. John Peterson Western State Colorado University.
AUTOMATIC GENERATION OF MODEL TRAVERSALS FROM METAMODEL DEFINITIONS Authors: Tomaž Lukman, Marjan Mernik, Zekai Demirezen, Barrett Bryant, Jeff Gray ACM.
A Framework for Automated and Composable Testing of Component-based Services Miguel A. Jiménez, Ángela Villota, Norha M. Villegas, Gabriel Tamura, Laurence.
ECE 750 Topic 8 Meta-programming languages, systems, and applications Automatic Program Specialization for J ava – U. P. Schultz, J. L. Lawall, C. Consel.
Declarative Languages With XML Michael D. Thomas
Slice & dice the Web with XmlPL, The XML Processing Language A presentation for Boise Code Camp 2007 Joseph Coffland Cauldron Development LLC.
Part 1: Overview of LINQ Intro to LINQ Presenter: PhuongNQK.
Sumant Tambe* Akshay Dabholkar Aniruddha Gokhale
PROGRAMMING LANGUAGES
Introduction to Design Patterns
Object Oriented Programming in Java
Implementing Language Extensions with Model Transformations
Multiple Aspect Modeling of the Synchronous Language Signal
Ivan Kurtev, Klaas van den Berg Software Engineering Group
Implementing Language Extensions with Model Transformations
Presentation transcript:

Sumant Tambe, et. al LEESA DSPD 2008 An Embedded Declarative Language for Hierarchical Object Structure Traversal Sumant Tambe* Aniruddha Gokhale Vanderbilt University, Nashville, TN, USA *Contact : 2nd International Workshop on Domain-Specific Program Development (DSPD), GPCE 2008, Nashville, TN, USA

2 Sumant Tambe, et. al LEESA DSPD 2008 Object Structures and Operations  Object Structures  Hierarchical data structure (XML)  Object Graph/Network (e.g., Domain-specific Models)  Uses of object structures  Domain-specific modeling language (DSML) interpreters, transformations  Systems using XML data binding  Component deployment & configuration engines  Web services  Common operations  Queries (search)  Traversals (visit each element)

3 Sumant Tambe, et. al LEESA DSPD 2008 Existing Approaches and Their Limitations ApproachLimitations  Imperative object-oriented API  Implemented using classes, interfaces, and collections of objects in Java, C++  Visitor pattern: separates visitation actions from traversal (Good!)  XQuery / XSLT / XPath  W3C standards  Suitable for hierarchical structures  Traversal/Visitor Language (TVL)  Separate specification language  Autogenerates traversal code  LINQ (Language Integrated Query)  Used in C# and VB  Based on Microsoft.NET framework  Imperative object-oriented API  Code bloat while using large/complex data models. Intent is lost  In multiple traversals: traversals are coupled with visitation actions – limits reusability  XQuery / XSLT / Xpath  Only hierarchical. No support for object graphs. No static checking  Traversal/Visitor Language (TVL)  High cost of development of lexer/parser  Must learn new language (syntax, semantics) and code generation step  LINQ  Depends on.NET framework features

4 Sumant Tambe, et. al LEESA DSPD 2008 Solution: LEESA  LEESA: Language for Embedded Query and Traversal  Features of LEESA  A domain-specific embedded language (DSEL) for writing queries and traversals over object graphs (models)  Provides short and expressive syntax for traversal  Supports multiple traversal strategies  Traversal is checked statically by that compiler  Supports Visitor: decouples visitation actions from traversal  Cheap to develop because it is embedded in C++  Reuses C++ lexer, parser and whole slew of standard libraries  Much flatter learning curve than external DSLs  Seamless transition between LEESA and traditional C++

5 Sumant Tambe, et. al LEESA DSPD 2008 Layered Architecture of LEESA DSL for query and traversal A C++ generative programming technique OO access API (UDM, XML data binding) In memory representation of object structure

6 Sumant Tambe, et. al LEESA DSPD 2008 LEESA Expressions Example 1: Give all the States under RootFolder RootFolder() >> StateMachine() >> State() Example 2: Select states whose name start with “S” Returns a std::set S >> SelectByName(State(),”S?”) Returns a std::set RootFolder() >> StateMachine() >> State()S = Examples based on the StateMachine meta-model => Labeling and later composition of expressions is possible

7 Sumant Tambe, et. al LEESA DSPD 2008  Visitor pattern is supported  Add visitor object inside square bracket  Calls corresponding Visit* function  Separates visitation actions from traversal order Object Structure Visitation Using LEESA CountVisitor cv; RootFolder() >> StateMachine()[cv] >> State()[cv] >> Property()[cv]  “>>” visits in breadth-first order  “>>=” visits in depth-first order  Query operators work with both strategies  Traversal strategies can be mixed together RootFolder() >>= StateMachine()[cv] >>= State()[cv] >>= Property()[cv] Example 3: Visit each StateMachine, State, and Property and count them Example 4: Same as before but in depth-first order

8 Sumant Tambe, et. al LEESA DSPD 2008 Layered Architecture of LEESA DSL for query and traversal A C++ generative programming technique OO access API (UDM, XML data binding) In memory representation of object structure

9 Sumant Tambe, et. al LEESA DSPD 2008 Overview of Expression Templates  First developed in 1994 by Todd Veldhuizen  Known uses: Boost.Spirit parser, Blitz++ scientific computing library  Based on the idea of lazy evaluation  Execute expressions much later in the program from the point of their definition  Pass an expression -- not the result of the expression -- as a parameter to a function  E.g., foo (x * y + z);  The result of expression is computed before calling the function  Instead, an abstract syntax tree (AST) is created at compile-time using templates and operator overloading XY Z + *

10 Sumant Tambe, et. al LEESA DSPD 2008 Returns a set of R LEESA’s Expression Templates  LEESA defines a couple of expression templates and many operators  We’ll consider GetChildren operator  ChainExpr expression template  ChainExpr creates an AST that embodies traversal GetChildren  L.children (); RootFolder() >> StateMachine() >> State() >> Property() GetChildren  StateMachine.children ();

11 Sumant Tambe, et. al LEESA DSPD 2008 Future Work  How to improve error reporting?  Promising solution: C++ concept checking  How to make it less dependent on structure?  Structure-shyness property  Promising solution: template metaprogramming RootFolder() >> ***** >> Property() Questions?