Next: Initiating a query from
Up: Calling Prolog from C
Previous: Calling Prolog from C
  Contents
  Index
This section discusses the functions used to communicate about
predicates. Though a Prolog predicate may defined or not, redefined,
etc., a Prolog predicate has a handle that is not destroyed, nor moved.
This handle is known by the type predicate_t.
- predicate_tPL_predfunctor_t f, module_t m
Return a handle to a predicate for the specified name/arity in the given
module. This function always succeeds, creating a handle for an
undefined predicate if no handle was available.
predicate_tPL_predicateconst char *name, int arity, const char* module
Same a PL_pred, but provides a more convenient interface to
the C-programmer.
voidPL_predicate_infopredicate_t p, atom_t *n, int *a, module_t *m
Return information on the predicate p. The name is stored
over n, the arity over a, while m receives the
definition module. Note that the latter need not be the same as
specified with PL_predicate. If the predicate was imported into
the module given to PL_predicate, this function will return the
module where the predicate was defined.
Next: Initiating a query from
Up: Calling Prolog from C
Previous: Calling Prolog from C
  Contents
  Index
Dr. Richard Botting
2001-12-12