Computer Science
>
>

CS 243: Program Analysis and Optimizations

Winter 2023

Stanford University

Focuses on efficient high-level programming through code optimization and program analysis for quality improvement. Also explores automatic memory management and natural language coding through machine learning.

Course Page

Overview

What do we teach?

  • How do we make high-level programming languages efficient by optimizing the code? (Data-flow analysis)
  • Machine learning and scientific computing need a lot of cycles; machines such as GPUs are complex to code. How do we automatically generate efficient code for these machines effectively. (Parallelism and Locality)
  • Can we use program analysis to improve the quality of the code such as detecting security bugs in programs? (Pointer analysis, Satisfiability Modulo Theories)
  • How do we automatically manage memory efficiently so users do not have to manage it themselves? (Garbage collection)
  • The highest programming language is obviously natural language. With the recent introduction of large language models such as GPT3 and CodeX, how do we let consumers code in natural language using machine learning? Note: no prior knowledge in machine learning is needed. (Neural networks)

How do you learn this?

As compilers are one of the most complex programs we write, by teaching compilers, we are also teaching software engineering. It is a course where programming and mathematics meet. We show how to apply general mathematical concepts (fixpoint computations, graph theory, linear algebra, binary decision diagrams, neural networks) to handle various complex programming problems. You will learn how to formulate solutions to problems, and not just memorizing prior work.

Prerequisites

CS 103 or CS 103B, and CS 107; Java programming language experience

Learning objectives

Course Emphasis

  • Methodology: apply the methodology to other real life problems
    • Problem statement
      • Which problem to solve?
    • Theory and Algorithm -Theoretical frameworks
      • Algorithms
    • Experimentation: Hands-on experience (Weekly programming/written homeworks)
  • Compiler knowledge:
    • Non-goal: how to build a complete optimizing compiler
    • Important algorithms
    • Exposure to new ideas
    • Background to learn existing techniques

Textbooks and other notes

No data

Other courses in Compilers

15-411 Compiler Design

Fall 2020

Carnegie Mellon University

CS 143 Compilers

Spring 2022

Stanford University

Courseware availability

Lecture notes available at Tentative Schedule

No videos available

Assignments available at Tentative Schedule

No other materials available

Covered concepts