CompuServe Thread

Forum unknown · General/DDJ office

Theological PROLOG

1 messages in this thread
#6473From: Neil J. RubenkingSep 10, 1986 9:12 AM
Mike I got a real kick out of your theological predicates in the Sept. '86 issue. Tried to convert for Turbo Prolog and ran into a problem with "variable is not bound in this clause". I can press <F10> and go on anyway to get the desired solution. Have you written a TPro version? Here's what I came up with: /* Theological program from Sept. '86 DDJ */ predicates can(symbol,symbol,symbol) omnipotent(symbol) indestructible(symbol) clauses can(X,_,_) :- omnipotent(X). omnipotent(god). indestructible(X) :- not (can(_,destroy,X)). You can ask about a particular thing: "can(god,create,thing), indestructible (thing)" and get an unsatisfying answer of "False". But if you use a variable in place of "thing", TProlog gives the above-mentioned warning. Pressing on, the query "can(god,create,X), indestructible(X)" gives "No Solution" -better? — Neil