Program Comprehension for Domain-Specific Languages Maria João Varanda 1, Marjan Mernik 2, Daniela da Cruz 3, Pedro Henriques 3 1 Polytechnic Institute.

Slides:



Advertisements
Similar presentations
Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
Advertisements

25 February 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department.
Requirements Engineering n Elicit requirements from customer  Information and control needs, product function and behavior, overall product performance,
Object-Oriented Analysis and Design
Automated Analysis and Code Generation for Domain-Specific Models George Edwards Center for Systems and Software Engineering University of Southern California.
Software Reuse Building software from reusable components Objectives
1/18 CS 693/793 Lecture 09 Special Topics in Domain Specific Languages CS 693/793-1C Spring 2004 Mo, We, Fr 10:10 – 11:00 CH 430.
Knowledge Acquisitioning. Definition The transfer and transformation of potential problem solving expertise from some knowledge source to a program.
Intelligent User Interfaces Research Group Directed by: Frank Shipman.
Introduction to Databases Transparencies
Kari R. Schougaard, PhD Stud. Værktøjer og Teknikker, 2006 UNIVERSITY OF AARHUS Department of Computer Science Unified Modeling Language Visual language.
CS 290C: Formal Models for Web Software Lecture 6: Model Driven Development for Web Software with WebML Instructor: Tevfik Bultan.
Chapter 1 Principles of Programming and Software Engineering.
© Copyright Eliyahu Brutman Programming Techniques Course.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Systems Engineering Foundations of Software Systems Integration Peter Denno, Allison Barnard Feeney Manufacturing Engineering Laboratory National Institute.
Strategies to relate the program and problem domains using code instrumentation Mario Marcelo Berón University of Minho Pedro Rangel Henriques University.
Domain-Specific Software Engineering Alex Adamec.
Spectra Software Defined Radio Products Applying Model Driven Design, Generative Programming, and Agile Software Techniques to the SDR Domain OOPSLA '05.
 A set of objectives or student learning outcomes for a course or a set of courses.  Specifies the set of concepts and skills that the student must.
PROGRAMMING LANGUAGES The Study of Programming Languages.
Software Engineering Muhammad Fahad Khan
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 18 Slide 1 Software Reuse.
Bridging the chasm between MDE and the world of compilation Nondini Das 1.
Requirements Analysis
IMPROVING PROGRAM COMPREHENSION TOOLS FOR DOMAIN-SPECIFIC LANGUAGES Supervisors: Professor Pedro Rangel Henriques Professora Maria João Varanda Pereira.
Robert Tairas, Marjan Mernik, Jeff Gray Using Ontologies in the Domain Analysis of Domain-Specific Languages Workshop on Transformation and Weaving Ontologies.
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.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
Building Tools by Model Transformations in Eclipse Oskars Vilitis, Audris Kalnins, Edgars Celms, Elina Kalnina, Agris Sostaks, Janis Barzdins Institute.
Unit Testing for Domain-Specific Languages 1 Hui Wu, 1 Jeff Gray and 2 Marjan Mernik 1 University of Alabama at Birmingham, USA
Programming in Java Unit 3. Learning outcome:  LO2:Be able to design Java solutions  LO3:Be able to implement Java solutions Assessment criteria: 
Generative Programming. Automated Assembly Lines.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
1 Introduction to Software Engineering Lecture 1.
Illustrations and Answers for TDT4252 exam, June
Unit-1 Introduction Prepared by: Prof. Harish I Rathod
Lecture # 3 & 4 Chapter # 2 Database System Concepts and Architecture Muhammad Emran Database Systems 1.
Knowledge Representation of Statistic Domain For CBR Application Supervisor : Dr. Aslina Saad Dr. Mashitoh Hashim PM Dr. Nor Hasbiah Ubaidullah.
Model-Driven Engineering of Behaviors in User Interfaces Efrem Mbaki & Jean Vanderdonckt Université catholique de Louvain (UCL) Louvain School of Management.
A Context Model based on Ontological Languages: a Proposal for Information Visualization School of Informatics Castilla-La Mancha University Ramón Hervás.
FDT Foil no 1 On Methodology from Domain to System Descriptions by Rolv Bræk NTNU Workshop on Philosophy and Applicablitiy of Formal Languages Geneve 15.
Towards Multi-Paradigm Software Development Valentino Vranić Department of Computer Science and Engineering Faculty of Electrical Engineering.
1. 2 Preface In the time since the 1986 edition of this book, the world of compiler design has changed significantly 3.
Semantics for DSL Group Members: Ritu Arora, Diyang Chu, Zekai Demirezen, Jeff Gray, Jacob Gulotta, Luis Pedro, Arturo Sanchez, Greg Sullivan,Ximing Yu.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
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,
ICT EMMSAD’05 13/ Assessing Business Process Modeling Languages Using a Generic Quality Framework Anna Gunhild Nysetvold* John Krogstie *, § IDI,
Volgograd State Technical University Applied Computational Linguistic Society Undergraduate and post-graduate scientific researches under the direction.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
CASE (Computer-Aided Software Engineering) Tools Software that is used to support software process activities. Provides software process support by:- –
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
SSQSA present and future Gordana Rakić, Zoran Budimac Department of Mathematics and Informatics Faculty of Sciences University of Novi Sad
Winter 2011SEG Chapter 11 Chapter 1 (Part 1) Review from previous courses Subject 1: The Software Development Process.
Parastoo Mohagheghi 1 A Multi-dimensional Framework for Characterizing Domain Specific Languages Øystein Haugen Parastoo Mohagheghi SINTEF, UiO 21 October.
1 Unit Testing for Domain-Specific Languages 1 Hui Wu, 1 Jeff Gray and 2 Marjan Mernik 1 University of Alabama at Birmingham, USA
DS(M)Ls for End-Users and Domain Experts? Panel on Creating DSLs Models in Software Engineering Workshop Zurich, Switzerland June 3, 2012 Jeff Gray University.
Concepts and Realization of a Diagram Editor Generator Based on Hypergraph Transformation Author: Mark Minas Presenter: Song Gu.
TRAINING PACKAGE The User Action Framework Reliability Study July 1999.
DSLs: The Good, the Bad, and the Ugly Marjan Mernik University of Maribor Faculty of Electrical Engineering and Computer Science.
AUTOMATIC GENERATION OF MODEL TRAVERSALS FROM METAMODEL DEFINITIONS Authors: Tomaž Lukman, Marjan Mernik, Zekai Demirezen, Barrett Bryant, Jeff Gray ACM.
DESIGN PROCESS AND CONCEPTS. Design process s/w design is an iterative process through which requirements are translated into a “blueprint” for constructing.
 System Requirement Specification and System Planning.
Principles of Programming & Software Engineering
Object-Oriented Software Engineering Using UML, Patterns, and Java,
Knowledge Representation
Informatics 121 Software Design I
Need for the subject.
Ivan Kurtev, Klaas van den Berg Software Engineering Group
Abstract Types Defined as Classes of Variables
Presentation transcript:

Program Comprehension for Domain-Specific Languages Maria João Varanda 1, Marjan Mernik 2, Daniela da Cruz 3, Pedro Henriques 3 1 Polytechnic Institute of Bragança, Dep. of Computing and Communications, Portugal 2 University of Maribor, Fac. of Electrical Engineering and Computer Science, Slovenia 3 University of Minho, Dep. of Computer Science, Portugal

Context Program Comprehension (PC) is really an hard and complex task, requiring : cognitive models, data extraction, information representation, knowledge exploration, sw visualization, sw metrics …

Context In order to reach a full understanding of software systems, it is crucial to relate problem and program domains. Program Visualization and Program Animation are important aids to make this process easier, more effective!

Context The outcome of existing tools for General Purpose Languages (GPL) is far away from being as good as desirable !

CoRTA'08 - Bragança, 2008-July-115 Motivation To introduce a research project aimed at understanding how the standard approaches for the comprehension of GPL can be adapted for the comprehension of domain specific languages (DSL).

CoRTA'08 - Bragança, 2008-July-116 Motivation We believe that specific visualizations could be defined to improve the comprehension of the descriptions in that particular domain !

CoRTA'08 - Bragança, 2008-July-117 Outline DSLs DSLpc Project Cognitive Dimensions Framework Methods and Techniques for PC User-centric visualization for DSL ◦ Case-studies Conclusion

CoRTA'08 - Bragança, 2008-July-118 Domain Specific Languages Languages tailored to specific application domain that offer to users more appropriate notations and abstractions. DSLs are more expressive and are easier to use than GPLs for the domain in question, with gains in productivity and maintenance costs.

CoRTA'08 - Bragança, 2008-July-119 Domain Specific Languages Some specific goals behind the design of DSLs are: to make programming more accessible to end-users, to improve correctness of the written programs, and to improve the program developing time. to make maintenance easier.

CoRTA'08 - Bragança, 2008-July-1110 DSLpc Project In this project we have the following objectives: ◦ to measure how easy is to use DSLs (comparing with the use of GPLs), ◦ to understand which one of the existing PC approaches are applicable to DSLs and how could they be improved, ◦ to propose a set of techniques to improve the PC of DSLs, and ◦ to allow the enhancement of DSL program comprehension by enabling user-centric visualization.

CoRTA'08 - Bragança, 2008-July-1111 DSLpc Project how easy is to understand DSLs prgs As it does not exists any formal study on advantges of DSLs, our purpose is to identify the aspects among the CDF that are enhanced in the context of DS Languages

CoRTA'08 - Bragança, 2008-July-1112 DSLpc Project how easy is to understand DSLs prgs Cognitive dimensions framework (CDF) – a set of 13 guidelines – provides relevant aspects to be used to determine how easy is: ◦ to learn the language, ◦ to develop a program, ◦ to evolve a program, ◦ to comprehend a program.

CoRTA'08 - Bragança, 2008-July-1113 DSLpc Project PC Approaches

CoRTA'08 - Bragança, 2008-July-1114 DSLpc Project PC Approaches -- Data Extraction Data necessary for DSL comprehension, that must be extracted, is specific and should be identified case-by-case.

CoRTA'08 - Bragança, 2008-July-1115 DSLpc Project PC Approaches -- Data Extraction We will consider 2 families of extraction methods: ◦ Non-invasive: that does not modify the source program and uses abstract interpretation techniques. ◦ Invasive: program instrumentation modifies the source code (inserting inspector functions) to be able to collect dynamic information at runtime.

CoRTA'08 - Bragança, 2008-July-1116 DSLpc Project PC Approaches -- Data Extraction The development of both approaches completely rely on traditional grammar-oriented techniques for compiler writing and implementation. We use Translation Grammars or Attribute Grammars, and resort to Compiler Generators to automatically produce the code of the desired processors.

CoRTA'08 - Bragança, 2008-July-1117 DSLpc Project PC Approaches -- Data Extraction If DSLs processing is supported by grammars technology we can affirm that existing PC approches (methods and techniques) for extraction, are reusable in that specific context.

CoRTA'08 - Bragança, 2008-July-1118 DSLpc Project PC Approaches – Information Rep. We also believe that traditional PC methods and techniques for Information Representation and storage are reusable in that specific context.

CoRTA'08 - Bragança, 2008-July-1119 DSLpc Project PC Approaches -- Knowledge Exploration Inference mechanisms, metrics, and visualization/navigation over the information so far collected, may also be inherited from generic PC approaches. That intuition comes directly from the previous slide --- the same IR schema is used for GPL/DSL contexts.

CoRTA'08 - Bragança, 2008-July-1120 DSLpc Project PC Approaches -- Knowledge Exploration Working with DSLs, we can take total profit of the inherent speciality, and look for more expressive and adequate visual representations for each domain and also metrics and visual interaction and querying.

CoRTA'08 - Bragança, 2008-July-1121 DSLpc Project PC Approaches -- Knowledge Exploration Program and Problem comprehension can be achieved easily because it is easier to present a conceptual mapping between both.

CoRTA'08 - Bragança, 2008-July-1122 DSLpc Project User-centric Visualization It would be useful to construct visualization tools where end-users, not language designer or developer, can easily specify their own visualization---problem and person specific.

CoRTA'08 - Bragança, 2008-July-1123 DSLpc Project User-centric Visualization Concerning the implementation, we think that we can rely upon the approach followed in Alma, a system for program visualization and animation that deals easily with different programming languages and allows the construction of the most appropriate visualizations for each domain.

CoRTA'08 - Bragança, 2008-July-1124 DSLpc Project User-centric Visualization The core of Alma is similar to a compiler's Back-End that takes as input an abstract representation, a DAST (Decorated Abstract Syntax Tree), and implements the visualizer and the animator components in a systematic way.

CoRTA'08 - Bragança, 2008-July-1125 DSLpc Project User-centric Visualization This is achieved by means of two rule bases, one for the visualization of tree nodes,and another for tree rewriting.

CoRTA'08 - Bragança, 2008-July-1126 DSLpc Project User-centric Visualization We plan to build a graphical editor that will provide to the end-user the chance to associate to each node of the DAST: ◦ a geometric figure (a square, circle, etc), or an image. ◦ an external (end-user defined) drawing function.

CoRTA'08 - Bragança, 2008-July-1127 DSLpc Project User-centric Visualization This will permit to build specific drawings parameterized to fit well in each particular DSL. The external function will be called using the attributes available in the DAST nodes to tune the picture to each concrete situation.

CoRTA'08 - Bragança, 2008-July-1128 DSLpc Project User-centric Visualization We can include that functionality, keeping the tree visualizer engine generic and unchanged; also the animator system, based on a tree rewriting engine, will be kept unchanged.

CoRTA'08 - Bragança, 2008-July-1129 Case-study 1: Programming a Cleaning Robot A sample program to move Roby: xi= 0 yi= 0 DOWN 3 RIGHT 7 UP 2 LEFT 4

CoRTA'08 - Bragança, 2008-July-1130 Case-study 1: Programming a Cleaning Robot A Program Domain View (operational)

CoRTA'08 - Bragança, 2008-July-1131 Case-study 1: Programming a Cleaning Robot A Problem Domain View (behavioral)

CoRTA'08 - Bragança, 2008-July-1132 Case-study 2: FDL – Feature Description Language An FDL Description Car: all(carBody,Transmission,Engine,HorsePower, pullsTrailer?) Transmission: one_of (automatic, manual) Engine: more_of (electric, gasoline ) HorsePower: one_of(lowPower, mediumPower, highPower)

CoRTA'08 - Bragança, 2008-July-1133 Case-study 2: FDL – Feature Description Language A Program Domain View (operational)

CoRTA'08 - Bragança, 2008-July-1134 Case-study 2: FDL – Feature Description Language A Problem Domain View (behavioral)

CoRTA'08 - Bragança, 2008-July-1135 Conclusion We have introduced the 2 main directions of our new bilateral (Portugal/Slovenia) project for joint research: ◦ to understand and measure how easy is to comprehend and handle programs written in DSLs; ◦ to addapt and improve Program Comprehension Tools for DSLs programs.

CoRTA'08 - Bragança, 2008-July-1136 Conclusion In the first case, we believe that DSL concept implies that a DSL program should be more natural and clearer than the equivalent solution expressed in a General Purpose Language (GPL), but we intent to prove it analyzing DSL actual impact according to the aspects defined in the Cognitve Dimension Framework

CoRTA'08 - Bragança, 2008-July-1137 Conclusion We feel that some of the cognitive dimensions (like hidden dependencies, hard mental operations, secondary notation, visibility, role expressiveness) can benefit from DSL program visualization and program comprehension tools, and we intend to prove that!

CoRTA'08 - Bragança, 2008-July-1138 Conclusion In the second case, we have to directions: to corroborate our statement that classic approaches for GPLs Program Comprehension, can be reused for DSLs; to enhance DSL program comprehension tools, by enabling user-centric visualization.

CoRTA'08 - Bragança, 2008-July-1139 Conclusion We made a concrete proposal: to improve the program understanding tool Alma with extra functionality to allow the user to specify the visual representation he wants to apply for each particular DSL. This allows a better visualization of the Problem Domain, making it closer to Program Domain.