Join the Discussion

Recent site activity

Association Has Asymmetric Subsetting

Description

<put the description here>

Reference

<put the reference here>

QVTr

top relation AssociationHasAsymmetricSubsetting {

    checkonly domain source _subsettingProperty:Property {
        otherEnd = _subsettingOpposite:Property {},
        subsettedProperty = _subsettedProperty:Property {
            otherEnd = _subsettedOpposite:Property {}
        }
    };
    
    enforce domain target _c:Category {name = 'Semantic Anti-Patterns',
        pattern = _p:Pattern {name = 'AssociationHasAsymmetricSubsetting',
            rootBinding =  _rb1:RoleBinding {role = 'subsettingProperty', element = _subsettingProperty,
            childBinding = _rb2:RoleBinding {role = 'subsettedProperty', element = _subsettedProperty,
            childBinding = _rb3:RoleBinding {role = 'subsettingOpposite', element = _subsettingOpposite,
            childBinding = _rb4:RoleBinding {role = 'subsettedOpposite', element = _subsettedOpposite
    }}}}}};
    
    when {
        _subsettingOpposite.subsettedProperty->excludes(_subsettedOpposite); 
        _subsettingOpposite.redefinedProperty->excludes(_subsettedOpposite);
    }
}

Examples

<put text or diagrams showing the anti-pattern>
Comments