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

Generate SPARQL for nodegroups with cycles #684

Closed
cuddihyge opened this issue Apr 5, 2022 · 7 comments
Closed

Generate SPARQL for nodegroups with cycles #684

cuddihyge opened this issue Apr 5, 2022 · 7 comments
Assignees
Labels

Comments

@cuddihyge
Copy link
Contributor

No description provided.

@cuddihyge
Copy link
Contributor Author

@glguy No real fault of yours, but the fact that the query generator is now non-deterministic sent me on a couple-days wild goose chase. It turns out the infamous LM string query arbitrarily returned in 0.5 seconds or 45 seconds depending upon which random route the query generator happened to choose. I added a sort by ID as a tie-breaker in NodeGroup.getNextHeadNode() just to make it (more?) deterministic.

I'm hoping to experiment with the Jena query optimizer now, so I have it arbitrarily sorting in the direction that gives me the long-running version.

@cuddihyge
Copy link
Contributor Author

@glguy reports that simpler cycles with MINUS are implemented. This might be a good stopping point.
@cuddihyge and others need to test

@cuddihyge
Copy link
Contributor Author

cuddihyge commented Jun 16, 2022

@glguy is working on a "final" set of tests
...and put a nodegroup with cycles into a report

@cuddihyge
Copy link
Contributor Author

cuddihyge commented Jun 20, 2022

I did a merge and test and found this example that doesn't seem to work.
The MINUS is not generated.
image

I believe it should be MINUS { ?Link chain:nextLink ?Link_1 . }

@cuddihyge
Copy link
Contributor Author

Or more likely, this one is ambiguous. ??

@cuddihyge
Copy link
Contributor Author

@glguy
The sparql generator gets confused inside generateSparqlSubgraphClausesNodeItem().

  • It is processing ?Link_0's links
  • It recurses into do ?Link_1's links
  • It sees ?Link_1's incoming "minus nextlink" but it is only set up to presume a tree, so it only looks for "reverse minus nextlink" and ignores the forward "minus"
  • If it were not presuming a tree, it could process the link properly and stop because ?Link is already done

But will this actually work?

  • will ?Link always be the head node?
  • is it arbitrary luck or actually enforced that the algorithm went to ?Link_0 first?
  • if it had done ?Link_1 first, how would it have known to stop, and not put ?Link_0 inside the MINUS {} too?
  • is there any real hint that the minus clause is only supposed to contain ?Link_1

@cuddihyge
Copy link
Contributor Author

Storing these excellent examples from @galguy here in the issue:
This example looks for components that are impacted requirements that shouldn’t be governing their behavior

image

Extract correctly linked test results.

image

Finding linked requirements from the same baseline

image

Looking for bad cases of someone reviewing their own requirements

image

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

No branches or pull requests

3 participants