Version: sysml v0.9.0 (commit ee54ea0), darwin-arm64 release binary
A connection usage typed by an allocation def is rejected with type/usage-typing, but an allocation definition is a connection definition.
Repro
package P {
part def A;
part def B;
allocation def Al { end a : A; end b : B; }
connection c : Al[*];
}
$ sysml -validate -debug alloc.sysml
alloc.sysml:5:5: error: A connection must be typed by connection definitions. [type/usage-typing]
connection c : Al[*];
^~~~~~~~~~~~~~~~~~~~~
sysml: alloc.sysml did not analyse cleanly; no check was made
The same thing happens when the allocation def also specializes Allocations::Allocation, or a user connection def.
Expected
No error. In the SysML v2 abstract syntax, AllocationDefinition specializes ConnectionDefinition, and the normative library says the same: Systems Library/Allocations.sysml, allocation def Allocation :> BinaryConnection. An allocation def therefore satisfies the typing requirement of a ConnectionUsage.
Because the error is in the type tier, it also hides every later-tier diagnostic for the whole model.
Version:
sysml v0.9.0(commitee54ea0), darwin-arm64 release binaryA
connectionusage typed by anallocation defis rejected withtype/usage-typing, but an allocation definition is a connection definition.Repro
The same thing happens when the allocation def also specializes
Allocations::Allocation, or a userconnection def.Expected
No error. In the SysML v2 abstract syntax,
AllocationDefinitionspecializesConnectionDefinition, and the normative library says the same:Systems Library/Allocations.sysml,allocation def Allocation :> BinaryConnection. An allocation def therefore satisfies the typing requirement of aConnectionUsage.Because the error is in the
typetier, it also hides every later-tier diagnostic for the whole model.