According to the manual the
public predicate directive (SWI-Prolog -- Manual) “has no semantics.” I’m not sure that’s really the case because whenever I reload a module containing user defined arithmetic functions I get a slew of warnings like:
Warning: /Users/ ... /functionalarithmetic/dot_arithmetic.pl:145: Warning: Local definition of user:fill/3 overrides weak import from dot_arithmetic
one for each user defined arithmetic function. Each function predicate, e.g.,
fill/3 is exported by the module.
In any of my testing, these warnings don’t seem to have any material impact. They seem to be caused when the
arithmetic_function directive is expanded causing a
:- public(Pred). to be executed. As a test, I’ve removed this directive from the expansion and the warnings disappear and no ill effects have yet to be noticed.
So what does this directive actually do and will removing it from the expansion of
arithmetic_function have any ill effects.