Did you know ... Search Documentation:
Packs (add-ons) for SWI-Prolog

Package "race"

Title:Client for the SOAP interface of the Attempto Reasoner RACE
Rating:Not rated. Create the first rating!
Latest version:0.1.0
SHA1 sum:f020cdc4d3bb2bdb3fc7d9cb4dc3aae82e1ecbcf
Author:Falco Nogatz <fnogatz@gmail.com>
Maintainer:Falco Nogatz <fnogatz@gmail.com>
Packager:Falco Nogatz <fnogatz@gmail.com>
Home page:https://github.com/fnogatz/race
Download URL:https://github.com/fnogatz/race/releases/*.zip

Reviews

No reviews. Create the first review!.

Details by download location

VersionSHA1#DownloadsURL
0.1.022053a951b20875ad885b7a3323cc02a5706d49450https://github.com/fnogatz/race.git
2ce4e325a82c85237bc4bfe810f08cae006b0f6a1https://github.com/fnogatz/race.git
637948ad75ec1e9f56fb80b322392f858d2440621https://github.com/fnogatz/race.git
7349c7ac6a66fe46fe363fa88cfbdc3200b1f7311https://github.com/fnogatz/race.git
9e2c3ec0835c787c12067b2b7a345bb779b5d2ce1https://github.com/fnogatz/race.git
a8d643a2078df9b184c8a19e9572802018eefe5b1https://github.com/fnogatz/race.git
ee1931496f1e700e1fb2c5fb90774510d97728b81https://github.com/fnogatz/race.git
f020cdc4d3bb2bdb3fc7d9cb4dc3aae82e1ecbcf1https://github.com/fnogatz/race.git

library(race)

Prolog client for the SOAP interface of the Attempto Reasoner RACE.

Installation

This package requires library(wsdl). It can be installed from within SWI-Prolog using the following command:

?- pack_install(wsdl).

Then, you can install this package by calling:

?- pack_install('https://github.com/fnogatz/race.git').

As of now, this package has not been published in SWI-Prolog's packs list, so pack_install(race) is not yet supported.

Example Usage

First of all you have to load the library:

?- use_module(library(race)).

Consistency Check

%% check_consistency(+Knowledge)
?- check_consistency("John is great. He is not great.").
false.

%% check_consistency(+Knowledge, -Inconsistencies)
?- check_consistency("John is tall. Mary is tall. John is not tall.", Inconsistencies).
Inconsistencies = [fact("John is tall."), fact("John is not tall.")].

Question Answering

%% ask(+Knowledge, +Question, -Result)
%% ask(+Knowledge, +Question, -Result, +Options)
?- ask("Every man is a human. John is a man.", "Who is a human?", Result).
Result = results([
   proof([
      fact("Every man is a human."),
      fact("John is a man."),
      substitution("who", "John")
   ]),
   proof([
      fact("Every man is a human."),
      fact("John is a man."),
      substitution("who", "(at least 1) man")
   ])
]).

By using the option sentence(true), it will return a textual response instead. It can be used in sentences like this can be answered with ...:

?- ask("Every man is a human. John is a man.", "Who is a human?", Result, [sentence(true)]).
Result = results([
   "who as John and the known fact that Every man is a human and the known fact that John is a man",
   "who as (at least 1) man and the known fact that Every man is a human and the known fact that John is a man"
]).

Theorem Proving

%% prove(+Knowledge, +Theorem, -Result)
%% prove(+Knowledge, +Theorem, -Result, +Options)
?- prove("John likes Mary. If A likes B then B likes A.", "Mary likes John.", Result).
Result = results([
   proof([
      fact("John likes Mary."),
      fact("If A likes B then B likes A."),
      substitution("something", "John"),
      substitution("something", "Mary")
   ])
]).

Use sentence(true) in Options to get a textual response instead. It can be used in sentences like this can be proven with ...:

?- prove("John likes Mary. If A likes B then B likes A.", "Mary likes John.", Result, [sentence(true)]).
Result = results([
   "something as John and something as Mary and the known fact that John likes Mary and the known fact that If A likes B then B likes A"
]).

Background

This package uses the SOAP interface of the RACE web service. A detailed specification is available online as part of the RACE web service. We make use of the provided WSDL file with some modifications in order to be compatible with SWI-Prolog's library(wsdl). The adapted and original version of the WSDL file can be found in the `/prolog/race/wsdl` directory.

Contents of pack "race"

Pack contains 10 files holding a total of 25.1K bytes.