Gerardo Schneider Department of Informatics University of Oslo December 2008.

Slides:



Advertisements
Similar presentations
06/01/101 Functional Programming GC16 / 3011 Chris Clack.
Advertisements

Programming Paradigms Introduction. 6/15/2005 Copyright 2005, by the authors of these slides, and Ateneo de Manila University. All rights reserved. L1:
CSE111: Great Ideas in Computer Science Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:
Introduction to Object-Oriented Programming (OOP)
C. Varela1 Programming Languages (CSCI 4430/6969) History, Syntax, Semantics, Essentials, Paradigms Carlos Varela Rennselaer Polytechnic Institute August.
Compilation 2007 The What and Why of Compilers Michael I. Schwartzbach BRICS, University of Aarhus.
Comp 205: Comparative Programming Languages Imperative Programming Languages Functional Programming Languages Semantics Other Paradigms Lecture notes,
Presented by Neng-Fa Zhou1 Evolution of programming languages –Machine language –Assembly language –Sub-routines and loop (Fortran) –Procedures and recursion.
ISBN Chapter 2 Evolution of the Major Programming Languages.
Introduction to Programming (in C++) Introduction Jordi Cortadella, Ricard Gavaldà, Fernando Orejas Dept. of Computer Science, UPC.
1 Programming Languages Marjan Sirjani 2 1- The Study of Programming Languages The purpose of language is simply that it must convey meaning. (Confucius)
CS 415: Programming Languages Chapter 1 Aaron Bloomfield Fall 2005.
First appearedFeaturesMain paradigmsPopular uses COMPUTING Basic FOR A=1 TO 100 IF A MOD 15 = 0 THEN PRINT “FizzBuzz” ELSE IF A MOD 3 = 0 THEN PRINT “Fizz”
History of Programming Languages
JSON The Fat Free Alternative to XML. Data Interchange The key idea in Ajax. An alternative to page replacement. Applications delivered as pages. How.
Cs784(Prasad)L1Intro1 Systematic Development of Programming Languages.
COMPUTER PROGRAMS AND LANGUAGES Chapter 4. Developing a computer program Programs are a set (series) of instructions Programmers determine The instructions.
©Xiaoying Gao, Peter Andreae First Java Program COMP 102 #2 2014T2 Xiaoying Sharon Gao Computer Science Victoria University of Wellington.
First Java Program COMP 102 #2 2015T2 Xiaoying Sharon Gao Computer Science Victoria University of Wellington.
By Neng-Fa Zhou1 Evolution of programming languages –Machine language –Assembly language –Sub-routines and loop (Fortran) –Procedures and recursion (Algol,
Programming History. Who was the first programmer?
Subprograms Support process abstraction and modularity –characteristics of subprograms are that they have a single entry point the calling entity is suspended.
1 Programming Language History and Evolution In Text: Chapter 2.
Software for Translators Barcelona, January 2002.
Analysis of Programming Language Vladimir Viies Lembit Jürimägi Tallinna.
Programming Languages Meeting 14 December 9/10, 2014.
Programming Languages
Copyright © Genetic Computer School 2008 Computer Systems Architecture SA 7- 0 Lesson 7 Memory Management.
Allyson M. Hoss, January 14, 2008 CSC 7101 Programming Language Structures Spring 2008 Louisiana State University.
int k = Integer.MAX_VALUE; k++; int k = Integer.MAX_VALUE; k++; What happens when the following code executes? byte b = someFile.readByte(); b = (byte)(b.
1-1 1 Introduction  Programming linguistics: concepts and paradigms syntax, semantics, and pragmatics language processors.  Historical development of.
4th Dimension/4D ABAP ABC ActionScript Ada Agilent VEE Algol Alice Angelscript Apex APL AppleScript Arc Arduino ASP AspectJ Assembly.
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 190 Programming Language Paradigms Fall 2014
CS 603: Programming Language Organization Lecture 1 Spring 2003 Department of Computer Science University of Alabama Joel Jones.
Programming Language Theory 2014, 1 Chapter 1 :: Introduction Origin : Michael L. Scott School of Computer & Information Engineering,
Programming Language Paradigms ITSK2314 Lecture 3.
a medium allowing humans and computers to communicate an abstraction of the real world a notation for expressing algorithms the set of all syntactically.
History. Development Driven by Function Functions of a Programming Language –To describe computation for use by computers –To describe computation and.
CPS120 Introduction to Computer Science High Level Language: Paradigms.
Programming Language History and Evolution
Basic Concepts: computer, program, programming …
CSCE 190 Programming Language Paradigms
The language focusses on ease of use
Introduction to programming languages, Algorithms & flowcharts
Outline Introduction Programming in eclipse Debugging in eclipse
Basic 1964 PC general purpose Imperative Small Easy to use.
Introduction to programming languages, Algorithms & flowcharts
Carlos Varela Rennselaer Polytechnic Institute September 1, 2017
Problem Solving Using C: Orientation & Lecture 1
Comp 205: Comparative Programming Languages
TIMELINE OF PROGRAMMING LANGUAGE
Lecture 1: .NET What Is It And Why Use It? 9/18/2018
Programming Language History and Evolution
Evolution of programming languages
Introduction to programming languages, Algorithms & flowcharts
Passing Functions as Parameters
Introduction to Computers and Python
Problem Solving.
CMPT 360 Programming Languages (Notations)
Problem Solving Using C: Orientation & Lecture 1
Programming Language Design
Java Lesson 36 Mr. Kalmes.
SE2040 Software Development III Dr. Rob Hasker
Problem Solving Using C: Orientation & Lecture 1
Overview of Programming Paradigms
Programming Languages and Paradigms
School of Computer & Information Engineering,
CSCE 190 Programming Language Paradigms
A Tour of Language Implementation
Presentation transcript:

Gerardo Schneider Department of Informatics University of Oslo December 2008

.net 2Gerardo Schneider JAva Haskell Prolog C Python Lisp fortran cobol pascal basic esterel eiffel Action Script perl Java Script Lustre ml scheme fp Apl php ruby C++ ADA OZ erlang algol modula simula C# vhdl verilog ocaml Java card ALf xsb curry Tcl ecma Script Common lisp curl nemerle rebol aspectj Do you need to know them all? What do you need to know?

3Gerardo Schneider procedure inc(i, j); integer i, j; begin i := i+1; j := j+1 end; k:=1; A[1]:= 2; A[2]=4; inc(k, A[k]); procedure inc( k, A[k] ); integer k, A[k]; begin k := k+1; A[k] := A[k]+1 end; In ALGOL 60 Result: k=2; A[2]=5 Is this what you expected? Probably not! (Call-by-name) What is the resul of the call? Is it i=2 and j=3?

4Gerardo Schneider Write a program to compute a 20 : a 0 = 11/2 a 1 = 61/11 a n+2 = 111– 1130-(3000/ a n ) a n+1 class mya { static double a(int n) { if (n==0) return 11/2.0; if (n==1) return 61/11.0; return ( /a(n-2))/a(n-1); } public static void main(String[] argv) { for (int i=0;i<=20;i++) System.out.println ("a("+i+") = "+a(i)); } } In JAVA Is this a correct result? NO: The right answer is 20 ! (Precision problem) $ java mya a(0) = 5.5 a(2) = a(4) = a(6) = a(8) = a(10) = a(12) = a(14) = a(16) = a(18) = a(20) =

.net 5Gerardo Schneider JAva Haskell Prolog C Python Lisp fortran cobol pascal basic esterel eiffel Action Script perl Java Script Lustre ml scheme fp Apl php ruby C++ ADA OZ erlang algol modula simula C# vhdl verilog ocaml Java card ALf xsb curry Tcl ecma Script Common lisp curl nemerle rebol aspectj What about the rest?!

6Gerardo Schneider Functional Program. Object-Oriented Aspect-Oriented Logic Programming Procedural Progam. Parallel Computing Actor-Based Modelling Lang. Reflective Program. Declarative Program. Meta-Programming Constraint Program. Rule-Based Program. Pipeline Program. Dataflow-Based Subject-Oriented Visual Programming It helps! But, what about OZ ? Concurrent, constraint, dataflow, distributed, functional (evaluation: eager, lazy), imperative, logic, object-oriented (class-based), active and passive objects

Syntax Semantics Taxonomy (Pragmatics) Paradigms Principles 7Gerardo Schneider

Sequential vs Concurrent Shared Memory vs Message Passing Synchronous vs Asynchronous Static vs Dynamic Scope Value-Passing (by value, by reference, by name,...) Lazy vs Eager Evaluation Untyped vs Typed 8Gerardo Schneider Passive vs Active Objects Simple vs Multiple Inheritance Lower vs Higher-Order Functions Recursion vs Iteration Unification / Resolution Pattern Matching Exceptions, Tail recursion, backtracking, heap,...

9Gerardo Schneider A program with sensitive data (Avoid indirect information flow) A program running concurrently in an open system with shared variables (Avoid side effects) A program to run on a small device -smart card (Guarantee bound on resources) A program with hard real- time constraints (Avoid problems with response time) Knowing the basic principles and the application domain will help you to develop better and more accurate programs

 Good to know the syntax well enough  Good to be a ”good” practioner  Good if you know how to test programs  Good if you can be a good hacker  Good if you can understand your code  Good to learn many programming languages  Better if you also know the semantics  Better if you also know the theory  Better if you also apply formal validation tech.  Better if you also have a good methodology  Better if somebody else also understands it  Better if you also know the principles 10Gerardo Schneider