Note: This plug-in currently runs on Windows. Some additional work is required for launching the service on other operating systems.
SWI-Prolog is a popular flavor of Prolog and one which is particularly well-suited for use with OWL due to its ability to load RDF Data.
Both the SWI-Prolog reasoner plug-in and the associated translator plug-in require that SWI-Prolog be available as a service. The translator uses the service to verify that built-in predicates used in rules are actually defined and the reasoner uses the service to do inference and to respond to queries.
Assuming that an SWI-Prolog service is not already available and running, please follow these instructions to set up a local service.
Install the SADL-IDE and SWI-Prolog for SADL by following these instructions but use the update site http://sadl.sourceforge.net/kepler/swiprolog/update/.
When the SWI-Prolog reasoner for SADL is requested, SADL will start the service provided that the executable (swipl-win.exe) is on the path.
In the SWI-Prolog plug-ins for SADL, custom built-in functions (predicates) can be defined in Prolog and used in SADL rules. A template file is generated in which predicates can be defined or which can "consult" other .pl files containing the predicates. The following files are created in the OwlModels folder when the SWI-Prolog translator plug-in is run for a project.
swi-run-prolog-service.pl -- this file is passed to the SWI-Prolog executable and starts the service
swi-prolog-service.pl -- this file is loaded by the previous and sets up the HTTP service used by the reasoner
swi-standard-declarations.pl -- contains standard declarations and loads standard libraries for semantic web; loaded by first file in this list
swi-custom-predicates.pl -- this is mean for the user to edit to define custom predicates and/or to load other files; it is loaded by the first file in this list