:- module(database, [stock/2]). stock(p1, 23). stock(p2, 45). stock(p3, 12). :- save_active_module(dbserver,
:- module(sales). :- use_active_module(database, [stock/2]). replenish(P) :- stock(P, S), S < 5, ...
Using Active Modules: An Example
:- module(database, [stock/2]). stock(p1, 23). stock(p2, 45). stock(p3, 12). :- save_active_module(dbserver, alba:888, true).
:- module(sales). :- use_active_module(database, [stock/2]). module_address(database, alba:888). replenish(P) :- stock(P, S), S < 5, ...
Using Active Modules: An Example
:- module(database, [stock/2]). :- use_active_module(name_server, [add\_address/2]). stock(p1, 23). stock(p2, 45). stock(p3, 12). :- save_active_module(dbserver, Addr, add_address(database,Addr)).
:- module(sales). :- use_active_module(database, [stock/2]). :- use_module(locate_module_addresses). replenish(P) :- stock(P, S), S < 5, ...