The source code for Mendel’s Accountant is here:
There’s also a version in the Go programming language here: