Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assert RDF term type restrictions as constraints #49

Open
wouterbeek opened this issue Jan 20, 2017 · 0 comments
Open

Assert RDF term type restrictions as constraints #49

wouterbeek opened this issue Jan 20, 2017 · 0 comments

Comments

@wouterbeek
Copy link
Contributor

When we perform Basic Graph Pattern (BGP) queries we can often deduce that instantiations must be of a specific type. E.g., in the following BGP there is no need to instantiate X to a literal:

rdf(a, b, X),
\+ rdf_is_literal(X),
rdf(X, d, e).

It would be great if we could assert such type restrictions as constraints:

{rdf_is_subject(X)},
rdf(a, b, X),
rdf(X, d, e).

The interaction between RDF constraints would allow senseless queries to fail early, for instance the following would immediately fail (because one constraint assumes X is a literal while another constraint states that X cannot be a literal):

{X < "2017"^^xsd:gYear},
{rdf_is_subject(X)},
rdf(X, p, o).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant