DOC PREVIEW
U of I CS 421 - Programming Languages and Compilers

This preview shows page 1-2 out of 6 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Programming Languages andCompilers (CS 421)Elsa L Gunter2112 SC, UIUChttp://www.cs.uiuc.edu/class/fa06/cs421/Based in part on slides by Mattox Beckman, as updatedby Vikram Adve and Gul AghaElsa L. GunterContact Information -Elsa L Gunter• Office: 2112 SC• Office hours:– Thursdays 9:00am – 10:15am– Also by appointment• Email: [email protected] L. GunterContact Information - TAsTeaching Assistants Office: 0207 SC• T. Baris Aktemur– Email: [email protected]– Hours: Mon 9:00am - 10:00am & Thurs 1:00pm - 2:00pm• Chris Osborn– Email: [email protected]– Hours: Tues 9:00am - 10:00am & Wed 12:30pm - 1:30pm• Andrei Popescu– Email: [email protected]– Hours:Tues 4:00pm - 5:00pm & Fri 4:00pm - 5:00pmElsa L. GunterSome Course ReferencesNo required textbook.• Compilers: Principles, Techniques, and Tools, (also known as"The Dragon Book"); by Aho, Sethi, and Ullman. Published byAddison-Wesley. ISBN: 0-201-10088-6.• Advanced Programming Language Design, by Raphael A.Finkel. Addison Wesley Publishing Company, 1996.• Programming Language Pragmatics, by Michael L. Scott.Morgan Kaufman Publishers, 2000.• Concepts, Techniques, and Models of Computer Programmingby Peter Van Roy and Seif Haridi, MIT Press, 2004.• Essentials of Programming Languages (2nd Edition) by DanielP. Friedman, Mitchell Wand and Christopher T. Haynes, MITPress 2001.Elsa L. GunterCourse Grading• Homework 35%– About 10 MPs (in Ocaml) and 4 writtenassignments– MPs submitted by handin• Midterm 25%– In class - Oct 10• DO NOT MISS EXAM DATE!• Final 40% - Dec 16• Percentages are approximate– Exams may weigh more if homework is muchbetterElsa L. GunterCourse Homework• You may discuss homeworks and theirsolutions with others• You may not leave the discussion with awritten solution• You must write your own solution• You may not look at another writtensolution when you are writing your own– You may look at examples from class andother similar examplesElsa L. GunterCourse Website• Main page - summary of news items• Policy - rules governing course• Lectures - syllabus and slides• MPs - information about homework• Exams• Unit Projects - for 4 credit students• Resources - tools and helpful info• FAQElsa L. GunterPersonal History• First began programming morethan 35 years ago• First languages: basic, DG Novaassembler• Since have programmed in at least10 different languages– Not including AWK, sed, shell scripts,latex, HTML, etcElsa L. GunterPersonal History - Moral One language may not last you allday, let alone your wholeprogramming lifeElsa L. GunterProgramming LanguageGoals• Original Model:– Computers expensive, people cheap;hand code to keep computer busy• Today:– People expensive, computers cheap;write programs efficiently andcorrectlyElsa L. GunterProgramming LanguageGoals• Mythical Man-Month Author FredBrookes“The most important two tools forsystem programming … are (1) high-level programming languages and (2)interactive languages”Elsa L. GunterLanguages as Abstractions• Abstraction from the Machine• Abstraction from the Operational Model• Abstraction of Errors• Abstraction of Data• Abstraction of Components• Abstraction for ReuseElsa L. GunterWhy Study ProgrammingLanguages?Helps you to:– understand efficiency costs of givenconstructs– reduce bugs by understanding semanticsof constructs– think about programming in new ways– choose best language for task– design better program interfaces (andlanguages)– learn new languagesElsa L. GunterStudy of ProgrammingLanguages• Design and Organization– Syntax: How a program is written– Semantics: What a program means– Implementation: How a program runs• Major Language Features– Imperative / Applicative / Rule-based– Sequential / ConcurrentElsa L. GunterFeatures of a Good Language• Simplicity – few clear constructs,each with unique meaning• Orthogonality - every combinationof features is meaningful, withmeaning given by each feature• Flexible control constructsElsa L. GunterFeatures of a Good Language• Rich data structures – allowsprogrammer to naturally model problem• Clear syntax design – constructs shouldsuggest functionality• Support for abstraction - program datareflects problem being solved; allowsprogrammers to safely work locallyElsa L. GunterFeatures of a Good Language• Expressiveness – conciseprograms• Good programming environment• Architecture independence andportabilityElsa L. GunterFeatures of a Good Language• Readability–Simplicity–Orthogonality–Flexible control constructs–Rich data structures–Clear syntax designElsa L. GunterFeatures of a Good Language• Writability–Simplicity–Orthogonality–Support for abstraction–Expressivity–Programming environment–PortabilityElsa L. GunterFeatures of a GoodLanguage• Usually readability and writabilitycall for the same languagecharacteristics• Sometimes they conflict:– Comments: Nested comments (e.g/*… /* … */ … */ ) enhance writability,but decrease readabilityElsa L. GunterFeatures of a Good Language• Reliability–Readability–Writability–Type Checking–Exception Handling–Restricted aliasingElsa L. GunterProgramming LanguageImplementation• Develop layers of machines, eachmore primitive than the previous• Translate between successivelayers• End at basic layer• Ultimately hardware machine atbottomElsa L. GunterBasic Machine Components• Data: basic data types andelements of those types• Primitive operations: forexamining, altering, and combiningdata• Sequence control: order ofexecution of primitive operationsElsa L. GunterBasic Machine Components• Data access: control of supply ofdata to operations• Storage management: storageand update of program and data• External I/O: access to data andprograms from external sources,and output resultsElsa L. GunterBasic Computer ArchitectureExternal filesCache memoryMain memoryProgram counterData registersInterpreterArithmetic/Logic UnitCPUElsa L. GunterInterpretation VersusCompilation• A compiler from language L1 tolanguage L2 is a program thattakes an L1 program and for eachpiece of code in L1 generates apiece of code in L2 of samemeaningElsa L. GunterInterpretation VersusCompilation• An interpreter of L1 in L2 is an L2program that executes the meaningof a given L1 program• Compiler would examine the bodyof a loop once; an interpreter wouldexamine it every


View Full Document

U of I CS 421 - Programming Languages and Compilers

Documents in this Course
Lecture 2

Lecture 2

12 pages

Exams

Exams

20 pages

Lecture

Lecture

32 pages

Lecture

Lecture

21 pages

Lecture

Lecture

15 pages

Lecture

Lecture

4 pages

Lecture

Lecture

68 pages

Lecture

Lecture

68 pages

Lecture

Lecture

84 pages

s

s

32 pages

Parsing

Parsing

52 pages

Lecture 2

Lecture 2

45 pages

Midterm

Midterm

13 pages

LECTURE

LECTURE

10 pages

Lecture

Lecture

5 pages

Lecture

Lecture

39 pages

Load more
Download Programming Languages and Compilers
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Programming Languages and Compilers and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Programming Languages and Compilers 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?