This directive defines the argument types of the named
predicates, which will force compile time namespace expansion
for these predicates. Heads is a coma-separated list of callable
terms. Defined argument properties are:
- :
-
Argument is a goal. The goal is processed using expand_goal/2,
recursively applying goal transformation on the argument.
- +
-
The argument is instantiated at entry. Nothing is changed.
- -
-
The argument is not instantiated at entry. Nothing is changed.
- ?
-
The argument is unbound or instantiated at entry. Nothing is
changed.
- @
-
The argument is not changed.
- r
-
The argument must be a resource. If it is a term
prefix:local it is translated.
- o
-
The argument is an object or resource. See
rdf_global_object/2.
- t
-
The argument is a term that must be translated. Expansion will
translate all occurences of prefix:local appearing
anywhere in the term. See rdf_global_term/2.
As it is subject to term_expansion/2, the rdf_meta/1 declaration
can only be used as a directive. The directive must be processed
before the definition of the predicates as well as before
compiling code that uses the rdf meta-predicates. The atom
rdf_meta
is declared as an operator exported from
library(semweb/rdf_db). Files using rdf_meta/1 must explicitely
load this library.
Beginning with SWI-Prolog 7.3.17, the low-level RDF interface
(rdf/3, rdf_assert/3, etc.) perform runtime expansion of
Prefix:Local
terms. This eliminates the need for rdf_meta/1
for simple cases. However, runtime expansion comes at a
significant overhead and having two representations for IRIs (a
plain atom and a term Prefix:Local
) implies that simple
operations such as comparison of IRIs no longer map to native
Prolog operations such as IRI1 == IRI2
.