This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-03-04
Channels
- # announcements (4)
- # asami (38)
- # babashka (20)
- # beginners (188)
- # cider (1)
- # clara (11)
- # clj-kondo (103)
- # clj-together (1)
- # cljs-dev (15)
- # clojure (138)
- # clojure-australia (5)
- # clojure-europe (33)
- # clojure-france (1)
- # clojure-losangeles (5)
- # clojure-nl (4)
- # clojure-norway (11)
- # clojure-serbia (3)
- # clojure-uk (11)
- # clojurescript (45)
- # community-development (3)
- # conjure (22)
- # core-async (18)
- # datomic (44)
- # defnpodcast (4)
- # deps-new (1)
- # depstar (49)
- # events (2)
- # fulcro (33)
- # girouette (2)
- # honeysql (37)
- # jackdaw (5)
- # jobs-discuss (16)
- # kaocha (3)
- # leiningen (4)
- # lsp (77)
- # malli (55)
- # membrane (4)
- # off-topic (61)
- # polylith (5)
- # quil (5)
- # reagent (33)
- # reitit (12)
- # remote-jobs (1)
- # reveal (4)
- # rewrite-clj (2)
- # sci (16)
- # shadow-cljs (22)
- # sql (1)
- # test-check (27)
- # tools-deps (44)
@quoll: Am I right that naga/pabu doesn’t implement negation or failure, or any way to do intersection? It’s purely monotonic right?
which can also be used in rules for Naga. Indeed, if you create a new object in the head of a rule, then Naga updates the query to use a not
expression to remove existing entities that already match the pattern
is there an example?
its ok I’ll do some digging in the code; thanks for the pointer 🙇
inner joins are an intersection. Do you maybe mean graph intersections? Or something else again?
sorry I didn’t mean intersection at all; that’s clearly used a everywhere — I meant disjointness constraints
OK, yes. It’s the not
operator.
I don’t actually follow Datomic semantics 😳
Instead, I follow SPARQL semantics
me too
Also, look at test/naga/test_rules.cljc line 238 (test-rewrite). That’s doing query rewriting for rules
@quoll: Sorry that appears to be in asami queries… I’m meaning in naga rules
That test takes a set of patterns for generating data, and a :where
clause, and it rewrites the :where
clause to exclude data that already matches the output pattern
ok — not sure if this is quite what I’m after
Essentially if I detect a contradiction in the graph; I’d like to fail the reasoning
e.g. rules like eq-diff1: https://www.w3.org/TR/2012/REC-owl2-profiles-20121211/#Reasoning_in_OWL_2_RL_and_RDF_Graphs_using_Rules
e.g. return a failing goal
I suppose I could always just return a special error report node, that if present meant inconsistency… I guess I could capture information the failure that way too
That kind of thing is not negation! There are 2 approaches. One is to assert data that indicates a failure. The other is to have rules perform a failing action rather than asserting data. Either way, it’s a positive test. It’s just what you choose to do with what you find
It’s approximated by having statements that match the negation term, and use a NOT operation to remove them
Naga has a space in it for doing non-assertion things. I just haven’t had a need to do it yet 🙂
My original thought was to connect to a messaging API and send things there. A client process could then report on what comes through.
The other thing is to define a head that indicates an error. I thought maybe an empty head. Or possibly a predicate form, like (error "eq-diff2") :- owl:sameAs(X, Y), owl:differentFrom(X, Y).
ok cool that’s essentially what I was thinking I’d do too. I think that’ll work for a lot of what I want.