SlideShare una empresa de Scribd logo
1 de 10
CSE 425: Intro to Programming Languages and their Design
A Few Key Ideas
• No particular language is a prerequisite for this course
– However you should be proficient in at least one language
– A working knowledge of C++ is worth pursuing as you go
– We’ll work on many paradigms in C++
• “How we communicate influences how we think and
vice versa.”
– [Louden and Lambert 3rd Ed. pp. 2]
• “Similarly, how we program computers influences how
we think about computation, and vice versa.”
– [Louden and Lambert 3rd Ed. pp. 2]
CSE 425: Intro to Programming Languages and their Design
Abstraction in Programming
• Von Neumann Architecture
– Program instructions and data are stored in a memory area
– CPU executes a sequence of instructions
• Machine instruction sets: lowest level of abstraction
– Binary representation that the CPU can process
– Or that a virtual machine can process (e.g., byte code)
• Assembly language is only slightly more abstract
– “Readable” labels: operations, registers, location addresses
0010 001 000000100
LD R1 FIRST
(opcode) (register) (location)
CSE 425: Intro to Programming Languages and their Design
Evolving to Higher Levels of Abstraction
• Algebraic notation and floating point numbers
– E.g., Fortran (John Backus)
• Structured abstractions and machine independence
– E.g., ALGOL (a committee), Pascal (Niklaus Wirth)
• Architecture independence (on beyond Von
Neumann)
– E.g., based on Lambda Calculus (Alonzo Church)
– E.g., Lisp (John McCarthy)
CSE 425: Intro to Programming Languages and their Design
Data Abstraction
• Basic abstractions
– Variables, data types, declarations
• Structured abstractions
– Data structures, arrays
• Unit abstractions
– Abstract data types (ADTs), classes, packages, namespaces
• Key ideas
– Information hiding, modularity, reusability, interoperability
CSE 425: Intro to Programming Languages and their Design
Control Abstraction
• Basic abstractions
– Algebraic statements, “syntactic sugar”
• Structured abstractions
– Loops, branch instructions
– Procedures, iterators, cursors, manipulators, etc.
• Unit abstractions
– ADTs, classes, packages, namespaces (same as for data!)
• Key ideas
– Selection, iteration, formal/actual parameters, composition
CSE 425: Intro to Programming Languages and their Design
Some Programming Paradigms
• Imperative/procedural (E.g., C, C++)
– Variables, assignment, other operators
• Functional (E.g., Lisp, Scheme, ML, Haskell, C++)
– Abstract notion of a function, based on lambda calculus
• Logic (E.g., Prolog, but can develop structures in C++)
– Based on symbolic logic (e.g., predicate calculus)
• Object-oriented (E.g., Java, Python, C++)
– Based on encapsulation of data and control together
• Generic (E.g., C++ and especially its standard library)
– Based on type abstraction and enforcement mechanisms
– We’ll cover informally via examples throughout the semester
CSE 425: Intro to Programming Languages and their Design
Language Definition
• Syntax
– Lexical structure, tokens, grammars (E.g., BNF)
• Basic semantics
– Informal description, may be incomplete
• Formal semantics
– Operational semantics (execution specification)
– Denotational semantics (specification as functions)
– Axiomatic semantics (assertions about program state)
CSE 425: Intro to Programming Languages and their Design
Language Design
• Goals (potentially conflicting)
– Efficiency of coding or execution, writability, expressiveness
• Specific design criteria
– Regularity (how well language features are integrated)
– Generality (how few cases have to be handled specially)
– Orthogonality (how widely features still behave the same)
– Uniformity (consistent appearance/behavior across features)
– Safety or “security” (how difficult it is to produce errors)
– Extensibility (how easy and effective is feature addition)
CSE 425: Intro to Programming Languages and their Design
Comparing Programming Languages
• Different languages usually have different goals
– E.g., C++ focuses on expressiveness and efficiency of
execution, at some cost to writability and efficiency of coding
• Accordingly, they may focus on different design
criteria
– E.g., although Java, C++, and Python are all designed with
the object-oriented programming paradigm in mind…
– … operator overloading increases extensibility but reduces
safety (e.g., operator precedence of ^ for exponentiation)
– … generality and uniformity are aided by a simpler and
smaller set of language features
– … and so forth
CSE 425: Intro to Programming Languages and their Design
Today’s Studio Exercises
• We’ll explore Visual Studio and a few coding ideas
– Built incrementally from simple to more complex abstractions
• We’ll work in C++, a multi-paradigm language
– Please form teams that put people less (or without a) C++
background together with those familiar with C++
– Ask for help as needed
– Use the on-line C++ reference and also the material at
http://www.cse.wustl.edu/~cdgill/courses/cse332/
• Record your answers as you go and e-mail them (with
the studio name in the subject line), when you’re done
– E-mail them to the course account, cse425@seas.wustl.edu
– You should get an e-mail back acknowledging receipt
– Please track which studios you have (and have not) sent

Más contenido relacionado

Similar a _intro.ppt

cs241-f06-final-overview
cs241-f06-final-overviewcs241-f06-final-overview
cs241-f06-final-overview
Colin Bell
 
Embedded 100912065920-phpapp02
Embedded 100912065920-phpapp02Embedded 100912065920-phpapp02
Embedded 100912065920-phpapp02
Atv Reddy
 

Similar a _intro.ppt (20)

Object Oriented Analysis and Design - Overview
Object Oriented Analysis and Design - OverviewObject Oriented Analysis and Design - Overview
Object Oriented Analysis and Design - Overview
 
PL Lecture 01 - preliminaries
PL Lecture 01 - preliminariesPL Lecture 01 - preliminaries
PL Lecture 01 - preliminaries
 
Metamorphic Domain-Specific Languages
Metamorphic Domain-Specific LanguagesMetamorphic Domain-Specific Languages
Metamorphic Domain-Specific Languages
 
cs241-f06-final-overview
cs241-f06-final-overviewcs241-f06-final-overview
cs241-f06-final-overview
 
Oodb
OodbOodb
Oodb
 
oodb.ppt
oodb.pptoodb.ppt
oodb.ppt
 
Cobbbbbbbnnnnnnnnnnnnnnnnncepts of PL.pptx
Cobbbbbbbnnnnnnnnnnnnnnnnncepts of PL.pptxCobbbbbbbnnnnnnnnnnnnnnnnncepts of PL.pptx
Cobbbbbbbnnnnnnnnnnnnnnnnncepts of PL.pptx
 
The Road to U-SQL: Experiences in Language Design (SQL Konferenz 2017 Keynote)
The Road to U-SQL: Experiences in Language Design (SQL Konferenz 2017 Keynote)The Road to U-SQL: Experiences in Language Design (SQL Konferenz 2017 Keynote)
The Road to U-SQL: Experiences in Language Design (SQL Konferenz 2017 Keynote)
 
intro.pptx
intro.pptxintro.pptx
intro.pptx
 
Programming for Problem Solving
Programming for Problem SolvingProgramming for Problem Solving
Programming for Problem Solving
 
Pl9ch1
Pl9ch1Pl9ch1
Pl9ch1
 
Lec 1 25_jul13
Lec 1 25_jul13Lec 1 25_jul13
Lec 1 25_jul13
 
.Net Framework & Languages Supported by .Net Frmaework
.Net Framework & Languages Supported by .Net Frmaework.Net Framework & Languages Supported by .Net Frmaework
.Net Framework & Languages Supported by .Net Frmaework
 
Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...
Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...
Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...
 
Embedded 100912065920-phpapp02
Embedded 100912065920-phpapp02Embedded 100912065920-phpapp02
Embedded 100912065920-phpapp02
 
Embedded 100912065920-phpapp02
Embedded 100912065920-phpapp02Embedded 100912065920-phpapp02
Embedded 100912065920-phpapp02
 
The Road to Lambda - Mike Duigou
The Road to Lambda - Mike DuigouThe Road to Lambda - Mike Duigou
The Road to Lambda - Mike Duigou
 
L12 Visualizing Architecture
L12 Visualizing ArchitectureL12 Visualizing Architecture
L12 Visualizing Architecture
 
Intro to .NET and Core C#
Intro to .NET and Core C#Intro to .NET and Core C#
Intro to .NET and Core C#
 
Are High Level Programming Languages for Multicore and Safety Critical Conver...
Are High Level Programming Languages for Multicore and Safety Critical Conver...Are High Level Programming Languages for Multicore and Safety Critical Conver...
Are High Level Programming Languages for Multicore and Safety Critical Conver...
 

Último

一比一原版犹他大学毕业证如何办理
一比一原版犹他大学毕业证如何办理一比一原版犹他大学毕业证如何办理
一比一原版犹他大学毕业证如何办理
F
 
一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理
一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理
一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理
AS
 
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
gajnagarg
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
JOHNBEBONYAP1
 
一比一原版贝德福特大学毕业证学位证书
一比一原版贝德福特大学毕业证学位证书一比一原版贝德福特大学毕业证学位证书
一比一原版贝德福特大学毕业证学位证书
F
 
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
ydyuyu
 
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu DhabiAbu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Monica Sydney
 
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
ayvbos
 

Último (20)

一比一原版犹他大学毕业证如何办理
一比一原版犹他大学毕业证如何办理一比一原版犹他大学毕业证如何办理
一比一原版犹他大学毕业证如何办理
 
一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理
一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理
一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理
 
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime NagercoilNagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
 
Call girls Service Canacona - 8250092165 Our call girls are sure to provide y...
Call girls Service Canacona - 8250092165 Our call girls are sure to provide y...Call girls Service Canacona - 8250092165 Our call girls are sure to provide y...
Call girls Service Canacona - 8250092165 Our call girls are sure to provide y...
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
 
Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.
 
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...
 
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
 
Research Assignment - NIST SP800 [172 A] - Presentation.pptx
Research Assignment - NIST SP800 [172 A] - Presentation.pptxResearch Assignment - NIST SP800 [172 A] - Presentation.pptx
Research Assignment - NIST SP800 [172 A] - Presentation.pptx
 
Leading-edge AI Image Generators of 2024
Leading-edge AI Image Generators of 2024Leading-edge AI Image Generators of 2024
Leading-edge AI Image Generators of 2024
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
 
Local Call Girls in Gomati 9332606886 HOT & SEXY Models beautiful and charmi...
Local Call Girls in Gomati  9332606886 HOT & SEXY Models beautiful and charmi...Local Call Girls in Gomati  9332606886 HOT & SEXY Models beautiful and charmi...
Local Call Girls in Gomati 9332606886 HOT & SEXY Models beautiful and charmi...
 
一比一原版贝德福特大学毕业证学位证书
一比一原版贝德福特大学毕业证学位证书一比一原版贝德福特大学毕业证学位证书
一比一原版贝德福特大学毕业证学位证书
 
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
 
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu DhabiAbu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
 
Mira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Mira Road Housewife Call Girls 07506202331, Nalasopara Call GirlsMira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Mira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
 
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
 
PIC Microcontroller Structure & Assembly Language.ppsx
PIC Microcontroller Structure & Assembly Language.ppsxPIC Microcontroller Structure & Assembly Language.ppsx
PIC Microcontroller Structure & Assembly Language.ppsx
 
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac RoomVip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf
 

_intro.ppt

  • 1. CSE 425: Intro to Programming Languages and their Design A Few Key Ideas • No particular language is a prerequisite for this course – However you should be proficient in at least one language – A working knowledge of C++ is worth pursuing as you go – We’ll work on many paradigms in C++ • “How we communicate influences how we think and vice versa.” – [Louden and Lambert 3rd Ed. pp. 2] • “Similarly, how we program computers influences how we think about computation, and vice versa.” – [Louden and Lambert 3rd Ed. pp. 2]
  • 2. CSE 425: Intro to Programming Languages and their Design Abstraction in Programming • Von Neumann Architecture – Program instructions and data are stored in a memory area – CPU executes a sequence of instructions • Machine instruction sets: lowest level of abstraction – Binary representation that the CPU can process – Or that a virtual machine can process (e.g., byte code) • Assembly language is only slightly more abstract – “Readable” labels: operations, registers, location addresses 0010 001 000000100 LD R1 FIRST (opcode) (register) (location)
  • 3. CSE 425: Intro to Programming Languages and their Design Evolving to Higher Levels of Abstraction • Algebraic notation and floating point numbers – E.g., Fortran (John Backus) • Structured abstractions and machine independence – E.g., ALGOL (a committee), Pascal (Niklaus Wirth) • Architecture independence (on beyond Von Neumann) – E.g., based on Lambda Calculus (Alonzo Church) – E.g., Lisp (John McCarthy)
  • 4. CSE 425: Intro to Programming Languages and their Design Data Abstraction • Basic abstractions – Variables, data types, declarations • Structured abstractions – Data structures, arrays • Unit abstractions – Abstract data types (ADTs), classes, packages, namespaces • Key ideas – Information hiding, modularity, reusability, interoperability
  • 5. CSE 425: Intro to Programming Languages and their Design Control Abstraction • Basic abstractions – Algebraic statements, “syntactic sugar” • Structured abstractions – Loops, branch instructions – Procedures, iterators, cursors, manipulators, etc. • Unit abstractions – ADTs, classes, packages, namespaces (same as for data!) • Key ideas – Selection, iteration, formal/actual parameters, composition
  • 6. CSE 425: Intro to Programming Languages and their Design Some Programming Paradigms • Imperative/procedural (E.g., C, C++) – Variables, assignment, other operators • Functional (E.g., Lisp, Scheme, ML, Haskell, C++) – Abstract notion of a function, based on lambda calculus • Logic (E.g., Prolog, but can develop structures in C++) – Based on symbolic logic (e.g., predicate calculus) • Object-oriented (E.g., Java, Python, C++) – Based on encapsulation of data and control together • Generic (E.g., C++ and especially its standard library) – Based on type abstraction and enforcement mechanisms – We’ll cover informally via examples throughout the semester
  • 7. CSE 425: Intro to Programming Languages and their Design Language Definition • Syntax – Lexical structure, tokens, grammars (E.g., BNF) • Basic semantics – Informal description, may be incomplete • Formal semantics – Operational semantics (execution specification) – Denotational semantics (specification as functions) – Axiomatic semantics (assertions about program state)
  • 8. CSE 425: Intro to Programming Languages and their Design Language Design • Goals (potentially conflicting) – Efficiency of coding or execution, writability, expressiveness • Specific design criteria – Regularity (how well language features are integrated) – Generality (how few cases have to be handled specially) – Orthogonality (how widely features still behave the same) – Uniformity (consistent appearance/behavior across features) – Safety or “security” (how difficult it is to produce errors) – Extensibility (how easy and effective is feature addition)
  • 9. CSE 425: Intro to Programming Languages and their Design Comparing Programming Languages • Different languages usually have different goals – E.g., C++ focuses on expressiveness and efficiency of execution, at some cost to writability and efficiency of coding • Accordingly, they may focus on different design criteria – E.g., although Java, C++, and Python are all designed with the object-oriented programming paradigm in mind… – … operator overloading increases extensibility but reduces safety (e.g., operator precedence of ^ for exponentiation) – … generality and uniformity are aided by a simpler and smaller set of language features – … and so forth
  • 10. CSE 425: Intro to Programming Languages and their Design Today’s Studio Exercises • We’ll explore Visual Studio and a few coding ideas – Built incrementally from simple to more complex abstractions • We’ll work in C++, a multi-paradigm language – Please form teams that put people less (or without a) C++ background together with those familiar with C++ – Ask for help as needed – Use the on-line C++ reference and also the material at http://www.cse.wustl.edu/~cdgill/courses/cse332/ • Record your answers as you go and e-mail them (with the studio name in the subject line), when you’re done – E-mail them to the course account, cse425@seas.wustl.edu – You should get an e-mail back acknowledging receipt – Please track which studios you have (and have not) sent