Skip to content

Commit a25c643

Browse files
authored
Update test data to aas-core-meta bd56058 (#520)
We update the development requirements to and re-record the test data for [aas-core-meta bd56058]. Notably, we propagate the fix for AASd-109 in V3.0 where we change the invariant such that it checks for consistency among properties even when a ``value`` property is missing. This affects only the re-recording of the test data corresponding to V3.0 meta-model. [aas-core-meta bd56058]: aas-core-works/aas-core-meta@bd56058
1 parent e22ccae commit a25c643

File tree

9 files changed

+91
-47
lines changed

9 files changed

+91
-47
lines changed

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"twine",
5353
"jsonschema==3.2.0",
5454
"xmlschema==3.3.1",
55-
"aas-core-meta@git+https://github.com/aas-core-works/aas-core-meta@31d6afd#egg=aas-core-meta",
55+
"aas-core-meta@git+https://github.com/aas-core-works/aas-core-meta@bd56058#egg=aas-core-meta",
5656
"ssort==0.12.3",
5757
]
5858
},

test_data/cpp/test_main/aas_core_meta.v3/expected_output/verification.cpp

+9-4
Original file line numberDiff line numberDiff line change
@@ -11551,7 +11551,7 @@ void OfSubmodelElementList::Execute() {
1155111551
case 15: {
1155211552
if (
1155311553
!((
11554-
(instance_->value().has_value())
11554+
(instance_->type_value_list_element().has_value())
1155511555
&& (
1155611556
(
1155711557
instance_->type_value_list_element() == types::AasSubmodelElements::kProperty
@@ -11561,9 +11561,14 @@ void OfSubmodelElementList::Execute() {
1156111561
))
1156211562
|| ((
1156311563
(instance_->value_type_list_element().has_value())
11564-
&& PropertiesOrRangesHaveValueType(
11565-
(*(instance_->value())),
11566-
(*(instance_->value_type_list_element()))
11564+
&& (
11565+
(
11566+
(!(instance_->value().has_value()))
11567+
|| PropertiesOrRangesHaveValueType(
11568+
instance_->value(),
11569+
(*(instance_->value_type_list_element()))
11570+
)
11571+
)
1156711572
)
1156811573
))
1156911574
) {

test_data/csharp/test_main/aas_core_meta.v3/expected_output/verification.cs

+5-2
Original file line numberDiff line numberDiff line change
@@ -4286,15 +4286,18 @@ Aas.ISubmodelElementList that
42864286

42874287
if (!(
42884288
!(
4289-
(that.Value != null)
4289+
(that.TypeValueListElement != null)
42904290
&& (
42914291
that.TypeValueListElement == AasSubmodelElements.Property
42924292
|| that.TypeValueListElement == AasSubmodelElements.Range
42934293
)
42944294
)
42954295
|| (
42964296
(that.ValueTypeListElement != null)
4297-
&& Verification.PropertiesOrRangesHaveValueType(that.Value, that.ValueTypeListElement)
4297+
&& (
4298+
(that.Value == null)
4299+
|| Verification.PropertiesOrRangesHaveValueType(that.Value, that.ValueTypeListElement)
4300+
)
42984301
)))
42994302
{
43004303
yield return new Reporting.Error(

test_data/golang/test_main/aas_core_meta.v3/expected_output/verification/verification.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -5250,14 +5250,15 @@ func VerifySubmodelElementList(
52505250
}
52515251

52525252
if !(
5253-
!((that.Value() != nil) &&
5253+
!((that.TypeValueListElement() != nil) &&
52545254
(that.TypeValueListElement() == aastypes.AASSubmodelElementsProperty ||
52555255
that.TypeValueListElement() == aastypes.AASSubmodelElementsRange)) ||
52565256
((that.ValueTypeListElement() != nil) &&
5257+
((that.Value() == nil) ||
52575258
PropertiesOrRangesHaveValueType(
52585259
that.Value(),
52595260
*that.ValueTypeListElement(),
5260-
))) {
5261+
)))) {
52615262
abort = onError(
52625263
newVerificationError(
52635264
"Constraint AASd-109: If type value list element is equal to " +

test_data/intermediate/real_meta_models/aas_core_meta.v3/expected_symbol_table.txt

+24-13
Original file line numberDiff line numberDiff line change
@@ -9841,7 +9841,7 @@ SymbolTable(
98419841
instance=Name(
98429842
identifier='self',
98439843
original_node=...),
9844-
name='value',
9844+
name='type_value_list_element',
98459845
original_node=...),
98469846
original_node=...),
98479847
Or(
@@ -9888,20 +9888,31 @@ SymbolTable(
98889888
name='value_type_list_element',
98899889
original_node=...),
98909890
original_node=...),
9891-
FunctionCall(
9892-
name='properties_or_ranges_have_value_type',
9893-
args=[
9894-
Member(
9895-
instance=Name(
9896-
identifier='self',
9891+
Or(
9892+
values=[
9893+
IsNone(
9894+
value=Member(
9895+
instance=Name(
9896+
identifier='self',
9897+
original_node=...),
9898+
name='value',
98979899
original_node=...),
9898-
name='value',
98999900
original_node=...),
9900-
Member(
9901-
instance=Name(
9902-
identifier='self',
9903-
original_node=...),
9904-
name='value_type_list_element',
9901+
FunctionCall(
9902+
name='properties_or_ranges_have_value_type',
9903+
args=[
9904+
Member(
9905+
instance=Name(
9906+
identifier='self',
9907+
original_node=...),
9908+
name='value',
9909+
original_node=...),
9910+
Member(
9911+
instance=Name(
9912+
identifier='self',
9913+
original_node=...),
9914+
name='value_type_list_element',
9915+
original_node=...)],
99059916
original_node=...)],
99069917
original_node=...)],
99079918
original_node=...),

test_data/java/test_main/aas_core_meta.v3/expected_output/verification/Verification.java

+7-4
Original file line numberDiff line numberDiff line change
@@ -3795,17 +3795,20 @@ public Stream<Reporting.Error> transformSubmodelElementList(
37953795

37963796
if (!(
37973797
!(
3798-
(that.getValue().isPresent())
3798+
(that.getTypeValueListElement() != null)
37993799
&& (
38003800
that.getTypeValueListElement() == AasSubmodelElements.PROPERTY
38013801
|| that.getTypeValueListElement() == AasSubmodelElements.RANGE
38023802
)
38033803
)
38043804
|| (
38053805
(that.getValueTypeListElement().isPresent())
3806-
&& propertiesOrRangesHaveValueType(
3807-
that.getValue().orElse(null),
3808-
that.getValueTypeListElement().orElse(null))
3806+
&& (
3807+
(!that.getValue().isPresent())
3808+
|| propertiesOrRangesHaveValueType(
3809+
that.getValue().orElse(null),
3810+
that.getValueTypeListElement().orElse(null))
3811+
)
38093812
))) {
38103813
errorStream = Stream.<Reporting.Error>concat(errorStream,
38113814
Stream.of(new Reporting.Error(

test_data/parse/real_meta_models/aas_core_meta.v3/expected_symbol_table.txt

+24-13
Original file line numberDiff line numberDiff line change
@@ -4470,7 +4470,7 @@ UnverifiedSymbolTable(
44704470
instance=Name(
44714471
identifier='self',
44724472
original_node=...),
4473-
name='value',
4473+
name='type_value_list_element',
44744474
original_node=...),
44754475
original_node=...),
44764476
Or(
@@ -4517,20 +4517,31 @@ UnverifiedSymbolTable(
45174517
name='value_type_list_element',
45184518
original_node=...),
45194519
original_node=...),
4520-
FunctionCall(
4521-
name='properties_or_ranges_have_value_type',
4522-
args=[
4523-
Member(
4524-
instance=Name(
4525-
identifier='self',
4520+
Or(
4521+
values=[
4522+
IsNone(
4523+
value=Member(
4524+
instance=Name(
4525+
identifier='self',
4526+
original_node=...),
4527+
name='value',
45264528
original_node=...),
4527-
name='value',
45284529
original_node=...),
4529-
Member(
4530-
instance=Name(
4531-
identifier='self',
4532-
original_node=...),
4533-
name='value_type_list_element',
4530+
FunctionCall(
4531+
name='properties_or_ranges_have_value_type',
4532+
args=[
4533+
Member(
4534+
instance=Name(
4535+
identifier='self',
4536+
original_node=...),
4537+
name='value',
4538+
original_node=...),
4539+
Member(
4540+
instance=Name(
4541+
identifier='self',
4542+
original_node=...),
4543+
name='value_type_list_element',
4544+
original_node=...)],
45344545
original_node=...)],
45354546
original_node=...)],
45364547
original_node=...),

test_data/python/test_main/aas_core_meta.v3/expected_output/verification.py

+9-4
Original file line numberDiff line numberDiff line change
@@ -3426,7 +3426,7 @@ def transform_submodel_element_list(
34263426
if not (
34273427
not (
34283428
(
3429-
(that.value is not None)
3429+
(that.type_value_list_element is not None)
34303430
and (
34313431
(
34323432
that.type_value_list_element == aas_types.AASSubmodelElements.PROPERTY
@@ -3438,9 +3438,14 @@ def transform_submodel_element_list(
34383438
or (
34393439
(
34403440
(that.value_type_list_element is not None)
3441-
and properties_or_ranges_have_value_type(
3442-
that.value,
3443-
that.value_type_list_element
3441+
and (
3442+
(
3443+
(that.value is None)
3444+
or properties_or_ranges_have_value_type(
3445+
that.value,
3446+
that.value_type_list_element
3447+
)
3448+
)
34443449
)
34453450
)
34463451
)

test_data/typescript/test_main/aas_core_meta.v3/expected_output/verification.ts

+9-4
Original file line numberDiff line numberDiff line change
@@ -3988,7 +3988,7 @@ class Verifier
39883988
if (!(
39893989
!(
39903990
(
3991-
(that.value !== null)
3991+
(that.typeValueListElement !== null)
39923992
&& (
39933993
(
39943994
that.typeValueListElement == AasTypes.AasSubmodelElements.Property
@@ -4000,9 +4000,14 @@ class Verifier
40004000
|| (
40014001
(
40024002
(that.valueTypeListElement !== null)
4003-
&& propertiesOrRangesHaveValueType(
4004-
that.value,
4005-
that.valueTypeListElement
4003+
&& (
4004+
(
4005+
(that.value === null)
4006+
|| propertiesOrRangesHaveValueType(
4007+
that.value,
4008+
that.valueTypeListElement
4009+
)
4010+
)
40064011
)
40074012
)
40084013
)

0 commit comments

Comments
 (0)