For the past ~decade I've mostly been using OpenTaxSolver, a file-based open source US tax utility. It's worked for my uses.

It'd be appealing to try to factor out the underlying translation of the tax code and IRS form layout into some very simple DSL that could be used by multiple kinds of software.

You might be interested in the French example, if you don’t know already. They designed the Mlang DSL for tax calculation, and released a bunch of things on GitHub.

Here is the compiler: https://hal.inria.fr/hal-03002266v3/document

https://github.com/MLanguage/mlang

They’ve also open sourced an official calculator, along with web APIs: https://github.com/openfisca/openfisca-france