Pattern-Directed Programming

Slides:



Advertisements
Similar presentations
MicroKernel Pattern Presented by Sahibzada Sami ud din Kashif Khurshid.
Advertisements

1 Programming Languages (CS 550) Lecture Summary Functional Programming and Operational Semantics for Scheme Jeremy R. Johnson.
CSE341: Programming Languages Lecture 16 Datatype-Style Programming With Lists or Structs Dan Grossman Winter 2013.
Getting started with ML ML is a functional programming language. ML is statically typed: The types of literals, values, expressions and functions in a.
OOP Design Patterns Chapters Design Patterns The main idea behind design patterns is to extract the high level interactions between objects and.
Expert System Human expert level performance Limited application area Large component of task specific knowledge Knowledge based system Task specific knowledge.
Basic IR: Queries Query is statement of user’s information need. Index is designed to map queries to likely to be relevant documents. Query type, content,
Functional Design and Programming Lecture 1: Functional modeling, design and programming.
Programming Language Paradigms: summary. Object-oriented programming Objects are the fundamental building blocks of a program. Interaction is structured.
1 Scheme Scheme is a functional language. Scheme is based on lambda calculus. lambda abstraction = function definition In Scheme, a function is defined.
T.Sharon - A.Frank 1 Internet Resources Discovery (IRD) IR Queries.
Ch3: Software Engineering Principles 1 What is a principle?  Definition:  Goals of accounting principles:  Goals of software engineering principles?
UML CASE Tool. ABSTRACT Domain analysis enables identifying families of applications and capturing their terminology in order to assist and guide system.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 16 Slide 1 User interface design.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
Java Methods By J. W. Rider. Java Methods Modularity Declaring methods –Header, signature, prototype Static Void Local variables –this Return Reentrancy.
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)
GENERAL CONCEPTS OF OOPS INTRODUCTION With rapidly changing world and highly competitive and versatile nature of industry, the operations are becoming.
Artificial Intelligence CIS 479/579 Bruce R. Maxim UM-Dearborn.
Notes for Chapter 12 Logic Programming The AI War Basic Concepts of Logic Programming Prolog Review questions.
Context Tailoring the DBMS –To support particular applications Beyond alphanumerical data Beyond retrieve + process –To support particular hardware New.
Assessing the Suitability of UML for Modeling Software Architectures Nenad Medvidovic Computer Science Department University of Southern California Los.
Polymorphism, Inheritance Pt. 1 COMP 401, Fall 2014 Lecture 7 9/9/2014.
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
CSCI-383 Object-Oriented Programming & Design Lecture 13.
Iterative Constructs Review l What are named constants? Why are they needed? l What is a block? What is special about declaring a variable inside a block?
SICP Interpretation Parts of an interpreter Arithmetic calculator Names Conditionals and if Storing procedures in the environment Environment as.
Chapter 18 Object Database Management Systems. McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Outline Motivation for object.
18 April 2005CSci 210 Spring Design Patterns 1 CSci 210.
Towards Multi-Paradigm Software Development Valentino Vranić Department of Computer Science and Engineering Faculty of Electrical Engineering.
CS212: Object Oriented Analysis and Design
WEB 2.0 PATTERNS Carolina Marin. Content  Introduction  The Participation-Collaboration Pattern  The Collaborative Tagging Pattern.
Implementing a Dependently Typed λ -Calculus Ali Assaf Abbie Desrosiers Alexandre Tomberg.
2004 Hawaii Inter Conf Comp Sci1 Specifying and Proving Object- Oriented Programs Arthur C. Fleck Computer Science Department University of Iowa.
Interfaces About Interfaces Interfaces and abstract classes provide more structured way to separate interface from implementation
Basic Scheme February 8, 2007 Compound expressions Rules of evaluation Creating procedures by capturing common patterns.
Thinking behind the environment for Making Construals (MCE)
The Interpreter Pattern (Behavioral) ©SoftMoore ConsultingSlide 1.
Yr 7.  Pupils use mathematics as an integral part of classroom activities. They represent their work with objects or pictures and discuss it. They recognise.
Chapter 18 Object Database Management Systems. Outline Motivation for object database management Object-oriented principles Architectures for object database.
Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 10: Tools.
JavaScript Introduction and Background. 2 Web languages Three formal languages HTML JavaScript CSS Three different tasks Document description Client-side.
CSE 425: Functional Programming I Programs as Functions Some programs act like mathematical functions –Associate a set of input values from the function’s.
Procedure Definitions and Semantics Procedures support control abstraction in programming languages. In most programming languages, a procedure is defined.
Comp 411 Principles of Programming Languages Lecture 3 Parsing
Tom Van Cutsem, Vrije Universiteit Brussel
Operational Semantics of Scheme
Functional Programming
Constructors and Destructors
By P. S. Suryateja Asst. Professor, CSE Vishnu Institute of Technology
Basic Scheme February 8, 2007 Compound expressions Rules of evaluation
Names and Attributes Names are a key programming language feature
Introduction to Design Patterns
Java Primer 1: Types, Classes and Operators
Iterative Constructs Review
September 4, 1997 Programming Languages (CS 550) Lecture 6 Summary Operational Semantics of Scheme using Substitution Jeremy R. Johnson TexPoint fonts.
Business Process Measures
CS212: Object Oriented Analysis and Design
Knowledge Representation
Digital Signature Schemes and the Random Oracle Model
The Metacircular Evaluator
Constructors and Destructors
The Metacircular Evaluator (Continued)
Streams, Delayed Evaluation and a Normal Order Interpreter
What would be our focus ? Geometry deals with Declarative or “What is” knowledge. Computer Science deals with Imperative or “How to” knowledge 2/23/2019.
6.001 SICP Interpretation Parts of an interpreter
Assignments and Procs w/Params
topics interpreters meta-linguistic abstraction eval and apply
Presentation transcript:

Pattern-Directed Programming A style explicitly using pattern-matching against program source names Presentation to be followed by an epilogue on research into an observer-actor style

Motivation Languages include a control structure giving effective, procedural interpretations to the means of combination and means of abstraction of the language, e.g. the apply function in Scheme. Augmentations to the control structure of a language along with language-level facilities for invoking control structures either explicitly or implicitily define new styles of programming. Advanced control features such as mechanisms for automatic search and backtracking and applying the operations of propositional calculus to streams of data result in widely divergent styles and idioms for programming. What control mechanisms which have yet to be incorporated into the control structure of a language? Have existing control mechanisms been integrated into a language in both implicit and explicit forms?

The Basic Idea Pattern matching exists largely implicitly in the control structures of current languages Merge a pattern matcher with the control structure of an evaluator of a functional language Provide language-level keywords for explicitly invoking the pattern matcher against names in the environment of invocation Take advantage of the characteristic that pattern matching returns multiple values

Implementation Strategy Augment the control structure of a meta- circular evaluator of the functional core of Scheme Add keyword match to match a pattern against names in the environment Extend the evaluation semantics of Scheme to accept match objects in the operator position of an S-expression

Blather: The Interpreter match constructs match objects, a tagged list consisting of names and an associated environment (match) returns match object consisting of all names and the environment in which the names were matched (match <symbol>) returns a match object with all names containing <symbol> (match-object-to-names <match_object>) returns a list of names in a match object (match-object-to-values <match_object>) evaluates names from the match object in the associated environment of the match object (<match_object> . <argument_list>) looks up each name in the match object and applies the result to the argument list concatenating the results into a single result list

Noteworty Features As designed and implemented, the explicit invocation of the pattern matcher and the returned match objects proved easily composable with the existing features of Scheme When programming in a uniform style treating all functions as taking a single list as argument, match objects can be used freely throughout a program

Possible Uses Any domain in which patterns might be closely associated with code or behaviors represents a possible area of application, for example DNA/RNA and protein folding analysis Patterns represent a possible bridge between symbolic and subsymbolic knowledge, so pattern- directed programs using reflection might be used to retrieve symbolic knowledge from subsymbolic systems

Future Work Implement a large system using the pattern- directed style to study the expressiveness, controllability, and comprehensibility of pattern-directed programming Evaluate the fitness of the keywords and special forms of the implementation in the context of a large project, and add language- level features as necessary

Epilogue: The Observer-Actor Style As a second area of research, studied solutions to the problem of unintentional object retention as manifest in situations such as the observer design pattern Resolved to implement a simple object system without aliasing and including a messaging facility in the control structure to shift decisions about actor retirement into the interpretation of messages Planned an observe-act evaluation strategy similar to the read- eval-print strategy of LISP/Scheme Outlined a recursive procedure for computing with nested observer-actors Design was longer than anticipated delaying implementation Hope to finish implementation in a few weeks

Thanks