module.pl -- Extended Prolog modules.

One of the extensions is that rdf_meta/1 information can be specified through exported predicates, as in:

:- module(my_module, [ my_predicate(r,t) ]).

Which expands to a call of rdf_meta(my_predicate(r,t)).

Predicates may further be marked as goals for computable properties, as in:

:- module(my_module, [ my_predicate(r,r) -> onto:my_property ]).

Where my_predicate is called to compute the relation onto:my_property between the entities that are bound to the arguments of the predicate.

Finally, a notion of interface is added which is documented below.

author
- Daniel Beßler
license
- BSD
 use_directory(+Dir) is semidet
Load initialization file in directory. The file must be named __init__.pl.
 interface(+Name, +Exports) is det
Defines a new interface. The syntax is equal to the one used to define modules. Modules implementing the interface include a term implements(InterfaceFile) in the list of exported terms.
file a:
    :- interface(iface,
            [ test(r,r) ]).
file b:
    :- module(iface_impl,
            [ implements(iface),
              test2(t),
              test3/2
            ]).