Hi Dave,

Thank you for the detail explanation. It is very helpful for me.

Regards,
ddd

Dave Reynolds <[email protected]> 于2023年1月13日周五 02:51写道:

> There isn't an all function as such.
>
> That's the notation for a structured value in the rule system. The rule
> system supports structured values which are essentially named tuples,
> using the syntax:
>
>     name(value1, value2, ... valuen)
>
> Think of them as like prolog predicates but limited to a single level.
> Since "predicate" means something else in RDF land, and "tuple" would
> also have been confusing we called these structures functors, which may
> or may not have been a good choice of name.
>
> Internally they are represented as a special kind of structured literal
> but they are not supposed to escape out into query results. They are
> just used to pass information between sets of rules.
>
> So the allID rule is gathering all the information from the triples that
> make up an allValues restriction into one data structure, then the later
> allX rules are triggered off that data structure. Basically helps with
> performance and readability.
>
> Dave
>
>
> On 13/01/2023 01:38, L B wrote:
> > In the official document, there are some example code shown as below.
> >
> > https://jena.apache.org/documentation/inference/
> >
> > My question is where the all() function defined?
> >
> > [allID: (?C rdf:type owl:Restriction), (?C owl:onProperty ?P),
> >       (?C owl:allValuesFrom ?D)  -> (?C owl:equivalentClass all(?P, ?D))
> ]
> >
> > [all2: (?C rdfs:subClassOf all(?P, ?D)) -> print(‘Rule for ‘, ?C)
> > [all1b: (?Y rdf:type ?D) <- (?X ?P ?Y), (?X rdf:type ?C) ] ]
> >
> > [max1: (?A rdf:type max(?P, 1)), (?A ?P ?B), (?A ?P ?C)
> > -> (?B owl:sameAs ?C) ]
> >
>

Reply via email to