CS 330 Programming Languages 09 / 06 / 2007 Instructor: Michael Eckmann.

Slides:



Advertisements
Similar presentations
CS 102 Computers In Context (Multimedia) 01 / 21 / 2009 Instructor: Michael Eckmann.
Advertisements

Copyright © 1998 by Addison Wesley Longman, Inc. 1 Chapter One Preliminaries, including –Why study PL concepts? –Programming domains –PL evaluation criteria.
Chapter 1: Preliminaries
CS 330 Programming Languages 10 / 16 / 2008 Instructor: Michael Eckmann.
CS 330 Programming Languages 09 / 07 / 2006 Instructor: Michael Eckmann.
CS 330 Programming Languages 09 / 12 / 2006 Instructor: Michael Eckmann.
Reasons to study concepts of PL
ISBN Chapter 1 Preliminaries. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.1-2 Chapter 1 Topics Motivation Programming Domains.
ISBN Chapter 1 Preliminaries. Copyright © 2007 Addison-Wesley. All rights reserved.1-2 Chapter 1 Topics Reasons for Studying Concepts of.
CS 354 Overview. Copyright © 2007 Addison-Wesley. All rights reserved. 1–2 Course Topics What is a programming language? What features do programming.
Programming Languages Structure
ISBN Lecture 01 Preliminaries. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.1-2 Lecture 01 Topics Motivation Programming.
CS 330 Programming Languages 09 / 11 / 2007 Instructor: Michael Eckmann.
Summer 02-03Programming Language Concepts1 Programming Language Concepts (CS 360) Lecture 1: Overview, Grammars, and Little Languages Jeremy R. Johnson.
ISBN Chapter 1 Topics Motivation Programming Domains Language Evaluation Criteria Influences on Language Design Language Categories Language.
Copyright © 1998 by Addison Wesley Longman, Inc. 1 Concepts of Programming Languages Chapter 1.
ISBN Chapter 1 Preliminaries. Copyright © 2007 Addison-Wesley. All rights reserved.1-2 Chapter 1 Topics Reasons for Studying Concepts of.
ICE1341 Programming Languages Spring 2005 Lecture #3 Lecture #3 In-Young Ko iko.AT. icu.ac.kr iko.AT. icu.ac.kr Information and Communications University.
Programming Language Concepts
Chapter 1 Preliminaries.
Chapter 1 Preliminaries. Copyright © 2012 Addison-Wesley. All rights reserved.1-2 Chapter 1 Topics Reasons for Studying Concepts of Programming Languages.
Language Evaluation Criteria
CS 355 – Programming Languages
CS 363 Comparative Programming Languages
CS 106 Introduction to Computer Science I 01 / 25 / 2010 Instructor: Michael Eckmann.
CS 330 Programming Languages 09 / 04 / 2008 Instructor: Michael Eckmann.
Programming Languages Summer
Copyright © 2006 Addison-Wesley. All rights reserved.1-1 ICS 410: Programming Languages.
Copyright © 2007 Addison-Wesley. All rights reserved.1-1 Reasons for Studying Concepts of Programming Languages Increased ability to express ideas Improved.
ICS 313 Fundamentals of Programming Languages Instructor: Abdul Wahid Wali Lecturer, CSSE, UoH
ISBN Chapter 1 Preliminaries. Corrected and improved by Assoc. Prof. Zeki Bayram, EMU, North Cyprus. Original Copyright © 2007 Addison-Wesley.
ISBN CS 354 Preliminaries. Copyright © 2006 Addison-Wesley. All rights reserved.1-2 Course Topics What is a programming language? What features.
ISBN Chapter 1 Preliminaries. Copyright © 2015 Pearson. All rights reserved.1-2 Chapter 1 Topics Reasons for Studying Concepts of Programming.
ISBN Chapter 1 Preliminaries. Copyright © 2009 Addison-Wesley. All rights reserved.1-2 Chapter 1 Topics Reasons for Studying Concepts of.
CS 106 Introduction to Computer Science I 01 / 22 / 2007 Instructor: Michael Eckmann.
CS 106 Introduction to Computer Science I 01 / 22 / 2008 Instructor: Michael Eckmann.
Chapter 1: Preliminaries Lecture # 2. Chapter 1: Preliminaries Reasons for Studying Concepts of Programming Languages Programming Domains Language Evaluation.
CSCE 343 – Programming Language Concepts Welcome!.
ISBN Chapter 1 Preliminaries. Copyright © 2006 Addison-Wesley. All rights reserved.1-2 Chapter 1 Topics Reasons for Studying Concepts of.
Concepts of Programming Languages
CSCI 3370: Principles of Programming Languages Introduction
Why study programming languages?
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
PROGRAMMING LANGUAGES
Chapter 1 Reasons to study concepts of PLs Programming Domains
1.1 Reasons to study concepts of PLs
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
CS 3304 Comparative Languages Fall 2011
Chapter 1 Introduction.
Chapter 1 Preliminaries.
Chapter 1 Preliminary. Chapter 1 Preliminary 1.1 Reasons for Studying Concepts of Programming Languages Increased capacity to express ideas Improved.
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
Chapter 1 Topics Reasons for Studying Concepts of Programming Languages Programming Domains Language Evaluation Criteria Influences on Language Design.
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
Programming Languages, Preliminaries, History & Evolution
Reasons To Study Programming Languages
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
Presentation transcript:

CS 330 Programming Languages 09 / 06 / 2007 Instructor: Michael Eckmann

Michael Eckmann - Skidmore College - CS Fall 2007 Today’s Topics Introduction Review the syllabus Review the policies on academic dishonesty and improper collaboration First chapter stuff Fill out a questionnaire

Homework Read chapter 1 in Sebesta before class Tuesday. Sections 1.3 and 1.4 are important so please read them carefully. I will and post to our webpage a written assignment to be due 11:59 pm. September 11 via to I prefer plain text files, but will accept the typical word processing format. I'll the whole class and ask that you each reply to me (not reply all) so I know I have your address correct. Please also let me know if you want me to send to additional addresses. Michael Eckmann - Skidmore College - CS Fall 2007

Work I designed the course and the assignments with purpose in mind. Different types of assignments will require different types of thinking and skills. My intent is that they will be informative and challenging as well as have theoretical and practical value.

Michael Eckmann - Skidmore College - CS Fall 2007 Reason to study Prog. Langs. Increased ability to express ideas –Hard to conceptualize what you can't describe –Limited grasp of lang. -> limited complexity of thought –(read paragraph from text) page 2. –May be able to apply what is learned in one language to another. How? For choosing appropriate languages –The more you know, the better you can fit the job to the language –What language will you choose if you only know one language? –What advantages are there to choosing the one you know?

Michael Eckmann - Skidmore College - CS Fall 2007 Reason to study Prog. Langs. Understand significance of implementation –Use language more intelligently, e.g. Faster execution, avoid certain features, find bugs easier Ability to design new languages Overall advancement of computing

Michael Eckmann - Skidmore College - CS Fall 2007 Syllabus Office hours Text book Class room Assignments –programs –homeworks Collaboration policy Grading scheme Attendance Workload Readings Note: The most up-to-date syllabus will be found on the course web page.

Application Areas of Prog. Langs. Question: What are some differences between the needs of a scientific application and a business application? What about vs. systems applications (e.g. OS's and their support programs.) Scientific applications –Fortran, Algol 60, et al. Business applications –Cobol Artificial intelligence –Lisp, Prolog, Scheme Systems programming –C Scripting languages –Perl, JavaScript, PHP, et al. Special-purpose languages Michael Eckmann - Skidmore College - CS Fall 2007

Language Evaluation When we talk about Language evaluation we're talking about evaluating how effective the features of a language are at allowing programmers to create programs that are readable, writeable, reliable, costly etc. In that way we can then compare languages to each other in terms of how readable, writeable, reliable, costly, etc. the programs in each of those languages tend to be. This is different from comparing, for instance, how readable 2 programs written in the same language are. Michael Eckmann - Skidmore College - CS Fall 2007

Language Evaluation Readability –Why is it important? –Software lifecycle (time/$ spent on maintenance vs. on initial coding) –Simplicity (1 way vs. mult., operator overloading) –Orthogonality (set of primitives combined in few ways in all combinations to build data structures (read pg. 10)) –Control (e.g. gotos vs. loops) –Types (e.g. Using an int where a boolean is best) –Structures (e.g. array of records vs. arrays of individuals) –Syntax (identifier rules (limited size, valid chars), special words can be variable names --- any advantage to this?) Michael Eckmann - Skidmore College - CS Fall 2007

Language Evaluation Writability –Orthogonality if small set and all combinations make sense + if large set and all combinations exist but some don't make sense to ever use or would be rarely used – (could cause undetected errors) –Abstraction (functional (methods/functions) & data (classes)) don't need to know/be reminded of/replicate the implementation details, just need to use what you wrote –Expressivity (powerful operators or many ways to do the same things e.g. count++, for vs. while...) Reliability –(+)Type checking (at run-time vs. compile-time vs. neither) when is better? –(+)Exception Handling –(-)Aliasing (why?) Michael Eckmann - Skidmore College - CS Fall 2007

Language Evaluation Cost (time == $) –training programmers in the language –writing --- IDEs –compiling, executing --- compiler optimization tradeoff –Implementation system (e.g. The compiler and/or interpreter available for free?) –Poor reliability –Maintenance (up to 4 times cost of developing) Can you think of others? Michael Eckmann - Skidmore College - CS Fall 2007

A few Imperative Languages C, Pascal and many others C++ is imperative-based but it is OO Java is also imperative-based but it is OO

von Neumann Architecture Michael Eckmann - Skidmore College - CS Fall 2007

von Neumann bottleneck transmission/piping between memory and CPU takes longer than executing instructions within the CPU. Michael Eckmann - Skidmore College - CS Fall 2007

Imperative Language Features Imperative languages are built FOR the von Neumann architecture –Data and programs stored in same memory –Memory is separate from CPU –Instructions and data are transmitted from CPU to memory, results are transmitted back to CPU Variables model memory cells Assignment statements model transmission Iteration is efficient (b/c instructions are in adjacent memory cells) – recursion is inefficient (b/c save state of each call). Michael Eckmann - Skidmore College - CS Fall 2007

Functional vs. Imperative Languages Functional (e.g. Lisp, Scheme, et al.) –Apply functions to parameters –different use of variables –No assignment statements –No iteration –Many programmers feel that there are extreme benefits to computing using functional languages. So, why aren't they used more? Michael Eckmann - Skidmore College - CS Fall 2007

Functional vs. Imperative Languages Because of von Neumann, that's why! What might be a drawback to using a functional language on a von Neumann machine? Michael Eckmann - Skidmore College - CS Fall 2007

Imperative Languages Von Neumann => imperative languages But many programmers do not realize this and think that imperative languages are the natural way to program. Michael Eckmann - Skidmore College - CS Fall 2007

The major Language Groups Imperative –And visual langs (drag/drop code) Functional Logic –Rule based, no order of execution Object-Oriented Michael Eckmann - Skidmore College - CS Fall 2007

Some Language Design Trade-offs Reliability vs. cost of execution –e.g. Run-time array range checking --- Java vs. C Readability vs. writability (expressivity) –Compactness Flexibility vs. safety –e.g. Multiple types allowed in same memory location Michael Eckmann - Skidmore College - CS Fall 2007

Compilation, Interpretation, Hybrids What is a compiler? What is an interpreter? What is a hybrid of these? –Java, Perl –Compiler generates intermediate code that is then interpreted –Any advantages/disadvantages? Michael Eckmann - Skidmore College - CS Fall 2007

Let's think about some stuff Any other language evaluation criteria you can think of? What are the pros and cons of case sensitivity in user defined names? Michael Eckmann - Skidmore College - CS Fall 2007