I was wondering, I am aware you can use assert
to add facts or rules or whatever if you have declared the predicate to be -:dynamic
, but this only allows the changes that are made to be kept in that session only, e.g. if you close the Prolog window then the database changes are lost.
So I was wondering, is there any way of making it so that the assert
and retract
predicates can make permanent changes to the Prolog .pl file?
Thanks