Did you know ... | Search Documentation: |
Explicit manipulation of the calling context |
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.
For example, the code asserta(done)@world
is the same as
asserta(world:done)
. Unlike in world:asserta(done)
,
asserta/1
is resolved in the current module rather than the module
world
. 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 using op(900, xfx, @)
.