-
Notifications
You must be signed in to change notification settings - Fork 8
Versions of The Abstract Syntax
Warning
This is a basis for discussion, and does not represent the current baseline.
In a pseudo-BNF where:
- Terminals begin with an upper-case character.
- Exclusions are allowed (using
≠
or∉
).
Regular:
graph ::= triple*
triple ::= namedNode IRI object
namedNode ::= IRI | BlankNode
object ::= namedNode | Literal
Generalized (non-normative; may be used to represent results of entailment):
graph ::= triple*
triple ::= node node node
node ::= IRI | BlankNode | Literal
This generalized abstract syntax provides the space for entailed facts, such as literals as subjects with its datatype as an rdf:type
, and for inverses of relationships turning literal objects to subjects.
Agreed baseline (allows ill-formed; normative but incomplete?):
graph ::= triple*
triple ::= namedOrTriple IRI object
namedOrTriple ::= namedNode | triple
namedNode ::= IRI | BlankNode
object ::= namedOrTriple | Literal
Allows triples as subjects and objects (called triple terms).
Well-formed (normative):
graph ::= triple*
triple ::= ( namedNode regularPredicate object ) |
( namedNode rdf:reifies triple )
regularPredicate ::= IRI ≠ rdf:reifies
namedNode ::= IRI | BlankNode
object ::= namedNode | Literal
Only allows triples as objects of rdf:reifies
.
Generalized (non-normative; may be used to represent results of entailment):
graph ::= triple*
triple ::= node node node
node ::= IRI | BlankNode | Literal | triple
Note
- Opinion (held by @niklasl): Triple terms adds complexity, due to the now recursive definition of a triple.
- Motivation: Only add as little as is necessary, since taking away what is added is a breaking change.
- Claim: Triples as objects are deemed necessary to have a fixed point reference to the relationship it denotes.
- Claim: No use cases require descriptions using triples as subjects.
- Claim: The triple term denotes the abstract logical relationship, not any particular concretization thereof. Apart from problems of what the relationship itself is, using this practically leads to the seminal example problem.
- Claim: The abstract relationship does have properties (a type and its constituent subject, predicate and object). An RDF semantics should be defined for that (entailing four triples). But just as with the RDF entailment rules for literals, this can be represented in the generalized abstract syntax.
- Conclusion: Only add triples as objects.
Concrete alternative:
graph ::= triple*
triple ::= namedNode IRI object
namedNode ::= IRI | BlankNode
object ::= namedNode | Literal | triple
Allows triples as objects (called triple terms).
The generalized abstract syntax provides the space for entailed facts, such as inverses of rdf:reifies
.
Warning
These may conflict with irregular uses in the wild.
Well-formed including type-well-formed (non-normative):
graph ::= triple*
triple ::= ( namedNode regularPredicate object ) |
( namedNode rdf:reifies triple ) |
( namedNode rdf:type namedNode )
regularPredicate ::= IRI ∉ {rdf:reifies, rdf:type}
namedNode ::= IRI | BlankNode
object ::= namedNode | Literal
Prohibits literals as types.
Well-formed including type-well-formed (non-normative) and list-well-formed (non-normative):
graph ::= triple*
triple ::= ( namedNode regularPredicate object ) |
( namedNode rdf:reifies triple ) |
( namedNode rdf:type namedNode ) |
( BlankNode rdf:first object ) |
( BlankNode rdf:rest object )
regularPredicate ::= IRI ∉ {rdf:reifies, rdf:type, rdf:first, rdf:rest}
namedNode ::= IRI | BlankNode
object ::= namedNode | Literal
Also prohibits RDF collections with named cons-pairs. Does not cover all rules for list-well-formed (that would require an additional functional restriction on those predicates).
Summary of the RDF-star WG wiki.
- Editor's guide
- Meeting minutes
- RDF terminology
- Scribes
- Use Cases collection
- RDF-star syntax and semantics:
- RDF-star "alternative baseline" (VOTED 2024.11.14 - frozen)
- RDF-star "liberal baseline" (current working version)
- RDF-star "minimal baseline" (VOTED 2024.07.18 - frozen - superseded by vote 2024.11.14 - deprecated)
- RDF-star "working baseline" (working version - deprecated)
- RDF‐star baseline examples
- RDF-star and LPGs
- Extending the baseline with "asserted" stuff
- systems and acronyms
- Task forces
- Text Direction considerations
- Text Direction Proposal
- Triple‐Edge-subgroup-proposals