What type of issue is this?
Prerequisites
Description
Several SysML2.NET.PIM.DTO types deviate from the normative Systems Modeling API and
Services PIM UML model (OMG document ptc-25-02-29). Two of the four make parts of the API
model unrepresentable, so a PSM mapping cannot round-trip. Each deviation below is confirmed
by both the UML model and the §7.1 prose.
| # |
Member |
Normative PIM |
Current |
Effect |
| 1 |
PrimitiveConstraint |
generalizes Constraint |
no base type |
Query.where is typed Constraint, so no query condition with a leaf is assignable. Only CompositeConstraint specializes Constraint today. §7.1.4: "PrimitiveConstraint is a concrete subtype of Constraint". |
| 2 |
Query.project |
project : Project [1..1] |
absent |
The owning project of a Query cannot be represented; callers must thread it in out-of-band. |
| 3 |
Commit.previousCommit |
previousCommits : Commit [0..*] |
Guid PreviousCommit |
A merge commit cannot record more than one predecessor. Deviates on both multiplicity and name. |
| 4 |
CompositeConstraint.constraint |
Constraint [2..*] (explicit lower=2) |
List<Constraint>, no lower bound |
A composite with 0 or 1 operands is accepted. §7.1.4: "composed of two or more Constraints". |
Item 1 is the most severe: QueryService::createQuery and Query.where cannot carry any
real filter.
Members present in the normative model but absent from the PIM DTOs:
Commit.change : DataVersion [1..*] and Commit.versionedData : DataVersion [0..*]
(change is mandatory, and is an input of createCommit)
Project.branches : Branch [1..*], Project.tags, Project.commitReferences
(§7.1.2: "A Project can have 1 or more branches")
Query.orderBy : String [0..*]
DataVersion.project : Project [1..1]
And PrimitiveConstraint.value is [1..*] in the model; the SDK's List<string> Value = []
carries no lower bound.
Steps to Reproduce
PIM/DTO/PrimitiveConstraint.cs declares public class PrimitiveConstraint with no base,
while PIM/DTO/CompositeConstraint.cs is : Constraint. Assigning a PrimitiveConstraint
to Query.Where does not compile.
PIM/DTO/Query.cs — no Project member, no OrderBy member.
PIM/DTO/Commit.cs — PreviousCommit is Guid; no Change or VersionedData members.
PIM/DTO/Project.cs — no Branches, Tags or CommitReferences members.
System Configuration
- SysML2.NET version: 0.24.1
- Environment (Operating system, version and so on): Windows 11, any
- .NET Framework version: net10.0 / netstandard2.1
- Additional information: found while implementing the REST/HTTP PSM mapping in
mycelium-fabric, where items 1 and 2 are currently worked around by answering 501 for
primitive constraints and threading the project id in from the route.
What type of issue is this?
Prerequisites
Description
Several
SysML2.NET.PIM.DTOtypes deviate from the normative Systems Modeling API andServices PIM UML model (OMG document
ptc-25-02-29). Two of the four make parts of the APImodel unrepresentable, so a PSM mapping cannot round-trip. Each deviation below is confirmed
by both the UML model and the §7.1 prose.
PrimitiveConstraintConstraintQuery.whereis typedConstraint, so no query condition with a leaf is assignable. OnlyCompositeConstraintspecializesConstrainttoday. §7.1.4: "PrimitiveConstraint is a concrete subtype of Constraint".Query.projectproject : Project [1..1]Querycannot be represented; callers must thread it in out-of-band.Commit.previousCommitpreviousCommits : Commit [0..*]Guid PreviousCommitCompositeConstraint.constraintConstraint [2..*](explicitlower=2)List<Constraint>, no lower boundItem 1 is the most severe:
QueryService::createQueryandQuery.wherecannot carry anyreal filter.
Members present in the normative model but absent from the PIM DTOs:
Commit.change : DataVersion [1..*]andCommit.versionedData : DataVersion [0..*](
changeis mandatory, and is an input ofcreateCommit)Project.branches : Branch [1..*],Project.tags,Project.commitReferences(§7.1.2: "A Project can have 1 or more branches")
Query.orderBy : String [0..*]DataVersion.project : Project [1..1]And
PrimitiveConstraint.valueis[1..*]in the model; the SDK'sList<string> Value = []carries no lower bound.
Steps to Reproduce
PIM/DTO/PrimitiveConstraint.csdeclarespublic class PrimitiveConstraintwith no base,while
PIM/DTO/CompositeConstraint.csis: Constraint. Assigning aPrimitiveConstraintto
Query.Wheredoes not compile.PIM/DTO/Query.cs— noProjectmember, noOrderBymember.PIM/DTO/Commit.cs—PreviousCommitisGuid; noChangeorVersionedDatamembers.PIM/DTO/Project.cs— noBranches,TagsorCommitReferencesmembers.System Configuration
mycelium-fabric, where items 1 and 2 are currently worked around by answering
501forprimitive constraints and threading the project id in from the route.