Represent Accounting Equation Using SWI-Prolog

This sounds like an interesting problem. Possibly it is too early for my favorite message: do not represent your knowledge/rules as executable Prolog. Instead, create a representation as Prolog terms that expresses the rules in a format your domain experts will like. Next, write a Prolog program that make them work. This can either be by interpreting them, compiling them to executable Prolog or even compile them into something else (JavaScript, C, …).

The first step is typically easy. The others are a bit harder, but can be delayed until you hit scalability issues.

Note that such a format make your domain experts happy and make it much simpler to reason about your rules and find inconsistencies, produce explanations, etc.

3 Likes