10.4.1 AS-Domain-Mapping.type-value 包的良构规则

CollectionValue

[1] 集合值的所有元素必须具有与其相应的CollectionType的elementType相符合的类型。

context CollectionValue inv:
    elements->forAll(e: Element | e.value.model.conformsTo(model.elementType))

DomainElement

没有额外的良构规则。

Element

没有额外的良构规则。

EnumValue

没有额外的良构规则。

ObjectValue

[1] 对象值中的所有绑定必须对应该对象分类符中定义的属性或关联。

context ObjectValue inv:
    history->forAll( snapshot | snapshot.bindings->forAll( b |
        self.model.allAttributes()->exists (attr | b.name = attr.name) or
        self.model.allAssociationEnds()->exists ( role | b.name = role.name) ) )

OclMessageValue

没有额外的良构规则。

PrimitiveValue

没有额外的良构规则。

SequenceTypeValue

没有额外的良构规则。

SetTypeValue

没有额外的良构规则。

StaticValue

没有额外的良构规则。

TupleValue

[1] 元组值中的元素类型必须与相应的元组成员的类型相符。

context TupleValue inv:
    elements->forAll( elem | let correspondingPart: Attribute =
        self.model.allAttributes()->any( part | part.name = elem.name ) in
            elem.value.model.conformsTo( correspondingPart.type ) )

UndefinedValue

没有额外的良构规则。

Value

没有额外的良构规则。

results matching ""

    No results matching ""