Skip to content

Commit 6dc86cc

Browse files
Jan WielemakerJan Wielemaker
Jan Wielemaker
authored and
Jan Wielemaker
committed
First steps working.
1 parent b754f9b commit 6dc86cc

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

README.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Concepts in motion playground
2+
3+
This repository contains some simple code to see whether we can get
4+
reasoning to work with Thea. To use it:
5+
6+
- Get the development version of SWI-Prolog (for the tabling)
7+
- Download:
8+
9+
```
10+
git clone [email protected]:conceptsinmotion/playground
11+
git submodule update --init
12+
```
13+
- Run
14+
```
15+
swipl playground.pl
16+
?- initialize_reasoner.
17+
?- reasoner_ask(subClassOf(Sub,Super)).
18+
```
19+
20+
Test on Linux (Ubuntu 19.04). Should work on any platform where Prolog
21+
and Java work. On some platform some environment setup may be needed to
22+
get JPL (the Prolog <-> Java interface) to run.

playground.pl

+16
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,19 @@
2727
!.
2828
validate(X) :-
2929
format(user_error, 'Invalid: ~p~n', [X]).
30+
31+
%! initialize_reasoner
32+
%
33+
% Initialise the reasoner and send it our ontology. After this we can
34+
% use e.g.
35+
%
36+
% ```
37+
% ?- reasoner_ask(subClassOf(Sub,Super)).
38+
% ?- reasoner_ask(unsatisfiable(Class)).
39+
% ```
40+
41+
initialize_reasoner :-
42+
% debug(owl2),
43+
load,
44+
initialize_reasoner(pellet, _Reasoner).
45+

0 commit comments

Comments
 (0)