ClioPatria provides an RDF application platform
Prolog JavaScript HTML Shell CSS Java Other
Clone or download
Failed to load latest commit information.
Windows Drop -s flags from startup scripts Sep 6, 2017
api ADDED: serve both `/sparql/` and `/sparql` May 24, 2017
applications ADDED: role attribute to support more advanced cliopatria:display_lin… Sep 20, 2017
client Cleanup main directory Jun 21, 2010
components ADDED: role attribute to support more advanced cliopatria:display_lin… Sep 20, 2017
config-available MODIFIED: Drop from default installed plugins to avoid inter… Sep 6, 2017
cpack MODIFIED: Renamed many components. Nov 6, 2010
entailment FIXED: load missing rdf_has/4 from rdf_db Jul 10, 2017
etc Better default setup for HTTPS Nov 30, 2015
lib FIXED: Added missing meta-predicate declarations. Oct 9, 2017
rdf ADDED: missing hashes ending lib:source urls, needed to make rdf_libr… Jul 21, 2017
rdfql FIXED: Issue#61: \uXXXX and \UXXXXXXXX decoding must happen before an… Nov 1, 2017
scripts Automate generating a version Sep 6, 2017
skin FIXED: Issue#14: make/0 warning on http_help:page_documentation_link/3. Jul 7, 2015
test TEST: Fixed show_test_data/1. May 12, 2014
user ENHANCED: Keep track of what the user considers his public location for Sep 7, 2017
w3c Data on the W3C wiki Apr 15, 2011
web ADDED: Attach a ?referer=URL when clicking the Login button such that Sep 7, 2017
.fileheader Updated copyright Jun 7, 2010
.gitignore Issue#7: include in .gitignore Feb 10, 2015
.gitmodules FIXED: Remote URL for SPARQL 1.1 test suite Apr 25, 2015 Update the mailing list link May 10, 2017
RoadMap.txt Deleted examples; these are now replaced by packages Nov 12, 2010
TODO.txt Update TODO Nov 8, 2010
VERSION Automate generating a version Sep 6, 2017 FIXED: Added missing meta-predicate declarations. Oct 9, 2017
configure Drop -s flags from startup scripts Sep 6, 2017 Update verbosity and avoid duplicate messages. Sep 6, 2017 ADDED: cliopatria:bag_shape/3 hook that allows for controlling bags of Apr 17, 2015 Allow default resource_format to be set by setting cpa_browse:resourc… Sep 4, 2017 CLEANUP: Remove no longer needed verbose message suppression. Sep 7, 2017 Setup without symlinks Sep 6, 2017
win-config.exe Generated file Sep 6, 2017

The ClioPatria Semantic Web Toolkit


ClioPatria is an extension of the SWI-Prolog RDF infrastructure (semweb package) that provides you with a ready-to-run web-server that can be extended into a full-fledged Semantic Web application. The semweb package provides reading and writing RDF (XML and Turtle), storage and querying by means of rdf(Subject, Predicate, Object). ClioPatria adds the following:

  • A SPARQL server This processes HTTP SPARQL requests. The server also includes support for SeRQL and the Sesame ( HTTP protocol.

  • Reasoning libraries Called entailment modules. See entailment/README.txt

  • User administration Create users, provide OpenID services, use external OpenID authorization and connect users to right-tokens.

  • A web-based developers front-end This provides provides browsing the RDF, loading and unloading graphs, testing queries interactively, browsing the documentation of HTTP services and source-code.

  • Web-page generation components Server-side components to render an RDF resource or literals with a link to the development UI, render simple graphs, etc.

  • Additional libraries These are additional components to the http and semweb libraries that may become part of SWI-Prolog in the future. Examples are lib/semweb/ to optimise rdf-control-structures and lib/semweb/ to transform graphs represented as rdf(S,P,O) terms.


Basic installation merely requires installing a recent version of SWI-Prolog and unpacking ClioPatria (see Downloading below). Next, you can deploy it in two ways:

Installation as application

Running ClioPatria as an application requires a few steps:

  1. Create the start-file from On Unix, this is achieved by running ./configure from the top directory. On Windows by double-clicking win-config.exe.

  2. Optionally, pull in additional configuration files according to config-enabled/README.txt. This can also be done later.

  3. Start as ./ on Unix or double-clicking on Windows and direct your browser to the indicated address (default is http://localhost:3020/. If this is the first time, you will be asked to enter an admin password. This protects some web-operations, such as managing settings and loading/unloading RDF.

If you want to extend the application, there are two options. One is to put a Prolog file with the desired extensions in config-enabled. Another is to run configure/setup from another directory. This creates and config-enabled in the current working directory, after which the extensions can be placed in config-enabled.

Windows notes

If the file name extension that is associated to SWI-Prolog is pl, you may install the system by double-clicking rather win-config.exe.

If the file name extension that is associated to SWI-Prolog is not pl, win-config.exe is needed to open SWI-Prolog on The installation will create a run script with the appropriate extension (typically pro).

Use as library

To use ClioPatria as a library, one can simply compile The file as generated from installation as an application gives additional actions you may want to setup. The web-server is started by cp_server/0, but the system runs happily if the Prolog HTTP server is started in another way, as long as the server uses http_dispatch/1 for dispatching HTTP requests.


Currently, ClioPatria can only be downloaded through GIT. The commands for downloading the system are:

git clone
cd ClioPatria
git submodule update --init web/yasqe
git submodule update --init web/yasr

Further reading

We published an article in the Semantic Web Journal that explains the rationale behind ClioPatria. Please cite this when you are using ClioPatria in your research (full reference below).

Many of the design issues around handling the Semantic Web in Prolog are described and motivated in Jan Wielemaker's PhD thesis (PDF) as well as various articles. RoadMap.txt explains the basic layout of the sources.

Feel free to join the ClioPatria mailing list at


  • Jan Wielemaker
  • Wouter Beek
  • Jacco van Ossenbruggen
  • Michiel Hildebrand
    author    = {Jan Wielemaker and
                 Wouter Beek and
                 Michiel Hildebrand and
                 Jacco van Ossenbruggen},
  title     = {ClioPatria: {A} SWI-Prolog infrastructure for the Semantic Web},
  journal   = {Semantic Web},
  volume    = {7},
  number    = {5},
  pages     = {529--541},
  year      = {2016},
  url       = {},
  doi       = {10.3233/SW-150191},
  timestamp = {Mon, 12 Dec 2016 16:21:50 +0100},
  biburl    = {},
  bibsource = {dblp computer science bibliography,}