What I would do here is something like:

1. standardize on JSON as the internal representation, and

2. write a simple (<1kloc) Python-based compiler that takes human-friendly, Pythonic syntax and transforms it into that JSON, based on operator overloading.

So you would write something like:

    from factgraph import Max, Dollar # or just import *
    tentative_tax_net_nonrefundable_credits = Max(Dollar(0), total_tentative_tax - total_nonrefundable_credits)
and then in class Node (in the compiler):

    def __sub__(self, other):
    return SubtractNode(minuent=self, subtrachents=[other])
Values like total_nonrefundable_credits would be objects of class Node that "know where they come from", not imperatively-calculated numbers. The __sub__ method (which is Python's way of operator overloading) would return a new node when two nodes are subtracted.