3 ms·
It is interesting that your compilers class targets the lambda calculus. While we have a thorough curriculum on functional programming at CMU (and for one clas
by rpearl 15y ago
It is interesting that your compilers class targets the lambda calculus.
While we have a thorough curriculum on functional programming at CMU (and for one class I did write several compilers which took more complex languages and translated them to the lambda calculus and even more minimalistic languages like the SK (optionally I) combinator calculus, that class wasn't on compilers, it was "Principles of Programming Languages". It also covered type theory, implementing type inference, and so on.
Whereas our compilers class covers the sort of topics you would expect in a compiler targeting a real architecture: parsing/lexing, choosing intermediate languages, SSA form, optimizations, register allocation, code generation, and so on. We have a separate class which covers compiling higher order typed languages (SML in particular).
Our compilers class is also unusual (in ones I have seen) in that, instead of building a lexer, building a parser, doing translation, and so on for each stage, as separate projects, rather students build a whole compiler for each assignment. The language compiled gains more and more features: first control flow, then function calls, then memory operations (structs, arrays, heap-allocation).
Might I ask your thinking when choosing the lambda calculus as the basis for your compilers class?
- dill_day 15y agoFWIW, if you follow the link to his compilers class page, you can see that the projects do in fact deal with traditional topics: Lexical analyzer Parser High-level translator Normalizer & CPS converter Low-level translator Register allocator & Assembly code emitter Anyway, when I took compilers it was similar to yours -- each week we compiled larger subsets of Python to x86.
- mattmight 15y agoIt was a normal compilers class. We compiled Python. This was just an exercise for week one.
- mahmud 15y agoCMU has the most rigorous CS corriculum, specially fo PL research, FP & compilers.