Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Programming Languages and Translators, Study notes of Programming Languages

A course syllabus for Programming Languages and Translators taught by Prof. Stephen A. Edwards at Columbia University in Fall 2013. The course covers topics such as compilers, regular and context-free languages, and software development. The main project for the course involves designing and implementing a compiler for a student's own little language using OCaml. information on assignments, grading, prerequisites, and common mistakes to avoid.

Typology: Study notes

2012/2013

Uploaded on 05/11/2023

anahitay
anahitay 🇺🇸

4.7

(16)

255 documents

1 / 46

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Programming Languages and Translators
Stephen A. Edwards
Columbia University
Fall 2013
Pieter Bruegel, The Towerof Babel, 1563
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e

Partial preview of the text

Download Programming Languages and Translators and more Study notes Programming Languages in PDF only on Docsity!

Programming Languages and Translators

Stephen A. Edwards

Columbia University

Fall 2013

Pieter Bruegel, The Tower of Babel , 1563

Instructor

Prof. Stephen A. Edwards sedwards@cs.columbia.edu http://www.cs.columbia.edu/~sedwards/ 462 Computer Science Building

Objectives

Theory of language design œ (^) Finer points of languages œ (^) Different languages and paradigms Practice of Compiler Construction œ (^) Overall structure of a compiler œ (^) Automated tools and their use œ (^) Lexical analysis to assembly generation

Required Text

Alfred V. Aho, Monica S. Lam, Ravi Sethi, and Jeffrey D. Ullman. Compilers: Principles, Techniques, and Tools. Addison-Wesley, 2006. Second Edition. Bug Al about all bugs. You can get away with the first edition.

Prerequisites

COMS W3261 Computer Science Theory œ (^) You need to understand grammars œ (^) We will be working with regular and context-free languages COMS W3157 Advanced Programming œ (^) Teams will build a large software system œ (^) Makefiles, version control, test suites œ (^) Testing will be as important as development

Class Website

Off my home page, http://www.cs.columbia.edu/~sedwards/ Contains syllabus, lecture notes, and assignments. Schedule may be updated

Part I

The Project

The Project

Design and implement your own little language. Five deliverables:

  1. A proposal describing and motivating your language
  2. A language reference manual defining it formally
  3. A compiler or interpreter for your language running on some sample programs
  4. A final project report
  5. A final project presentation

First Three Tasks

  1. Decide who you will work with You’ll be stuck with them for the term; choose wisely.
  2. Elect a team leader Languages come out better from dictatorships, not democracies. Besides, you’ll have someone to blame.
  3. Select a weekly meeting time Harder than you might think.

Teams

œ (^) There should be one leader. S/he should resolve all contentious design decisions. œ (^) If you have any doubt about your team dynamics, have no doubt: you are headed for trouble. Tell your TA or me about it as soon as possible. Each member of a group gets a separate grade for the project.

Language Reference Manual

A careful definition of the syntax and semantics of your language. Follow the style of the C language reference manual (Appendix A of Kernighan and Ritchie, The C Programming Langauge ; see the class website).

Final Report Sections

  1. Introduction: the proposal
  2. Language Tutorial
  3. Language Reference Manual
  4. Project Plan
  5. Architectural Design
  6. Test Plan
  7. Lessons Learned
  8. Complete listing

Design a language?

A small, domain-specific language. Think of awk or php, not Java or C++. Examples from earlier terms: Geometric figure drawing language Matlab-like array manipulation language Quantum computing language Screenplay animation language Escher-like pattern generator Music manipulation language (harmony) Web surfing language Mathematical function manipulator Simple scripting language (à lá Tcl)

Three Common Mistakes to Avoid

  1. Configuration File Syndrome œ (^) Your language must be able to express algorithms , not just data œ (^) If your language looks like “a bird and a bird and a turtle and a pond and grass and a rock,” it has fallen victim to configuration file syndrome and needs to be changed