Language and Ontology Shriram Krishnamurthi Yan-David Erlich Matthias Felleisen Rice University.

Slides:



Advertisements
Similar presentations
1 Copyright 1998 by Dragos Manolescu and Joseph W. Yoder Building Frameworks With Patterns “An Active Object-Model For A Dynamic Web-Based Application”
Advertisements

Presented by: Thabet Kacem Spring Outline Contributions Introduction Proposed Approach Related Work Reconception of ADLs XTEAM Tool Chain Discussion.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 8 Slide 1 System modeling 2.
Programming Distributed Systems Lab Institute of Computer Science University of Augsburg Universitätsstraße 14, D Augsburg Tel.: (+49) 821/ ,
Design Patterns for Object Oriented systems CSC 515 Ashwin Dandwate.
Design Patterns Yes, they are important Robert Cotton April 23, 2009.
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.
Design Patterns CS is not simply about programming
Reasons to study concepts of PL
ISBN Chapter 1 Preliminaries. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.1-2 Chapter 1 Topics Motivation Programming Domains.
Object-Oriented Databases
ISBN Lecture 01 Preliminaries. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.1-2 Lecture 01 Topics Motivation Programming.
Kari R. Schougaard, PhD Stud. Værktøjer og Teknikker, 2006 UNIVERSITY OF AARHUS Department of Computer Science Unified Modeling Language Visual language.
Whole Platform Tesi di Dottorato di: RICCARDO SOLMI Università degli Studi di Bologna Facoltà di scienze matematiche, fisiche e naturali Corso di Dottorato.
Software Issues Derived from Dr. Fawcett’s Slides Phil Pratt-Szeliga Fall 2009.
Copyright © 1998 by Addison Wesley Longman, Inc. 1 Concepts of Programming Languages Chapter 1.
Course Instructor: Aisha Azeem
Architecture, Implementation, and Testing Architecture and Implementation Prescriptive architecture vs. descriptive architecture Prescriptive architecture:
Sumant Tambe, et. al LEESA DSPD 2008 An Embedded Declarative Language for Hierarchical Object Structure Traversal Sumant Tambe* Aniruddha Gokhale Vanderbilt.
CS 355 – Programming Languages
11 1 Object oriented DB (not in book) Database Systems: Design, Implementation, & Management, 6 th Edition, Rob & Coronel Learning objectives: What.
Zhonghua Qu and Ovidiu Daescu December 24, 2009 University of Texas at Dallas.
Sumant Tambe, et. al LEESA DSPD 2008 An Embedded Declarative Language for Hierarchical Object Structure Traversal Sumant Tambe* Aniruddha Gokhale Vanderbilt.
“Enhancing Reuse with Information Hiding” ITT Proceedings of the Workshop on Reusability in Programming, 1983 Reprinted in Software Reusability, Volume.
SWE 316: Software Design and Architecture – Dr. Khalid Aljasser Objectives Lecture 11 : Frameworks SWE 316: Software Design and Architecture  To understand.
Database Design - Lecture 2
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
Key Challenges for Modeling Language Creation by Demonstration Hyun Cho, Jeff Gray Department of Computer Science University of Alabama Jules White Bradley.
4 Dec 2001Kestrel1 From Patterns to Programming Languages Matthias Felleisen Northeastern University.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
Unified Modeling Language, Version 2.0
Building Tools by Model Transformations in Eclipse Oskars Vilitis, Audris Kalnins, Edgars Celms, Elina Kalnina, Agris Sostaks, Janis Barzdins Institute.
SOEN 6011 Software Engineering Processes Section SS Fall 2007 Dr Greg Butler
January 12, Introduction to Design Patterns Tim Burke References: –Gamma, Erich, et. al. (AKA, The Gang of Four). Design Patterns: Elements of Reusable.
Copyright © 2006 Addison-Wesley. All rights reserved.1-1 ICS 410: Programming Languages.
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.
Copyright © 2007 Addison-Wesley. All rights reserved.1-1 Reasons for Studying Concepts of Programming Languages Increased ability to express ideas Improved.
Design engineering Vilnius The goal of design engineering is to produce a model that exhibits: firmness – a program should not have bugs that inhibit.
CSE 219 Computer Science III Program Design Principles.
Chapter 18 Object Database Management Systems. McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Outline Motivation for object.
1 5 Nov 2002 Risto Pohjonen, Juha-Pekka Tolvanen MetaCase Consulting AUTOMATED PRODUCTION OF FAMILY MEMBERS: LESSONS LEARNED.
Software Design Patterns (1) Introduction. patterns do … & do not … Patterns do... provide common vocabulary provide “shorthand” for effectively communicating.
Roles in Software Development using Domain Specific Modelling Languages Holger Krahn, Bernhard Rumpe, Steven Völkel Software Systems Engineering Technische.
Testing Extensible Design Patterns in OO Frameworks through Scenario Templates D.S. Sanders Software Verification & Validation.
Slide 1 Systems Analysis and Design With UML 2.0 An Object-Oriented Approach, Second Edition Chapter 2: Introduction to Object-Oriented Systems Analysis.
Pattern Language for AP1 Pattern Language for Adaptive Programming (AP) Karl Lieberherr Northeastern University.
December 4, ICSSEA’03 The SmartTools Software Factory The MDA approach and Generative programming for Software Development:
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University IWPSE 2003 Program.
Lecture 2 Intro. To Software Engineering and Object-Oriented Programming (1/2)
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Slide 1 Systems Analysis and Design With UML 2.0 An Object-Oriented Approach, Second Edition Chapter 2: Introduction to Object-Oriented Systems Analysis.
1 Unified Modeling Language, Version 2.0 Chapter 2.
The Spoofax Language Workbench Rules for Declarative specification of language and IDEs Lennart C. L. Kats and Eelco Visser Delft University of Technology.
Ontology Support for Abstraction Layer Modularization Hyun Cho, Jeff Gray Department of Computer Science University of Alabama
What’s Ahead for Embedded Software? (Wed) Gilsoo Kim
Aspect Oriented Security Tim Hollebeek, Ph.D.
Institute for Software Integrated Systems Vanderbilt University On Metamodel Composition Akos Ledeczi, Greg Nordstrom, Gabor Karsai, Peter Volgyesi and.
Concepts and Realization of a Diagram Editor Generator Based on Hypergraph Transformation Author: Mark Minas Presenter: Song Gu.
Chapter 18 Object Database Management Systems. Outline Motivation for object database management Object-oriented principles Architectures for object database.
FUNCTIONAL PROGRAMING AT WORK - HASKELL AND DOMAIN SPECIFIC LANGUAGES Dr. John Peterson Western State Colorado University.
A Framework for Automated and Composable Testing of Component-based Services Miguel A. Jiménez, Ángela Villota, Norha M. Villegas, Gabriel Tamura, Laurence.
Aspect-oriented Code Generation Approaches Abid Mehmood & Dayang N. A. Jawawi Department of Software Engineering Faculty of Computer Science and Information.
Design Patterns CSCE 315 – Programming Studio Spring 2013.
Prof. Bhushan Trivedi Director GLS Institute of Computer Technology
Design Patterns: MORE Examples
Definition CASE tools are software systems that are intended to provide automated support for routine activities in the software process such as editing.
SysML v2 Formalism: Requirements & Benefits
Systems Analysis and Design With UML 2
1.1 Reasons to study concepts of PLs
What Is Good Software(Program)?
Presentation transcript:

Language and Ontology Shriram Krishnamurthi Yan-David Erlich Matthias Felleisen Rice University

Language and Perception zDifferent programming styles influence the way we think about the world zTherefore, programmers want to extend their languages to suit their problem domains zConsequence: programmers define new languages all the time!

Adaptive Programming: Overview Lieberherr, et al

Adaptive Programming: Traversals Traversal: from BusRoute to Person through BusStop

Software Patterns: Overview zConcrete versions of design patterns zAllow high-level descriptions of creational, behavioral and structural properties zMap pattern instances to code (Definition and mapping should respect the inductive structure of patterns) Gamma, Helm, Johnson, Vlissides, and others

Software Patterns: Example Adapter Pattern += Adapter

Software Patterns + Adaptive Programming Behaviors are described by the Visitor Pattern, but it has lots of syntactic overhead Visitor BusWaiterVisitor { BusRoute -> … BusStop -> … Person -> … }

Scientific Computation: Matrices Overview Implementation uses C++ templates Two languages are involved: zconfiguration (extensional) yelement type (float, complex, …) yshape (upper triangular, symmetric, …) zimplementation specification (intensional) ybounds checked (yes, no) yoptimize for (speed, size) Czarnecki, Eisenecker, et al

Summary Examples of the growing influence of domain-specific languages (DSLs) zDLSs are a way to institutionalize knowledge and make it common to all the programmers in an organization/domain zSome DSLs are created afresh; many leverage existing languages

Are DSLs APIs? begin_scope (); … … … end_scope (); create_scoped_variable (“x”); … access_scoped_variable (“x”); (This is a terrible language!) Similar examples in COM, etc

Typical Needs zNew binding forms zDifferent orders of evaluation (applicative vs normal, right-to-left, etc) zDomain-specific notations, conventions Programmers use libraries because that’s all they have available!

Roadmap Needs a combination of support from the programming language and environment zEasy and powerful definitions zTight integration of language extensions zPreservation of language abstractions zPowerful implementation model

Adaptive Programming: Recap Visitor BusWaiterVisitor { BusRoute -> … BusStop -> … Person -> … }

Tool Support for Adaptive Programming Combining these specifications: The adaptive programming tool does not know about our pattern extensions Result: users must choose between DSLs Sometimes, there is no ordering of DSLs

Requirement: Tight Integration zExternal tools cannot be composed zExternal tools may provide poor debugging support zIntegrated tools may require the environment to be re-built for every addition or change Important consideration: Easy prototyping

The Middle Ground Start with macro systems a la Scheme zA macro system is a rewriting engine that works on a term structured syntax zThe macro language is embedded into a host language zMultiple extensions can co-exist

Definition Facility (define-macro Adapter (rewrite (_ adapts to as (fields …) (methods …)) (as (class implements (fields ( ) …) (methods …))))

Macros as Transformers

Requirement: Preserve Abstractions Embedding languages would not be effective if the programmer did not get information in terms of what they wrote (Information = type errors, program slices, value flow graphs, etc)

Why This Matters MultiplicationExpression,struct MatrixDSL::int_number >,class MatrixICCL::Rect,struct MatrixDSL::int_number >>,class MatrixICCL::Dyn2DCContainer >,struct MatrixDSL::stat_val >,struct MatrixDSL::unspecified_DSL_feature>,struct MatrixDSL::dense,struct MatrixDSL::dyn >,struct MatrixDSL::speed,struct MatrixDSL::unspecified_DSL_feature,struct MatrixDSL::unspecified_DSL_feature,struct MatrixDSL::unspecified_DSL_feature,struct MatrixDSL::unspecified_DSL_feature>>::DSLConfig>::DSLConfig>>>>>,class MatrixICCL::Matrix,struct MatrixDSL::int_number >,class MatrixICCL::Rect,struct MatrixDSL::int_number >>,class MatrixICCL::Dyn2DCContainer >,struct MatrixDSL::stat_val >,struct MatrixDSL::unspecified_DSL_feature>,struct MatrixDSL::dense,struct Ma… Generated from (A + B) * C

Alternative

Maintaining Abstractions Source correlation Ability to track source information through expansions Helps programmers understand feedback in terms of original source

Interacting Abstractions Elaboration tracking Keeps track of history of transformations on terms Helps designers (and programmers) debug in the presence of complex interactions

Requirement: Generalize Domain Even common languages have lots of “little” languages in them Macros are often limited to the expression and definition language (define (factorial (int n) : int) …) Expansion uses a protocol to determine “latest version” of each language

Requirement: Generalize Expansion Macros are traditionally source-to-source; generalize by zgiving control over expansion of sub- expressions zallowing intermediate stages to produce non-source output zenriching with attribute specifications (both threaded and unthreaded)

Recap What we have described is a generalization of macros to extend to full compilation: Macros Compilers We provide both mechanism and policy: zseveral incremental stages zcommon framework, so designers can combine these in a single specification

Requirement: Modularize Languages zLanguages are defined as “vocabularies” zThese have abstract parent languages zDesigners can compose them to create complete languages (analogous to “mixins” for classes) zThis makes specifications much more coherent and reusable

Languages as Layers Base Language 1 Base Language 2  L1  L2  L3 Base Language 1  L1  L3

Summary Experience shows our system is practical and efficient Key features: zdefinition conveniences (…, hygiene) zsource correlation zmacros-to-compilers continuum zlanguage mixins

Conclusion We have zmade a case for extensible languages zdescribed several “challenge” features to demand of programming environments zmentioned how we implement these features