Infer, a static analysis tool, has a DSL for declaring forbidden patterns: https://code.facebook.com/posts/277643589367408/ (it models ASTs with *temporal* logic!)
miniblog.
Related Posts
What types should you infer when code is invalid?
In Garden, + only applies to integers. What should the type of "x" + "y" be?
(1) Int: This produces cascading errors.
(2) String: We've already emitted an error anyway.
(3) Bottom.
Opinions?
Neat GitHub bot that uses ML to infer whether a task is a bug, a feature request or a question: https://github.com/marketplace/issue-label-bot
The bot is no longer available as a service, but the source is available: https://github.com/machine-learning-apps/Issue-Label-Bot
Some excellent new error diagnostics from gcc with -fanalyze: https://developers.redhat.com/blog/2020/03/26/static-analysis-in-gcc-10/
The multi-function analysis reminds me of Infer, and the cute nested ASCII display resembles rustc.

