?- a(X).
X = 1.
?- retract(a(1)).
ERROR: No permission to modify static procedure `a/1'
ERROR: Defined at /home/edu/Downloads/Prolog/experiments/meta.pl:2
ERROR: In:
ERROR: [8] retract(a(1))
ERROR: [7] <user>
?- assert(a(2)).
true.
?- retract(a(1)).
true.
?- a(X).
X = 2.
The query assert(a(1)). performs the same as assert(a(2)).; I just think assert(a(2)). demonstrates the propagation of the bug.
This seems to only happen when you assert functors of the same arity in the knowledge base.
I am following the official steps.
Step 01.
Step 10.
This is a knowledge base.
This is the interactor.
The query
assert(a(1)).
performs the same asassert(a(2)).
; I just thinkassert(a(2)).
demonstrates the propagation of the bug. This seems to only happen when you assert functors of the same arity in the knowledge base.