Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions shacl-compact-syntax/scope.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,12 @@ Some or all of these additions may be ignored in favour of keeping SHACL-C a sim
For any large scale application of SHACL, it is necessary to modularize, and it felt like this was a serious gap in the specification.
- [Imports](https://rawgit2.com/VladimirAlexiev/shacl/shaclc-grammars/shacl-compact-syntax/grammar/shaclc-XText.html#ImportsDecl) (how is this different from `owl:imports`?)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the example, this is exactly translated to owl:imports. Nothing more...

- Rich [Parameter Declarations](https://rawgit2.com/VladimirAlexiev/shacl/shaclc-grammars/shacl-compact-syntax/grammar/shaclc-XText.html#ParameterDeclaration) and respective assignments at invocation
- [Dedicated Syntax](https://rawgit2.com/VladimirAlexiev/shacl/shaclc-grammars/shacl-compact-syntax/grammar/shaclc-XText.html#SparqlConstraint) for SPARQL Constraints, i.e. unlike SHACL SPARQL, SPARQL is not embedded in RDF literals (`"""<sparql query>"""`) .
- [Explicit Syntax](https://rawgit2.com/VladimirAlexiev/shacl/shaclc-grammars/shacl-compact-syntax/grammar/shaclc-XText.html#SparqlConstraint) for SPARQL Constraints, i.e. SPARQL is not embedded in RDF literals (`"""<sparql query>"""`), unlike SHACL SPARQL.
Comment thread
VladimirAlexiev marked this conversation as resolved.
Outdated
- Potential benefits:
- Having a syntax for SPARQL allows a much better integration.
- We do not have a language within a language.
- XText (and other grammar based code generators) can be used to directly generate code from it, and it is so much more powerful to have consistency ensured by a single parser.
- Using a more explicit SPARQL representation (not embedded in RDF literals) gives a better chance of implementing uncremental evaluation.
- Potential disadvantages:
- Copies large parts of the SPARQL grammar.
- To be compatible with SHACL, we need to devise a target RDF representation for this dedicated syntax.
There was [SPIN SPARQL Syntax](https://spinrdf.org/sp.html) (RDF triple constructs for expressing SPARQL queries), which SHACL abandoned because it was too wordy.
- Need to devise two algorithms: "SHACL parsing and compilation to triples" and "generation of SHACL from triples"
- Issue https://github.com/w3c/shacl/issues/75 discusses whether to reintroduce an explicit RDF syntax for SPARQL.

### [Making SHACL-C Lossless](https://github.com/w3c/shacl/issues/36)

Expand Down