Debugging with DOT
I'm starting a PhD on first-order automated theorem proving, which is the reason I'm writing an experimental theorem prover in OCaml. Theorem provers are full of complicated algorithms (that I plan to write on later), and my usual techniques for debugging are twofold:
- Writing a lot of ...
Tail-recursive map in OCaml
The List.map function of the OCaml standard lib is not implemented tail-recursively. The current version (as of 4.00 on my computer) is
let rec map f = function  ->  | a::l -> let r = f a in r :: map f l
It's pretty efficient on small lists, but blows up ...read more