I only understood the first part, but representing an AST as an interpreter is interesting. Does this require a functional-style language or could a similar thing be done in, say, Java?
The OCaml language features that are used that would need to be emulated somehow in Java:
* Sum types (type a = A of int | B of float). Think tagged unions [1].
* Module functors (module NAME(PARAM : MODULE_TYPE) = struct ... end). Think package level functions (you get some of this with dependency injection frameworks, but it's probably no-where near as safe/sane and flexible.
* GADTs (type a = A : int -> int | int term). I'm not sure how you would represent these in java, I'm not fully up to speed on how they work yet.