Program Analysis and Optimizations


Stanford School of Engineering



This course is for anyone who is interested in programming and computer architecture. It also teaches program analysis techniques used in compilers and software development tools to improve productivity, reliability, and security. Emphasis on the methodology of applying mathematical abstractions such as graphs, fixpoint computations, binary decision diagrams in writing complex software, using compilers as an example.

The course answers the following questions:

  • 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).
  • The highest programming language is obviously natural language. Can we program our virtual assistant to perform compound tasks in natural language? We use machine learning techniques to map natural language into formal languages. Note: no prior knowledge in machine learning is needed. (Neural networks, Satisfiability Modulo Theories)
  • Can we use program analysis to automatically detect security bugs in programs? (Pointer analysis)
  • How do we automatically manage memory efficiently so users do not have to manage it themselves? (Garbage collection)
  • How do we make high-level programming languages efficient by optimizing the code? (Data-flow analysis)


CS103 and CS107

Note: CS143 is NOT a pre-requisite to CS243


Course Availability

The course schedule is displayed for planning purposes – courses can be modified, changed, or cancelled. Course availability will be considered finalized on the first day of open enrollment. For quarterly enrollment dates, please refer to our graduate education section.

Thank you for your interest. The course you have selected is not open for enrollment. Please click the button below to receive an email when the course becomes available again.

Request Information