Skip to content

type/usage-typing rejects a connection usage typed by an allocation def #630

Description

@someshSandbox

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions