Hi Everyone...lurker hoping to ask a n00bie question. As a sw engineer moving more towards accounting, I thought a fun project would be to write up some of the accounting rules into prolog. Good practice for both. I was having trouble understanding how to structure some of the rules, and was hoping someone could point me in the right direction.
So far, I can handle the heirarchy of what primitive accounts (like cash) belong to what larger groups (like assets).
isAccount(X) :- isCreditAccount(X).
isAccount(X) :- isDebitAccount(X).
However I'm having trouble expressing rules like "Assets = Liabilities + Equities". I think the trouble is that if an account gets bound to some variable X, that account needs to both know its value, and some atom that describes the what kind of account it is.
Sorry if this is confusing, I'm confused. Thanks for reading!