Talen en Compilers
News
Grading
Schedule
Materials
Assignments
FAQ
Education Page
Tools
Haskell Platform
GHC
Documentation
GHC
Hackage Packages
base package
Search
Hayoo!
Hoogle
Packages
Center
Home
Courses
People
Projects
Page
Edit Page
Rename Page
Attach File
Printable
Wiki Source
More ...
Web
Recent Changes
Notify Service
News
Page Index
Search
More ...
Wiki
About TWiki
Text Formatting
Registration
Change Password
Reset Password
Users
Groups
Log In
or
Register
Course Materials
TC
---++ Slides The lecture slides for the current period (2012-2013) are posted here: | *Date* | *Lecture* | | 2012-11-12 | [[%ATTACHURL%/TC-01-handout.pdf][Introduction]] | | 2012-11-15 | [[%ATTACHURL%/TC-2-handout.pdf][Grammars and Parsing]] | | 2012-11-19 | [[%ATTACHURL%/TC-3-handout.pdf][Parser Combinators]] | | 2012-11-22 | [[%ATTACHURL%/TC-4-handout.pdf][Parser Combinators and Grammar Transformations]] | | 2012-11-26 | [[%ATTACHURL%/TC-5-handout.pdf][Grammar and Parser Design]] | | 2012-11-29 | [[%ATTACHURL%/TC-6-handout.pdf][Compositionality]] | | 2012-12-03 | [[%ATTACHURL%/TC-7-handout.pdf][Compositional Interpreters for Expressions]] | | 2012-12-06 | [[%ATTACHURL%/TC-8-handout.pdf][Intermediate Summary]] | | 2012-12-10 | [[%ATTACHURL%/TC-9-handout.pdf][Simple Stack Machine]] ([[%ATTACHURL%/TC-9-final.pdf][animated]]) ([[CourseMaterials#Simple_Stack_Machine][SSM reference]]) | | 2012-12-17 | [[%ATTACHURL%/TC-10-handout.pdf][Regular Languages]] | | 2012-12-20 | [[%ATTACHURL%/TC-11-handout.pdf][Regular Expressions and Pumping Lemmas]] | | 2013-01-07 | [[%ATTACHURL%/TC-12-handout.pdf][LL Parsing]] | | 2013-01-10 | [[%ATTACHURL%/TC-13-handout.pdf][LR Parsing (part 1)]] | | 2013-01-14 | [[%ATTACHURL%/TC-14-handout.pdf][LR Parsing (part 2)]] | | 2013-01-17 | [[%ATTACHURL%/TC-15-handout.pdf][Advanced Parser Combinators]] | | 2013-01-21 | [[%ATTACHURL%/TC-16-handout.pdf][Summary]], Exam preparation | | 2013-01-24 | Questions | ---++ Lecture Notes In this course we will use the lecture notes on Languages and Compilers. The latest version posted here is from November 2011. * *[[%ATTACHURL%/TC-20111101.pdf][TC-20111101.pdf]]* You can also buy a printed copy of the lecture notes from the OSZ for ¤13. Some of the printed versions may be from older editions, but the differences are minor. ---+++ Errata Please reports any errors you find in the lecture notes. We will post them here. ---++ Software ---+++ Basic Installation We use Haskell for all labs. The easiest way to get all the tools you need is by installing the [[http://hackage.haskell.org/platform/][Haskell Platform]]. The lab computers should already be configured with the Haskell Platform. If, for some reason, you need to configure a system without the Haskell Platform, then you will need to install the following tools: * [[http://www.haskell.org/ghc/][GHC]] - the Glasgow Haskell Compiler * [[http://www.haskell.org/alex/][Alex]] - a lexical analyser generator * [[http://www.haskell.org/happy/][Happy]] - a parser generator ---+++ Installing Packages from Hackage You may decide to install packages (such as [[http://hackage.haskell.org/package/alex][alex]] or [[http://hackage.haskell.org/package/happy][happy]]) from the open package repository called [[http://hackage.haskell.org/packages/hackage.html][Hackage]]. You can do this using software called [[http://www.haskell.org/haskellwiki/Cabal-Install][cabal-install]], whose command-line tool is called =cabal= and is included with the Haskell Platform. See the guide on [[http://www.haskell.org/haskellwiki/Cabal/How_to_install_a_Cabal_package][how to install a Cabal package]] for more on this procedure. At the lab computers the cabal command is available from the special cabal command prompt which can be found under Start -> Standard Applications -> Informatica -> Haskell 2011.2.0.1 -> cabal. In short, to install a downloaded cabal package, unzip it and in the resulting directory do =cabal install=. To install a package which is available at [[http://hackage.haskell.org/packages/hackage.html][Hackage]], use the command =cabal install packagename=. ---+++ Parser Combinator Library For the parser combinator labs in this course, we use our own Haskell package =uu-tc=. You can download one of the following files (=tar.gz= for Linux and Mac or =zip= for Windows), decompress it, and install it using =cabal=. * [[http://www.cs.uu.nl/docs/vakken/b3tc/dist/uu-tc-2009.2.2.tar.gz][uu-tc-2009.2.2.tar.gz]] * [[http://www.cs.uu.nl/docs/vakken/b3tc/dist/uu-tc-2009.2.2.zip][uu-tc-2009.2.2.zip]] The documentation for the package is available here: * [[http://www.cs.uu.nl/docs/vakken/b3tc/dist2/doc/html/uu-tc/index.html][uu-tc-2009-2.2 API]] ---+++ Simple Stack Machine The [[http://www.staff.science.uu.nl/~dijks106/SSM/][SSM page]] has the reference for the Simple Stack Machine architecture and instruction set. ---++ Old Exams | *Year* | *First Exam* | *Second Exam* | *Extra Exam* | | 2003 | [[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/tent200312.pdf][exam]] ([[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/uitw200312.ppt][solutions]]) | [[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/tent200401.pdf][exam]] ([[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/uitw200401.pdf][solutions]]) | [[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/tent200402.pdf][exam]] ([[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/uitw200402.pdf][solutions]]) | | 2004 | [[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/tent200412.pdf][exam]] ([[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/uitw200412.ppt][solutions]]) | [[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/tent200501.pdf][exam]] ([[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/uitw200501.pdf][solutions]]) | [[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/tent200503.pdf][exam]] | | 2005 | [[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/tent200512.pdf][exam]] ([[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/uitw200512.ppt][solutions]]) | [[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/tent200601.pdf][exam]] ([[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/uitw200601.pdf][solutions]]) | | | 2006 | [[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/tent200612.pdf][exam]] ([[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/uitw200612.pdf][solutions]]) | [[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/tent200701.pdf][exam]] | | | 2007 | [[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/tent200712.pdf][exam]] ([[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/uitw200712.lhs][solutions]]) | | | | 2008 | [[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/Deeltoets20081216.pdf][exam]] ([[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/Move.hs][partial solutions]]) | | | | 2009 | [[%ATTACHURL%/Exam-2009-1.pdf][exam]] ([[%ATTACHURL%/Exam-2009-1-solution.pdf][solutions]]) | [[%ATTACHURL%/Exam-2009-2.pdf][exam]] ([[%ATTACHURL%/Exam-2009-2-solution.pdf][solutions]]) | | | 2010 | [[%ATTACHURL%/Exam-2010-1.pdf][exam]] ([[%ATTACHURL%/Exam-2010-1-solution.pdf][solutions]]) | [[%ATTACHURL%/Exam-2010-2.pdf][exam]] ([[%ATTACHURL%/Exam-2010-2-solution.pdf][solutions]]) | | | 2011 | [[%ATTACHURL%/Exam-2011-1.pdf][exam]] ([[%ATTACHURL%/Exam-2011-1-solution.pdf][solutions]]) | [[%ATTACHURL%/Exam-2011-2.pdf][exam]] ([[%ATTACHURL%/Exam-2011-2-solution.pdf][solutions]]) | [[%ATTACHURL%/Exam-2011-3.pdf][exam]] ([[%ATTACHURL%/Exam-2011-3-solution.pdf][solutions]]) | | 2012 | [[%ATTACHURL%/Exam-2012-1.pdf][exam]] ([[%ATTACHURL%/Exam-2012-1-solution.pdf][solutions]]) | [[%ATTACHURL%/Exam-2012-2.pdf][exam]] ([[%ATTACHURL%/Exam-2012-2-solution.pdf][solutions]]) | | <!-- %TOC% ---++++ Errata Here is a list of errata for the version of the lecture notes from before 2009-11-10: p.16: In Definition 2.6, the star in the displayed formula has to be removed: ∀i, 0≤i<n: φ_i ⇒ φ_i+1 (thanks to Gerrit Wiltink) p.17: In Definition 2.7, the definition of L(A) has to be L(A) = { s | A ⇒* s, s ∈ T* } (thanks to Gerrit Wiltink) p.26: In Section 2.5.6, the final version of the grammar must have the productions Decls → Decls ; Decl and Decls → Decl. In the lecture notes, there is a spurious opening parenthesis in the first production. p.68: In Section 4.1, after the grammar for travelling schemes, "where Identifier and ℕ" should be "where Identifier and Nat". The handout versions miss the intermediate steps in multiple-step slides. The slides will be uploaded after the lecture. Right now last years' slides are still here. The slides will not change a lot, though. #SlidesXVI #SlidesXV #SlidesXIV #SlidesXIII #SlidesXII #SlidesXI #SlidesX #SlidesIX #SlidesVIII #SlidesVII #SlidesVI #SlidesV #SlidesIV #SlidesIII #SlidesII #SlidesI | 2011-01-26 | Summary | [[%ATTACHURL%/TC-16-final.pdf][TC-16-final.pdf]] | [[%ATTACHURL%/TC-16-handout.pdf][TC-16-handout.pdf]] | | 2011-01-24 | Advanced parser combinators | [[%ATTACHURL%/TC-15-final.pdf][TC-15-final.pdf]] | [[%ATTACHURL%/TC-15-handout.pdf][TC-15-handout.pdf]] | | 2011-01-19 | LR parsing 2 | [[%ATTACHURL%/TC-14-final.pdf][TC-14-final.pdf]] | [[%ATTACHURL%/TC-14-handout.pdf][TC-14-handout.pdf]] | | 2011-01-17 | LR parsing 1 | [[%ATTACHURL%/TC-13-final.pdf][TC-13-final.pdf]] | [[%ATTACHURL%/TC-13-handout.pdf][TC-13-handout.pdf]] | | 2011-01-12 | LL parsing | [[%ATTACHURL%/TC-12-final.pdf][TC-12-final.pdf]] | [[%ATTACHURL%/TC-12-handout.pdf][TC-12-handout.pdf]] | | 2011-01-10 | Regular expressions and pumping lemmas | [[%ATTACHURL%/TC-11-final.pdf][TC-11-final.pdf]] | [[%ATTACHURL%/TC-11-handout.pdf][TC-11-handout.pdf]] | | 2010-12-22 | Regular languages | [[%ATTACHURL%/TC-10-final.pdf][TC-10-final.pdf]] | [[%ATTACHURL%/TC-10-handout.pdf][TC-10-handout.pdf]] | | 2010-12-20 | Simple stack machine | [[%ATTACHURL%/TC-9-final.pdf][TC-9-final.pdf]] | [[%ATTACHURL%/TC-9-handout.pdf][TC-9-handout.pdf]] | | 2010-12-08 | Intermediate summary | [[%ATTACHURL%/TC-8-final.pdf][TC-8-final.pdf]] | [[%ATTACHURL%/TC-8-handout.pdf][TC-8-handout.pdf]] | | 2010-12-06 | Compositional interpreters for expressions | [[%ATTACHURL%/TC-7-final.pdf][TC-7-final.pdf]] | [[%ATTACHURL%/TC-7-handout.pdf][TC-7-handout.pdf]] | | 2010-12-01 | Compositionality | [[%ATTACHURL%/TC-6-final.pdf][TC-6-final.pdf]] | [[%ATTACHURL%/TC-6-handout.pdf][TC-6-handout.pdf]] | | 2010-11-29 | Grammar and parser design | [[%ATTACHURL%/TC-5-final.pdf][TC-5-final.pdf]] | [[%ATTACHURL%/TC-5-handout.pdf][TC-5-handout.pdf]] | | 2010-11-24 | Parser combinators and grammar transformations | [[%ATTACHURL%/TC-4-final.pdf][TC-4-final.pdf]] | [[%ATTACHURL%/TC-4-handout.pdf][TC-4-handout.pdf]] | | 2010-11-22 | Parser combinators | [[%ATTACHURL%/TC-3-final.pdf][TC-3-final.pdf]] | [[%ATTACHURL%/TC-3-handout.pdf][TC-3-handout.pdf]] | | 2010-11-17 | Grammars and Parsing | [[%ATTACHURL%/TC-2-final.pdf][TC-2-final.pdf]] | [[%ATTACHURL%/TC-2-handout.pdf][TC-2-handout.pdf]] | | 2010-11-15 | Introduction | [[%ATTACHURL%/TC-1-final.pdf][TC-1-final.pdf]] | [[%ATTACHURL%/TC-1-handout.pdf][TC-1-handout.pdf]] | ---++++ Mac OS X 10.6 (Snow Leopard) If you use Mac OS X 10.6 (Snow Leopard), consult this [[http://www.haskell.org/haskellwiki/Mac_OS_X][webpage]] for extra instructions. #SimpleStackMachine #OefenTentamens ---+++ Oefententamens | 2003/2004 | [[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/tent200312.pdf][Eerste deeltentamen]] (met [[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/uitw200312.ppt][uitwerking]]) | [[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/tent200401.pdf][Tweede deeltentamen]] (met [[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/uitw200401.pdf][uitwerking]]) | [[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/tent200402.pdf][Aanvullende toets]] (met [[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/uitw200402.pdf][uitwerking]]) | | 2004/2005 | [[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/tent200412.pdf][Eerste deeltentamen]] (met [[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/uitw200412.ppt][uitwerking]]) | [[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/tent200501.pdf][Tweede deeltentamen]] (met [[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/uitw200501.pdf][uitwerking]]) | [[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/tent200503.pdf][Aanvullende toets]] | | 2005/2006 | [[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/tent200512.pdf][Eerste deeltentamen]] (met [[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/uitw200512.ppt][uitwerking]]) | [[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/tent200601.pdf][Tweede deeltentamen]] (met [[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/uitw200601.pdf][uitwerking]]) | | | 2006/2007 | [[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/tent200612.pdf][Eerste deeltentamen]] (met [[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/uitw200612.pdf][uitwerking]]) | [[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/tent200701.pdf][Tweede deeltentamen]] | | | 2007/2008 | [[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/tent200712.pdf][Eerste deeltentamen]] (met [[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/uitw200712.lhs][uitwerking]]) | | | | 2008/2009 | [[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/Deeltoets20081216.pdf][Eerste deeltentamen]] (met [[http://www.cs.uu.nl/docs/vakken/b3tc/tentamen/Move.hs][gedeeltelijke uitwerking]]) | | | | 2009/2010 | [[%ATTACHURL%/Exam-2009-1.pdf][Eerste deeltentamen]] (met [[%ATTACHURL%/Exam-2009-1-solution.pdf][uitwerking]]) | [[%ATTACHURL%/Exam-2009-2.pdf][Tweede deeltentamen]] (met [[%ATTACHURL%/Exam-2009-2-solution.pdf][uitwerking]]) | | | 2010/2011 | [[%ATTACHURL%/Exam-2010-1.pdf][Eerste deeltentamen]] (met [[%ATTACHURL%/Exam-2010-1-solution.pdf][uitwerking]]) | [[%ATTACHURL%/Exam-2010-2.pdf][Tweede deeltentamen]] (met [[%ATTACHURL%/Exam-2010-2-solution.pdf][uitwerking]]) | | -->