Semantics for LDOM

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Here is what is needed to fix the meaning of LDOM.  The syntax is taken from
http://labra.github.io/Haws/ldom/index.html with problematic constructs
removed and some slight modifications made.  This syntax does not include
many of the atomic shapes that have been proposed (like checking that an IRI
belongs to a namespace); adding these is simple but tedious.


  Semantics for LDOM

An RDF graph is a set of triples.

An LDOM document D is a partial mapping from IRIs to shapes.

Shapes are constructed using the following grammar:

Shape ::= arc Property Value <Min,Max>
        | and(Shape,Shape)
 | or(Shape,Shape)
 
Min ::= 0 | 1 | 2 | ...
Max ::= 0 | 1 | 2 | ... | unbounded

Property ::= ( IRI | inverse IRI )

Value ::= shape Label | type IRI | kind (iri|literal|blank) | { V, ..., V }

V ::= IRI | Literal | Blank

Given an RDF graph G and an LDOM document D an interpretation of D over G is
a partial mapping I from IRIs to IRIs union blank nodes union data values.

Given an interpretation I of D over G, I is extended to shapes as follows
- - I(shape L) = I(L) if I(L) is defined, undefined otherwise
- - I(type D) = the value space of D, for D a datatype
- - I(type C) = { x | x rdf:type C in G }, for C not a datatype
- - I(kind iri) = { x | x an IRI }
- - I(kind literal) = { x | x a blank node }
- - I(kind blank) = { x | x a literal }
- - I({V1,...,Vn}) = {V1',...,Vn'}
   where Vn' is the value of Vn for Vn a literal,
                Vn otherwise
- - I(arc P V <Min,Max>) = { x | Min<=card(F)<=Max and F <= I(V) }
 where F = { y | y p x in G } for P of the form inverse p
       F = { y | x P y in G } otherwise
- - I(and(S1,S2)) = I(S1) intersection I(S2)
- - I(or(S1,S2)) = I(S1) union I(S2)

An interpretation I of D over G is a pre-model of D over G if
- - I(L) = I(D(L)) if D(L) is defined
- - I(L) is undefined otherwise

A pre-model M of D over G is the model of D over G if there is no other
pre-model M' of D over G such that M(L)<=M'(L) for all L where M(L) is
defined.


Problematic Constructs

Anything that is related to negation causes problems with recursive shape
recognition.   Anything that is related to coverage needs an intuition
behind it before a semantics can be produced.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJU5UehAAoJECjN6+QThfjzmmoH/Rzw7/cZWlstqoNIHXlppK/j
QlLqAL4CzTP8ZhDB5OGzRDsKxInj3DCXWZWrppQYVmhflXJ5f0vSyrVBoIk9PaIj
mPfKS/VEyBVOLEDyhSiWB+xVOlv9vmIQwYly4SDGSTK43yWyR6Yc6eZk2gNnfgFf
ETR6STXiADk9cR7RvaIzrWm9B60vEx+gsGoAF+UqjI2k3/w1UxkGbwnKAvFZD/yG
Con5eJxdDd1Njo1wnTyPrRi6T46aeFtCBAaFGmUlQs8ecubw1aUedjyTdFvPbdrn
IPq5bGzsLR6cqJiX1Y3G6FpDzskwkKgPbF5tEM+4FeUgk/iieh6Dp9OdJ9+pzXY=
=QHav
-----END PGP SIGNATURE-----

Received on Thursday, 19 February 2015 02:17:38 UTC