RE: Detecting cycles in OWL
William Van Woensel <[email protected]> Mon, 27 Apr 2020 15:18:52 +0000
| Newsgroups | gmane.org.w3c.semantic-web |
|---|---|
| Message-ID | <YTOPR0101MB1530B42C93C0C7CB10E4AEBFD4AF0@YTOPR0101MB1530.CANPRD01.PROD.OUTLOOK.COM> |
Hi Mikael,
Just to give you an extra option, Notation 3<https://www.w3.org/TeamSubmission/n3/> (N3) is an assertion and logic language that extends Turtle, which may be a bit easier for those who are used to that kind of notation:
@prefix : <http://example.com#> .
@base <http://example.com#> .
:b a :B .
:x :p1 :y .:y :p2 :b . :y a :C .
:x :p3 :q . :q :p4 :b . :q a :D .
{ ?b a :B .
?a :p1 ?c . ?c :p2 ?b . ?c a :C .
?a :p3 ?d . ?d :p4 ?b . ?d a :D .
} => {
?a a :CycleFromA .
} .
You can try this code in Eye<https://github.com/josd/eye> or Cwm<https://www.w3.org/2000/10/swap/doc/cwm.html> and it will draw the correct conclusion. Currently the syntax and semantics of N3 is being standardized by a W3C Community Group<https://github.com/w3c/N3> but the above code will remain the same.
William
-----Original Message-----
From: Mikael Pesonen <[email protected]>
Sent: April-27-20 10:45 AM
To: [email protected]
Subject: Re: Detecting cycles in OWL
CAUTION: The Sender of this email is not from within Dalhousie.
Thank you for the suggestions (SPIN, RIF).