Re: Storing data and code in a Db with LISP-like interface
Date: 21 Apr 2006 09:13:46 -0700
Bob Badour wrote:
> Pascal Bourguignon wrote:
> > Bob Badour <bbadour_at_pei.sympatico.ca> writes:
> >>Can it handle n-ary relations? Like "John bought 10 apples each at
> >>10cents" ?
> > Of course:
> > bought(john,10,apple,10,cent).
> > How many apple did john buy?
> > ?- bought(john,HowMany,apple,_price,_money).
> Thank you, that's much more revealing than 100 binary relations.
But those snipped relationships are the kinds of things the original poster was talking about ;-)
Straight out of the can it doesn't summarize the results, it stops when one solution to a goal is found. You enter ; and it seeks another solution.
But anything that can represent a Rubix cube and solve it in about 600 lines of code can be made to do all sorts of clever things.
OTOH if you're searching for things Prolog cannot do you're right, there are many apparently easy things it can't do, that's why I originally spoke of possibly extending it.
> ?- bought(john,HowMany,apple,_price,_money).
Received on Fri Apr 21 2006 - 18:13:46 CEST