aas-specs
aas-specs copied to clipboard
Limit recursion depth for SMEs
Is your feature request related to a problem? Please describe. There should be a decision on a maximal recursion depth of SubmodelElements. Some SubmodelElements may contain arbitrary other SubmodelElements - namely:
- SubmodelElementList
- SubmodelElementCollection
- Entity
- AnnotatedRelationshipElement
This prevents overflow errors and should also serve as a guideline for modeling.
Describe the solution you'd like Define a maximal recursion depth in the spec. Suggestion: 100.
Describe alternatives you've considered Leave everything as is. There probably won't be any problems until someone has a really complex scenario where their stack crashes at runtime.
@arnoweiss even the exact 100 as limit could still cause problems. https://github.com/eclipse-basyx/basyx-java-server-sdk/issues/158
Spoke to some colleagues and they used 32 in similar specifications.
After all, it's up to the workstream AAS if this should be specified at all (I think it's relevant for interop --> not implementation-specific --> relevant for spec) and then decide on a reasonable number.
You are probably right. To restrict recursion would not be backward-compatible but we could give a recommendation. I am happy to learn which depth might be appropriate. We should also have a look at existing Submodel Templates and which depth they used so far.
TF AAS Part 1 2024-06-12 Decision Proposal: Add the following recommendation: A minimum recursion depth of 32 for Container-Elements should be supported. These are the SubmodelElements affected: SubmodelElementList SubmodelElementCollection Entity AnnotatedRelationshipElement Operation
For term "Container-Element" see also #420
Workstream AAS Specs 2024-06-13 accepted to add recommendation A minimum recursion depth of 32 for Container-Elements should be supported. Additionally add note: This means for certification a maximum of 32 recursion test cases should be tested.