« Return to Thread: 'not' as atomic symbol

Re: 'not' as atomic symbol

by Richard O'Keefe :: Rate this Message:

Reply to Author | View in Thread


On 10 Jan 2007, at 11:32 am, randy sharp wrote:

> How do I disable the predicate interpretation of 'not'?

Unless you are trying to define a predicate called 'not',
why do you want to?

> I have an NL application which involves the word 'not', but it seems  
> to be trying to interpret the word as a predicate rather than as an  
> atomic symbol.

Could you possibly mean "as an atomic symbol which is an operator"?
But no, in SWI 5.6.27, not _isn't_ an operator, there is nothing at
all special about the atom 'not'.
>
>
> In SICStus, this wasn't a problem. I used the following statement to  
> disable the prolog interpretation of the following words:
>
> :- op(0,fx,[(wait),(public),(mod),(dynamic)].

No, that DIDN'T disable the Prolog interpretation of ANY of those words.
All it did was change the SYNTAX.  Instead of writing
        :- dynamic p/1.
you would have to write
        :- dynamic(p/1).
but the SEMANTICS of 'dynamic' is in no way changed by cancelling its
operator properties.
>
>
> I thought the same might apply here:
>
> :- op(0,fx,[(not)].
>
> but this didn't work either.

'not' doesn't have any operator properties to start with.
        X = not,
        Y = [the,problem,is,not,obvious],
        Z = not(knotted(not))
all work perfectly fine out of the box.

What _exactly_ is happening that you don't want to happen?


------------
For further info, please visit http://www.swi-prolog.org/

To unsubscribe, send a plaintext mail with "unsubscribe prolog <e-mail>"
in its body to majordomo@...

 « Return to Thread: 'not' as atomic symbol

LightInTheBox - Buy quality products at wholesale price