CSE 3302 Programming Languages Kelly Scott French Spring

  • Slides: 31
Download presentation
CSE 3302 Programming Languages Kelly Scott French Spring 2017 Lecture 1 - Introduction, Spring

CSE 3302 Programming Languages Kelly Scott French Spring 2017 Lecture 1 - Introduction, Spring 2017 CSE 3302 Programming Languages, UT-Arlington based on slides by Chengkai Li 1

Self Introduction • Kelly Scott French • Background: Languages, companies, environments • http: //crystal.

Self Introduction • Kelly Scott French • Background: Languages, companies, environments • http: //crystal. uta. edu/~french/ Lecture 1 - Introduction, Spring 2017 CSE 3302 Programming Languages, UT-Arlington based on slides by Chengkai Li 2

Now it’s your turn… • name, year, where from • courses taken • programming

Now it’s your turn… • name, year, where from • courses taken • programming skills • what do you want to get from the course • anything else Lecture 1 - Introduction, Spring 2017 CSE 3302 Programming Languages, UT-Arlington based on slides by Chengkai Li 3

Course Page • http: //crystal. uta. edu/~french/courses/cse 3302 -sp 17/ Syllabus, Announcements, Schedule (lecture

Course Page • http: //crystal. uta. edu/~french/courses/cse 3302 -sp 17/ Syllabus, Announcements, Schedule (lecture notes), Homework, Machine Problems, Exams, Resources, Accommodation based on disability. • Important announcements: announcement page (http: //crystal. uta. edu/~cli/cse 3302/announcements. htm) • Tentative! Lecture 1 - Introduction, Spring 2017 CSE 3302 Programming Languages, UT-Arlington based on slides by Chengkai Li 4

Basics • Lectures: Wednesday, 4: 00 - 6: 50 pm, SH 125 – Slides

Basics • Lectures: Wednesday, 4: 00 - 6: 50 pm, SH 125 – Slides don’t cover everything. You need to read the book and supplementary materials. • Instructor: Kelly French Office hours: Wed 7 -8 pm or by appointment, ERB 322 Contact: kelly. french [at] mavs. uta. edu • Assistant Instructor/TA: TBD • Textbook: M. Gabbrielli and S. Martini, Programming Languages: Principles and Paradigms, Springer-Verlag, 2010. • Reference book: Java. Script: The Good Parts, by Douglas Crockford. Lecture 1 - Introduction, Spring 2017 CSE 3302 Programming Languages, UT-Arlington based on slides by Chengkai Li 555

Basics (cont. ) • Prerequisites – Background: • CSE 1325: O-O Programming • CSE

Basics (cont. ) • Prerequisites – Background: • CSE 1325: O-O Programming • CSE 2320: Algorithms & Data Structures • CSE 2312: Comp. Org. & Assembly Lang. Prog. Automata, grammar, regular expression, … – Programming: Experiences with at least one major programming language. Lecture 1 - Introduction, Spring 2017 CSE 3302 Programming Languages, UT-Arlington based on slides by Chengkai Li 6

Tentative grading scheme • • • Homework: Labs: Midterm exam: Final exam: Bonus points:

Tentative grading scheme • • • Homework: Labs: Midterm exam: Final exam: Bonus points: Lecture 1 - Introduction, Spring 2017 25%. 20%. (4: 00 -7: 50 pm, Wednesday, Mar. 8 th, SH 125) 30%. (4: 00 -7: 50 pm, Wednesday, May. 10 th, SH 125) 5% (class participation) + 5% (labs). CSE 3302 Programming Languages, UT-Arlington based on slides by Chengkai Li 7

Homework (HW) 25% • HW 1, HW 2, HW 3, HW 4 • Problem-based

Homework (HW) 25% • HW 1, HW 2, HW 3, HW 4 • Problem-based • Can discuss, but must write it independently. • Review the materials learned • Get you prepared for the exams Lecture 1 - Introduction, Spring 2017 CSE 3302 Programming Languages, UT-Arlington based on slides by Chengkai Li 8

Machine Problems (Labs) 25% • 4 Labs. • Can discuss, but must do it

Machine Problems (Labs) 25% • 4 Labs. • Can discuss, but must do it independently. • Decent amount of programming: – Not crazy. – But not a piece of cake either. Lecture 1 - Introduction, Spring 2017 CSE 3302 Programming Languages, UT-Arlington based on slides by Chengkai Li 9

Deadlines • 11: 59 pm. • Degree of lateness • Up to 11: 59

Deadlines • 11: 59 pm. • Degree of lateness • Up to 11: 59 pm next day • Up to 11: 59 pm two days Penalty 30 pts 60 pts (No exception, unless you have medical or other emergency, with proof documents from the school. ) Lecture 1 - Introduction, Spring 2017 CSE 3302 Programming Languages, UT-Arlington based on slides by Chengkai Li 10

Blackboard o Assignment instruction and files o Student assignment submission (we don’t accept email

Blackboard o Assignment instruction and files o Student assignment submission (we don’t accept email submission or hard-copy) o Discussion Group o Grades Lecture 1 - Introduction, Spring 2017 CSE 3302 Programming Languages, UT-Arlington based on slides by Chengkai Li 11

Exams • Midterm: 20% Mar. 8 th Review / Midterm Exam (in class), closebook,

Exams • Midterm: 20% Mar. 8 th Review / Midterm Exam (in class), closebook, close-notes • Final: 25% May. 3 rd Review May. 10 th Exam, Wednesday 4 -6: 50 pm, close-book, close-notes Lecture 1 - Introduction, Spring 2017 CSE 3302 Programming Languages, UT-Arlington based on slides by Chengkai Li 12

Regrade • 7 days after we post scores on Blackboard and send out announcements.

Regrade • 7 days after we post scores on Blackboard and send out announcements. TA will handle regrade requests. Won’t consider it after 7 days. • If not satisfied with the results, 7 days to request again. Instructor will handle it, and the decision is final. Lecture 1 - Introduction, Spring 2017 CSE 3302 Programming Languages, UT-Arlington based on slides by Chengkai Li 13

How to get bonus points? 5% • During lectures: – Raise questions. (There are

How to get bonus points? 5% • During lectures: – Raise questions. (There are no bad questions. ) – Actively participate in discussions. – But don’t overdo it please. • In labs – Organization – Clarity – Test Cases Lecture 1 - Introduction, Spring 2017 CSE 3302 Programming Languages, UT-Arlington based on slides by Chengkai Li 14

Get questions after class? • Discuss with classmates: – The best way to learn

Get questions after class? • Discuss with classmates: – The best way to learn is to teach. • General questions (that can be asked by any student): – Post on discussion group (Blackboard, Piazza, or Google group) • Individual questions (that apply to you specifically): – Email TA – No need to CC me. If TA cannot handle it, they will forward to me. • Come to TA’s office hours or my office hours. Lecture 1 - Introduction, Spring 2017 CSE 3302 Programming Languages, UT-Arlington based on slides by Chengkai Li 15

Get bored • Do you watch Youtube? Lecture 1 - Introduction, Spring 2017 CSE

Get bored • Do you watch Youtube? Lecture 1 - Introduction, Spring 2017 CSE 3302 Programming Languages, UT-Arlington based on slides by Chengkai Li 16

http: //www. youtube. com/watch? v=g. C 2 ew 6 q. La 8 U Don’t

http: //www. youtube. com/watch? v=g. C 2 ew 6 q. La 8 U Don’t do it. It’s not worth it. Lecture 1 - Introduction, Spring 2017 CSE 3302 Programming Languages, UT-Arlington ©Chengkai Li, 2008 17

CSE 3302: What is it about? • Exposure to various kinds of languages and

CSE 3302: What is it about? • Exposure to various kinds of languages and paradigms. • Understand the features, pros/cons of languages. • Do things in the right way. • Learn a new language effectively and quickly. • Choose a language to use for a project/system. • Design new languages. Lecture 1 - Introduction, Spring 2017 CSE 3302 Programming Languages, UT-Arlington based on slides by Chengkai Li 19

CSE 3302: What isn’t it about? • I want to get easy credit without

CSE 3302: What isn’t it about? • I want to get easy credit without doing much. • I want to become a coding guru in C/C++/C#/Java/… • I want to know every details about implementing a language. • I want to prove properties of a language. Lecture 1 - Introduction, Spring 2017 CSE 3302 Programming Languages, UT-Arlington based on slides by Chengkai Li 20

Big picture • Let’s draw the picture Lecture 1 - Introduction, Spring 2017 CSE

Big picture • Let’s draw the picture Lecture 1 - Introduction, Spring 2017 CSE 3302 Programming Languages, UT-Arlington based on slides by Chengkai Li 21

Big picture? http: //thunder. prohosting. com/~ccastle/My. Computer. gif Lecture 1 - Introduction, Spring 2017

Big picture? http: //thunder. prohosting. com/~ccastle/My. Computer. gif Lecture 1 - Introduction, Spring 2017 CSE 3302 Programming Languages, UT-Arlington based on slides by Chengkai Li 22

Purpose of Language Lecture 1 - Introduction, Spring 2017 CSE 3302 Programming Languages, UT-Arlington

Purpose of Language Lecture 1 - Introduction, Spring 2017 CSE 3302 Programming Languages, UT-Arlington based on slides by Chengkai Li 23

Music Notation is a Language? Communication between composer and performer Music has both semantics

Music Notation is a Language? Communication between composer and performer Music has both semantics and syntax Music score is instructions to be executed by one or more performers Not just *what* note to ply but *who* - what instrument and which part if multiples *where* - solo, duet, small group, full orchestra *how* - soft / loud or how long - staccato / slurred *when* - measures, rests *how fast* - tempo, time signature The bars help distinguish notes in a standard way, the clef sets out the reference point for the bars Lecture 1 - Introduction, Spring 2017 CSE 3302 Programming Languages, UT-Arlington based on slides by Chengkai Li 24

What is a programming language? OS printf("hello, worldn"); CPU Memory • Programmers use PLs

What is a programming language? OS printf("hello, worldn"); CPU Memory • Programmers use PLs to instruct computers to do things. Lecture 1 - Introduction, Spring 2017 CSE 3302 Programming Languages, UT-Arlington based on slides by Chengkai Li 25

Programming languages? LDA #2 STA X (http: //encarta. msn. com/media_461557622/ENIAC. html) SELECT name FROM

Programming languages? LDA #2 STA X (http: //encarta. msn. com/media_461557622/ENIAC. html) SELECT name FROM Students Where status=“sleeping” • We talk about high-level general-purpose programming languages. Lecture 1 - Introduction, Spring 2017 CSE 3302 Programming Languages, UT-Arlington based on slides by Chengkai Li 26

Machine Readability OS printf("hello, worldn"); executable CPU compiler Memory • • No ambiguity Efficient

Machine Readability OS printf("hello, worldn"); executable CPU compiler Memory • • No ambiguity Efficient translation/compilation … Covered in compiler course Lecture 1 - Introduction, Spring 2017 CSE 3302 Programming Languages, UT-Arlington based on slides by Chengkai Li 27

Human Readability printf("hello, worldn"); executable OS compiler CPU Memory • This is what really

Human Readability printf("hello, worldn"); executable OS compiler CPU Memory • This is what really matters – Abstractions for describing the actions • Data abstraction: subject of computation • Control abstraction: transfer of control in computation – Human-Human communications • Your program will be read by others Lecture 1 - Introduction, Spring 2017 CSE 3302 Programming Languages, UT-Arlington based on slides by Chengkai Li 28

Paradigms • Imperative/Procedural: (ALGOL, FORTRAN , Pascal, C, Ada) control statements manipulate the data

Paradigms • Imperative/Procedural: (ALGOL, FORTRAN , Pascal, C, Ada) control statements manipulate the data and program states • OO: (C++, Java, Smalltalk) data/object-centric • Functional: (Lisp, Scheme, ML, Haskell) everything is done by function evaluations • Logic: (Prolog) axioms (statements about truth) + inferences • Parallel: (threads in Java) • Mix: (Python, Perl, Ruby) Few “pure” languages Lecture 1 - Introduction, Spring 2017 CSE 3302 Programming Languages, UT-Arlington based on slides by Chengkai Li 29

Syntax and Semantics • Syntax: structure of programs (tokens, keywords, statements. ) • Semantics:

Syntax and Semantics • Syntax: structure of programs (tokens, keywords, statements. ) • Semantics: What are meant by programs Lecture 1 - Introduction, Spring 2017 CSE 3302 Programming Languages, UT-Arlington based on slides by Chengkai Li 30

Syntax and Semantics • Can a language exist without syntax? • A language without

Syntax and Semantics • Can a language exist without syntax? • A language without syntax? Calvin Ball Lecture 1 - Introduction, Spring 2017 CSE 3302 Programming Languages, UT-Arlington based on slides by Chengkai Li 31

Schedule: What we are going to learn • • Introduction History Syntax Semantics Data

Schedule: What we are going to learn • • Introduction History Syntax Semantics Data Types Control Abstract Data Types • • • OO (Java, Smalltalk) (6 lectures) Functional (Lisp, Scheme, ML, Haskell) (4 lectures) Logic (Prolog) (4 lectures) Python (2 lectures: panel discussion) A taste of advanced topics and research (2 guest lectures) Lecture 1 - Introduction, Spring 2017 (1 lectures) (0. 5 lectures) (2 lectures) (1 lectures) CSE 3302 Programming Languages, UT-Arlington based on slides by Chengkai Li 32