CSE 341, S. Tanimoto Wrapup - 1 Wrapup Programming Languages as systems for specifying computation Comparing Lisp, Java and Perl The future.

Slides:



Advertisements
Similar presentations
Chapter 8 High-Level Programming Languages. 8-2 Chapter Goals Describe the translation process and distinguish between assembly, compilation, interpretation,
Advertisements

AP Computer Science. Google Interview Question You are given 8 identical looking balls. One of them is heavier than the rest of the 7 (all the others.
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.
CSE S. Tanimoto Syntax and Types 1 Representation, Syntax, Paradigms, Types Representation Formal Syntax Paradigms Data Types Type Inference.
Summer 02-03Programming Language Concepts1 Programming Language Concepts (CS 360) Lecture 1: Overview, Grammars, and Little Languages Jeremy R. Johnson.
CSE 1301 J Lecture 2 Intro to Java Programming Richard Gesick.
CSE S. Tanimoto Introduction 1 CSE 341 Programming Languages Autumn 2001 Instructor: Steve Tanimoto Teaching assistants:
CS 331, Principles of Programming Languages Introduction.
Languages and tools. BY SA machine code.
CSE 341, S. Tanimoto Concepts 1- 1 Programming Language Concepts Formal Syntax Paradigms Data Types Polymorphism.
(1.1) COEN 171 Programming Languages Winter 2000 Ron Danielson.
Programming languages1 Programming paradigms Families of programming languages.
Chapter 1 - Introduction
The string data type String. String (in general) A string is a sequence of characters enclosed between the double quotes "..." Example: Each character.
1 Introduction Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Sections
Java Programming, Second Edition Chapter One Creating Your First Java Program.
Chapter 8 High-Level Programming Languages. 8-2 Chapter Goals Describe the translation process and distinguish between assembly, compilation, interpretation,
Software for Translators Barcelona, January 2002.
Lecture 1 Introduction Figures from Lewis, “C# Software Solutions”, Addison Wesley Richard Gesick.
1 Topics Covers everything –1) in slides –2) from the very beginning. Language classification, history, and comparison Programming paradigms –Structured.
CSE 12 – Basic Data Structures Cynthia Bailey Lee Some slides and figures adapted from Paul Kube’s CSE 12 CS2 in Java Peer Instruction Materials by Cynthia.
An Introduction to Java – Part 1 Dylan Boltz. What is Java?  An object-oriented programming language  Developed and released by Sun in 1995  Designed.
Programming Languages Meeting 14 December 9/10, 2014.
Review, Pseudocode, Flow Charting, and Storyboarding.
Theory of Programming Languages Introduction. What is a Programming Language? John von Neumann (1940’s) –Stored program concept –CPU actions determined.
BEGINNING PROGRAMMING.  Literally – giving instructions to a computer so that it does what you want  Practically – using a programming language (such.
A Look at Java. Categorize Java Which paradigm? Which paradigm? Scripting? Scripting? Declarative or procedural? Declarative or procedural? Which generation?
CS 331, Principles of Programming Languages Chapter 1.
CSE S. Tanimoto More-Concepts - 1 More Programming Language Concepts Currying Lazy Evaluation Polymorphism.
Programming Languages
Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 1 Overview A good programming language is.
Introduction Mehdi Einali Advanced Programming in Java 1.
Lisp "List Processing". Lisp history John McCarthy developed the basics behind Lisp during the 1956 Dartmouth Summer Research Project on Artificial Intelligence.
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.
Week Four Agenda Link of the week Review week three lab assignment This week’s expected outcomes Next lab assignment Break-out problems Upcoming deadlines.
Java Programming Daily review / 1 PT. each. September 28/29: Lesson 1 - a 1. Create the “skeleton” of a program Public class Tester { Public static void.
Chapter 3 Introducing Java. Objectives and Goals 1. Define terminology associated with object- oriented programming. 2. Explain why Java is a widely used.
Intro to Programming STARS College of Communication and Information Florida State University Written by: Hannah Brock Alissa Ovalle Nicolaus Lopez Martin.
a medium allowing humans and computers to communicate an abstraction of the real world a notation for expressing algorithms the set of all syntactically.
Programming Languages 2nd edition Tucker and Noonan
CSC 533: Programming Languages Spring 2016
CSC 533: Programming Languages Spring 2015
PROGRAMMING LANGUAGES
Representation, Syntax, Paradigms, Types
Final Review In Text: Chapters 1-3, 5-11,
Final Review In Text: Chapters 1-3, 5-10, 12,
Final Review In Text: Chapters 1-3, 5-10, 12,
صياغة البرامج ولغات البرمجة Programming & programming languages
Final Review In Text: Chapters 1-3, 5-10,
Final Review In Text: Chapters 1-3, 5-10,
Representation, Syntax, Paradigms, Types
Programming Languages 2nd edition Tucker and Noonan
CSE 341 Programming Languages Autumn 2001
CSE 341 Programming Languages Autumn 2003
CSE 341 Programming Languages Autumn 2002
Representation, Syntax, Paradigms, Types
Functional Programming Concepts
CSE 341 Programming Languages Spring 2003
CSE S. Tanimoto Comparing Languages
Functional Programming Concepts
Principles of Programming Languages
Lecture 8 Programming Paradigm & Languages. Programming Languages The process of telling the computer what to do Also known as coding.
CSE 341 Programming Languages Autumn 2003
Representation, Syntax, Paradigms, Types
강의 내용 및 방법 접근방법 리포트 시험 Lambda Calculus, Proof of Correctness
February , 2009 CSE 113 B.
Abstraction and Repetition
Compilers Principles, Techniques, & Tools Taught by Jing Zhang
Functional Programming Concepts
Presentation transcript:

CSE 341, S. Tanimoto Wrapup - 1 Wrapup Programming Languages as systems for specifying computation Comparing Lisp, Java and Perl The future

CSE 341, S. Tanimoto Wrapup - 2 Programming 1. Specify computation 2. Using a finite-length expression, specify arbitrarily long computations using looping or recursion. 3. Key criterion is that the program description be effective, so that a computer really can interpret/compile and execute it.

CSE 341, S. Tanimoto Wrapup - 3 Language Comparison Lisp: uniform syntax, interpreted, mostly functional. Java: typical syntax, compiled, mostly object-oriented. Perl: permissive syntax, compiled, multi- paradigm, scripting.

CSE 341, S. Tanimoto Wrapup Bottles of Beer The next step up from “Hello World” Print the words to the song, “99 Bottles of Beer on the Wall.” For solutions in over 200 languages, see

CSE 341, S. Tanimoto Wrapup - 5 BASIC Beginners’ All purpose Symbolic Instruction Code 10 REM Basic version of 99 bottles of beer 20 FOR X=99 TO 1 STEP PRINT X;"Bottle(s) of beer on the wall,";X;"bottle(s) of beer" 40 PRINT "Take one down and pass it around," 50 PRINT X-1;"bottle(s) of beer on the wall" 60 NEXT

CSE 341, S. Tanimoto Wrapup - 6 Lisp ;;; Print the words to 99 Bottles of beer. (defun b (n) (format nil "~A bottle~A of beer" n (if (= n 1) "" "s")) ) (defun bb (n) (format t "~A on the wall, ~A.~%~A ~A.~%" (b n)(b n) "Take one down and pass it around, " (b (1- n)) ) (if (> n 1) (bb (1- n))) ) (bb 99)

CSE 341, S. Tanimoto Wrapup - 7 Java public class Bottle { public static void main(String Argv[]) { for(int i=99; i>0; i--) { String b = b(i); System.out.println(b + " on the wall, " + b + ".\n" + "Take one down and pass it around, " + b(i-1) + " on the wall."); } static String b(int n) { String s = "s"; if (n == 1) s = ""; return n + " bottle" + s + " of beer"; }

CSE 341, S. Tanimoto Wrapup - 8 Perl # Print words to '99 Bottles of Beer' -- S. Tanimoto $w = " on the wall"; $t = "\nTake one down and pass it around, "; for (reverse(1.. 99)) { print b($_),"$w, ",b($_),". ",$t,b($_-1),"$w.\n"; } sub b() { ($n) $p = ($n != 1) ? "s" : ""; "$n bottle$p of beer"; }

CSE 341, S. Tanimoto Wrapup - 9 Prolog bbw(1) :- write(' One bottle of beer on the wall'). bbw(N) :- write(N), bob, write(' on the wall'). bb(1) :- bbw(1), write(', one bottle of beer'), tod, write(' No'), bob, write('.'). bb(N) :- bbw(N), write(', '), write(N), bob, tod, M is N - 1, bbw(M), write('.\n'), bb(M). bob :- write(' bottles of beer'). tod :- write('. Take one down; pass it around - ').

CSE 341, S. Tanimoto Wrapup - 10 The Future Ubiquitous computing, wireless Internet, embedded systems Computers will be everywhere! Your toaster MAY be programmable. What kind of programming system will it offer? What will be the consequences of inability to program? End-user programming languages and systems will play a key role in letting ordinary people be in control of the devices in their own homes.

CSE 341, S. Tanimoto Wrapup - 11 Final Exam Coverage includes topics from: Lisp quiz Java quiz + regular expressions (theory and Perl practice), syntax description using BNF and EBNF, logic programming (clauses, literals, unification, Prolog’s search procedure) orthogonality, polymorphism, language paradigms data type -- strong vs weak typing, structural equivalence of types vs name equivalence.