Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

DReW Reasoner


  • DReW is a reasoner for DL-Programs over Datalog-rewritable Description Logics
    • DL-Programs are a powerful combination of OWL ontology and Datalog (with negation) rules
  • DReW is open sourced and hosted at

Download and Install

  1. Download latest from and extract it
  2. Download DLV from

Command Line Usage

DReW can be used from command line

Usage: drew [-rl | -el] [ -asp | -wf ] -ontology <ontology_file> {-sparql <sparql_file> 
	| -dlp <dlp_file> | -default <df_file> } [-filter <filter>] -dlv <dlv_file> [-verbose <verbose_level>] 
  -rl | -el 
    rewriting for OWL 2 RL or OWL 2 EL
  -asp, -wf
    the semantics of DL-Programs 
    -asp: Answer set semantics (default)
    -wf: Well-founded semantics  
    the ontology file to be read 
    the sparql file to be query, which has to be a conjunctive query 
    the dl-program file
    the default rules file 
    the path of dlv 
    Specify verbose category (default: 0)

Example: drew -el -ontology university.owl -dlp rule.dlp -dlv /usr/bin/dlv 
A note on -wf option

Due to a parser bug with the java library DLVWrapper, when using -wf option, please use the script dlv-wf provided for <dlv_file> .


In the following, we assume the dlv executable file is located at $HOME/bin/dlv .

DL-Program Reasoning

Example with network DL-Programs under ASP semantics

./drew -rl -ontology sample_data/network.owl -dlp sample_data/network.dlp -filter connect -dlv $HOME/bin/dlv

{ connect(x1, <>) connect(x2, <>) }

{ connect(x1, <>) connect(x2, <>) }

{ connect(x1, <>) connect(x2, <>) }

{ connect(x1, <>) connect(x2, <>) }

Example with network DL-Programs under Well-founded semantics

$ ./drew -rl -ontology sample_data/network.owl -dlp sample_data/network.dlp -filter overloaded -wf -dlv ./dlv-wf
{ overloaded(<>) }

Answering Conjunctive Query

$ ./drew -rl -ontology sample_data/U0.owl -sparql sample_data/lubm_q1.sparql -dlv $HOME/bin/dlv
{ ans(<>) ans(<>) ans(<>) ans(<>) }

Default Reasoning

$ ./drew -el -ontology sample_data/bird.owl -default sample_data/bird.df -dlv $HOME/bin/dlv
in("Fred", "Flier")
out("Tweety", "Flier")

Building DReW from source

$ git clone
$ cd drew
$ ./

Then you will find in the target folder.


  • OWL API for parsing and managing ontologies
  • DLV as the backend Datalog Engine
  • Jena for SPARQL Parser


[0] Guohui Xiao. Inline Evaluation of Hybrid Knowledge Bases. PhD thesis, Vienna University of Technology, December 2013.

[1] Guohui Xiao, Thomas Eiter and Stijn Heymans. The DReW System for Nonmonotonic DL-Programs. In: Proceedings of Joint Conference of the Sixth Chinese Semantic Web Symposium and the First Chinese Web Science Conference (SWWS 2012).

[2] T. Eiter, M. Ortiz, M. Simkus, T. Tran, and G. Xiao. Query rewriting for Horn-SHIQ plus rules. In Proc. of AAAI 2012. AAAI.

[3] T. Eiter, T. Krennwallner, P. Schneider, and G. Xiao. Uniform Evaluation of Nonmonotonic DL-Programs. In FoIKS'12, pages 1–22. Springer.

[4] Guohui Xiao and Thomas Eiter. Inline evaluation of hybrid knowledge bases – PhD description. In Proc. 5th International Conference on Web Reasoning and Rule Systems (RR 2011), pages 300–305. Springer, 2011.

[5] S. Heymans, T. Eiter, and G. Xiao. Tractable reasoning with DL-programs over datalog- rewritable description logics. In Proc. of ECAI 2010. IOS Press.

[6] G. Xiao, S. Heymans, and T. Eiter. DReW: a reasoner for datalog-rewritable description logics and dl-programs. In Informal Proc. 1st Int’l Workshop on Business Models, Business Rules and Ontologies (BuRO 2010), 2010.


Guohui Xiao mailto:xiao(a)

Bitdeli Badge


DReW reasoner for DL-Programs over Datalog-rewritable Descritption Logics



You can’t perform that action at this time.