assignment-action-usage-referent-is-time-varying

Available in: SysML

This checks that assignment actions are only ever used to assign to time-varying usages, i.e. variable (mutable) usages.

Specification

The feature_target of the referent of an AssignmentActionUsage must be able to have time-varying values.

Usages are time-varying if and only if all are true:

  • It has an owning_type that specializes Occurrences::Occurrence.

  • It is not a portion.

  • It does not specialize Links::SelfLink or Occurrences::HappensLink.

  • If is_composite = true, it does not specialize Actions::Action.

Example

attribute x : ScalarValues::Integer;
action def A {
    assign x := 3; // error: An assignment action referent must be able to have time-varying values
}

Use only time-varying usages:

action def A {
    attribute x : ScalarValues::Integer;
    assign x := 3; // ok
}

All validation rules