Skip to content

Commit

Permalink
adding alternative RDF TriG syntax example
Browse files Browse the repository at this point in the history
  • Loading branch information
josd committed Mar 14, 2024
1 parent 5730925 commit 10284eb
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,40 @@ See the living document [RDF Surfaces Primer](https://w3c-cg.github.io/rdfsurfac

- https://github.com/eyereasoner/Notation3-By-Example/tree/main/blogic
- https://github.com/eyereasoner/eye/tree/b81e05163e21e93e9fc0ab27c369af7f98a16658/reasoning/blogic

### Example using alternative RDF TriG syntax

```trig
# ------------------
# Socrates inference
# ------------------
#
# Infer that Socrates is mortal.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix blogic: <http://www.w3.org/2000/10/swap/blogic#>.
@prefix : <http://example.org/ns#>.
:Socrates a :Man.
:Man rdfs:subClassOf :Human.
:Human rdfs:subClassOf :Mortal.
(_:A _:B _:S) blogic:onNegativeSurface _:subclass_surface1.
_:subclass_surface1 {
_:A rdfs:subClassOf _:B.
_:S a _:A.
() blogic:onNegativeSurface _:subclass_surface2.
}
_:subclass_surface2 {
_:S a _:B.
}
# query
(_:S _:C) blogic:onQuerySurface _:query_surface.
_:query_surface {
_:S a _:C.
}
```

0 comments on commit 10284eb

Please sign in to comment.