association-binary-specialization

Available in: KerML, SysML

This checks that nary associations do not specialize Links::BinaryLink.

Specification

If an Association has more than two association_ends, then it must not specialize, directly or indirectly, the Association BinaryLink from the Kernel Semantic Library.

Example

This can be triggered by a nary association specializing a binary association as Links::BinaryLink specialization is inserted automatically:

connection def A { end a; end b; }
connection def C :> A {
    end a;
    end b;
    end c; // error
}

Or by specializing Links::BinaryLink explicitly:

connection def D :> Links::BinaryLink {
    end a;
    end b;
    end c; // error
}

Fix this by removing extraneous end features:

connection def A { end a; end b; }
connection def C :> A { end a; end b; } // ok
connection def D :> Links::BinaryLink { end a; end b; } // ok

Or specializing other nary associations:

connection def A { end a; end b; end c; }
connection def C :> A { end a; end b; end c; } // ok