I am using library(persistency) on a pengine, so I’m calling with_mutex/2, which is an unsafe predicate. I want to declare the predicate that calls with_mutex/2 as safe and am following the rdf example in the docs.
But what I’m getting is: ERROR: No permission to declare safe_goal `projects_manager:get_project/1’
One possible reason is that the predicate is not yet defined. safe_primitive/1 can only be used on defined predicates that are not meta predicates. That is a safety measure to avoid clearly wrong safe declarations. So, you may have to change the declaration order. I normally put sandbox declarations at the bottom of the file in which the safe predicates are defined. Note that if you do not use sandboxing this has no consequences except for one unused clause.
Thank’s Jan, I tried that, still the same error. I’ve also tried jiggling around when the persistent db file is attached, but that doesn’t seem to help either.