James Gray
7/3/2005 3:36:00 PM
On Jul 3, 2005, at 8:24 AM, Pit Capitain wrote:
> Ruby Quiz schrieb:
>
>> This week's Ruby Quiz is to build an inference engine that is
>> capable of
>> answering questions based on the provided truths.
>> ...
>>
>
> Just out of curiosity, after entering
>
> > All Foos are Bars
> OK.
>
> what should be the response to
>
> > No Foos are Bars
Basically, whatever you are comfortable with.
> If the answer is "OK." it would mean that the set of "Foos" is
> empty, because no Foo can be a Bar and not be a Bar. Questions like
>
> > Are all Foos <whatever>?
>
> should then be answered with Yes.
This is the correct logical interpretations, but...
> The other alternative would be to assume that when speaking of
> "Foos" the set of "Foos" isn't empty and there exists at least one
> Foo?
This makes more sense to me, so it's probably what I would choose.
Given that, I would likely just print an error message to the user,
in the example you give.
James Edward Gray II