We encountered a type-error compilation issue in Syside v0.10.1 regarding attribute subsetting (:>) from the ISQ library within a constraint definition. The exact same model compiles successfully in both the official SysML v2 Jupyter evaluation environment (sysmlv2-release) and CATIA Magic Systems of Systems Architect (SysML v2 Community 2026x).
Environment
-
Extension Version: Syside v0.10.1 (VS Code)
-
OS: Windows
Error Message
Plaintext
Quantities::TensorQuantityValue does not conform to ScalarValues::NumericalValue syside(type-error)
AttributeUsage ElectricalEnergySystem::VoltageSafetyRule::nominal
Minimal Reproducible Example (MRE)
package ElectricalEnergySystem {
private import ISQ::;
private import ScalarValues::;
private import NumericalFunctions::*;
item def ElectricalEnergy {
attribute voltage :> ISQ::voltage;
}
constraint def VoltageSafetyRule {
in item energy : ElectricalEnergy;
// The error triggers here or inside the expression below
in attribute nominal : Real :> ISQ::voltage;
in attribute allowableVariation : Real;
abs(energy.voltage - nominal) <= nominal * allowableVariation
}
port def EnergyPort {
out item electricalEnergy : ElectricalEnergy;
attribute nominalVoltage :> ISQ::voltage;
attribute allowableVoltageVariation : Real default 0.1;
ref assert constraint : VoltageSafetyRule {
in energy = electricalEnergy;
in nominal = nominalVoltage;
in allowableVariation = allowableVoltageVariation;
}
}
}
Issue Description
In VoltageSafetyRule, the attribute nominal is declared as : Real :> ISQ::voltage;.
-
energy.voltageresolves correctly as a quantity value. -
However, when subtracting
nominalfromenergy.voltageinside theabs()function, Syside’s type checker flags a strict type mismatch, stating thatQuantities::TensorQuantityValuedoes not conform toScalarValues::NumericalValue.
It seems that Syside strictly enforces Real (ScalarValues) and treats it as incompatible with the dimensioned quantity type inherited via :> ISQ::voltage, whereas the official reference implementation allows this implicit conversion or resolves the subsetting more flexibly.
Could you please look into whether this type-checking behavior can be aligned with the standard SysML v2 reference execution toolset?