The Rein Policy Framework for the Semantic Web*

Latest Version : http://dig.csail.mit.edu/2006/06/rein/

This Version : http://dig.csail.mit.edu/2005/05/rein/

Rein (pronounced rain) is a decentralized framework for representing and reasoning over distributed policies in the Semantic Web. Rein (Rei and N3) uses high level Rei concepts for policies and N3 rules to connect these policies to each other and the Web. Policies in Rein use information defined in and inferences made by other policies and web resources forming interconnected policy networks. Rein allows policies to be represented in different policy ontologies and uses N3 rules, a semantic web rule language, for defining the connections in these networks. Reasoning over these networks to obtain policy decisions is done using cwm, an N3 reasoner. Rein consists of three main components - a high level ontology for describing policy networks, mechanisms in N3 for using information and inferences from both policies and web resources, and an engine for inferring policy decisions from policy networks.

[Download Rein & Examples]

[Download cwm from W3C repository]

Overview :
Introduction to Rein
Executing the example
Creating your own Rein Policy Network
Future Work

Introduction to Rein

Rein provides a unifying framework that allows users to define policies in their own taxonomies and provides mechanisms in N3 rules that enable these policies to access and reason over each other and the web. Rein allows policies to be described using ontologies in RDF-S and OWL, and serialized in RDF/XML or N3. It also allows policies to use information and inferences about entities and relationships defined in other policies and resources using mechanisms described in N3 rules. These policies and resources are implicitly connected through access links and form Rein policy networks. This leads to a modular architecture where a policy need not 'understand' the ontology or reasoning used by another policy or web resource in order to use it within its own rules. Policy networks allow the definition of policies in terms of other policies and information distributed on the Semantic Web.

Rein does not propose a single policy ontology or language for policy specification. It allows every policy to potentially have its own policy ontology and if required, a reasoner in N3 rules for interpreting the semantics of the policy ontology. Policies can range from simple to very complex. However, even the simplest policy carries its semantics by reference because it uses a namespace for the policy ontology, which can be looked up, and the rules (reasoner) associated with ontology can be used. Rein relies on N3 semantics and cwm functionality to integrate the policy networks. Rein supports N3 rules for representing interconnections between policies and resources. N3 rules allow policies to access the web and objectively check the contents and inferences of documents, without having to load them and believe everything they say. Rein uses the cwm reasoning engine to provide distributed reasoning capability over policy networks. Though Rein consists of N3 and cwm, we believe that other rule languages such as RuleML and SWRL and their reasoners could also provide similar functionality.

Though policies can be described in their own policy ontologies, the Rein framework requires the use of its policy network ontology for defining the connections in the policy network. The policy network ontology (defined in rein.n3) includes the rein:Request class and defines various properties that resources and policies trying to build networks should use. The concepts used to build a Rein network are illustrated below :

The Rein reasoning engine is an N3 rules file, engine.n3 It accepts as input a file containing a list of rein:Request instances. It processes every rein:Request by finding the policy associated with the resource and reasoning over its network.


  1. Download and install cwm
  2. Download the Rein reasoning engine and examples
  3. Unpack rein.tar.gz
  4. Download cwm from the public w3c CVS repository
  5. Install cwm


We have developed an example Rein policy network using 4 policy ontologies, 5 policies (PolicyC imports PolicyE), and several resources as shown in the picture below :

Executing the example

  1. Assume that cwm, the Rein engine, the modified cwm file are downloaded and installed in the following directories

    cwm : /home/cwm/cwm.py
    Rein engine : /home/rein/engine.n3
    Modified cwm : /home/modified/llyn.py
  2. Copy /home/modified/llyn.py to /home/cwm/swap/

  3. Create an alias for cwm. For example,
    alias cwm="python /home/cwm/cwm.py"

  4. Change to the Rein home directory and run the following command
    cwm --n3 requestA.n3 --think --filter="engine.n3"

    Future Work

    • Provide support for possible attacks like dos
    • Improve querying mechanism
    • Study complexity caused by long chains in policy networks
    • Look into using SWRL and/or RuleML to replicate functionality of Rein


    Rei - An owl-based policy language for Distributed Environments
    N3 - Notation3 - Design Issues article
    N3 Rules - Experience with N3 rules
    Cwm - A general purpose reasoner for the Semantic Web
    RuleML - The Rule Markup Initiative
    SWRL - A Semantic Web Rule Language Combining OWL and RuleML


    maintained by Lalana Kagal
    $Revision: 1.4 $
    $Date: 2005/09/30 17:09:23 $

    *This work is sponsored by the National Science Foundation (Awards 0427275 and 0524481).