CS 329M: Machine Programming (2023)
Instructor: Justin Gottschlich
Stanford Course: CS 329M (3-4 credits)
Dates: September 26 - December 9 (2023)
When: Tues / Thurs 4:30-6:20pm
Building: History Corner (Building 200), room 200-002
The field of machine programming (MP) is concerned with the automation of software development. Given the recent advances in software algorithms, hardware efficiency and capacity, and an ever increasing availability of code data, it is now possible to train machines to help develop software. In this course, we teach students how to build real-world MP systems. We begin with a high-level overview of the field, including an abbreviated analysis of state-of-the-art (e.g., Merly Mentor). Next, we discuss the foundations of MP and the key areas for innovation, some of which are unique to MP. We close with a discussion of current limitations and future directions of MP. This course includes a nine-week hands-on project, where students (as individuals or in a small group) will create their own MP system and demonstrate it to the class. This course is primarily intended for graduate students and is not recommended for undergraduate students (no undergraduate admittance without instructor approval).
While some overlap exists between traditional techniques to train machines to perform non-programming tasks (e.g., natural language processing, computer vision, etc.), teaching machines to perform programming-specific tasks has uniqueness in at least two dimensions. First, there are certain techniques that are more (or less) effective for MP, such as using self-supervision to learn from the large corpora of unlabeled open-source code. Second, software reasoning is fundamentally multi-dimensional; that is, there exist multiple unique ways to learn from software (e.g., static analysis, dynamic analysis, input/output specifications, program state reinforced-convergence, hardware telemetric data, etc.). In this course, we discuss each of these techniques (and others) and how they can be effectively applied to MP systems.
This course is designed for graduate students. Highly talented undergraduates can be admitted with instructor approval. The following are the prerequisites for this course.
(i) Deep learning or (ii) linear algebra and mathematical maturity.
Experience with the C and C++ programming languages (PLs).
Software engineering coursework or experience.
Python programming experience, including experience with TensorFlow or PyTorch.
Basic understanding of PL abstractions, static and dynamic program analysis, compilers, and general machine learning techniques.
Students do not need an extensive background in machine learning, data systems, programming languages, software engineering, and compilers. The necessary aspects of these fields will be covered in the course as they become necessary. However, students with a background in these topics will likely have an easier time understanding the intuition behind some of the more advanced MP topics in the course (e.g., building semantics reasoners, program synthesis for MP data generation).
Tentative Course Syllabus
The course lectures cover the following major segments:
Introduction & Overview: lecture 1 focuses on a high-level overview of the "what" and "why" of machine programming as well as explaining how to deeply reason about technology. Lecture 2 provides insight into the three pillars of MP and the importance of programming languages and software engineering for MP.
Data & Learning: this lecture provides a foundation of the importance of data and how it impacts various forms of learning (especially self-supervised learning)..
Core: these are lectures in core areas that are foundational to most MP system. These core aspects may be disjoint (unusual) from what is required for typical machine learning systems.
Deep Data: two lectures about the various ways to reason about, generate, and utilize data for MP systems: lecture 1 discusses classical ML-based data utilization (e.g., training, validation, and testing), lecture 2 covers future ways to harness and automatically synthesize and label data for MP systems (e.g., program synthesis for data generation, dynamic execution information for analysis, automated semantics labeling, etc.).
Semantic Reasoning: two lectures on the foundations, construction, and utilization of semantic reasoning systems in MP: lecture 1 covers some of the basics found in other CS courses that are necessary for advanced reasoning about syntax and semantics, lecture 2 covers details on how to construct semantics representations and use them for downstream MP tasks.
Tentative Course Grading
Part 1: Lecture 1
Part 3: Lecture 16 (student presentations). Lecture 17 (student presentations).