CSCI 3136 Principles of Programming Languages Summer 2013 Faculty of Computer Science Dalhousie University 1 / 100
CSCI 3136 Principles of Programming Languages Summer 2013 Aminul Islam Faculty of Computer Science Dalhousie University 2 / 100
Basic Course Information 3 / 100
Basic Course Information � Web: http://web.cs.dal.ca/~islam/3136/ 4 / 100
Basic Course Information � Web: http://web.cs.dal.ca/~islam/3136/ � Class: Mon & Wed 12:05-13:25 at CS 127 5 / 100
Basic Course Information � Web: http://web.cs.dal.ca/~islam/3136/ � Class: Mon & Wed 12:05-13:25 at CS 127 � Lab: Fri 12:05-13:25 at CS Lab 3 6 / 100
Basic Course Information � Web: http://web.cs.dal.ca/~islam/3136/ � Class: Mon & Wed 12:05-13:25 at CS 127 � Lab: Fri 12:05-13:25 at CS Lab 3 � Instructor: Aminul Islam (islam@cs.dal.ca) Office: Room # 437, The Goldberg CS Building 7 / 100
Basic Course Information � Web: http://web.cs.dal.ca/~islam/3136/ � Class: Mon & Wed 12:05-13:25 at CS 127 � Lab: Fri 12:05-13:25 at CS Lab 3 � Instructor: Aminul Islam (islam@cs.dal.ca) Office: Room # 437, The Goldberg CS Building � Office Hour: Fri 11:00-12:00 8 / 100
Textbooks and Other Material 9 / 100
Textbooks and Other Material � Class slides are available online 10 / 100
Textbooks and Other Material � Class slides are available online � Recommended text: Michael L. Scott. Programming Language Pragmatics, 3rd edition 2009 11 / 100
Textbooks and Other Material � Class slides are available online � Recommended text: Michael L. Scott. Programming Language Pragmatics, 3rd edition 2009 � More relevant books listed on the course web site (some of them are available on-line) 12 / 100
Textbooks and Other Material � Class slides are available online � Recommended text: Michael L. Scott. Programming Language Pragmatics, 3rd edition 2009 � More relevant books listed on the course web site (some of them are available on-line) � Other links can be found at course web site 13 / 100
Evaluation and Plagiarism Policy Evaluation Plagiarism policy 14 / 100
Evaluation and Plagiarism Policy Evaluation • 40% assignments (Five) Plagiarism policy 15 / 100
Evaluation and Plagiarism Policy Evaluation • 40% assignments (Five) • 20% midterm exam Plagiarism policy 16 / 100
Evaluation and Plagiarism Policy Evaluation • 40% assignments (Five) • 20% midterm exam • 40% final exam Plagiarism policy 17 / 100
Evaluation and Plagiarism Policy Evaluation • 40% assignments (Five) • 20% midterm exam • 40% final exam Plagiarism policy • Assignments and exams must be done individually 18 / 100
Evaluation and Plagiarism Policy Evaluation • 40% assignments (Five) • 20% midterm exam • 40% final exam Plagiarism policy • Assignments and exams must be done individually • Any use of reference material (book, web, ... ) must be acknowledged 19 / 100
Evaluation and Plagiarism Policy Evaluation • 40% assignments (Five) • 20% midterm exam • 40% final exam Plagiarism policy • Assignments and exams must be done individually • Any use of reference material (book, web, ... ) must be acknowledged • According to Faculty policy, any suspected case of plagiarism is referred to the Academic Integrity Officer and may be forwarded to the Senate Discipline Committee. Details at http: //www.cs.dal.ca/graduate/studentinfo/plagiarism 20 / 100
How is This Course Useful? 21 / 100
How is This Course Useful? � Help choose the most appropriate language for the job, evaluate trade-offs 22 / 100
How is This Course Useful? � Help choose the most appropriate language for the job, evaluate trade-offs � Make it easier to learn new languages 23 / 100
How is This Course Useful? � Help choose the most appropriate language for the job, evaluate trade-offs � Make it easier to learn new languages � Learn to simulate useful features in languages that lack them 24 / 100
How is This Course Useful? � Help choose the most appropriate language for the job, evaluate trade-offs � Make it easier to learn new languages � Learn to simulate useful features in languages that lack them � ? 25 / 100
Course Outline Contents • Introduction • Lexical analysis and automata theory • Syntactic Analysis and Context-Free Grammars • Semantic analysis • Names, scopes, and binding • Control flow • Data types and object-oriented programming • Specialized topics Tutorials • Perl • Scheme/Lisp • Prolog 26 / 100
Course Outline Contents • Introduction • Programming language, History, Paradigms • Implementation • Lexical analysis and automata theory • Syntactic Analysis and Context-Free Grammars • Semantic analysis • Names, scopes, and binding • Control flow • Data types and object-oriented programming • Specialized topics Tutorials • Perl • Scheme/Lisp • Prolog 27 / 100
We know Something in Common 28 / 100
We know Something in Common • C 29 / 100
We know Something in Common • C • C++ 30 / 100
We know Something in Common • C • C++ • C# 31 / 100
We know Something in Common • C • C++ • C# • Java 32 / 100
We know Something in Common • C • C++ • C# • Java • JavaScript 33 / 100
We know Something in Common • C • C++ • C# • Java • JavaScript • Perl 34 / 100
We know Something in Common • C • C++ • C# • Java • JavaScript • Perl • PHP 35 / 100
We know Something in Common • C • C++ • C# • Java • JavaScript • Perl • PHP • Python 36 / 100
We know Something in Common • C • C++ • C# • Java • JavaScript • Perl • PHP • Python • Ruby 37 / 100
We know Something in Common • C • C++ • C# • Java • JavaScript • Perl • PHP • Python • Ruby • SQL 38 / 100
We know Something in Common • C • C++ • C# • Java • JavaScript • Perl • PHP • Python • Ruby • SQL According to langpop.com, 10 most cited programming languages 39 / 100
Principles of Programming Language 40 / 100
Principles of Programming Language? 41 / 100
Principles of Programming Language? Human Language Programming Language 42 / 100
Principles of Programming Language? Human Language Programming Language • Vocabulary 43 / 100
Principles of Programming Language? Human Language Programming Language • Vocabulary • Key words 44 / 100
Principles of Programming Language? Human Language Programming Language • Grammar 45 / 100
Principles of Programming Language? Human Language Programming Language • Grammar • Grammar 46 / 100
Principles of Programming Language? Human Language Programming Language • Proper Name/Noun (e.g., Gosling is the ... ) 47 / 100
Principles of Programming Language? Human Language Programming Language • Proper Name/Noun (e.g., • Variable Name (e.g., int x Gosling is the ... ) = 3; ) 48 / 100
Principles of Programming Language? Human Language Programming Language ... • 49 / 100
Principles of Programming Language? Human Language Programming Language ... ... • • 50 / 100
Principles of Programming Language? Human Language Programming Language • Vocabulary • Key words • Grammar • Grammar • Proper Name/Noun (e.g., • Variable Name (e.g., int x Gosling is the ... ) = 3; ) ... ... • • 51 / 100
Difference between Human Language and Programming Language “Colorless green ideas sleep furiously.” “John is a married bachelor.” 52 / 100
Brief history of Programming Languages 53 / 100
Brief history of Programming Languages • Machine language 54 / 100
Brief history of Programming Languages • Machine language “Hello world” example in Machine language 110011100111000001111100000001000011111000011111100000000010 000011001111100001100010000010011111000100000000000001001111 100000111110001000000000000000001000111110010000001100001111 55 / 100
Brief history of Programming Languages • Assembly language 56 / 100
Brief history of Programming Languages “Hello world” example in Assembly • Assembly language language for the IBM-PC (i386) dosseg .model small .stack 100h .data hello_message db ’Hello, World!’,0dh,0ah,’$’ .code main proc mov ax,@data mov ds,ax mov ah,9 mov dx,offset hello_message int 21h mov ax,4C00h int 21h main endp end main 57 / 100
Brief history of Programming Languages • FORTRAN (1957), COBOL (1959), BASIC (1964), C (1972) 58 / 100
Brief history of Programming Languages “Hello world” example in FORTRAN • FORTRAN (1957), COBOL program helloworld (1959), BASIC (1964), C write (*,*) ‘‘Hello, world.’’ (1972) end program helloworld 59 / 100
Brief history of Programming Languages • LISP (1959) → Scheme (1975), Common Lisp (1984) 60 / 100
Brief history of Programming Languages “Hello world” example in LISP (DEFUN HELLO-WORLD () (PRINT (LIST ’HELLO ’WORLD))) • LISP (1959) → Scheme (1975), Common Lisp (1984) 61 / 100
Brief history of Programming Languages • Prolog (1973) 62 / 100
Recommend
More recommend