'Component-based Program Synthesis in OCaml' is a nice 2017 paper on program synthesis in OCaml. https://www-scf.usc.edu/~zhanpenl/prog_syn.pdf
Some impressive examples, but programmatically generating friendly variable names remains a hard problem. JSNice is the only nice solution I've seen.
miniblog.
Related Posts
Underrated perk of JSON: it's easy to programmatically make changes to a file made by a human.
Very few other formats have this advantage. `cargo add` took a bunch more implementation work than `npm install`, because preserving TOML comments takes more work.
I occasionally see people debate whether important functions should occur first, or helper functions first.
I've not seen it enforced though. It's hard to programmatically enforce.
OCaml takes a side: you have to put helper functions first!
Programmatically generating chess puzzles from a database of games played by users:
