[3.0, 3.1] Make qualifier constraint implementation specific#386
Open
empwilli wants to merge 1 commit intoaas-core-works:mainfrom
Open
[3.0, 3.1] Make qualifier constraint implementation specific#386empwilli wants to merge 1 commit intoaas-core-works:mainfrom
empwilli wants to merge 1 commit intoaas-core-works:mainfrom
Conversation
The current implementation of constraint AAS-129 is incomplete: it only checks the constraint for the direct children of Submodel, whereas the constraint requires that its condition is checked for all SubmodelElements in the whole Submodel recursively. This, however, can currently not be expressed in the meta model description. Hence, we extract the constraint into a separate method and annotate it as implementation specific.
mristin
requested changes
Jan 14, 2026
| return True | ||
|
|
||
|
|
||
| @verification |
Contributor
There was a problem hiding this comment.
Add a transpilable verification function so that we have the hard parts dealt with outside of the snippet:
not (self.submodel_elements is not None)
or (
not (self.kind_or_default() != Modelling_kind.Template)
or (
all(
not (submodel_element.qualifiers is not None)
or all(
qualifier.kind_or_default() != Qualifier_kind.Template_qualifier
for qualifier in submodel_element.qualifiers
)
for submodel_element in self.submodel_elements
)
)
)
Add a comment that the two methods must be in sync -- include an assertion in tests/ that the code is exactly the same for the two methods (one for submodel element list and the other for submodel element collection).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The current implementation of constraint AAS-129 is incomplete: it only checks
the constraint for the direct children of Submodel, whereas the constraint
requires that its condition is checked for all SubmodelElements in the whole
Submodel recursively. This, however, can currently not be expressed in the meta
model description. Hence, we extract the constraint into a separate method and
annotate it as implementation specific.
This addresses #374.