Represent Accounting Equation Using SWI-Prolog

Charles, thanks. Only the types (asset, liability, etc.) are hard-coded, not the accounts. Accounts can be added and updated using the user interface.

I had no idea that XBRL can encode or contain chart of accounts. But indeed it seems to be a one of the main concepts of XBRL and the extensibility of XBRL comes from ability to add custom accounts. I think that if I could associate each account with XBRL concept, then indeed I could automatically produce statements in XBRL format!