Java Mint: A Call for Questions Walid Taha Rice University.

Slides:



Advertisements
Similar presentations
Sml2java a source to source translator Justin Koser, Haakon Larsen, Jeffrey Vaughan PLI 2003 DP-COOL.
Advertisements

Software Development Life Cycle. Why Do We need Software Development Models Helps to make sure that we cover all bases during planning and implementation.
Stacks & Their Applications COP Stacks  A stack is a data structure that stores information arranged like a stack.  We have seen stacks before.
CSE341: Programming Languages Lecture 23 OO vs. Functional Decomposition; Adding Operations & Variants; Double-Dispatch Dan Grossman Fall 2011.
The Bridge Pattern.. Intent Decouple an abstraction from its implementation so that the two can vary independently Also known as: Handle/Body.
Design Issues. Where to put class definitions  What goes in a source file? At most 1 public class At most 1 public class Other “helper” classes as needed.
CS 290C: Formal Models for Web Software Lecture 10: Language Based Modeling and Analysis of Navigation Errors Instructor: Tevfik Bultan.
Misc. Announcements Assignment available end of the day today –Due back in 11/03 (after break) Will also update slides on website –Today Midterm next week.
Modules in UHC A proposal by: Tom Hofte & Eric Eijkelenboom.
Tim Sheard Oregon Graduate Institute Lecture 11: A Reduction Semantics for MetaML CS510 Section FSC Winter 2005 Winter 2005.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
The Project AH Computing. Functional Requirements  What the product must do!  Examples attractive welcome screen all options available as clickable.
Introduction SWE 619. Why Is Building Good Software Hard? Large software systems enormously complex  Millions of “moving parts” People expect software.
PPL Syntax & Formal Semantics Lecture Notes: Chapter 2.
A Survey of Software Refactoring Tom Mens, Tom Tourwé
Design patterns. What is a design pattern? Christopher Alexander: «The pattern describes a problem which again and again occurs in the work, as well as.
1 Chapter 3 and 6– Classes, Objects and Methods Object-Oriented Programming Concepts – Read it from Java TutorialJava Tutorial Definition: A class is a.
Agile and Efficient Domain-Specific Languages using Multi-stage Programming in Java Mint Edwin Westbrook, Mathias Ricken, and Walid Taha.
Tech Talk Go4 Factory Patterns Presented By: Matt Wilson.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 4, Requirements Elicitation.
5 STEPS …COMMUNICATION Communication Skills. 5 STEPS …COMMUNICATION “We cannot solve our problems with the same thinking we used when we created them”
CSE 425: Object-Oriented Programming I Object-Oriented Programming A design method as well as a programming paradigm –For example, CRC cards, noun-verb.
1 Introduction Modules  Most computer programs solve much larger problem than the examples in last sessions.  The problem is more manageable and easy.
A Theory of Hygienic Macros David Herman, Mitchell Wand Northeastern University.
Generative Programming. Automated Assembly Lines.
Formal Semantics Chapter Twenty-ThreeModern Programming Languages, 2nd ed.1.
Not only mark-up languages! There are other many other grammar formalisms and tools than XML. Some of them standardized (ASN). Even XML does not always.
The Factory Patterns SE-2811 Dr. Mark L. Hornick 1.
ADTs and C++ Classes Classes and Members Constructors The header file and the implementation file Classes and Parameters Operator Overloading.
Objects & Dynamic Dispatch CSE 413 Autumn Plan We’ve learned a great deal about functional and object-oriented programming Now,  Look at semantics.
Design Patterns -- Omkar. Introduction  When do we use design patterns  Uses of design patterns  Classification of design patterns  Creational design.
CSC 480 Software Engineering Design With Patterns.
CSE 331 Software Design & Implementation Hal Perkins Autumn 2012 Wrapup 1.
“Education is a Treasure that follows you everywhere.” – Chines Proverb Methods and Functions.
Chapter 12 Support for Object-Oriented Programming.
Generating Heap- bounded Programs Walid Taha, Stephan Ellner (Rice University) Hongwei Xi (Boston University)
Design Reuse Earlier we have covered the re-usable Architectural Styles as design patterns for High-Level Design. At mid-level and low-level, design patterns.
Patterns in cs education Matthias Felleisen & Daniel Jackson NDIST · December 5, 2001.
L what are predefined functions? l what is? n function name n argument(s) n return value n function call n function invocation n nested function call l.
(1) ICS 313: Programming Language Theory Chapter 11: Abstract Data Types (Data Abstraction)
Advanced Functional Programming Tim Sheard 1 Lecture 17 Advanced Functional Programming Tim Sheard Oregon Graduate Institute of Science & Technology Lecture:
Functional Programming IN NON-FUNCTIONAL LANGUAGES.
COMP 412, FALL Type Systems II C OMP 412 Rice University Houston, Texas Fall 2000 Copyright 2000, Robert Cartwright, all rights reserved. Students.
Cs3180 (Prasad)L156HOF1 Higher-Order Functions. cs3180 (Prasad)L156HOF2 Equivalent Notations (define (f x y) (… body …)) = (define f (lambda (x y) (…
1 Aspectual Caml an Aspect-Oriented Functional Language Hideaki Tatsuzawa Hidehiko Masuhara Akinori Yonezawa University of Tokyo.
PPL Syntax & Formal Semantics Lecture Notes: Chapter 2.
CLASSIFICATION OF DESIGN PATTERNS Hladchuk Maksym.
Adding Concurrency to a Programming Language Peter A. Buhr and Glen Ditchfield USENIX C++ Technical Conference, Portland, Oregon, U. S. A., August 1992.
Ruby Inheritance and other languages….
Operational Semantics of Scheme
AP CSP: Creating Functions & Top-Down Design
Inheritance Modern object-oriented (OO) programming languages provide 3 capabilities: encapsulation inheritance polymorphism which can improve the design,
CSE341: Programming Languages Lecture 21 Dynamic Dispatch Precisely, and Manually in Racket Dan Grossman Spring 2016.
Design Patterns: Brief Examples
CSE341: Programming Languages Lecture 21 Dynamic Dispatch Precisely, and Manually in Racket Dan Grossman Winter 2013.
Week 2, Day 1: The Factory Method Pattern
Predefined Functions Revisited
CSE341: Programming Languages Lecture 21 Dynamic Dispatch Precisely, and Manually in Racket Dan Grossman Spring 2017.
CSE341: Programming Languages Lecture 21 Dynamic Dispatch Precisely, and Manually in Racket Dan Grossman Autumn 2017.
CSE341: Programming Languages Lecture 21 Dynamic Dispatch Precisely, and Manually in Racket Dan Grossman Autumn 2018.
FP Foundations, Scheme In Text: Chapter 14.
CSE341: Programming Languages Lecture 21 Dynamic Dispatch Precisely, and Manually in Racket Zach Tatlock Winter 2018.
CSE341: Programming Languages Section 9 Dynamic Dispatch Manually in Racket Zach Tatlock Winter 2018.
Background In his classic 1972 paper on definitional interpreters, John Reynolds introduced two key techniques: Continuation-passing style - Makes.
Continuation Marks A john clements talk.
Support for Object-Oriented Programming
How To Run a Successful Skinny Contest In Your Clinic
6.001 SICP Interpretation Parts of an interpreter
Predefined Functions Revisited
CSE341: Programming Languages Lecture 21 Dynamic Dispatch Precisely, and Manually in Racket Dan Grossman Spring 2019.
Presentation transcript:

Java Mint: A Call for Questions Walid Taha Rice University

Please open your mail client and start writing To: Subject: Your Java Mint Talk... and send comments during the talk

Multi-stage Programming In a nutshell: We love abstractions We don’t like to pay for them Multi-stage programming = abstractions - runtime cost

Java Mint Multi-stage programming worked nicely in the purely functional setting Can we do the same in bigger languages?

This Talk A call for discussion. The plan: Defining “abstractions” The functional theory of MSP (‘97-‘09) Why this theory matters Building the new theory

“Abstractions”

Abstraction Mechanisms A way of writing code so that is –is parameterized, and –can be instantiated by providing parameters Note: no loss of information We call them “abstractions” for short

Purely Functional Abstractions Primitive functions Lambda abstractions Module definitions, and functors Records Variants (using “The Trick”) MSP can guarantee the elimination of all of these overheads MSP types are well matched to a structural type system

Object-Oriented Abstractions These are the kinds of things we would like to deal with in the OO setting: Objects (as records/fields) Objects (as methods) Object creation Mixins (?) Aspects (already staged?) Design Patterns (?? Require formalization)

The Theory of Functional MSP

Why bother with “the theory”? There is a huge body of results on various technical aspects of functional MSP What we don’t talk about much in technical papers is how do we put all of these results together? We need to revisit this “big picture” at this juncture

The Functional Theory of MSP In (Static Types and Scoping) We Trust Staging = modifying evaluation order Future stage values are extensional Staging annotations are lightweight (3+1) Code type constructor is simple, orthogonal Multi-stage Programming –Naive: Just annotate –Realistic: Convert to CPS, and annotate

The Functional Theory of MSP Staging affects only termination Programmers know how to ensure correct termination behavior Statically typed program generation = staging + expressive static types Expressive static types = CiC/Coq

What Does FMSP Matter? eval:exp * (id -> val)-> val seval:exp * (id -> )-> typecheck:exp -> (!t. texp t) option teval:texp t * (i:id -> T(i)) -> t steval:texp t * (i:id -> bottom line: steval = 10 * seval = 40 * eval

Building the New Theory

Concrete Questions Can we achieve safe imperative MSP? Can we keep notation lightweight? –Sam: Can we get away without HOFs? Killer app: FOP, Yannis’s examples? Can we avoid altering effects? Does Java need more expressive static types? If so, how can we add them? Can we preserve extensionality? Can we improve break even points? Tim, Jacques: What will the PG programming style be, and how do you teach it? Ras: Do programmers what to treat as early and what to treat as late?

Bigger Questions Can program generation gain broad, respectable acceptance? Net Gain: Can we show that program generation introduces less problems than it solves? Vanishing: Can we show that using program generation is “just programming”? Doug: Certifying boards need to recognize things other than testing for certification (such as program generation). Can we generate certificates with programs? (Is this already being done in the ORF Tom Maibaum, FAA speaker at PCC)

Call To Action Mint needs you! Designing a Meta-Java is harder –Java is more complicated –We want to take harder problems Need group involvement in –Design, implementation, testing, evaluation –Get on the list (tell me at top of your )

Final Words OOMSP is an enormous challenge We should take on hard challenges We can meet hard challenges –Coming up with environment classifiers took 8 years

Acknowledgment Thanks to the participants of the WG 2.11 for valuable discussions, and for Jacques and William for feedback they after the talk.