Cupid A Domain Specific Language for Coupled ESMs Rocky Dunlap Coupling Workshop 2013 1 Second Workshop on Coupling Technologies for Earth System Modeling.

Slides:



Advertisements
Similar presentations
Integration of MBSE and Virtual Engineering for Detailed Design
Advertisements

Object-Oriented Application Frameworks Much of the cost and effort stems from the continuous re- discovery and re-invention of core concepts and components.
.NET Technology. Introduction Overview of.NET What.NET means for Developers, Users and Businesses Two.NET Research Projects:.NET Generics AsmL.
INTRODUCTION TO SIMULATION WITH OMNET++ José Daniel García Sánchez ARCOS Group – University Carlos III of Madrid.
IAAnalyzer: Towards a Model-Driven Modeling and Analysis Framework for C ONNECT(ors) Massimo Tivoli, University of L’Aquila (UNIVAQ)
Feature Analysis of Coupling Technologies for Climate Models Spencer Rugaber, Rocky Dunlap and Leo Mark College of Computing Georgia Institute of Technology.
Presented by: Thabet Kacem Spring Outline Contributions Introduction Proposed Approach Related Work Reconception of ADLs XTEAM Tool Chain Discussion.
Train Control Language Teaching Computers Interlocking By: J. Endresen, E. Carlson, T. Moen1, K. J. Alme, Haugen, G. K. Olsen & A. Svendsen Synthesizing.
Automated Analysis and Code Generation for Domain-Specific Models George Edwards Center for Systems and Software Engineering University of Southern California.
Introduction to Software Architecture. What is Software Architecture?  It is the body of methods and techniques that help us to manage the complexities.
UML CASE Tool. ABSTRACT Domain analysis enables identifying families of applications and capturing their terminology in order to assist and guide system.
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.
Principle of Functional Verification Chapter 1~3 Presenter : Fu-Ching Yang.
Generative Programming. Generic vs Generative Generic Programming focuses on representing families of domain concepts Generic Programming focuses on representing.
Stimulating reuse with an automated active code search tool Júlio Lins – André Santos (Advisor) –
Introduction to Software Testing
CASE Tools And Their Effect On Software Quality Peter Geddis – pxg07u.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 18 Slide 1 Software Reuse.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 18 Slide 1 Software Reuse.
Software Product Families. Generative Programming Main text: Ian Sommerville, Software Engineering, 8 th edition, chapter 18 Additional readings: K. Czarnecki.
Workshop on Integrated Application of Formal Languages, Geneva J.Fischer Mappings, Use of MOF for Language Families Joachim Fischer Workshop on.
Metadata Creation with the Earth System Modeling Framework Ryan O’Kuinghttons – NESII/CIRES/NOAA Kathy Saint – NESII/CSG July 22, 2014.
“Enhancing Reuse with Information Hiding” ITT Proceedings of the Workshop on Reusability in Programming, 1983 Reprinted in Software Reusability, Volume.
Architecture-Based Runtime Software Evolution Peyman Oreizy, Nenad Medvidovic & Richard N. Taylor.
Model transformation with a dedicated imperative language IRISA Rennes (France) - Triskell team Jean-Marc Jézéquel Didier Vojtisek Jean-Philippe Thibault.
Introduction to MDA (Model Driven Architecture) CYT.
1 CW 2015, Manchester, 04/ Coupling technology benchmarking in IS-ENES2 Coupling technology benchmarking in IS-ENES2 IS-ENES2 WP10-T3 Evaluation.
Building Tools by Model Transformations in Eclipse Oskars Vilitis, Audris Kalnins, Edgars Celms, Elina Kalnina, Agris Sostaks, Janis Barzdins Institute.
MathCore Engineering AB Experts in Modeling & Simulation WTC.
Workshop 16: An upward shift in abstraction leads to a corresponding increase in productivity. In the past this has occurred when programming languages.
ESMF Code Generation Rocky Dunlap Spencer Rugaber Leo Mark Georgia Tech College of Computing.
Model-Driven Analysis Frameworks for Embedded Systems George Edwards USC Center for Systems and Software Engineering
R R R 1 Frameworks III Practical Issues. R R R 2 How to use Application Frameworks Application developed with Framework has 3 parts: –framework –concrete.
Grid Computing Research Lab SUNY Binghamton 1 XCAT-C++: A High Performance Distributed CCA Framework Madhu Govindaraju.
Generative Programming. Automated Assembly Lines.
Abstract We present two Model Driven Engineering (MDE) tools, namely the Eclipse Modeling Framework (EMF) and Umple. We identify the structure and characteristic.
1 Introduction to Software Engineering Lecture 1.
Introduction to Software Engineering. Why SE? Software crisis manifested itself in several ways [1]: ◦ Project running over-time. ◦ Project running over-budget.
Chapter 8 Object Design Reuse and Patterns. Object Design Object design is the process of adding details to the requirements analysis and making implementation.
Dr. Darius Silingas | No Magic, Inc. Domain-Specific Profiles for Your UML Tool Building DSL Environments with MagicDraw UML.
OOPSLA workshop on Domain-Specific Visual Languages 1 Framework for Domain-Specific Visual Languages Juha-Pekka.
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.
ModelPedia Model Driven Engineering Graphical User Interfaces for Web 2.0 Sites Centro de Informática – CIn/UFPe ORCAS Group Eclipse GMF Fábio M. Pereira.
Cupid: A Smart Development Environment for Earth System Models Rocky Dunlap research sponsored by NASA/ROSES 1.
Page 1© Crown copyright 2004 FLUME Metadata Steve Mullerworth 3 rd -4 th October May 2006.
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,
ESMF Code Generation with Cupid Update and Demo October 2009 Rocky Dunlap Spencer Rugaber Leo Mark Georgia Tech College of Computing.
OOPSLA workshop on Domain-Specific Visual Languages 1 Juha-Pekka Tolvanen, Steven Kelly, Jeff Gray, Kalle Lyytinen.
Page 1© Crown copyright 2004 FLUME Marco Christoforou, Rupert Ford, Steve Mullerworth, Graham Riley, Allyn Treshansky, et. al. 19 October 2007.
CrossCheckSimulation Results Conclusions References Model Instrumentation Modeling with CUTS Property Specification SPRUCE Challenge Problem Checking Model.
February 8, 2006copyright Thomas Pole , all rights reserved 1 Lecture 3: Reusable Software Packaging: Source Code and Text Chapter 2: Dealing.
Software Engineering Issues Software Engineering Concepts System Specifications Procedural Design Object-Oriented Design System Testing.
An update on BFG, The Bespoke Framework Generator Graham Riley (& Rupert Ford, STFC) Coupling Workshop Boulder, Colorado - February 20 th -22 nd.
Chapter 18 Object Database Management Systems. Outline Motivation for object database management Object-oriented principles Architectures for object database.
1 Integrating Models with Domain-Specific Modeling Languages 18 October 2010 Steven Kelly & Juha-Pekka Tolvanen.
Yu, et al.’s “A Model-Driven Development Framework for Enterprise Web Services” In proceedings of the 10 th IEEE Intl Enterprise Distributed Object Computing.
From Use Cases to Implementation 1. Structural and Behavioral Aspects of Collaborations  Two aspects of Collaborations Structural – specifies the static.
Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.
Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks.
George Edwards Computer Science Department Center for Systems and Software Engineering University of Southern California
From Use Cases to Implementation 1. Mapping Requirements Directly to Design and Code  For many, if not most, of our requirements it is relatively easy.
Designing Software for Ease of Extension and Contraction
Model-Driven Analysis Frameworks for Embedded Systems
Evaluating Compuware OptimalJ as an MDA tool
Execute your Processes
Automated Analysis and Code Generation for Domain-Specific Models
From Use Cases to Implementation
Software Architecture & Design
Presentation transcript:

Cupid A Domain Specific Language for Coupled ESMs Rocky Dunlap Coupling Workshop Second Workshop on Coupling Technologies for Earth System Modeling NCAR, Boulder, Colorado, February 20-22, 2013

Outline Motivation and Goals of Cupid Overview and Current Status Example Application Evaluation and Challenges Future Work 2

Motivation and Goals Earth System Modeling software is highly complex Much effort is spent dealing with accidental details of parallel programming, array manipulations, etc. Goal of Cupid: 3 Provide significant increases in modeler productivity by raising the level of abstraction of the coupling aspects of ESMs.

Different Kinds of Performance 4 # of nodes days simulated per hour papers published hours of effort model scalability modeler productivity

Form of ReuseProgramming TasksExample Technologies Software Libraries Instantiate library types; call library subroutines MCT, PSMILe (OASIS), OASIS-MCT Component Technologies Write explicit interfaces; implementation via traditional programming; composition via interface “wiring” CCA Frameworks Same as library + implement fine- grained, pre-defined interfaces (due to inversion of control) ESMF, CSDMS, OpenPALM Generative/ Domain- specific languages Programs written in a custom language with domain-specific concepts; textual or visual notations BFG XML, PrePALM (OpenPALM), Cupid How does the form of code reuse affect developer productivity? 5

6 General Purpose Language (Fortran 90) program module if, then, else, endif do, do while call integer, real, double precision dimension open, read continue, stop Domain Specific Language gridded component coupler component driver state decomposition grid, mesh field redist, regrid clock

Cupid Overview 7 Coupling Specification (Cupid DSL) Black box Generated Application (Fortran 90) Executable Cupid Compiler Fortran Compiler White box Maintenance ESMF link Black box

Domain Model and Constraints 8 self.fieldConnection->forAll( srcField.scope = self.srcComponent and dstField.scope = self.dstComponent)

Cupid Compiler 9 [template public genESMFInitMethod(c : ESMFGriddedComponent)] subroutine init_(comp, istate, ostate, clock, rc) type(ESMF_GridComp) :: comp type(ESMF_State) :: istate type(ESMF_State) :: ostate type(ESMF_Clock) :: clock integer, intent(out) :: rc... [for (field : ESMFField | c.item->filter(ESMFField))] [field.name/] = ESMF_FieldCreate(grid=[field.grid.name/], arrayspec=[field.arraySpec.name/], & indexflag=[field.index/], & totalLWidth=[toFortranArrayConstructor(field.totalLWidth)/], & totalUWidth=[toFortranArrayConstructor(field.totalUWidth)/], & name="[field.name/]", rc=rc) [/for]... [/template] MOF Model to Text Transformation Language (OMG)

Eclipse-based Implementation 10 Eclipse Modeling Framework Ecore Metamodel Acceleo Model to Text Photran Editor

Current Status 11 ESMF TypePublic API MethodsDSL Generated Calls ESMF_Array222 ESMF_ArraySpec41 ESMF_Clock202 ESMF_CplComp245 ESMF_DistGrid101 ESMF_Field279 ESMF_Grid183 ESMF_GridComp246 ESMF_State184 ESMF_Time161 ESMF_TimeInterval182 (Framework level)252 (12 Unsupported types) Calls can be generated to ~10% of API methods. 11 of 23 ESMF types represented in DSL.

12 Case Study: ESMF Coupled Flow Demo

Caution: Some coding required! 13 Inserted Code reading namelists, setting parameters set up initial conditions and boundary conditions field updates for each timestep calls to halo operations Generated Code static superstructure instantiation of components, states, and fields populating import and export states calls to child components coupler component (redist or regrid) freeing memory Modified Code grid coordinates grid inheritance

Challenge: DSL Integration How to integrate with scientific code? Possible solutions: – Skeleton approach Developer fills in science implementation – Model interface approach A set of Fortran subroutines with model fields as subroutine arguments (à la BFG) Define interfaces using Scientific Interface Description Language (SIDL) Self-describing models (à la CSDMS BMI) 14

Challenge: Representing Behavior Static structural aspects are fairly easy to model – Parent-child relationship of components Behavioral (dynamic) aspects are more difficult – Populating an ESMF State object with different fields during different points of model execution Possible solutions – make behaviors implicit (e.g., all fields added during init, remain unchanged during run, removed during finalize) – introduce a behavioral modeling language (adds complexity!) 15

Conclusion 16 Superstructure Components and their composition; driving Science Field updates based on discrete form of PDEs Infrastructure Building blocks: grids, distributed fields, clocks, regrid, redistribution, I/O, configuration, etc. Different approaches and different tools are required to raise the abstraction level of each of these parts. DSL approach is viable for specifying some parts of the coupling infrastructure.

Future Work Cupid: An IDE for Model Development and Modeler Training NASA Computational Modeling Algorithms and Cyberinfrastructure (CMAC) Program Team –Georgia Institute of Technology (Dunlap/Mark/Rugaber) –University of Colorado/CIRES (DeLuca) –NASA Software Systems Support Office (Clune) –NASA GISS (Schmidt) Extend and harden existing DSL+generator into a student training environment for rapidly developing ESMF-based applications Incorporate more IDE features, including linking with an execution environment Modularize Model E and demonstrate in IDE 17

Thanks! 18

19

Domain Specific Languages Increase Productivity Nokia [1] mobile phone app development – 1000% increase in productivity – “shift focus from code to design” – “In many cases, we can generate 100% of the required code.” US Air Force Military Command and Control Systems [2] – 300% increase in productivity Lucent Product Family development [3] – initial productivity factor 3x-5x; 10x productivity increase for experts – graphical DSLs more successful than textual 20

Reuse Techniques 21 System Specification Generator Compositional (library, components, frameworks) Generative (domain-specific languages)

22 Coupling Specification Generator Hybrid Approach

Challenge: Domain Model There is no universal domain model for coupling – SQL came about after a formal definition of relational databases – Common Information Model (CIM)  currently defined as retrospective metadata – Jay Larson’s theory of coupling [4] 23

Domain Model Analysis 24 Strembeck, Mark, and Uwe Zdun. "An approach for the systematic development of domain‐specific languages." Software: Practice and Experience (2009): Earth System Modeling Framework (ESMF) Core Language Model Language Model Constraints Behavioral Model Approach: Extract DSL from an existing system

You Have Already Used DSLs DSLUse SQLQuery and manipulate relational databases Make, AntBuilding software systems MatlabScientific data analysis HTMLMarkup for web pages YACC, ANTLRParser generators LATEXTypesetting LabVIEWDesign of measurement and control systems 25

What kinds of domains benefit from DSLs? 26 Sprinkle, Jonathan, et al. "Guest Editors' Introduction: What Kinds of Nails Need a Domain-Specific Hammer?." IEEE Software 26.4 (2009): The domain is well-defined40+ years of building coupled models The domain has repetitive elements or patterns, such as multiple products, features, or targets Emergence of reusable coupling software evidences common coupling requirements, designs, implementations Accuracy; expert involvement; and flexibility of the specification, verification, and validation of design are important Correct and verifiable coupling infrastructure is essential for scientific validity of model output The implementation or specification must serve as documentation Many ESMs are under-documented and often the code itself is the documentation. Amortization of effort justifies investment in DSL creation. Payoffs in terms of productivity increases when implementing new couplings Domain characteristicEvidence in ESM domain

Core Language Model 27

Core Language Model 28

Object Constraint Language 29 self.fieldConnection->forAll( srcField.scope = self.srcComponent and dstField.scope = self.dstComponent)

Implementation – Language Model Language model using Eclipse-based tools – classes, generalization/ specialization, abstract classes – type system – object references, containment – OCL constraints via annotations – automatic generation of model editor GUI 30

References 31 1.Kelly, Steven, and Juha-Pekka Tolvanen. "Visual domain-specific modeling: Benefits and experiences of using metaCASE tools." International workshop on Model Engineering, European Conference on Object-Oriented Programming (ECOOP) ed. J. Bezivin, J. Ernst Kieburtz, Richard B., et al. "A software engineering experiment in software component generation." Proceedings of the 18th international conference on Software engineering. IEEE Computer Society, Weiss, D. M., and C. T. R. Lai. "Software product line engineering: a family based software engineering process." (1999). 4.J. Walter Larson, "Ten organising principles for coupling in multiphysics and multiscale models," ANZIAM J., 48, C1090-C1111 (2009).