XNMR: A tool for knowledge bases exploration

by   L. Castro, et al.
Stony Brook University

XNMR is a system designed to explore the results of combining the well-founded semantics system XSB with the stable-models evaluator SMODELS. Its main goal is to work as a tool for fast and interactive exploration of knowledge bases.



There are no comments yet.


page 1

page 2


Alternating Fixpoint Operator for Hybrid MKNF Knowledge Bases as an Approximator of AFT

Approximation fixpoint theory (AFT) provides an algebraic framework for ...

Weighted defeasible knowledge bases and a multipreference semantics for a deep neural network model

In this paper we investigate the relationships between a multipreferenti...

Mathematical Theory Exploration in Theorema: Reduction Rings

In this paper we present the first-ever computer formalization of the th...

On the Usability of Probably Approximately Correct Implication Bases

We revisit the notion of probably approximately correct implication base...

A Note on General Statistics of Publicly Accessible Knowledge Bases

Knowledge bases are prevalent in various domains and have been widely us...

Toward a Category Theory Design of Ontological Knowledge Bases

I discuss (ontologies_and_ontological_knowledge_bases / formal_methods_a...

Large-Scale Vandalism Detection with Linear Classifiers - The Conkerberry Vandalism Detector at WSDM Cup 2017

Nowadays many artificial intelligence systems rely on knowledge bases fo...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 General Information

The XNMR package is an attempt of integration between the well-founded semantics system XSB[Sagonas, Swift, & Warren1993, Sagonas, Swift, & Warren1996] and the stable models evaluator SMODELS[Niemela & Simons1996]. It works in UNIX platforms (eg. Linux, Solaris), and work is being done to port it to Windows NT.

The package consists of three layers. The bottom layer is a low-level interface between XSB and SMODELS. This interface is written in C, and consists of 177 lines of code.

The second layer is a high-level library of Prolog predicates used to communicate with SMODELS. It has 117 lines of Prolog code.

The third layer is the top-loop evaluator. It is also written in Prolog, and consists of 421 lines of code.

2 Description of the System

XNMR is a package intended to integrate the possible-worlds stable semantics of SMODELS with the more skeptical well-founded semantics of XSB.

It is aimed at allowing the exploration of knowledge bases. It is well-suited for debugging large knowledge bases, by exploiting the modularity of such designs.

The package uses XSB as a pre-processing phase, where the well-founded semantics of a program, with respect to a given query, is computed. As a result of this process, a residual program is computed, where the interdependencies of the undefined objects is represented. The residual program is, then, given as input to SMODELS, so that the stable models for these undefined objects can be computed.

3 Applying the System

3.1 Methodology

This work is exploratory, in the sense that it combines characteristics of two well known systems for logic programming in a general way. We believe the system may be applied to several situations where the stable models semantics is preferred, as long as the notion of relevancy to a query (see

3.2) is satisfied.

More specifically, one application of this system is in debugging large knowledge bases. The system can take advantage of its ability to deal with partial information to allow for debugging of separate parts, or modules, of a knowledge base.

Work is in progress to develop a programming methodology that will allow problems to be described in such a way as to be suitable for evaluation with XNMR. The methodology is based on ways to encode the problem such as to avoid the non-relevancy problem.

3.2 Specifics

XNMR computes the partial stable models which are total on the relevant program, given a query. This is due to the combination of a query-driven system (XSB) to a bottom-up evaluator like SMODELS.

The models computed are total stable models with respect to the relevant parts of the program, according to the given query.

We believe this system may have successful applications on areas like debugging of knowledge bases, and null-valued databases.

3.3 Users and Useability

The system is to be used by people with an understanding of the issues involved in the combination of well-founded and stable models semantics. Since it is integrated with XSB Prolog, it is general enough to be used in several applications.

Even though the system is not, at the moment, being used outside our research group, there are already people interested in applying it to several applications.

4 Evaluating the System

4.1 Benchmarks

To our knowledge, there are no comparative systems available today. One reasonable way to benchmark the systems, though, would be considering XSB as a pre-processor to SMODELS. This way, accepted benchmarks for SMODELS could be applied to the system, as long as they were well-behaved with respect to the relevant-program restriction imposed by the top-down nature of XSB evaluation.

The system is incorporated to the XSB Prolog system, therefore having the same user-friendliness associated to such systems.

4.2 Comparison

The system is inherently logic-based. As stated in the previous section, there are no standard benchmarks to the system, due to its unique combination of top-down and bottom-up evaluators, which results in a restricted semantics being computed. We believe such benchmarks should be considered in an applications-based framework.

4.3 Problem Size

The XNMR system, by itself, doesn’t impose any restrictions to the size of problems being handled. So, the restrictions of the system are those of XSB and SMODELS. We also note that the system is not a prototype, and has been fully implemented as a package of XSB.


  • [Niemela & Simons1996] Niemela, I., and Simons, P. 1996. Efficient implementation of the well-founded and stable model semantics. In Joint International Conference and Symposium on Logic Programming, 289–303.
  • [Sagonas, Swift, & Warren1993] Sagonas, K.; Swift, T.; and Warren, D. 1993. An overview of the design and implementation of xsb. Technical report, SUNY at Stony Brook.
  • [Sagonas, Swift, & Warren1996] Sagonas, K.; Swift, T.; and Warren, D. 1996. An abstract machine for computing the well-founded semantics. In Joint International Conference and Symposium on Logic Programming., 274–289.