GithubHelp home page GithubHelp logo

sircanist / drew Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ghxiao/drew

0.0 0.0 0.0 20.12 MB

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

License: Apache License 2.0

Web Ontology Language 98.90% Python 0.04% TeX 0.01% Shell 0.01% Java 1.04% HTML 0.01% Prolog 0.01%

drew's Introduction

DReW Reasoner

Introduction

  • 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 https://github.com/ghxiao/drew

Download and Install

  1. Download latest drew.zip from http://code.google.com/p/drew-reasoner/downloads/list and extract it
  2. Download DLV from http://www.dlvsystem.com/dlv/

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  
  <ontology_file>
    the ontology file to be read 
  <sparql_file>
    the sparql file to be query, which has to be a conjunctive query 
  <dlp_file>
    the dl-program file
  <df_file>
    the default rules file 
  <dlv_file>
    the path of dlv 
  <verbose_level>
    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> .

Examples

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, <http://www.kr.tuwien.ac.at/staff/xiao/ontology/network.owl#n1>) connect(x2, <http://www.kr.tuwien.ac.at/staff/xiao/ontology/network.owl#n5>) }

{ connect(x1, <http://www.kr.tuwien.ac.at/staff/xiao/ontology/network.owl#n5>) connect(x2, <http://www.kr.tuwien.ac.at/staff/xiao/ontology/network.owl#n1>) }

{ connect(x1, <http://www.kr.tuwien.ac.at/staff/xiao/ontology/network.owl#n5>) connect(x2, <http://www.kr.tuwien.ac.at/staff/xiao/ontology/network.owl#n4>) }

{ connect(x1, <http://www.kr.tuwien.ac.at/staff/xiao/ontology/network.owl#n1>) connect(x2, <http://www.kr.tuwien.ac.at/staff/xiao/ontology/network.owl#n4>) }

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(<http://www.kr.tuwien.ac.at/staff/xiao/ontology/network.owl#n2>) }

Answering Conjunctive Query

$ ./drew -rl -ontology sample_data/U0.owl -sparql sample_data/lubm_q1.sparql -dlv $HOME/bin/dlv
{ ans(<http://www.Department0.University0.edu/GraduateStudent142>) ans(<http://www.Department0.University0.edu/GraduateStudent44>) ans(<http://www.Department0.University0.edu/GraduateStudent124>) ans(<http://www.Department0.University0.edu/GraduateStudent101>) }

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 https://github.com/ghxiao/drew.git
$ cd drew
$ ./build.sh

Then you will find drew-xx.zip in the target folder.

Dependencies

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

References

[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.

Contact

Guohui Xiao mailto:xiao(a)kr.tuwien.ac.at

Bitdeli Badge

drew's People

Contributors

bitdeli-chef avatar ghxiao avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.