1

Is it possible to solve Einstein's riddle (aka Zebra puzzle) with the Stardog reasoner? I.e. the following query does not yield the expected result einsteins_riddle_en:Old_Gold

stardog query myDatabase --reasoning "SELECT ?o WHERE {einsteins_riddle_en:Englishman einsteins_riddle_en:smokes ?o}"
+-------+
|   o   |
+-------+
+-------+
rmv
  • 3,195
  • 4
  • 26
  • 29

2 Answers2

1

You probably need to configure the database to use DL when performing reasoning, the default is SL which corresponds to ALHIO.

To configure stardog to use DL, set the database option reasoning.type to DL.

Michael
  • 4,858
  • 19
  • 32
  • Do i have to specify this option during the creation of the database? I can't find any documentation about that... :-( – rmv Jul 01 '15 at 13:08
  • BTW: I'm looking for a easily comprehensible tutorial about the difference between SL and DL reasoning..? – rmv Jul 06 '15 at 14:49
  • 1
    for DL, depending on what you think is easy, the Description Logic Handbook, particularly the first few chapters are a good read. SL is a custom fragment which is the maximum expressivity stardog can handle without pulling everything into memory as it does with DL. the reasoning chapter in the stardog docs (docs.stardog.com) explains this a bit. – Michael Jul 07 '15 at 10:37
0

For the sake of completeness: following Michael's advice i eventually got the expected inferred results by

nano database.properties
#vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
reasoning.schema.graphs = default , http\://www.example.org/mySchema
reasoning.punning.enabled = false
reasoning.type=DL
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

stardog-admin db drop   -n myDB
stardog-admin db create -n myDB --config database.properties  einsteins_riddle.ttl 

stardog query myDB --reasoning "SELECT ?p ?o WHERE {einsteins_riddle_en:Englishman ?p ?o}"  
+------------------------------+------------------------------+
|              p               |              o               |
+------------------------------+------------------------------+
| rdf:type                     | owl:Thing                    |
| rdf:type                     | einsteins_riddle_en:Man      |
| einsteins_riddle_en:lives_in | einsteins_riddle_en:house-3  |
| einsteins_riddle_en:smokes   | einsteins_riddle_en:Old_Gold |
| einsteins_riddle_en:drinks   | einsteins_riddle_en:milk     |
| einsteins_riddle_en:owns     | einsteins_riddle_en:snails   |
+------------------------------+------------------------------+
Query returned 6 results in 00:00:10.482

Thanks a lot!

rmv
  • 3,195
  • 4
  • 26
  • 29