The (semantic) web is one of the most promising application areas for SWI-Prolog. Prolog handles the semantic web Resource Description Framework (RDF) model naturally, where RDF provides a stable model for knowledge representation with shared semantics. Prolog is also quite capable of providing web services (HTTP), especially where it comes to generating HTML pages dynamically and providing data for Javascript web applications using the JSON serialisation.

Standard packages

Below are the most vital packages for programming web services and RDF processing.

Web server and client library Core web package. Provides an HTTP server and client, session handling, authorization, logging, etc. Libraries are also included for generating HTML pages and JSON (JavaScript Object Notation). RDF storage and query library Load/save RDF and query it. The library loads and saves XML/RDF and Turtle. Its database scales to approx. 20M triples on 32-bit hardware and 300M triples on a 64-bit machine with 64 Gb memory. Also provides simple RDFS and OWL support. The GIT version in the development tree has been updated to version 3. Spatial indexing library SWI-Prolog interface to Spatial Index and GEOS libraries, providing spatial indexing of URIs. Supports import and export to GML, KML, and RDF with GeoRSS Simple, GeoRSS GML, and W3C WGS84 vocabulary properties. This package is provided in the source, but not (yet) in the binary distributions. The source contains instructions for building the dependencies and the indexer itself.

Separately distributed packages

Some packages are distributed separately.