ISSUE-133: syntax simplification and regularization

syntax

syntax simplification and regularization

State:
CLOSED
Product:
SHACL - Core
Raised by:
Peter Patel-Schneider
Opened on:
2016-03-08
Description:
The current SHACL syntax has user-visible syntactic categories and
vocabulary for
- shapes (sh:Shape);
- scopes (sh:Scope), including property scopes (sh:PropertyScope), inverse
property scopes (sh:InversePropertyScope), all subjects scopes
(sh:AllSubjectsScope), and all objects scope (sh:AllObjectsScope);
- constraints (sh:Constraint), including node constraints
(sh:NodeConstraint) linked from shapes via sh:constraint,
property constraints (sh:PropertyConstraint) linked from shapes via
sh:property, and inverse property constraints (sh:InversePropertyConstraint)
linked from shapes via sh:inverseProperty.

This is a lot of machinery for a not-very-complex language. It is possible
to reduce the amount of machinery?


Scopes and constraints are effectively conjunctions---shapes of constraints
and constraints of constraint components. (There does not appear to be a
user-visible name for these components.) Not all components can appear in
all kinds of constraints. Component properties can only appear once in each
constraint even though most constraint components make sense when appearing
multiple times. On the other hand the properties for constraints can appear
multiple times in a shape.

These restrictions make the language complex and irregular. For example,
the following structure is illegal but natural:
[ a sh:PropertyConstraint;
sh:predicate ex:property1 ;
sh:class ex:class1 ;
sh:class ex:class2 ].
whereas the following would have the same meaning but is legal even though
less natural:
[ a sh:PropertyConstraint ;
sh:predicate ex:property1 ;
sh:class ex:class1 ;
sh:classIn ( ex:class2 ) ].
The following also has the same intuitive meaning
[ a sh:PropertyConstraint ;
sh:predicate ex:property1 ;
sh:and ( [ a sh:Shape ;
sh:constraint [ a sh:NodeConstraint ;
sh:class ex:class1 ] ]
[ a sh:Shape ;
sh:constraint [ a sh:NodeConstraint ;
sh:class ex:class2 ] ] ) ].
and might or might not be legal.

In some cases it is not possible to break out a conjunction within a single
constraint. For example, the following is illegal but natural:
ex:s1 a sh:Shape ;
sh:property [ a sh:PropertyConstraint ;
sh:predicate ex:property1;
sh:equals ex:property2;
sh:equals ex:property3 ].
To rewrite this in legal syntax requires two property cconstraints, as in
ex:s2 a sh:Shape ;
sh:property [ a sh:PropertyConstraint ;
sh:predicate ex:property1;
sh:equals ex:property3 ];
sh:property [ a sh:PropertyConstraint ;
sh:predicate ex:property1;
sh:equals ex:property2 ].


It is possible to reduce the complexity and increase the regularity of the
SHACL language?


Constraint components can involve multiple properties in a constraint. For
example, patterns components use sh:pattern and sh:flags, as in:
[ a sh:Propertyonstraint ;
sh:pattern "http:*" ;
sh:predicate ex:httpURL ;
sh:datatype xs:string ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:flags "i" ]
Determining the meaning of the pattern component requires looking for both
of its parts. This adds to the complexity of reading SHACL constraints. It
also adds to the complexity of processing SHACL constraints.

Is it possible to remove two-property aspects of the SHACL language?

Related Actions Items:
No related actions
Related emails:
  1. Re: Updates to Abstract Syntax (from kcoyle@kcoyle.net on 2016-07-28)
  2. Re: Updates to Abstract Syntax (from kontokostas@informatik.uni-leipzig.de on 2016-07-28)
  3. Re: Updates to Abstract Syntax (from andy.seaborne@topquadrant.com on 2016-07-28)
  4. Re: Updates to Abstract Syntax (from eric@w3.org on 2016-07-28)
  5. Re: Updates to Abstract Syntax (from holger@topquadrant.com on 2016-07-28)
  6. Re: Updates to Abstract Syntax (from kcoyle@kcoyle.net on 2016-07-27)
  7. Re: ISSUE-133: Wiki page with syntax examples (from kontokostas@informatik.uni-leipzig.de on 2016-07-19)
  8. Re: ISSUE-133: Wiki page with syntax examples (from holger@topquadrant.com on 2016-07-19)
  9. Re: ISSUE-133: Wiki page with syntax examples (from kontokostas@informatik.uni-leipzig.de on 2016-07-19)
  10. Re: ISSUE-133: Wiki page with syntax examples (from holger@topquadrant.com on 2016-07-19)
  11. Re: ISSUE-133: Wiki page with syntax examples (from kontokostas@informatik.uni-leipzig.de on 2016-07-18)
  12. Re: ISSUE-133: Wiki page with syntax examples (from holger@topquadrant.com on 2016-07-18)
  13. Re: ISSUE-133: Wiki page with syntax examples (from kcoyle@kcoyle.net on 2016-07-16)
  14. ISSUE-133: Wiki page with syntax examples (from holger@topquadrant.com on 2016-07-15)
  15. Re: List of open SHACL Core Syntax ISSUEs (from holger@topquadrant.com on 2016-07-14)
  16. Re: List of open SHACL Core Syntax ISSUEs (from kontokostas@informatik.uni-leipzig.de on 2016-07-14)
  17. List of open SHACL Core Syntax ISSUEs (from holger@topquadrant.com on 2016-07-12)
  18. AW: Re: RDF Data Shapes WG agenda for 19 May 2016 (from simon.steyskal@wu.ac.at on 2016-05-19)
  19. Re: RDF Data Shapes WG agenda for 19 May 2016 (from kontokostas@informatik.uni-leipzig.de on 2016-05-19)
  20. RDF Data Shapes WG agenda for 19 May 2016 (from lehors@us.ibm.com on 2016-05-18)
  21. Re: ISSUE-133 syntax simplifications & regularizations (from kontokostas@informatik.uni-leipzig.de on 2016-05-13)
  22. Re: ISSUE-133 syntax simplifications & regularizations (from kontokostas@informatik.uni-leipzig.de on 2016-05-12)
  23. Re: ISSUE-133 syntax simplifications & regularizations (from jimkont@gmail.com on 2016-05-12)
  24. Re: ISSUE-133 syntax simplifications & regularizations (from kcoyle@kcoyle.net on 2016-05-12)
  25. Re: RDF Data Shapes WG Agenda for 12 May 2016 (from lehors@us.ibm.com on 2016-05-12)
  26. Re: ISSUE-133 syntax simplifications & regularizations (from kontokostas@informatik.uni-leipzig.de on 2016-05-11)
  27. Re: ISSUE-133 syntax simplifications & regularizations (from holger@topquadrant.com on 2016-05-11)
  28. Re: ISSUE-133 syntax simplifications & regularizations (from holger@topquadrant.com on 2016-05-11)
  29. Re: ISSUE-135: Proposed changes to implement syntax simplification (from holger@topquadrant.com on 2016-05-11)
  30. Re: ISSUE-133 syntax simplifications & regularizations (from holger@topquadrant.com on 2016-05-11)
  31. Re: ISSUE-133 syntax simplifications & regularizations (from holger@topquadrant.com on 2016-05-11)
  32. Re: ISSUE-133 syntax simplifications & regularizations (from pfpschneider@gmail.com on 2016-05-10)
  33. Re: ISSUE-133 syntax simplifications & regularizations (from kcoyle@kcoyle.net on 2016-05-10)
  34. Re: ISSUE-133 syntax simplifications & regularizations (from pfpschneider@gmail.com on 2016-05-10)
  35. Re: ISSUE-133 syntax simplifications & regularizations (from pfpschneider@gmail.com on 2016-05-10)
  36. Re: ISSUE-133 syntax simplifications & regularizations (from pfpschneider@gmail.com on 2016-05-10)
  37. Re: ISSUE-133 syntax simplifications & regularizations (from kcoyle@kcoyle.net on 2016-05-10)
  38. Re: ISSUE-133 syntax simplifications & regularizations (from pfpschneider@gmail.com on 2016-05-10)
  39. Re: ISSUE-133 syntax simplifications & regularizations (from kontokostas@informatik.uni-leipzig.de on 2016-05-10)
  40. Re: ISSUE-133 syntax simplifications & regularizations (from pfpschneider@gmail.com on 2016-05-10)
  41. Re: ISSUE-133 syntax simplifications & regularizations (from kontokostas@informatik.uni-leipzig.de on 2016-05-10)
  42. ISSUE-133 several options for syntax simplification and regularization (from pfpschneider@gmail.com on 2016-05-10)
  43. Re: ISSUE-133 syntax simplifications & regularizations (from pfpschneider@gmail.com on 2016-05-10)
  44. ISSUE-133 syntax simplifications & regularizations (from kontokostas@informatik.uni-leipzig.de on 2016-05-10)
  45. Re: fundamental problems with SHACL (from holger@topquadrant.com on 2016-04-11)
  46. Re: fundamental problems with SHACL (from pfpschneider@gmail.com on 2016-04-08)
  47. Re: fundamental problems with SHACL (from holger@topquadrant.com on 2016-04-08)
  48. Re: RDF Data Shapes WG agenda for 7 April 2016 (from holger@topquadrant.com on 2016-04-07)
  49. How to make progress on syntax and metamodel? (from holger@topquadrant.com on 2016-03-18)
  50. Re: ISSUE-133: multi-occurrence use cases (from holger@topquadrant.com on 2016-03-14)
  51. Re: ISSUE-133: multi-occurrence use cases (was: Selected problems with Proposal 4) (from irene@topquadrant.com on 2016-03-12)
  52. ISSUE-133: multi-occurrence use cases (was: Selected problems with Proposal 4) (from holger@topquadrant.com on 2016-03-12)
  53. Re: Selected problems with Proposal 4 (from irene@topquadrant.com on 2016-03-11)
  54. Re: Selected problems with Proposal 4 (from pfpschneider@gmail.com on 2016-03-11)
  55. ISSUE-133: Proposals on multi-occurrence (from holger@topquadrant.com on 2016-03-11)
  56. Re: Selected problems with Proposal 4 (from holger@topquadrant.com on 2016-03-11)
  57. Re: shapes-ISSUE-133 (syntax): syntax simplification and regularization [SHACL - Core] (from holger@topquadrant.com on 2016-03-11)
  58. Re: Selected problems with Proposal 4 (from irene@topquadrant.com on 2016-03-10)
  59. Re: shapes-ISSUE-133 (syntax): syntax simplification and regularization [SHACL - Core] (from pfpschneider@gmail.com on 2016-03-10)
  60. Re: Selected problems with Proposal 4 (from pfpschneider@gmail.com on 2016-03-10)
  61. Re: shapes-ISSUE-133 (syntax): syntax simplification and regularization [SHACL - Core] (from pfpschneider@gmail.com on 2016-03-10)
  62. Re: shapes-ISSUE-133 (syntax): syntax simplification and regularization [SHACL - Core] (from holger@topquadrant.com on 2016-03-10)
  63. Selected problems with Proposal 4 (from holger@topquadrant.com on 2016-03-10)
  64. Re: ISSUE-41: Property paths (from simon.steyskal@wu.ac.at on 2016-03-10)
  65. Re: SHACL syntax and metamodel complexity (from kontokostas@informatik.uni-leipzig.de on 2016-03-09)
  66. ISSUE-41: Property paths (was: SHACL syntax and metamodel complexity) (from holger@topquadrant.com on 2016-03-09)
  67. Re: SHACL syntax and metamodel complexity (from simon.steyskal@wu.ac.at on 2016-03-09)
  68. Re: SHACL syntax and metamodel complexity (from holger@topquadrant.com on 2016-03-09)
  69. shapes-ISSUE-133 (syntax): syntax simplification and regularization [SHACL - Core] (from sysbot+tracker@w3.org on 2016-03-08)

Related notes:

RESOLUTION: Close ISSUE-133, based on the series of related resolutions
See https://www.w3.org/2016/07/28-shapes-minutes.html#resolution05

Arnaud Le Hors, 29 Jul 2016, 16:25:41

Display change log ATOM feed


Irene Polikoff <irene@topquadrant.com>, Ted Thibodeau <tthibodeau@openlinksw.com>, Chairs, Sandro Hawke <sandro@w3.org>, Staff Contact
Tracker: documentation, (configuration for this group), originally developed by Dean Jackson, is developed and maintained by the Systems Team <w3t-sys@w3.org>.
$Id: index.php,v 1.325 2014-09-10 21:42:02 ted Exp $