1 CS506 Seminar: Zehn Programmier-sprachen in einem Semester, Language Features, by L. Yamamoto Programming Languages Features Programming styles or paradigms.

Slides:



Advertisements
Similar presentations
18 Copyright © 2005, Oracle. All rights reserved. Distributing Modular Applications: Introduction to Web Services.
Advertisements

Construction process lasts until coding and testing is completed consists of design and implementation reasons for this phase –analysis model is not sufficiently.
Building Bug-Free O-O Software: An Introduction to Design By Contract A presentation about Design By Contract and the Eiffel software development tool.
Object-Oriented Software Engineering Visual OO Analysis and Design
Component-Based Software Engineering Main issues: assemble systems out of (reusable) components compatibility of components.
Database System Concepts and Architecture
Lecture 6: Software Design (Part I)
Security Design Patterns – Overview –Software Development Lifecycle –Enterprise Software Design Process and Artifacts –Pattern Format –Aspect Oriented.
Structures. Procedural (Imperative) Languages Procedural languages work on the basis of explicitly telling the computer ‘how to do something’; by using.
Copyright © 2003 by Prentice Hall Computers: Tools for an Information Age Chapter 15 Programming and Languages: Telling the Computer What to Do.
Chapter 11 Component-Level Design
Towards a Standard Interface for Runtime Inspection in AOP Environments OOPSLA Workshop on Tool for AOSD, Seattle, November 2002 Katharina Mehner and Awais.
Programming Paradigms Introduction. 6/15/2005 Copyright 2005, by the authors of these slides, and Ateneo de Manila University. All rights reserved. L1:
A Brief Introduction to Aspect-Oriented Programming Zhenxiao Yang.
Chapter 8 High-Level Programming Languages. 8-2 Chapter Goals Describe the translation process and distinguish between assembly, compilation, interpretation,
Aspect Oriented Programming. AOP Contents 1 Overview 2 Terminology 3 The Problem 4 The Solution 4 Join point models 5 Implementation 6 Terminology Review.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 32 Slide 1 Aspect-oriented Software Development.
Programming Languages Language Design Issues Why study programming languages Language development Software architectures Design goals Attributes of a good.
Programming Language Paradigms: summary. Object-oriented programming Objects are the fundamental building blocks of a program. Interaction is structured.
ASPECT ORIENTED SOFTWARE DEVELOPMENT Prepared By: Ebru Doğan.
Software Testing and Quality Assurance
CS 101 Course Summary December 5, Big Ideas Abstraction Problem solving Fundamentals of programming.
Programming Languages Structure
Chapter 8 High-Level Programming Languages Nell Dale John Lewis.
Eiffel Language and Design by Contract Contract –An agreement between the client and the supplier Characteristics –Expects some benefits and is prepared.
C++ fundamentals.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
Classes Mark Hennessy Dept. Computer Science NUI Maynooth C++ Workshop 18 th – 22 nd Spetember 2006.
Computer Architecture Computational Models Ola Flygt V ä xj ö University
Welcome to OBJECT ORIENTED PROGRAMMIN Date: 10/09/2014 Prepared By Prepared By : VINAY ALEXANDER PGT(CS) KV jhagrakhand.
Introduction to Aspect Oriented Programming Presented By: Kotaiah Choudary. Ravipati M.Tech IInd Year. School of Info. Tech.
Python Mini-Course University of Oklahoma Department of Psychology Day 2 – Lesson 6 Program Design 4/18/09 Python Mini-Course: Day 2 - Lesson 6 1.
Aspect Oriented Programming Razieh Asadi University of Science & Technology Mazandran Babol Aspect Component Based Software Engineering (ACBSE)
Programming Paradigms Procedural Functional Logic Object-Oriented.
Aspect Oriented Programming Scott Nykl CSSE 411 Senior Seminar.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 32 Slide 1 Aspect-oriented Software Development 1.
Hyper/J and Concern Manipulation Environment. The need for AOSD tools and development environment AOSD requires a variety of tools Life cycle – support.
Aspect Oriented Programming Sumathie Sundaresan CS590 :: Summer 2007 June 30, 2007.
Aspect Oriented Programming Gülşah KARADUMAN.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
AOP-1 Aspect Oriented Programming. AOP-2 Aspects of AOP and Related Tools Limitation of OO Separation of Concerns Aspect Oriented programming AspectJ.
Distribution and components. 2 What is the problem? Enterprise computing is Large scale & complex: It supports large scale and complex organisations Spanning.
MT311 Java Application Development and Programming Languages Li Tak Sing( 李德成 )
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University IWPSE 2003 Program.
Demeter Aspects We study techniques for the emerging area of Aspect-Oriented Software Development and focus on the following areas:  Aspectual Collaborations.
Click to edit Master text styles JavaMOP Hamid Reza Niroomand A presentation to Dr. Babamir.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
Review of Parnas’ Criteria for Decomposing Systems into Modules Zheng Wang, Yuan Zhang Michigan State University 04/19/2002.
R R R A Brief Introduction to Aspect-Oriented Programming.
Welcome to OBJECT ORIENTED PROGRAMMING Prepared By Prepared By : VINAY ALEXANDER PGT(CS) KV jhagrakhand.
 Is a programming paradigm  Extends OOP  Enables modularization of cross cutting concerns.
서울대한양대 ( 안 산 ) 충남대 1년1년 컴퓨터기초 (C) 컴퓨터프로그래밍 (C, Java) 컴퓨터프로그래밍 (C) 2. 봄 프로그래밍 원리 (Scheme, ML) Structure & Interpretation of Computer Programs 프로그래밍 방법론.
Language Paradigms CS655.
Programming paradigms
Why study programming languages?
Design by Contract Jim Fawcett CSE784 – Software Studio
Design by Contract Jim Fawcett CSE784 – Software Studio
Aspect-Oriented Programming with the Eclipse AspectJ plug-in
Distribution and components
Towards Effective Adaptive User Interfaces Design
Discussion with Gregor Kiczales at UBC
Demeter Aspects Who We Are Aspectual Collaborations
Computer Programming.
Reusability 11/29/2018© 2006 ITT Educational Services Inc.
A Brief Introduction to Aspect-Oriented Programming
Principles of Programming Languages
강의 내용 및 방법 접근방법 리포트 시험 Lambda Calculus, Proof of Correctness
AspectAda Aspect-Oriented Programming for Ada95
Programming Paradigms
Presentation transcript:

1 CS506 Seminar: Zehn Programmier-sprachen in einem Semester, Language Features, by L. Yamamoto Programming Languages Features Programming styles or paradigms Imperative Functional Declarative Modularity Procedural Object-oriented Aspect-oriented Reflective Component-based Design by Contract

2 CS506 Seminar: Zehn Programmier-sprachen in einem Semester, Language Features, by L. Yamamoto Programming Styles or Paradigms Imperative: how Most common languages (C, C++, Java…) Programmer provides explicit algorithm to solve a problem State (variable assignments), side effects Functional (e.g. LISP (next Seminar)) Everything is a function Computation = function evaluation Declarative: what AI background: Intelligent systems – Programmer states what needs to be done (not an explicit algorithm) – System searches for solution No explicit global state and side effects

3 CS506 Seminar: Zehn Programmier-sprachen in einem Semester, Language Features, by L. Yamamoto Programming Styles or Paradigms Declarative Logic (e.g. Prolog) Rule-based (CLIPS/Jess, Cisco ACLs) expert(pmeier, uberlin, graphtheory). expert(jsmith, ucla, netarch).... paper(title1, ptann, ulancs, netarch). paper(title2, mgerla, ucla, netarch). paper(title3, pkim, uskr, graphtheory).... reviewer(E, P) :- expert(E, I, T), paper(P, _, J, T), \+ I = J. ?- reviewer(X,Y). gprolog not run program: query

4 CS506 Seminar: Zehn Programmier-sprachen in einem Semester, Language Features, by L. Yamamoto More Programming Styles and Paradigms Deductive Message-passing Constraint High-order

5 CS506 Seminar: Zehn Programmier-sprachen in einem Semester, Language Features, by L. Yamamoto Modularity Features Procedural Object-oriented Aspect-oriented Reflective Component-based Design by Contract

6 CS506 Seminar: Zehn Programmier-sprachen in einem Semester, Language Features, by L. Yamamoto Aspect-Oriented Programming (AOP) Separation of concerns Functional (application) concerns – Good encapsulation through classes (OO) Cross-cutting concerns – Repeat across different classes – Examples: logging, monitoring, debugging, security – Encapsulation through aspects Aspect construct: encapsulates cross-cutting concerns Facilitates changes and upgrades (e.g. security policies) No changes to functional classes

7 CS506 Seminar: Zehn Programmier-sprachen in einem Semester, Language Features, by L. Yamamoto Aspect-Oriented Programming (AOP) AspectJ Language Java extension Implementation within Eclipse software platform Weaving classes and aspects together through joint points, pointcuts and advices – joint points: points in the program where the aspect must interfere (typically method calls, access to class members, exception handler blocks) – pointcut: selects joint points that match certain criteria – advices: the aspect-related code that is executed before, after, or around (before+after) a joint point.

8 CS506 Seminar: Zehn Programmier-sprachen in einem Semester, Language Features, by L. Yamamoto AOP Example: Logging class B method1(...) method2(...) class A method1(...) method2(...) aspect AutoLog{ pointcut loggableCalls(): before():loggableCalls(){ logger.entry(thisJointPoint.get...) } after():loggableCalls(){ logger.exit(thisJointPoint. get...) } jointpoint

9 CS506 Seminar: Zehn Programmier-sprachen in einem Semester, Language Features, by L. Yamamoto Component-Based Systems Classes (OO) Clear interface on exported features (how to use class) Imported features (what the class uses) not entirely clear from outside (class as a black-box) Components Both exported and imported features must be specified Like a hardware component described in a datasheet Software factories: assembling software like hardware Reusable components (Dynamic) composition mechanisms E.g. (Enterprise) JavaBeans, TinyOS nesC (sensor nets)

10 CS506 Seminar: Zehn Programmier-sprachen in einem Semester, Language Features, by L. Yamamoto Computational Reflection Reflection or introspection: think about oneself Self-Reference: Quine Computer program which prints its own source code (without reading it from a file or other external input) Self-replicating program Reflective system: information about itself (meta- information) accessible to the system itself Meta-info may be used to explain or change its behavior Two levels: Functional level or Base level Meta level: meta-information

11 CS506 Seminar: Zehn Programmier-sprachen in einem Semester, Language Features, by L. Yamamoto Quine Examples From In C: char*f="char*f=%c%s%c;main() {printf(f,34,f,34,10);}%c"; main(){printf(f,34,f,34,10);} In Scheme: ((lambda (x) (list x (list (quote quote) x))) (quote (lambda (x) (list x (list (quote quote) x))))) More:

12 CS506 Seminar: Zehn Programmier-sprachen in einem Semester, Language Features, by L. Yamamoto Computational Reflection Reflection tower (recursive): Meta level inspects base level Meta meta level inspects meta level, …, and so on Java reflection ( java.lang.reflect.*) Read classes and methods by name Discover class, object, and method properties Invoke methods or create objects whose class is discovered only at run time Not possible to create new classes, modify methods, etc.

13 CS506 Seminar: Zehn Programmier-sprachen in einem Semester, Language Features, by L. Yamamoto Design by Contract Contract = specification associated to a component Goals: quality assurance, reliability Eiffel language Contract specification as part of the language constructs contract Component A (Supplier) Component B (Client) Benefits and obligations

14 CS506 Seminar: Zehn Programmier-sprachen in einem Semester, Language Features, by L. Yamamoto Contract Example in Eiffel class DICTIONARY... put (x: ELEMENT; key: STRING) is require count < capacity not key.empty do... insertion algorithm... ensure has (x) item (key) = x count = old count + 1 invariant 0 <= count count <= capacity end Pre-conditions or obligations Post-conditions or benefits General class assertion

15 CS506 Seminar: Zehn Programmier-sprachen in einem Semester, Language Features, by L. Yamamoto Concurrency and Parallelism B A C time sequentialexecution BA A fork D C join CB parallel execution cobegin coend begin end

16 CS506 Seminar: Zehn Programmier-sprachen in einem Semester, Language Features, by L. Yamamoto Concurrency and Parallelism Granularity Processes (e.g. Unix fork) Threads (e.g. in Java) Concurrent blocks: fork, join, cobegin...coend Machine instructions: e.g. Very Long Instruction Word (VLIW), Data Flow machines

17 CS506 Seminar: Zehn Programmier-sprachen in einem Semester, Language Features, by L. Yamamoto Concurrency and Parallelism Chemical Programming: Gamma max max(x,y): x >= y => x max max 76

18 CS506 Seminar: Zehn Programmier-sprachen in einem Semester, Language Features, by L. Yamamoto Other Features and Concepts Iterators Persistence Operational Semantics Self-Documentation Proof-Carrying Code.....