Re: ISSUE-95: Proposal for model simplifications

The cleanup of SHACL constraints could be something like:

- A constraint is either a node constraint or a global constraint.

- A node constraint is something that is true or false of nodes in a graph.
  Node constraints can be just about anything, including SPARQL-based
  constraints.  Node constraints include boolean constructs and closed
  versions of constraints.

- Node constraints include property-path constraints.  A property-path
  constraint contains a property path, perhaps some cardinality
  constraints, and perhaps some node constraints.
  - For example "at least 5 children and all male" or "all inverse of
    children are people" are property-path constraints.
  - Cardinality constraints are "at least n" or "at most n" or qualified
    versions of these, e.g., "at least 5 are male", which contain a
    cardinality and a node constraint.
    a qualified cardinality constraint here ("at least 1 x is y").
  - A property-path constraint is evaluated on a node by finding the set of
    values of the property path from the node, checking to see if this set
    satisfies the cardinality constraints and then checking to see if the
    values each satisfy each of the node constraints.
  - A set of values satisfies an unqualified cardinality constraint
    depending only on the size of the set.  A set of values satisfies a
    qualified cardinality constraint if the subset of the values that
    satisfy the node constraint satisfy the cardinality.

- A global constraint is something that is true or false of a graph as a
  whole.  All (current) global constraints are SPARQL-based.

A SHACL shape is then just a node constraint.  Shapes tend to be named, and
used as targets of scoping (control) triples.


The difference between this goes beyond Arthur's to cover qualified
cardinalities, which don't fit into Arthur's setup; closure; and global
constraints.


The difference between node constraints and ShEx is that ShEx distinguishes
between node constraints (Shape Expressions) and shapes (combination of
Label and Shape Definition).



peter

Received on Thursday, 19 November 2015 19:06:15 UTC