-
Notifications
You must be signed in to change notification settings - Fork 0
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
Circular references #20
Comments
I think this can be fixed in practice by adding a consistency restriction: The length of a SequenceAnnotation must be strictly less than the length of the parent DC. There should already be the consistency restriction that the bioStart and bioEnd must be positions within the parent (e.g. sa.bioStart >=1 and sa.bioEnd <= sa.parent.length). If not, it needs adding. How does that sound? |
The problem with that solution is that bioStart and bioEnd are optional. |
OK... so if we have: dc1 -> sa -> dc2 Then: dc1.length > dc2.length. Although perhaps length is also optional for virtual DCs. Short of a full, recursive check for cycles, I don't see what else can be done for the sub-graph of virtual DCs. In any case, we need to state that cycles are not allowed. |
Yeah they're also optional. I think we should do the check, but have an option to disable the check. |
It is possible to create, serialize and deserialize a Collection that includes DnaComponents that have SequenceAnnotations whose subComponents refer back to the original DnaComponent.
The serializer doesn't complain or fail.
The problem is that circular references do not make sense for DNA. This could cause problems. E.g. you can imagine a web service crashing when someone gives it an SBOL file that has been crafted to contain circular references. Even though the deserializer wouldn't fail, the code interpreting the resulting data structure may not realize that it has to watch out for circular references and loop/recurse forever.
I'm adding this issue to libSBOLcore as well, since it should be a restriction in the data model which the XML serializer enforces.
The text was updated successfully, but these errors were encountered: