Junrui Liu's Avatar

Junrui Liu

@junrui-liu

CS PhD student @ UC Santa Barbara, doing program synthesis and verification. https://junrui-liu.github.io/ Opinions are my own.

177
Followers
343
Following
28
Posts
12.11.2024
Joined
Posts Following

Latest posts by Junrui Liu @junrui-liu

Anyway, all of these ideas are too cool to pass up. Iโ€™ll definitely try combining this with the "compilers-as-fixed-points" approach next time I get to teach the course!

12.02.2026 00:35 ๐Ÿ‘ 2 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

Alas, a quick search revealed Ras had taught this for years in his once-famous "Hack Your Language" course. I think the notes are based on the paper Parsing and Generation as Datalog Queries by Kanazawa. He shows how semi-naive = CYK and magic-set = Earley.
homes.cs.washington.edu/~bodik/ucb/c...

12.02.2026 00:35 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

Then it clicked: Datalog is essentially "fancy" graph transitive closure! Their algorithm can be recast as the evaluation of a Datalog program, where the input string forms the EDB and the grammar induces the IDB. Parsing effectively becomes solving Datalog.

12.02.2026 00:35 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

This was eye-opening, but I felt parsing was the missing piece. Could bottom-up parsing also be phrased this way? Later, I found inspiration in this paper by Esparza et al.: arxiv.org/pdf/2410.19386. They view parsing as the transitive closure of a graph constructed from the input string.

12.02.2026 00:35 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0
Thought Experiment: An Introductory Compilers Class Recently, I read a blog post in which Ben Karel summarized the reaction to a request John Regehr made about how to teach compilers , and as ...

A while ago, I came across Neel Krishnaswami's bold idea of centering an intro compilers course on the bottom-up evaluation of least fixed-points. Since so many compiler passes and static analyses can be framed this way, itโ€™s a powerful unifying theme.
semantic-domain.blogspot.com/2020/02/thou...

12.02.2026 00:35 ๐Ÿ‘ 4 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0
Why Study CS? Thoughts on LLM-assisted software engineering Dear students of Computer Science,

New on my blog: "Why Study CS? Thoughts on LLM-assisted software engineering" kmicinski.com/claude-code-...

07.01.2026 03:15 ๐Ÿ‘ 30 ๐Ÿ” 11 ๐Ÿ’ฌ 5 ๐Ÿ“Œ 0
Preview
Pedagogy Recommendations Parenthetically Speaking: Articles by Shriram Krishnamurthi

Over the years I've been asked many times for advice on pedagogy, what to read to learn more, etc. I've finally put together a bunch of materials into one blog post: Key Advice โ€ข Readings โ€ข Neuromyths โ€ข For Computer Scientists โ€ข Classroom Tips. Enjoy!
parentheticallyspeaking.org/articles/ped...

19.12.2025 22:02 ๐Ÿ‘ 31 ๐Ÿ” 10 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 1

Added to my holiday reading list. Looking forward!

19.12.2025 18:28 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
Preview
Limits of Computation This textbook discusses the most fundamental and puzzling questions about the foundations of computing. In 23 lecture-sized chapters it provides an exciting tour through the most important results in ...

A more update-to-date text using the same approach: link.springer.com/book/10.1007...

25.11.2025 19:43 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

Excited to see if I can incorporate this text into a data structures (or even discrete maths) course!

25.11.2025 17:49 ๐Ÿ‘ 2 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
Build a Compiler in Five Projects Class website here: https://kmicinski.com/cis531-f25

My five-project (along with slides, video lectures, etc.) compilers course has all projects now available online free: kmicinski.com/functional-p.... Five projects have you incrementally build a compiler for a substantial language, including functions, mutation, loops, vectors, etc.

24.11.2025 03:26 ๐Ÿ‘ 25 ๐Ÿ” 12 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 2

Well, if we're just interested in teaching the practical implications of Rice's Theorem & friends, then TMs can be completely dispensed with. Instead, use any of the equivalent models that's closer to practical languages, as exemplified by Jones' Computability and Complexity

12.11.2025 19:57 ๐Ÿ‘ 3 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0
Post image

"Proving termination and completeness... merely lets you sleep better."

11.11.2025 23:32 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
Free Theory of Computation text from Jim Hefferon Free Theory of Comptation Text, from Jim Hefferon

Turns out I'm not alone in this (e.g., found this textbook by Jim Hefferon which I might give it a try in the near future: hefferon.net/computation/). Also looking to try a more semantic treatment of simpler models, using applications from formal methods & verification

07.11.2025 23:15 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

been toying with the idea of teaching Theory of Computation by starting with TMs first, where students immediately grapple with important questions like (un)decidability and Rice's Theorem, which nicely motivate simpler computation models that show the expressivity <-> automation tradeoff

07.11.2025 23:09 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 2 ๐Ÿ“Œ 0
Control structures in programming languages Xavier Leroy

A new book on the history of control structures by the creator of #OCaml himself @camlist.bsky.social xavierleroy.org/control-stru...

05.11.2025 12:00 ๐Ÿ‘ 15 ๐Ÿ” 5 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 1
Preview
Interactive Theorem Provers for Proof Education | Proceedings of the 2025 ACM SIGPLAN International Symposium on SPLASH-E

Interactive theorem provers for proof education. ~ Romina Mahinpei, Manoel Horta Ribeiro, Mae Milano. dl.acm.org/doi/abs/10.1... #ITP #CoqProver #Teaching

13.10.2025 10:38 ๐Ÿ‘ 2 ๐Ÿ” 2 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
Preview
Write your own tiny programming system(s)! - YouTube The goal of this course is to teach how fundamental programming language techniques, algorithms and systems work by writing their miniature versions. The cou...

I'm teaching ๐—ช๐—ฟ๐—ถ๐˜๐—ฒ ๐˜†๐—ผ๐˜‚๐—ฟ ๐—ผ๐˜„๐—ป ๐˜๐—ถ๐—ป๐˜† ๐—ฝ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ด ๐˜€๐˜†๐˜€๐˜๐—ฒ๐—บ(๐˜€)! again. I'll be posting the videos & tasks on YouTube too.

In the first lecture, I explain what's a tiny system, why write one and show plenty of demos!

๐ŸŽž๏ธ Playlist: www.youtube.com/playlist?lis...
๐Ÿ‘‰ More info: d3s.mff.cuni.cz/teaching/npr...

07.10.2025 21:18 ๐Ÿ‘ 50 ๐Ÿ” 18 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 1

Sorry, I meant alternative instead of selective. Time to go back to OCamlโ€ฆ

27.09.2025 17:40 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

I had a random thought (when reading the free generator paper) that the selective applicative interface with a โ€f a * f b -> f (a*b)โ€ API instead of the usual โ€œ<*>โ€ roughly corresponds to typed context-free expressions minus fixpoint. Might explain the expressiveness vs understandability tradeoffโ€ฆ

27.09.2025 17:18 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 1
Preview
A Data-Centric Introduction to Computing This book is an introduction to computer science. It will teach you to program, and do so in ways that are of practical value and importance. However, it will also go beyond programming to computer sc...

Super excited to release the latest version of "A Data-Centric Introduction to Computing" (DCIC). See release notes for 2025-08-27 for what's changed and new (a LOT!): dcic-world.org/2025-08-27/R....
dcic-world.org

28.08.2025 01:21 ๐Ÿ‘ 49 ๐Ÿ” 10 ๐Ÿ’ฌ 2 ๐Ÿ“Œ 1

The most enlightening explanation on subtyping I read was from Benjamin Pierce's PhD thesis. Paraphrased, subtyping is type-directed program synthesis (intersection types synthesize tuple projections, nat<int synthesizes coercions, function contra & covariance synthesize function composition)

11.08.2025 18:46 ๐Ÿ‘ 4 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
PLP 1.3-1.4: Compilation, interpretation, and environments
PLP 1.3-1.4: Compilation, interpretation, and environments YouTube video by Jonathan Aldrich

Released today: the second video in my Programming Language Pragmatics series, covering Compilation, Interpretation, and Environments!

www.youtube.com/watch?v=mrmo...

Going forward, I'll post a video 3 times a week. Please share the series with anyone who might benefit!

08.08.2025 17:01 ๐Ÿ‘ 22 ๐Ÿ” 7 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

wow this sounds super interesting. Looking forward to reading your paper when it comes out!

01.08.2025 20:27 ๐Ÿ‘ 2 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0
Minnowbrook Logic Programming Seminar (Supercut w/ Extras)
Minnowbrook Logic Programming Seminar (Supercut w/ Extras) YouTube video by Kristopher Micinski

May 25-27, 2025, I hosted an event, the "Minnowbrook Logic Programming Seminar," in Blue Mountain Lake, NY. I recorded 11 talks on Datalog-related interests, totaling over 9+ hours of video, which I have just now published on YouTube youtu.be/3ec9VfMUVa8

07.07.2025 18:50 ๐Ÿ‘ 18 ๐Ÿ” 5 ๐Ÿ’ฌ 2 ๐Ÿ“Œ 1

The joy of comp sci is that it applies scientific (mathematical, if you're lucky) thinking to a domain which is constructed entirely artificially. Things are the way we make them. Reality doesn't fling you around: you fling reality around. And you need to learn to do so with skill and consideration.

28.06.2025 21:24 ๐Ÿ‘ 30 ๐Ÿ” 5 ๐Ÿ’ฌ 4 ๐Ÿ“Œ 0

Specifically, if you're looking for a CS job at a small liberal arts college check this list (later this summer): cs-pui.github.io

And warning: many of these jobs have early fall deadlines!

#FAccT2025

25.06.2025 12:47 ๐Ÿ‘ 20 ๐Ÿ” 8 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0
Introducing OxCaml At Jane Street, weโ€™ve been actively making improvements to OCaml for a long time. Over thelast few years, weโ€™ve started to build some fairly ambitious extens...

And here's a blog post, announcing the release!

blog.janestreet.com/introducing-...

13.06.2025 14:22 ๐Ÿ‘ 55 ๐Ÿ” 18 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 1

was even thinking about designing an automata theory course around this idea: regex is just like a simple imperative language with atomic print(), but with if's and while's conditions being non-deterministic. Then everything becomes "predicting what a program will print by abstracting it into regex"

11.06.2025 18:37 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0