Skip to content
Snippets Groups Projects

Block infinite loop by checking that class in range does not point to initial core concept

Merged Nicola Stoira requested to merge sphnc-421 into main

When testing SPO schema, there was an issue leading to an infinite loop when extracting the supporting concepts, i.e. when checking if the concepts are invoked by other concepts or not. For example:

spo#AllogeneicTransplantation --> spo#hasCancerTreatmentComplex [spo:CancerTreatmentComplex] --> spo#hasMedicalProcedure [sphn:MedicalProcedure] --> spo#AllogeneicTransplantation --> ...

spo#AllogeneicTransplantation is a child of sphn:MedicalProcedure, therefore when spo#hasMedicalProcedure it points back to the source concepts where we started the check. To avoid it we would need to stop the processing if at any level the source core concept is invoked. In the core we pass along the starting concept and in case the class in range of a property is matching that source concept, then we return False, because the concept is currently being checked.

Let me know what you think. This implies no changed for the SPHN only generated files.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading