Lec1 - CMPSC461:ProgrammingLanguage Concepts Lecture1...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CMPSC461:ProgrammingLanguage Concepts Lecture1 Whatthiscourseisabout Analy.cstudyofprogramminglanguages Whatisaprogram? Abunchofcharacters(Really?Always?) Obviously,notjustanybunchofcharacters Abunchofsymbols Seman.cs:Themeaningofaprogram "Whatdoesaprogramdo?" "Whatdoesastatementmean?" Languagesvs.LinguisMcs Languages:English,Spanish,Hebrew... LinguisMcs: HowisSpanishrelatedtoItalian? Arethereuniversalprinciplesunderlyinglanguages? Aretherefamiliesdifferingsignificantlyfromeach other? HowwouldyoudesignEsperanto2.0? Whatwewillstudy:thelinguis.csof programminglanguages ThesubtleMesoflinguisMcs AlinguisMcsprofessorwaslecturingtohisclass oneday."InEnglish,"hesaid,"Adouble negaMveformsaposiMve.Insomelanguages, though,suchasRussian,adoublenegaMveis sMllanegaMve.However,thereisnolanguage whereinadoubleposiMvecanforma negaMve." Avoicefromthebackoftheroompipedup, "Yeah,right." Thankfully,it'seasierforus ProgramminglanguageshaveprecisemathemaMcal meanings. Ohyeah? void foo (char *bar) { char c[12]; strcpy(c, bar); } int main (int argc, char **argv) { foo(argv[1]); } Whathappenswhenargv[1]haslength>12? "Whatdoestheprogramdo?" Interpreters Computerprogramsareexecutable Interpreter:Asystemthatexecutesaprogram Afundamental,fundamentalidea: "Theinterpreterforacomputerlanguageisjust anotherprogram." ImplicaMons TherulesofC,Java,etc.aremanmade.And youdon'thavetolovethoserules. Youcanmakeyourownlanguage(oratleast, minilanguage). Youcanchangethemeaningofprogramsina languageandsMllprograminit. Inmanycases,itistherightdecisiontodoso. ApplicaMons Havingfun:enMrelynewwaysoflookingatprogramming Becomingabe`erprogrammer LearningSpanish,forwhateverreason,givesyouanewviewof English LearningEnglishgrammarhelpsyouwritebe`erprose. Manycomplexpiecesofsobwarehaveinterpretersinthem Webbrowser:whatdoesawebpagemean?HowshouldIrender it? Database:Whatdoesaquerymean?WhatshouldIretrieve? Youmayverywellneedtodefineyourowninterpreter Definingnewlanguagesbecomingincreasinglyimportant Courseoverview Focusingonprinciplesofprogramminglanguages Rigorous,butfocusedonprogrammingrather thanmathemaMcalnotaMon. recursion,abstracMon,higherorderprogramming,... Youwillhavetobuildyourownlanguages. Programmingassignmentsareincremental. Philosophy:animplementaMonfor(almost)every concept. Language:Scheme Whyyoushouldnottakethiscourse Itwillbealotofwork Mystandardsarehigh Youmayfindit"useless" Wewon'tevenspeakofC,C++,Perl,orJava Yourfutureemployermaynotcare Thatsaid: MostTuringAwardwinnersinthehistoryofCShave comefromProgrammingLanguages PLisoneofthemostfundamentalareasofCS LotsofexciMngdevelopments ForthosesMllinterested Seehandoutfor officehours,contactinfo, grading policies,TAinfo... Policies OnlysendemailtomethroughAngel. TA(MadhavJha)shouldbecontacteddirectly. Latehomework:notaccepted,unlessaskedat least4daysbeforesubmissiondeadline. Plagiarism:PossiblyanimmediateF,certainly nogradeaboveC. Wearelikelytousesobwaretocheckif programsbydifferentpeoplelooksimilar. Gradingpolicy 6machinecheckableprogrammingassignments (incremental,includinglanguagedesign):30% 2codewalks(for2addiMonalassignments):20% Inclassmidterm:15% 1threepageessayonatopicofyourchoice(e.g., whyyouhateScheme,yourphilosophyof programming,thenextPLrevoluMon...):15%. CreaMvityandoutrageousnessrewarded. Final(weightedtowardslatertopics):20% Books Textbook:EssenMalsofProgrammingLanguages (3rded.).FriedmanandWand. SemiopMonal: TheLi`leSchemer(4thed.).FriedmanandFelleisen. OpMonal: TheSchemeProgrammingLanguage.Dybvig. HowtoDesignPrograms.h`p://www.htdp.org HowtoDesignWorlds. h`p://world.cs.brown.edu/1/ Programmingenvironment PLTScheme h`p://www.pltscheme.org h`p://docs.pltscheme.org/guide/index.html Dr.SchemeenvironmentforwriMngprograms Nootherenvironmentpermi`ed. Downloadandplay. Schedule FirstanintroducMontoScheme(Mllendof nextweek) Aberthat,therequiredtextfollowedclosely. WewillcovertheenMrebookchapterby chapter. SeehandoutfortentaMveschedule. ...
View Full Document

Ask a homework question - tutors are online