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

Check parse . serialize == id for NTriples, Turtle and RDF/XML #68

Open
robstewart57 opened this issue Jun 2, 2019 · 0 comments
Open

Comments

@robstewart57
Copy link
Owner

robstewart57 commented Jun 2, 2019

Discussion moved from #67 (comment) .

serialize . parse == id

Something like this would be a good property check for all three Ntriples, Turtle and RDF/XML formats.

Ideally we'd have:

parse . serialize == id

Since we use the generator instances we already have for RDF graphs in rdf4h. i.e.

  1. Use the Arbitrary instances in testsuite/tests/Data/RDF/PropertyTests.hs to generate RDF graphs.

  2. Serialise the graph to NTriples, Turle and RDF/XML formats.

  3. Parse that data back into RDF graphs in Haskell.

Check the graphs are equivalent.

As you say @wismill , it comes down the how equivalence check is performed. We do have isIsomorphic and isGraphIsomorphic in https://github.com/robstewart57/rdf4h/blob/master/src/Data/RDF/Query.hs .

The problem we have with property based testing of serialize . parse == id, is that we'd need predefined NTriples, Turtle and RDF/XML inputs to parse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant