> a tool that constructs the abstract syntax tree and verifies its various branches against deterministic rules
Isn’t that basically a linter?? If you go too far outside a regular ol’ linter (even a real nice type aware one like typescript-eslint) you hit a ceiling where some intelligent being needs to interpret things.
Though I will say I have seen interesting projects in clojure world like rewrite-clj, which makes it really easy to do structural analysis and modification of clojure programs. I’ve definitely thought there could be more room for stuff like that in the age of LLMs. I’ve also made more use out of ts-morph than ever before.
Also in my box of purely delusional ideas, I’ve thought about how cool it would be to encode LLM-derived semantics at the AST level, which then could be run through a regular deterministic linter. Like a switch case or pattern match could have “this is the happy path” or “this is an edge case” encoded into each branch. Then you could do stuff like collapse all non-happy-path lines, or highlight all edge case handling.