tags:

views:

97

answers:

1
not(A), not(D), not(B), not(not(D));not(not(A)), D, not(B), not(not(D));not(not(A)), not(D),B, not(not(D));not(not(A)), not

(D), not(B), not(D).

It reports :

ERROR: f:/program files/pl/demo/test.pl:1: No permission to modify static_procedure `(;)/2'

How to make it right?

+2  A: 

What you've given is a Prolog query that should be entered in the Prolog command prompt. It looks like you've put it into a Prolog source file, which isn't going to work. Prolog source files can only contain facts and rules.

A fact might look like this:

foo(bar).

A rule might look like this:

foo(X) :- baz(X).

The snippet you gave doesn't match either of these. In a Prolog source file, you can only string multiple conjunctions or disjunctions together in the body of a rule (ie the part to the right of the :- symbol).

You might want to read up on how to write prolog predicates.

humble coffee
But the fact is conjunctive,how to make it work?
You use the `;` character, this actually means disjunction. But either way, you can't have disjunctions or conjunctions inside the definition of a fact. You must define a rule and put them inside the body.
humble coffee