'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
I've seen JS beautifiers that re-indent minified code, but jsnice is much smarter. It infers useful variable names! https://www.jsnice.org/
