For example, suppose we intend that our Java-based application uses the SWIPL framework locally installed in /usr/local/swipl/. If one, instead, requires to use another install of SWIPL+JPL (e.g., the one under development or an alternative one installed in /usr/local), then we need to set-up a few variables to make sure the intended SWIPL resources are found. Initializing the Prolog engineĪlthough the class provides a number of methods for initializing the Prolog engine from within Java, their use is not usually necessary: Prolog will be automatically initialised with default parameters at the first attempt to use it.īy default, the SWIPL install accessible via the default executable (i.e., the one that runs when one types swipl) will be initialized.
You may wish to load this database into an interactive Prolog session to experiment with the predicates in this database before experimenting with JPL. descendent_of ( X, Y ) :- child_of ( Z, Y ), descendent_of ( X, Z ). descendent_of ( X, Y ) :- child_of ( X, Y ).