-
Notifications
You must be signed in to change notification settings - Fork 30
Add sh:ShapeClass #212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Discussion Feb 24th: https://www.w3.org/2025/02/24-data-shapes-minutes.html#d570 |
I am concerned that this proposal induces a requirement of SHACL-specific entailment to expose a non-SHACL modeling class that some systems may require to be hard-coded. If this were also trying to simplify Within OWL, my understanding of the parsing algorithm described in this document is that the parsing process happens with no inferencing. Only hard-coded statements are loaded into the parsing algorithm, whether through the initialization, or through following Let's pretend through just the next code block that ex:Person
a dash:ShapeClass ;
.
ex:person-1
a ex:Person ;
. And now I've talked about OWL long enough to come back to general RDF: I don't know whether RDF parsers also in general have the same strictness of "Something in the object position of ex:A
a sh:ShapeClass ;
.
ex:B
a sh:ShapeClass ;
rdfs:subClassOf ex:A ;
. I could see this raising a parse error, similar to "non-Class a part of a subclassing declaration". I'm concerned that this effort to save a type statement through entailment would cause compatibility issues by imposing a requirement of "You need to speak SHACL to load this" on a single graph that mixes SHACL with RDFS modeling and uses Meanwhile, coming back to OWL with one last remark - this proposal as written saves no effort for OWL-and-SHACL users, because it does not include |
Why should a niche technology such as OWL DL with all its well-known flaws and limitations constrain how other languages like SHACL are designed. The design mistakes that you describe are in the layering of OWL 2 on RDF. It is probably already outside of OWL DL when you use the current pattern, which is
because it uses rdfs:Class instead of owl:Class. SHACL doesn't say anything about owl:Class, and that's good. Maybe there will be an OWL 2.1 that addresses these problems, but it shouldn't be more than a nice-to-have for us here. I am aware that individuals can veto the decisions by the group. I have done this in the past too. Therefore, can we try to work on a compromise? What about we include an informal comment that explains that in order to be friendly to OWL, you should do X and Y (which could be "don't use rdfs:Class" and "use owl:Class instead"), so that you can live with the current proposal? Or that the WG publishes a separate document on the relationship between SHACL and languages including OWL, which would then also include the variant of the SHACL definitions that you have suggested in #246 ? In general, wouldn't adding a few triples to #246 also address the sh:ShapeClass compatibility? |
I've apparently caused a distraction: I only meant to use OWL to illustrate a problem I think would occur outside of OWL. I do believe OWL is outside the scope of this proposal for reasons specific to OWL. The point I wish to emphasize from my long comment is that ex:A
a sh:ShapeClass ;
.
ex:B
a sh:ShapeClass ;
rdfs:subClassOf ex:A ;
. I'm also not attempting a veto. I lead my comment with "I am concerned that...", and it's up to the group to decide whether my concern is shared. |
Wouldn't RDFS entailment infer that ex:A is also an rdfs:Class because rdfs:domain/range of rdfs:subClassOf is rdfs:Class? likewise, the range of rdf:type is rdfs:Class, so as soon as there are instances of a ShapeClass it would be understood to be an rdfs:Class. In shapes graph that only declare ex:A s sh:ShapeClass, why would an RDFS processor care what this is, as there are no inferences? |
RDFS entailment would pick this up today, yes, as those domain and range statements are in RDF 1.1 Semantics, Section 9.
This is a good point to enumerate the constraints of the use case I'm focused on:
I don't currently think SHACL-awareness is part of this constraints list. And one thing I'm really unaware of is how much point 5 is a concern to others. I've seen point 5 be a noteworthy data quality control matter. Explaining the no-inferencing bit: I'm aware that there is a friction with full RDFS entailment and JSON-LD use cases. In short, full RDFS entailment causes an issue with serializing data after entailment, because of entailment rule My concern to the original issue, adding |
@ajnelson-nist thanks for the details and the discussion. I am really trying to understand the exact problem space here. From your list of pre-conditions, what exactly do you mean with RDFS processor, if inferencing is OFF. Do you mean just some RDF (triples) processor? What sort of algorithm in particular? Asking because if an RDF processor only knows about RDFS vocabulary, then it wouldn't even understand To me, |
@ajnelson-nist as mentioned in the meeting today, we should try to conclude on this topic here on this ticket. See my comment above, I would appreciate if you could point of exact problems, exact interpretation mistakes that RDF processors would make if they only see sh:ShapeClass without its ontological definition. And if they do, is this even a valid argument: the whole point of ontologies is that people should use them to learn about classes. Even in cases like sh:NodeShape a non-SHACL processor wouldn't really understand that sh:NodeShape is an rdfs:Class without the sh graph. |
Replying to the last two comments:
I only meant a triples processor that parses some concrete syntax (Turtle, JSON-LD, etc.) into a graph representation. I had no specific algorithm matters in mind, only that RDFS entailment might not be guaranteed.
I agree with you here - the analogy with
During this "growing-up" period, I think a graph containing
I'm not familiar enough with the tooling space to know if specifically point 1 is generally done anyway. My concern's fairly moot if so, and I invite tool maintainers to weigh in on this. I'm aware that full RDFS inferencing is a sufficient concern in some use cases that it's not an option (such as JSON-LD having issues with rule Point 3 happening is a social question, and I decline to speculate. Point 4 is a small task to ask of the user, but it is a non-zero effort in cases where every If
SHACL 1.0 doesn't require loading Footnotes
|
Thanks for the continued discussion @ajnelson-nist. In a nutshell you seem to say "sh:ShapeClass for SHACL is the same as owl:Class for OWL, but the difference is that OWL is already established so most tools by now may know how to handle it, while no other language is allowed to enter the same group of languages from now on". I don't think this is fair to SHACL. The situation with OWL is even worse, because there really was no strong reason to even introduce owl:Class beside syntactical pureness, while in SHACL it really "means" something because it triggers validation for SHACL processors. Further, OWL is worse because it also introduces various other metaclasses including owl:Restriction and property metaclasses like owl:DatatypeProperty and ObjectProperty. Was this needed? No, I don't think so. Did it happen regardless? Yes. So why should we block SHACL from the same benefits. The owl:import is not needed but I think it's generally a reasonable expectation for RDF-based tools to look up ontological definitions. This is at the very heart of semantic web technology. Overall while I acknowledge there can be corner cases where tools may have some limited understanding of sh:ShapeClass, I think the consequences of this pale in comparison to the benefits of having sh:ShapeClass generally available to everyone else, especially SHACL tools. A tool that doesn't know about SHACL wouldn't behave differently when it encounters a sh:ShapeClass anyway. SHACL is in the same category of languages as OWL and therefore has the same rights to introduce new terms. |
Yes.
I did not say that and I cannot say that. Please do not claim that I said that.
I will make no remark on opinions. I do not intend to "block SHACL from the same benefits." I mean most to note that
Again, I do not intend to deny rights of growth. I just wish the working-group to remain aware that some forms of growth entail a cost for interoperability, borne by someone between working-group and end user (inclusive). |
@ajnelson-nist My apologies that I have put words into your mouth that you didn't state or mean to say. My mistake. I was over-interpreting what you wrote, but then I believe I was clear that it was just my interpretation via "you seem to say". I don't know how to proceed here. We were supposed to make progress through Github discussions. We appear to have different opinions on the severity of any potential misinterpretation by tools that don't know about SHACL 1.2. Much of this is, of course, speculation and difficult to predict because it is about the future adoption of SHACL. I guess this topic needs input from other people of the WG. |
All's well, @HolgerKnublauch . I appreciate it. I also agree, you and I are of differing opinion on how much of an issue this is---or possibly, whether it's an issue? I agree it's time for others' thoughts. As this thread sits now, I'm fine with us having one settling discussion in a working-group call, if nobody else replies on the thread. I have a hunch it'd be around 5, at most 10, minutes of a call. |
@ajnelson-nist I see where you are coming from with these concerns and I am glad that this has been brought up. It has sparked discourse about the evolution of SHACL that will likely become increasingly important as this WG advances. Would it be help at all to approach this from an instructional perspective rather than a technical one? Perhaps with a note like "Be aware that using ShapeClass in SHACL-unaware implementations may pose XYZ risks."
Of course, people who blindly import others' work may be affected if they overlook this small detail. But in such cases, that would probably be far from the biggest worry. I will add this to the agenda and hope we can reach a decision on this point in the next WG call. |
@PapoutsoglouE I'm doubtful of the value of an instructional perspective. My thinking is that expecting a user to read documentation to adapt their system to SHACL 1.2 might not function well in the transitive case. Say SHACL 1.2 in I don't know how many users there are of systems that flag "undefined class" usage. That's the population that I think is affected by this risk, and there are other operational conditions I've enumerated above (particularly non-inferencing) that could make this syntactic sugar into a non-trivial workflow matter to remediate (setting up a step to mix in Even as the working group considers whether their own userbases would be affected like I've described, I wish us to remain mindful of populations that could be. |
I have added the following recommendation to the PR: I believe this makes sense. By adding owl:imports of the sh: TTL graph, any tool with support for owl:imports should pull the missing triples in, and those will then also be applied to transitive use cases, following semantic web best practices. Having said this, I am still curious what specific problems would happen for "undefined class" usage. If tools struggle with undeclared classes, they would, for example, also struggle to understand that skos:Concept is a class, or that skos:prefLabel is a subPropertyOf rdfs:label. And of course, the elephant in the room, owl:Class. At some stage we need to assume that tools will need to look up ontological definitions before they consume random graphs. |
PR #254 was merged before the group had a chance to discuss this on a call. (Oh, and I see it was just reverted.) The "instructional perspective" is currently implemented. I still believe this should be discussed on Monday's call. I feel I've said most of what I want to say on this topic, aside from this last note: |
FWIW, it's not reverted yet, I only created a branch that would revert it. |
My mistake, I just saw the little ping in the thread here and didn't look if it was in the |
@ajnelson-nist talks about "RDFS parser errors". But what is this? Can you refer to the RDFS spec about such a term, or describe which existing sem web tools return such errors? He also writes about "without SHACL-awareness". All it takes to be "SHACL aware" is to import or directly load the sh ontology. If your concerns were real then any ontology that subclasses rdfs:Class and then uses that subclass, would be invalid (cause breakage or "parsing errors")! I don't think that is the case. |
@VladimirAlexiev - I got asked on the WG call to write a small demonstration. To your question, I meant to describe instantation of an RDF model in memory after reading a document, e.g. turning Re: @bergos 's request from today's call: The short demonstration centers on something I've seen come up in multiple tools with a "Strict parsing" mode, which I've seen sometimes be opt-in versus a default "lax" mode, but not always. With apologies if this muddies things, I believe I shouldn't identify the tools, as some folks welcome sternness in a parser (I'm one such person), but some may see it as a criticism. Take this graph serving as an all-in-one shapes, classes, and individuals graph, # Boilerplate
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX sh: <http://www.w3.org/ns/shacl#>
# Local
PREFIX ex: <http://example.org/ex/>
ex:A a sh:ShapeClass .
ex:a-1 a ex:A .
# ex:B not defined - intentional for the example, but maybe accidental in practice.
ex:a-2 a ex:B . Take a strict parsing tool, IF IF
PR #254 includes the suggested, most-upstream remediation for @HolgerKnublauch , after @PapoutsoglouE 's requested review deadline passes, would you mind cross-linking PR #254 here before closing this Issue? I'd do it, but I don't want to trigger an auto-close of the Issue. |
|
Sorry, but I believe I have to follow institutional rules which prevent me from naming such a tool.
Agreed. That's what I meant by remediation 2 ("side-loading"). |
@ajnelson-nist for your example:
|
Yes, if the tool was unaware of, and not supplied with, OWL.
Yes, if the tool was unaware of, and not supplied with, SKOS. |
Ok, given that our situation is not different from OWL, SKOS or any other ontology, my impression is that I can close this ticket unless I hear otherwise by Thursday. Please correct me if anyone disagrees. The branch was already merged (by accident). |
I have no objections to the ticket being closed Thursday. Just wanted to check, has there been enough editorial review against the PR that was merged? |
@ajnelson-nist I checked your excellent work on Cybersecurity and as I'm not bound by institutional rules, I'll venture a guess you're talking about Robot :-) I vote to close this issue and keep the PR merged. But for the future I'll heed the issue you posted about PR procedures. |
It would be helpful if you could check with your institutional compliance people, and confirm whether this institutional rule applies in the way you suggest. If you can name that tool, others can reproduce your experimental results, and thereby (hopefully) determine whether there is an issue in the tool (which we can then report to its source), or in what's being submitted to the tool (which we can then revise, as I believe it's our data). |
@TallTed - I'm well aware of your points, but I already understand that I can't name tools in this situation. With apologies, this is the line I have to be wary of, and I know it is a challenge for external-to-institution folks I interact with and for the longer record. Here, I can only describe qualities, and any may feel free to note tools that happen to fit some or all of those qualities, but I can neither confirm nor deny whatever tools I may have been thinking of. I suggest it will not be a good use of group energy to ask me further on this, and I ask for patience with the process I need to follow. |
@ajnelson-nist — OK. I was asking you to check because you said "I believe", which is rather softer than "I know" or "I have been informed". Your new comment indicates that you have checked, and you have been informed, so you know. I will sadly accept that. |
Uh oh!
There was an error while loading. Please reload this page.
Related to #169 SHACL should become more stand-alone and grow up in a formerly OWL-dominated world.
In the dash namespace we have added
so that classes using implicit class targets can be written with just one rdf:type instead of two:
instead of
This could be leveraged into the sh: namespace as sh:ShapeClass.
The text was updated successfully, but these errors were encountered: