- git repositories
- Selected code projects:
- 161-code:
C implementations for a variety of data structures. They are
designed to stay close to the pseudocode in my lecture
notes for the Stanford CS 161: Design and Analysis of
Algorithms course I taught in Summer 2024.
- libbreakpoint:
Programmatically set breakpoints in C, C++, etc., that
automatically launch GDB when the breakpoint is reached. Also
allows simple dumping of a visual representation of the heap
graph.
For example, adding the line
dotdump_to(root,"splay.dot"); to the splay tree code
from the repository described above easily produces this
visualization of its inner workings after linking with
libbreakpoint:
It's similarly easy to automatically generate, say, this graph
visualizing the internals of suckless.org's tsort
program:
- teaching:
From scratch C implementations of a SAT solver (watched
literals), SMT solver (eager encoded arrays + bitvectors),
symex engine, static analyzer, and neural network training. All
are within a few hundred lines, max. Most are set up as labs
that I've taught in our lab-based advanced operating systems
course.
- dietc: a
fork of the chibicc C compiler that desugars C, i.e., outputs
code in an extremely restricted subset of C designed for easy
analysis and source-to-source instrumentation. libdietc
provides examples of use.
- satispipy:
a super-simple, single-file, one-dependency PySMT alternative
that supports portfolio solving, automatic incrementalization,
and persistent caching.
- magic-buddy:
a buddy allocator with zero metadata overhead.
- earlpy:
a simple, hackable, reasonably efficient Earley parser generator.
- main website