Hi all,I'm have to prove the equality of left and right neutral element of a semi group using PROLOG
Some codes from the book "First-Order logic
and Automated Theorem proving"(2nd) are as follows:
funcount(1).
newfuncount(N) :-
funcount(N),
retract(funcount(N)),
M is N + 1,
assert(funcount(M)).
reset :-
retract(funcount(_)),
assert(funcount(1)),
!.
But, when I actually call reset or newfuncount,
SWI-Prolog has a ERROR message:
ERROR: No permission to modify static procedure "funcount/1".
Could anyone tell me how to avoid this problem? Thanks
Yours
Qiong
I'm have to prove the equality of left and right neutral element of a semi group using PROLOG
here is my code:
m(m(x,y),z):- m(x,m(y,z)).
m(el,x)=x.
m(x,er)=x.
and the error is No permission to modify static procedure `(=)/2'
can some one please help me
Thanks so much
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 491 |
Nodes: | 16 (3 / 13) |
Uptime: | 147:36:11 |
Calls: | 9,695 |
Calls today: | 5 |
Files: | 13,732 |
Messages: | 6,178,673 |