Save this video free

[HD] EECS4302 F26 - 2026-10-20 (Tuesday) - Lecture 10

Jackie Wang · 1:11:38 · Watch on YouTube

[HD] EECS4302 F26 - 2026-10-20 (Tuesday) - Lecture 10 Watch on YouTube →

Overview

Jackie Wang reviews course deadlines, then explains the Visitor pattern for recursive language structures, including its class architecture, `accept` implementation, and double dispatch through an evaluator processing an expression tree. The lecture connects the pattern to the Open-Closed and Single Choice principles, while also outlining preparation for the November 5 programming test, the November 19 written test, ANTLR 4 assignment work, and upcoming DFA minimization.

Key takeaways

Chapters

0:00 Fall 2026 Calendar: Tests, Assignment 2, and Project Milestone 1
3:00 Written-Test Preparation: Lexical Analysis and DFA Conversion
7:00 Office Hours and the Visitor Pattern’s Place in the Course
9:13 Visitor Architecture: Separate Language Structures and Operations
13:05 Visitor Method Mapping: One Visit Method per Structure Type
18:00 Operation Classes and Operation-Specific Results
22:00 Implementing `accept`: Dispatch by Structure Type
27:50 Visitor Test Setup: Static Types, Dynamic Types, and Result Casting
32:50 Building the Expression Tree for `1 + 2`
39:20 Double Dispatch: First Select the Structure’s `accept` Method
45:50 Second Dispatch: Choose `Evaluator.visitAddition`
50:50 Recursive Evaluation of Addition’s Left and Right Subtrees
57:00 Tracing Nested Dispatch and Practicing with More Complex Trees
1:04:00 Open-Closed Principle: Stable Structures, Extensible Operations

Keep these chapters and the full searchable transcript in your own library.

Transcript excerpt

0:05 All right, welcome back. Hope everybody had a good reading week, had a good rest. So, we got 7 more weeks to go. Definitely a lot is is to happen still. I would suggest we revisit the semester calendar very quickly just to see what we can expect and I do have some important announcement to really share with you. You definitely want to keep in mind. Okay. First of all, [clears throat] let's start with the semester calendar. Okay. Okay, so if you go to the lecture site and then look at the semester calendar over here. I believe the exam schedule should be out very soon. Okay, but I don't know yet, but should be out very soon. As soon as I know that's official, I'll share with you. Okay. Okay, so now we are here.

0:56 Oh. I'm so Okay, I'm so sorry. That's a different semester. Okay, my bad. Okay. Fall 26, of course. All right, there we go. Sorry about that. All right, [snorts] so now we are on 20th of October here. And just don't forget about your assignment number two. I would say for now the ANTLR 4 tutorial, hopefully everybody at least started with that and you definitely want to use assignment number two, try to complete it along and use that as the best opportunity to really get yourself familiar. Okay, I I'll tell you how why it is so important. Your programming test is actually coming on the 5th of November. Okay. So, I'm going to let you know exactly the logistics, but that's something we

1:43 already set on day one of the semester. Okay. So, programming test will be on 5th of November. It's about more than slightly more than 2 weeks away. Okay. I'll definitely give you guys some

This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.

Related notes

Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Jackie Wang.

Want the full transcript?

Save this video in YouTube Collector to get its complete searchable transcript, your own AI summaries, and a library that keeps every video you collect in one place.