<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Lectures on CS846-ML4SE 1265</title><link>https://pengyunie.github.io/cs846mlse-1265/docs/lectures/</link><description>Recent content in Lectures on CS846-ML4SE 1265</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://pengyunie.github.io/cs846mlse-1265/docs/lectures/index.xml" rel="self" type="application/rss+xml"/><item><title>Introduction</title><link>https://pengyunie.github.io/cs846mlse-1265/docs/lectures/01-intro/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pengyunie.github.io/cs846mlse-1265/docs/lectures/01-intro/</guid><description>&lt;h1 data-class="title-slide" id="introduction"&gt;Introduction&lt;/h1&gt;&lt;h3 id="cs846-machine-learning-for-software-engineering--spring-2026"&gt;CS846 Machine Learning for Software Engineering — Spring 2026&lt;/h3&gt;&lt;p&gt;Pengyu Nie&lt;/p&gt;
&lt;hr&gt;
&lt;h1 id="agenda"&gt;Agenda&lt;/h1&gt;&lt;ul&gt;
&lt;li&gt;Course logistics&lt;/li&gt;
&lt;li&gt;Round-table introductions&lt;/li&gt;
&lt;li&gt;ML/AI for SE research area overview&lt;/li&gt;
&lt;/ul&gt;
&lt;aside class="notes"&gt;
Speaker notes go here. Press 's' to open the notes window.
&lt;/aside&gt;
&lt;hr&gt;
&lt;h1 id="course-logistics--your-instructor"&gt;Course Logistics &amp;gt; Your Instructor&lt;/h1&gt;&lt;div class="photo-left"&gt;
&lt;div&gt;
&lt;img src="photo.jpg" class="img-md"&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;Name: Pengyu Nie&lt;/li&gt;
&lt;li&gt;Assistant Prof @ UWaterloo CS since 2023
&lt;ul&gt;
&lt;li&gt;before that: PhD @ UTAustin ECE&lt;/li&gt;
&lt;li&gt;before that: BSc @ USTC Physics&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;2nd time teaching this course&lt;/li&gt;
&lt;li&gt;Research interests on AI + SE, recent focus:
&lt;ul&gt;
&lt;li&gt;AI-assisted test generation and maintenance&lt;/li&gt;
&lt;li&gt;Automating MLE (machine learning engineering)&lt;/li&gt;
&lt;li&gt;Efficient model architectures for SE&lt;/li&gt;
&lt;li&gt;&amp;hellip; find out more in this course&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;hr&gt;
&lt;h1 id="course-logistics--communication"&gt;Course Logistics &amp;gt; Communication&lt;/h1&gt;&lt;ul&gt;
&lt;li&gt;The course website: &lt;a href="https://pengyunie.github.io/cs846mlse-1265/"&gt;https://pengyunie.github.io/cs846mlse-1265/&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Course logistics, syllabus, slides&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Email: &lt;a href="mailto:pynie@uwaterloo.ca"&gt;pynie@uwaterloo.ca&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Project milestone submissions&lt;/li&gt;
&lt;li&gt;Announcements&lt;/li&gt;
&lt;li&gt;General questions&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h1 id="course-logistics--syllabus"&gt;Course Logistics &amp;gt; Syllabus&lt;/h1&gt;&lt;ul&gt;
&lt;li&gt;Week 1, 05/12
&lt;ul&gt;
&lt;li&gt;Introduction and planning&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Week 2, 05/19
&lt;ul&gt;
&lt;li&gt;&lt;a href="../02-se-essentials/"&gt;Lecture: software engineering essentials&lt;/a&gt; (intro, program analyses, other artifacts, platforms &amp;amp; mining sources)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Week 3, 05/26
&lt;ul&gt;
&lt;li&gt;No class, please attend &lt;a href="https://kyunghyuncho.me/"&gt;Kyunghyun Cho&lt;/a&gt;&amp;rsquo;s talk&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Week 4, 06/02
&lt;ul&gt;
&lt;li&gt;Lecture: machine learning essentials (large language models, transformers, agents, etc.)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Week 5, 06/09
&lt;ul&gt;
&lt;li&gt;Project idea/proposal discussions&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Week 6 &amp;ndash; Week 12: seminar/presentation (led by you), guest lectures, etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h1 id="course-logistics--class-structure"&gt;Course Logistics &amp;gt; Class Structure&lt;/h1&gt;&lt;p&gt;Typical class structure starting from Week 6:&lt;/p&gt;</description></item><item><title>Software Engineering Essentials</title><link>https://pengyunie.github.io/cs846mlse-1265/docs/lectures/02-se-essentials/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pengyunie.github.io/cs846mlse-1265/docs/lectures/02-se-essentials/</guid><description>&lt;h1 data-class="title-slide" id="software-engineering-essentials"&gt;Software Engineering Essentials&lt;/h1&gt;&lt;h3 id="cs846-machine-learning-for-software-engineering--spring-2026"&gt;CS846 Machine Learning for Software Engineering — Spring 2026&lt;/h3&gt;&lt;p&gt;Pengyu Nie&lt;/p&gt;
&lt;hr&gt;
&lt;h1 id="agenda"&gt;Agenda&lt;/h1&gt;&lt;ul&gt;
&lt;li&gt;Goals
&lt;ul&gt;
&lt;li&gt;review key concepts in SE from data-driven view&lt;/li&gt;
&lt;li&gt;pointers to tools and datasets&lt;/li&gt;
&lt;li&gt;breath; relevancy; recency&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;No-Goals
&lt;ul&gt;
&lt;li&gt;depth; completeness&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h1 id="overview-software-development-life-cycle"&gt;Overview (Software Development Life Cycle)&lt;/h1&gt;&lt;div class="slide-canvas"&gt;
&lt;img src="sdlc.png" style="position: absolute; left: 80px; top: 100px; width: 560px; height: auto;"&gt;
&lt;ul style="position: absolute; left: 580px; top: 150px;"&gt;
&lt;li&gt;&lt;b&gt;Code&lt;/b&gt;: tokens, AST, call graph, data flow&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Validation&lt;/b&gt;: tests, specs&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Natural language&lt;/b&gt;: comments, documentations, issues/PRs, logs&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style="position: absolute; left: 580px; top: 400px; font-size: 24px;"&gt;
&lt;li&gt;some are readily available in verbatim form (code)&lt;/li&gt;
&lt;li&gt;some need to be extracted by parsing (call graph) or executing (data flow) code&lt;/li&gt;
&lt;li&gt;some need to be connected with other artifacts to make sense (comment-code, test-code)&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;hr&gt;
&lt;h1 data-class="title-slide" id="code-related-data"&gt;Code-Related Data&lt;/h1&gt;&lt;img src="program-analyses.png" style="position: absolute; left: 120px; top: 100px; width: 1000px; height: auto;"&gt;
&lt;hr&gt;
&lt;h1 id="code-related-data--lexing--parsing--lexing"&gt;Code-Related Data &amp;gt; Lexing &amp;amp; Parsing &amp;gt; Lexing&lt;/h1&gt;&lt;div class="slide-canvas"&gt;
&lt;div style="position: absolute; left: 200px; top: 50px;"&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-java" data-lang="java"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;public&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;class&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;C&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;public&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;int&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;factorial&lt;/span&gt;(&lt;span style="color:#66d9ef"&gt;int&lt;/span&gt; n) {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;if&lt;/span&gt; (n &lt;span style="color:#f92672"&gt;&amp;gt;&lt;/span&gt; 0) {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;return&lt;/span&gt; n &lt;span style="color:#f92672"&gt;*&lt;/span&gt; factorial(n &lt;span style="color:#f92672"&gt;-&lt;/span&gt; 1);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; } &lt;span style="color:#66d9ef"&gt;else&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;return&lt;/span&gt; 0;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div style="position: absolute; left: 100px; top: 300px; width: 600px"&gt;
&lt;ul&gt;
&lt;li&gt;Basis of the compilation pipeline, produce a stream of PL tokens for downstream analyses&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;PL tokens ≠ ML tokens&lt;/strong&gt; (by subword tokenizers like BPE/SentencePiece), e.g., &lt;code&gt;factorial&lt;/code&gt; vs &lt;code&gt;fact|orial&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div style="position: absolute; left: 800px; top: 20px; font-size: 28px;"&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th style="text-align: left"&gt;token&lt;/th&gt;
 &lt;th style="text-align: left"&gt;kind&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td style="text-align: left"&gt;&lt;code&gt;public&lt;/code&gt;&lt;/td&gt;
 &lt;td style="text-align: left"&gt;KEYWORD&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td style="text-align: left"&gt;&lt;code&gt;class&lt;/code&gt;&lt;/td&gt;
 &lt;td style="text-align: left"&gt;KEYWORD&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td style="text-align: left"&gt;&lt;code&gt;C&lt;/code&gt;&lt;/td&gt;
 &lt;td style="text-align: left"&gt;IDENT&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td style="text-align: left"&gt;&lt;code&gt;{&lt;/code&gt;&lt;/td&gt;
 &lt;td style="text-align: left"&gt;SYMBOL&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td style="text-align: left"&gt;&lt;code&gt;public&lt;/code&gt;&lt;/td&gt;
 &lt;td style="text-align: left"&gt;KEYWORD&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td style="text-align: left"&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
 &lt;td style="text-align: left"&gt;KEYWORD&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td style="text-align: left"&gt;&lt;code&gt;factorial&lt;/code&gt;&lt;/td&gt;
 &lt;td style="text-align: left"&gt;IDENT&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td style="text-align: left"&gt;&lt;code&gt;(&lt;/code&gt;&lt;/td&gt;
 &lt;td style="text-align: left"&gt;SYMBOL&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td style="text-align: left"&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
 &lt;td style="text-align: left"&gt;KEYWORD&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td style="text-align: left"&gt;&lt;code&gt;n&lt;/code&gt;&lt;/td&gt;
 &lt;td style="text-align: left"&gt;IDENT&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td style="text-align: left"&gt;&lt;code&gt;)&lt;/code&gt;&lt;/td&gt;
 &lt;td style="text-align: left"&gt;SYMBOL&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td style="text-align: left"&gt;&amp;hellip;&lt;/td&gt;
 &lt;td style="text-align: left"&gt;&amp;hellip;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;hr&gt;
&lt;h1 id="code-related-data--lexing--parsing--parsing"&gt;Code-Related Data &amp;gt; Lexing &amp;amp; Parsing &amp;gt; Parsing&lt;/h1&gt;&lt;div class="slide-canvas"&gt;
&lt;div style="position: absolute; left: 200px; top: 50px;"&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-java" data-lang="java"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;public&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;class&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;C&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;public&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;int&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;factorial&lt;/span&gt;(&lt;span style="color:#66d9ef"&gt;int&lt;/span&gt; n) {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;if&lt;/span&gt; (n &lt;span style="color:#f92672"&gt;&amp;gt;&lt;/span&gt; 0) {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;return&lt;/span&gt; n &lt;span style="color:#f92672"&gt;*&lt;/span&gt; factorial(n &lt;span style="color:#f92672"&gt;-&lt;/span&gt; 1);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; } &lt;span style="color:#66d9ef"&gt;else&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;return&lt;/span&gt; 0;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div style="position: absolute; left: 20px; top: 270px; width: 850px; font-size: 24px;"&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The data format used by most static analysis tools, e.g.,&lt;/p&gt;</description></item></channel></rss>