Quintus' derived module systems have no means to separate the lookup
module (for finding predicates) from the calling context (for qualifying
meta arguments). Some other Prolog implementations (e.g., ECLiPSe and
IF/Prolog) distinguish these operations, using @/2
for
setting the calling context of a goal. This is provided by SWI-Prolog,
currently mainly to support compatibility layers.
- @(:Goal, +Module)
- Execute Goal, setting the calling context to Module.
Setting the calling context affects meta-predicates, for which meta
arguments are qualified with Module and transparent
predicates (see
module_transparent/1).
It has no implications for other predicates.
For example, the code
asserta(done)@world
is the same asasserta(world:done)
. Unlike inworld:asserta(done)
, asserta/1 is resolved in the current module rather than the moduleworld
. This makes no difference for system predicates, but usually does make a difference for user predicates.Not that SWI-Prolog does not define
@
as an operator. Some systems define this construct usingop(900, xfx, @)
.