From 10d4ddebfd84cd9545a7ce4360c3af8d44e3af41 Mon Sep 17 00:00:00 2001 From: atheate Date: Mon, 10 Aug 2026 15:51:14 +0200 Subject: [PATCH 1/5] Validation for 5-State-based Behavior-1a --- .../RuleProcessor.CollectionProcessing.cs | 11 + .../HandleBarHelpers/RuleProcessor.cs | 106 +- .../01-Parts Tree/1a-Parts Tree.sysml | 1 + .../2a-Parts Interconnection.sysml | 1 + .../5-State-based Behavior-1a.sysml | 158 +++ ...ET.Serializer.TextualNotation.Tests.csproj | 6 + .../5-State-based Behavior-1a.sysmlx | 1028 +++++++++++++++++ .../TextualNotationValidationTestFixture.cs | 1 + ...AcceptActionUsageTextualNotationBuilder.cs | 4 +- .../ActionUsageTextualNotationBuilder.cs | 2 +- ...gnmentActionUsageTextualNotationBuilder.cs | 4 +- ...erformActionUsageTextualNotationBuilder.cs | 4 +- .../SendActionUsageTextualNotationBuilder.cs | 4 +- .../TransitionUsageTextualNotationBuilder.cs | 6 +- .../TypeTextualNotationBuilder.cs | 4 +- .../Writers/FeatureTextualNotationBuilder.cs | 10 +- .../Writers/NameResolutionCache.cs | 196 +++- .../ReferenceUsageTextualNotationBuilder.cs | 19 +- .../SendActionUsageTextualNotationBuilder.cs | 6 +- .../Writers/SharedTextualNotationBuilder.cs | 11 +- .../TextualNotationValidationExtensions.cs | 57 +- .../Writers/TypeTextualNotationBuilder.cs | 3 +- 22 files changed, 1610 insertions(+), 32 deletions(-) create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Expected/05-State-based Behavior/5-State-based Behavior-1a.sysml create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Validation/05-State-based Behavior/5-State-based Behavior-1a.sysmlx diff --git a/SysML2.NET.CodeGenerator/HandleBarHelpers/RuleProcessor.CollectionProcessing.cs b/SysML2.NET.CodeGenerator/HandleBarHelpers/RuleProcessor.CollectionProcessing.cs index f90aaf35..89f829b7 100644 --- a/SysML2.NET.CodeGenerator/HandleBarHelpers/RuleProcessor.CollectionProcessing.cs +++ b/SysML2.NET.CodeGenerator/HandleBarHelpers/RuleProcessor.CollectionProcessing.cs @@ -134,6 +134,17 @@ private void EmitCollectionNonTerminalLoop(EncodedTextWriter writer, IClass umlC } } + // A guarded body-item rule (IsGuardedBodyItemRule) admits elements that have no + // notation, and its per-item builder refuses to consume them WITHOUT advancing the + // cursor. The loop must therefore test the same predicate as the enclosing entry + // guard: a bare non-null test spins forever on the first refused element. + if (IsGuardedBodyItemRule(nonTerminalElement.Name)) + { + var guardVariableName = $"{targetProperty.Name.LowerCaseFirstLetter()}BodyItem"; + + whileCondition = $"{cursorVariableName}.Current is SysML2.NET.Core.POCO.Root.Elements.IRelationship {guardVariableName} && {guardVariableName}.IsValidFor{nonTerminalElement.Name}(writerContext)"; + } + if (perItemCall != null) { writer.WriteSafeString($"while ({whileCondition}){Environment.NewLine}"); diff --git a/SysML2.NET.CodeGenerator/HandleBarHelpers/RuleProcessor.cs b/SysML2.NET.CodeGenerator/HandleBarHelpers/RuleProcessor.cs index 5a61fe88..59b6654a 100644 --- a/SysML2.NET.CodeGenerator/HandleBarHelpers/RuleProcessor.cs +++ b/SysML2.NET.CodeGenerator/HandleBarHelpers/RuleProcessor.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.CodeGenerator.HandleBarHelpers using SysML2.NET.CodeGenerator.Grammar.Model; using uml4net.Extensions; + using uml4net.SimpleClassifiers; using uml4net.StructuredClassifiers; /// @@ -266,7 +267,51 @@ private static string ResolveAssignmentTargetTypeName(AssignmentElement assignme } var targetClass = RuleQueryUtilities.FindClass(umlClass.Cache, typeTarget); - return targetClass?.QueryFullyQualifiedTypeName(); + var targetTypeName = targetClass?.QueryFullyQualifiedTypeName(); + + if (targetTypeName == null) + { + return null; + } + + // A rule may PIN a property to a constant through a non-parsing assignment, e.g. + // `GuardExpressionMember : TransitionFeatureMembership = 'if' { kind = 'guard' } …`. + // Sibling rules then share one target type and are distinguishable ONLY by that constant, + // so it has to be part of the guard or the first sibling swallows them all. + var pinnedConstantPattern = ResolvePinnedConstantPattern(referencedRule, targetClass); + + return pinnedConstantPattern == null ? targetTypeName : $"{targetTypeName} {pinnedConstantPattern}"; + } + + /// + /// Builds a C# property pattern for a constant a rule pins via a non-parsing assignment + /// ({ kind = 'guard' }), used to tell apart sibling rules that share a target type. + /// + /// The rule whose pinned constant is sought. + /// The rule's target . + /// The property pattern, or when nothing enum-typed is pinned. + private static string ResolvePinnedConstantPattern(TextualNotationRule referencedRule, IClass targetClass) + { + var pinnedAssignment = referencedRule.Alternatives + .SelectMany(alternative => alternative.Elements) + .OfType() + .FirstOrDefault(assignment => assignment.Operator == "=" && !string.IsNullOrWhiteSpace(assignment.Value)); + + if (pinnedAssignment == null) + { + return null; + } + + var property = targetClass.QueryAllProperties() + .FirstOrDefault(x => string.Equals(x.Name, pinnedAssignment.PropertyName, StringComparison.OrdinalIgnoreCase)); + + if (property?.Type is not IEnumeration) + { + return null; + } + + var literalName = pinnedAssignment.Value.Trim('\'').CapitalizeFirstLetter(); + return $"{{ {property.Name.CapitalizeFirstLetter()}: {property.Type.QueryFullyQualifiedTypeName()}.{literalName} }}"; } /// @@ -447,7 +492,13 @@ private void ProcessSingleAlternative(EncodedTextWriter writer, IClass umlClass, } } - if (inlineConditionParts.Count > 0) + var optionalCollectionCondition = TryResolveOptionalCollectionGroupCondition(umlClass, elements, ruleGenerationContext); + + if (optionalCollectionCondition != null) + { + writer.WriteSafeString($"{Environment.NewLine}if ({optionalCollectionCondition}){Environment.NewLine}"); + } + else if (inlineConditionParts.Count > 0) { writer.WriteSafeString($"{Environment.NewLine}if ({string.Join(" || ", inlineConditionParts)}){Environment.NewLine}"); } @@ -474,6 +525,54 @@ private void ProcessSingleAlternative(EncodedTextWriter writer, IClass umlClass, } } + /// + /// Resolves the guard for an optional group whose only variable content is a *-quantified + /// bare non-terminal — e.g. ( '{' ActionBodyItem* '}' )?. Such a group must be emitted only + /// when its loop would iterate at least once: the group's own terminals carry no information, so a + /// property-based condition wrongly emits an empty { } whenever any unrelated property is set. + /// + /// The related + /// The optional group's elements + /// The current + /// The cursor-based condition, or when the group is not that shape. + private static string TryResolveOptionalCollectionGroupCondition(IClass umlClass, List elements, RuleGenerationContext ruleGenerationContext) + { + var nonTerminals = elements.OfType().ToList(); + + if (nonTerminals.Count != 1 || !nonTerminals[0].IsCollection || elements.Any(element => element is AssignmentElement or GroupElement)) + { + return null; + } + + var referencedRule = ruleGenerationContext.FindRule(nonTerminals[0].Name); + var collectionPropertyNames = referencedRule?.QueryCollectionPropertyNames(ruleGenerationContext.AllRules); + + if (collectionPropertyNames?.Count != 1) + { + return null; + } + + var targetProperty = umlClass.QueryAllProperties().SingleOrDefault(x => string.Equals(x.Name, collectionPropertyNames.Single(), StringComparison.OrdinalIgnoreCase)); + + if (targetProperty == null || !targetProperty.QueryIsEnumerable()) + { + return null; + } + + // The cursor is declared up-front by DeclareAllRequiredCursors; if it is absent this is not the + // shape we handle, so fall back rather than emit a second declaration. + var existingCursor = ruleGenerationContext.DefinedCursors.SingleOrDefault(x => x.IsCursorValidForProperty(targetProperty)); + + if (existingCursor == null) + { + return null; + } + + return IsGuardedBodyItemRule(nonTerminals[0].Name) + ? $"{existingCursor.CursorVariableName}.Current is SysML2.NET.Core.POCO.Root.Elements.IRelationship optionalBodyCandidate && optionalBodyCandidate.IsValidFor{nonTerminals[0].Name}(writerContext)" + : $"{existingCursor.CursorVariableName}.Current != null"; + } + /// /// Processes multiple alternatives where every alternative has exactly one element. /// Handles multi-collection assignments, unityped dispatch, and mixed-type element handling. @@ -1414,7 +1513,8 @@ private void EmitTerminalVsBodyWithSingleNonTerminal(EncodedTextWriter writer, I private static bool IsGuardedBodyItemRule(string bodyItemRuleName) { return string.Equals(bodyItemRuleName, "DefinitionBodyItem", StringComparison.Ordinal) - || string.Equals(bodyItemRuleName, "InterfaceBodyItem", StringComparison.Ordinal); + || string.Equals(bodyItemRuleName, "InterfaceBodyItem", StringComparison.Ordinal) + || string.Equals(bodyItemRuleName, "ActionBodyItem", StringComparison.Ordinal); } } } diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Expected/01-Parts Tree/1a-Parts Tree.sysml b/SysML2.NET.Serializer.TextualNotation.Tests/Expected/01-Parts Tree/1a-Parts Tree.sysml index 836a581b..4acd7af5 100644 --- a/SysML2.NET.Serializer.TextualNotation.Tests/Expected/01-Parts Tree/1a-Parts Tree.sysml +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Expected/01-Parts Tree/1a-Parts Tree.sysml @@ -43,6 +43,7 @@ package '1a-Parts Tree' { /* * 'frontAxleAssembly' is a nested part of part 'vehicle1'. * It is a composite part of the containing part. + * * (And similarly for 'rearAxleAssembly'.) */ part frontAxle: Axle; diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Expected/02-Parts Interconnection/2a-Parts Interconnection.sysml b/SysML2.NET.Serializer.TextualNotation.Tests/Expected/02-Parts Interconnection/2a-Parts Interconnection.sysml index 41756e72..54ca2d4e 100644 --- a/SysML2.NET.Serializer.TextualNotation.Tests/Expected/02-Parts Interconnection/2a-Parts Interconnection.sysml +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Expected/02-Parts Interconnection/2a-Parts Interconnection.sysml @@ -131,6 +131,7 @@ package '2a-Parts Interconnection' { /* * The two rear wheels of 'rearAxleAssembly' must be given * their own names in order to be referenced in connections. + * * (":>" is a shorthand here for "subsets".) */ part leftWheel :> rearWheel = rearWheel#(1) { diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Expected/05-State-based Behavior/5-State-based Behavior-1a.sysml b/SysML2.NET.Serializer.TextualNotation.Tests/Expected/05-State-based Behavior/5-State-based Behavior-1a.sysml new file mode 100644 index 00000000..55998edf --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Expected/05-State-based Behavior/5-State-based Behavior-1a.sysml @@ -0,0 +1,158 @@ +package '5-State-based Behavior-1a' { + private import ScalarValues::*; + private import ISQ::*; + package Definitions { + part def VehicleA { + /* + * The following declare that 'VehicleA' performs a + * 'provide power' action and exhibits some 'vehicle states', + * without giving details about these behaviors. + */ + perform action 'provide power': 'Provide Power'; + exhibit state 'vehicle states': 'Vehicle States'; + } + part def VehicleController { + exhibit state 'controller states': 'Controller States'; + } + /* + * Black box specifications for state definitions may also have + * input and output parameters, like activities, though none + * are used here. + */ + state def 'Vehicle States'; + state def 'Controller States'; + action def 'Provide Power'; + action def 'Perform Self Test'; + action def 'Apply Parking Brake'; + action def 'Sense Temperature' { + out temp: ThermodynamicTemperatureValue; + } + attribute def FuelCmd; + attribute def 'Vehicle Start Signal'; + attribute def 'Vehicle On Signal'; + attribute def 'Vehicle Off Signal'; + attribute def 'Start Signal'; + attribute def 'Off Signal'; + attribute def 'Over Temp'; + attribute def 'Return to Normal'; + } + package Usages { + private import Definitions::*; + /* + * These actions are used enabled in the state usage + * 'vehicle states', in addition to 'provide power'. + */ + action 'provide power': 'Provide Power'; + action 'perform self test': 'Perform Self Test'; + action 'apply parking brake': 'Apply Parking Brake'; + action 'sense temperature': 'Sense Temperature'; + state 'vehicle states': 'Vehicle States' parallel { + /* + * This is a usage of the state definition 'Vehicle States'. + * Note that it depends specifically on on the part 'vehicle1_c1'. + */ + state 'operational states' { + doc + /* + * The state definition for this usage is implicit. + */ + + entry action initial { + doc + /* + * This empty entry action acts like a start pseudo state. + */ + + } + transition initial then off; + state off; + transition 'off-starting' first off accept 'Vehicle Start Signal' if vehicle1_c1.'brake pedal depressed' do send new 'Start Signal'() to vehicle1_c1.vehicleController then starting { + /* + * The transition definition for a transition usage is always implicit. + * "accept" marks the trigger, "if" the guard and "do" the effect. + * + * The notation "'new Start Signal'()" constructs a specific instance of the + * 'Start Signal' attribute def to be sent to the 'vehicleController'. If the + * attribute def had properties, their values would be given as arguments + * inside the parentheses. + */ + } + state starting; + transition 'starting-on' first starting accept 'Vehicle On Signal' then on; + state on { + /* + * A state may have a "entry" action that is performed on entry into + * the state, a "do" action that is performed while in the state + * and an "exit" action that is performed on exit from the state. + */ + entry 'perform self test'; + do 'provide power'; + exit 'apply parking brake'; + } + transition 'on-off' first on accept 'Vehicle Off Signal' then off; + } + state 'health states' { + /* + * 'health states' is concurrent with 'operational states', because the + * containing state usage is "parallel". + */ + entry action initial; + do 'sense temperature' { + out temp; + /* + * State-behavior actions may have input and output parameters. + */ + } + transition initial then normal; + state normal; + transition 'normal-maintenance' first normal accept at vehicle1_c1.maintenanceTime then maintenance; + transition 'normal-degraded' first normal accept when 'sense temperature'.temp > vehicle1_c1.Tmax do send new 'Over Temp'() to vehicle1_c1.vehicleController then degraded; + state maintenance; + transition 'maintenance-normal' first maintenance accept 'Return to Normal' then normal; + state degraded; + transition 'degraded-normal' first degraded accept 'Return to Normal' then normal; + } + } + state 'controller states': 'Controller States' parallel { + state 'operational controller states' { + entry action initial; + transition initial then off; + state off; + transition 'off-on' first off accept 'Start Signal' then on; + state on; + transition 'on-off' first on accept 'Off Signal' then off; + } + } + part vehicle1_c1: VehicleA { + port fuelCmdPort { + in fuelCmd: FuelCmd; + } + /* + * These attribute properties are used in the specification for + * 'vehicle states'. + */ + attribute 'brake pedal depressed': Boolean; + attribute maintenanceTime: Time::DateTime; + attribute Tmax: ThermodynamicTemperatureValue; + perform 'provide power' :>> VehicleA::'provide power' { + doc + /* + * In the context of the 'vehicle1_c1' part, the 'provide power' action + * that is enabled in 'vehicle states' gets its input from the 'fuelCmdPort'. + */ + + in fuelCmd = fuelCmdPort.fuelCmd; + } + exhibit 'vehicle states' :>> VehicleA::'vehicle states' { + /* + * This allocates the state usage 'vehicle states' as the detailed + * state-based behavior for 'vehicle1_c1' that fills in the generic + * declaration in 'VehicleA'. + */ + } + part vehicleController: VehicleController { + exhibit 'controller states' :>> VehicleController::'controller states'; + } + } + } +} diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/SysML2.NET.Serializer.TextualNotation.Tests.csproj b/SysML2.NET.Serializer.TextualNotation.Tests/SysML2.NET.Serializer.TextualNotation.Tests.csproj index 52805693..7d22851e 100644 --- a/SysML2.NET.Serializer.TextualNotation.Tests/SysML2.NET.Serializer.TextualNotation.Tests.csproj +++ b/SysML2.NET.Serializer.TextualNotation.Tests/SysML2.NET.Serializer.TextualNotation.Tests.csproj @@ -136,6 +136,12 @@ Always + + Always + + + Always + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/05-State-based Behavior/5-State-based Behavior-1a.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/05-State-based Behavior/5-State-based Behavior-1a.sysmlx new file mode 100644 index 00000000..84ba72d7 --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/05-State-based Behavior/5-State-based Behavior-1a.sysmlx @@ -0,0 +1,1028 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Writers/TextualNotationValidationTestFixture.cs b/SysML2.NET.Serializer.TextualNotation.Tests/Writers/TextualNotationValidationTestFixture.cs index 5ab64ae8..d9a014d3 100644 --- a/SysML2.NET.Serializer.TextualNotation.Tests/Writers/TextualNotationValidationTestFixture.cs +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Writers/TextualNotationValidationTestFixture.cs @@ -50,6 +50,7 @@ public class TextualNotationValidationTestFixture [TestCase("03-Function-based Behavior", "3d-Function-based Behavior-item.sysmlx")] [TestCase("03-Function-based Behavior", "3e-Function-based Behavior-item.sysmlx")] [TestCase("04-Functional Allocation", "4a-Functional Allocation.sysmlx")] + [TestCase("05-State-based Behavior", "5-State-based Behavior-1a.sysmlx")] public async Task VerifyValidationTextualNotationXmi(string folderName, string fileName) { var loggerFactory = LoggerFactory.Create(builder => diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AcceptActionUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AcceptActionUsageTextualNotationBuilder.cs index b6cc3685..3427121a 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AcceptActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AcceptActionUsageTextualNotationBuilder.cs @@ -148,12 +148,12 @@ public static void BuildTransitionAcceptActionUsage(SysML2.NET.Core.POCO.Systems BuildAcceptNodeDeclaration(poco, writerContext, stringBuilder); var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); - if ((ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Root.Namespaces.IImport || ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Root.Namespaces.IMembership || ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership || ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IVariantMembership || ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Core.Types.IFeatureMembership) || !string.IsNullOrWhiteSpace(poco.DeclaredShortName) || !string.IsNullOrWhiteSpace(poco.DeclaredName) || poco.Direction.HasValue || poco.IsDerived || poco.IsAbstract || poco.IsVariation || poco.IsConstant || poco.IsOrdered || poco.IsEnd || poco.isReference || poco.IsIndividual || poco.PortionKind.HasValue || poco.IsComposite || poco.IsPortion || poco.IsVariable || poco.IsSufficient) + if (ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Root.Elements.IRelationship optionalBodyCandidate && optionalBodyCandidate.IsValidForActionBodyItem(writerContext)) { stringBuilder.Append(' '); stringBuilder.AppendLine("{"); stringBuilder.IncreaseIndent(); - while (ownedRelationshipCursor.Current != null) + while (ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Root.Elements.IRelationship ownedRelationshipBodyItem && ownedRelationshipBodyItem.IsValidForActionBodyItem(writerContext)) { TypeTextualNotationBuilder.BuildActionBodyItem(poco, writerContext, stringBuilder); } diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ActionUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ActionUsageTextualNotationBuilder.cs index 50dc4760..a7edda16 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ActionUsageTextualNotationBuilder.cs @@ -208,7 +208,7 @@ public static void BuildActionBodyParameter(SysML2.NET.Core.POCO.Systems.Actions stringBuilder.Append(' '); stringBuilder.AppendLine("{"); stringBuilder.IncreaseIndent(); - while (ownedRelationshipCursor.Current != null) + while (ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Root.Elements.IRelationship ownedRelationshipBodyItem && ownedRelationshipBodyItem.IsValidForActionBodyItem(writerContext)) { TypeTextualNotationBuilder.BuildActionBodyItem(poco, writerContext, stringBuilder); } diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AssignmentActionUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AssignmentActionUsageTextualNotationBuilder.cs index 97978231..77fac63c 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AssignmentActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AssignmentActionUsageTextualNotationBuilder.cs @@ -74,12 +74,12 @@ public static void BuildTransitionAssignmentActionUsage(SysML2.NET.Core.POCO.Sys ActionUsageTextualNotationBuilder.BuildAssignmentNodeDeclaration(poco, writerContext, stringBuilder); var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); - if ((ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Root.Namespaces.IImport || ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Root.Namespaces.IMembership || ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership || ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IVariantMembership || ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Core.Types.IFeatureMembership) || !string.IsNullOrWhiteSpace(poco.DeclaredShortName) || !string.IsNullOrWhiteSpace(poco.DeclaredName) || poco.Direction.HasValue || poco.IsDerived || poco.IsAbstract || poco.IsVariation || poco.IsConstant || poco.IsOrdered || poco.IsEnd || poco.isReference || poco.IsIndividual || poco.PortionKind.HasValue || poco.IsComposite || poco.IsPortion || poco.IsVariable || poco.IsSufficient) + if (ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Root.Elements.IRelationship optionalBodyCandidate && optionalBodyCandidate.IsValidForActionBodyItem(writerContext)) { stringBuilder.Append(' '); stringBuilder.AppendLine("{"); stringBuilder.IncreaseIndent(); - while (ownedRelationshipCursor.Current != null) + while (ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Root.Elements.IRelationship ownedRelationshipBodyItem && ownedRelationshipBodyItem.IsValidForActionBodyItem(writerContext)) { TypeTextualNotationBuilder.BuildActionBodyItem(poco, writerContext, stringBuilder); } diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PerformActionUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PerformActionUsageTextualNotationBuilder.cs index 6961b9eb..72379e7f 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PerformActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PerformActionUsageTextualNotationBuilder.cs @@ -103,12 +103,12 @@ public static void BuildTransitionPerformActionUsage(SysML2.NET.Core.POCO.System BuildPerformActionUsageDeclaration(poco, writerContext, stringBuilder); var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); - if ((ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Root.Namespaces.IImport || ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Root.Namespaces.IMembership || ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership || ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IVariantMembership || ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Core.Types.IFeatureMembership) || !string.IsNullOrWhiteSpace(poco.DeclaredShortName) || !string.IsNullOrWhiteSpace(poco.DeclaredName) || poco.Direction.HasValue || poco.IsDerived || poco.IsAbstract || poco.IsVariation || poco.IsConstant || poco.IsOrdered || poco.IsEnd || poco.isReference || poco.IsIndividual || poco.PortionKind.HasValue || poco.IsComposite || poco.IsPortion || poco.IsVariable || poco.IsSufficient) + if (ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Root.Elements.IRelationship optionalBodyCandidate && optionalBodyCandidate.IsValidForActionBodyItem(writerContext)) { stringBuilder.Append(' '); stringBuilder.AppendLine("{"); stringBuilder.IncreaseIndent(); - while (ownedRelationshipCursor.Current != null) + while (ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Root.Elements.IRelationship ownedRelationshipBodyItem && ownedRelationshipBodyItem.IsValidForActionBodyItem(writerContext)) { TypeTextualNotationBuilder.BuildActionBodyItem(poco, writerContext, stringBuilder); } diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SendActionUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SendActionUsageTextualNotationBuilder.cs index d90bc0d5..c6fd8325 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SendActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SendActionUsageTextualNotationBuilder.cs @@ -128,12 +128,12 @@ public static void BuildTransitionSendActionUsage(SysML2.NET.Core.POCO.Systems.A BuildSendNodeDeclaration(poco, writerContext, stringBuilder); var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); - if ((ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Root.Namespaces.IImport || ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Root.Namespaces.IMembership || ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership || ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IVariantMembership || ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Core.Types.IFeatureMembership) || !string.IsNullOrWhiteSpace(poco.DeclaredShortName) || !string.IsNullOrWhiteSpace(poco.DeclaredName) || poco.Direction.HasValue || poco.IsDerived || poco.IsAbstract || poco.IsVariation || poco.IsConstant || poco.IsOrdered || poco.IsEnd || poco.isReference || poco.IsIndividual || poco.PortionKind.HasValue || poco.IsComposite || poco.IsPortion || poco.IsVariable || poco.IsSufficient) + if (ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Root.Elements.IRelationship optionalBodyCandidate && optionalBodyCandidate.IsValidForActionBodyItem(writerContext)) { stringBuilder.Append(' '); stringBuilder.AppendLine("{"); stringBuilder.IncreaseIndent(); - while (ownedRelationshipCursor.Current != null) + while (ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Root.Elements.IRelationship ownedRelationshipBodyItem && ownedRelationshipBodyItem.IsValidForActionBodyItem(writerContext)) { TypeTextualNotationBuilder.BuildActionBodyItem(poco, writerContext, stringBuilder); } diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TransitionUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TransitionUsageTextualNotationBuilder.cs index ba52287e..d710a41b 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TransitionUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TransitionUsageTextualNotationBuilder.cs @@ -231,7 +231,7 @@ public static void BuildTransitionUsage(SysML2.NET.Core.POCO.Systems.States.ITra } } - if (ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership && ownedRelationshipCursor.GetNext(1) is SysML2.NET.Core.POCO.Systems.States.ITransitionFeatureMembership) + if (ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership && ownedRelationshipCursor.GetNext(1) is SysML2.NET.Core.POCO.Systems.States.ITransitionFeatureMembership { Kind: SysML2.NET.Core.Systems.States.TransitionFeatureKind.Trigger }) { if (ownedRelationshipCursor.Current != null) @@ -259,7 +259,7 @@ public static void BuildTransitionUsage(SysML2.NET.Core.POCO.Systems.States.ITra } - if (ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Systems.States.ITransitionFeatureMembership) + if (ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Systems.States.ITransitionFeatureMembership { Kind: SysML2.NET.Core.Systems.States.TransitionFeatureKind.Guard }) { if (ownedRelationshipCursor.Current != null) @@ -276,7 +276,7 @@ public static void BuildTransitionUsage(SysML2.NET.Core.POCO.Systems.States.ITra } - if (ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Systems.States.ITransitionFeatureMembership && ownedRelationshipCursor.GetNext(1) is SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership) + if (ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Systems.States.ITransitionFeatureMembership { Kind: SysML2.NET.Core.Systems.States.TransitionFeatureKind.Effect } && ownedRelationshipCursor.GetNext(1) is SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership) { if (ownedRelationshipCursor.Current != null) diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TypeTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TypeTextualNotationBuilder.cs index fbd28750..225a7ea8 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TypeTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TypeTextualNotationBuilder.cs @@ -124,7 +124,7 @@ public static void BuildInterfaceBodyItem(SysML2.NET.Core.POCO.Core.Types.IType /// The that accumulates the entire textual notation with indentation public static void BuildActionBody(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { - if (writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship).Current == null) + if (writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship).Current is not SysML2.NET.Core.POCO.Root.Elements.IRelationship emptyBodyCandidate || !emptyBodyCandidate.IsValidForActionBodyItem(writerContext)) { stringBuilder.AppendLine(";"); } @@ -134,7 +134,7 @@ public static void BuildActionBody(SysML2.NET.Core.POCO.Core.Types.IType poco, T stringBuilder.AppendLine("{"); stringBuilder.IncreaseIndent(); var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); - while (ownedRelationshipCursor.Current != null) + while (ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Root.Elements.IRelationship loopBodyItem && loopBodyItem.IsValidForActionBodyItem(writerContext)) { BuildActionBodyItem(poco, writerContext, stringBuilder); } diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/FeatureTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/FeatureTextualNotationBuilder.cs index 5163bfa4..417c109c 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/FeatureTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/FeatureTextualNotationBuilder.cs @@ -285,7 +285,15 @@ private static void BuildPayloadFeatureHandCoded(IFeature poco, TextualNotationW var hasIdentification = !string.IsNullOrWhiteSpace(poco.DeclaredShortName) || !string.IsNullOrWhiteSpace(poco.DeclaredName); - if (hasIdentification || ownedRelationshipCursor.Current is ISpecialization) + // An unnamed payload whose specialization is a LONE OwnedFeatureTyping (optionally followed by a + // multiplicity) is alternative 2 — a bare type name. Alternative 1 always routes through + // PayloadFeatureSpecializationPart, which emits `: Type`; a FeatureTyping IS an ISpecialization, + // so without this test alternative 2 is unreachable and `accept X` comes out as `accept : X`. + var isBareTypedPayload = !hasIdentification + && ownedRelationshipCursor.Current is IFeatureTyping + && ownedRelationshipCursor.GetNext(1) is not ISpecialization; + + if (!isBareTypedPayload && (hasIdentification || ownedRelationshipCursor.Current is ISpecialization)) { // Alt 1: Identification? PayloadFeatureSpecializationPart ValuePart? if (hasIdentification) diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/NameResolutionCache.cs b/SysML2.NET.Serializer.TextualNotation/Writers/NameResolutionCache.cs index 95d47598..c03f9b96 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/NameResolutionCache.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/NameResolutionCache.cs @@ -28,6 +28,7 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; + using SysML2.NET.Core.POCO.Kernel.Connectors; using SysML2.NET.Core.POCO.Kernel.Expressions; using SysML2.NET.Core.POCO.Kernel.Interactions; using SysML2.NET.Core.POCO.Root.Elements; @@ -160,6 +161,22 @@ public string Resolve(IElement target, IElement sourcePoco) var sourceLocalScope = this.GetSourceLocalScope(sourcePoco); + // KerML §8.2.3.5.1: the ONE exception to basic resolution — a Redefinition's redefinedFeature is + // resolved against the general Type of each ownedSpecialization of the owningType, NOT against the + // reference site's local namespace. This is what keeps `:>> fuelCmdPort` short while the ordinary + // local scope has that inherited membership removed (§8.2.3.5.3). + // Skipped when the redefining feature DECLARES the redefined feature's name: the bare form is + // legal there (it resolves in the supertype, not locally) but reads as a self-reference, and the + // pilot always writes `mass :>> Vehicle::mass`. Qualifying is never wrong, so match it. + if (sourcePoco is IRedefinition { RedefiningFeature: { } redefiningFeature } redefinitionContext + && ReferenceEquals(target, redefinitionContext.RedefinedFeature) + && !RedefinerDeclaredNameCollidesWith(redefiningFeature, target) + && !ReferencedFeatureSharesSimpleName(redefiningFeature, target) + && this.QueryRedefinedFeatureScope(redefinitionContext, target) is { } redefinitionScope) + { + sourceLocalScope = redefinitionScope; + } + // A redefinition's redefining feature — and equally a reference subsetting's referencing // feature, whose effective name derives FROM the referenced target — is bound in scope // under the very name being resolved and must not shadow its own target. Excluded from @@ -207,7 +224,7 @@ private static bool IsReachableByContainment(IElement target, IElement importOwn return false; } - for (IElement scope = importOwner; scope != null; scope = QueryOwningContainer(scope)) + for (var scope = importOwner; scope != null; scope = QueryOwningContainer(scope)) { if (ReferenceEquals(scope, declaringNamespace)) { @@ -489,6 +506,10 @@ private static string QueryPreferredRawName(IElement element) /// Determines whether the local referencer's DECLARED name equals the target's effective name — in /// which case the bare simple name would re-resolve to the local member and the qualified form is /// required. An anonymous referencer (no declared names) can never collide. + /// Deliberately DECLARED names only. Widening this to the effective name looks right — an + /// anonymous redefiner inherits its name from the feature it redefines — but the pilot writes the + /// bare form for exactly that shape (ref :>> driveshaft, port :>> fuelCmdPort), so + /// widening over-qualifies 2a / 2c / 3c-2 / 4a. /// /// The redefining/referencing feature; must be non-null. /// The referenced target. @@ -804,6 +825,11 @@ private INamespace GetSourceLocalScope(IElement sourcePoco) return this.RootNamespace; } + if (QueryContextRelationshipLocalScope(sourcePoco) is { } contextScope) + { + return contextScope; + } + var visited = new HashSet(); var current = sourcePoco; @@ -846,6 +872,116 @@ private INamespace GetSourceLocalScope(IElement sourcePoco) return this.RootNamespace; } + /// + /// Determines whether also REFERENCES a different element that + /// shares a simple name with — the exhibit X :>> Y shape, where the + /// reference and the redefinition name distinct elements under one name. + /// The reference is written bare, so leaving the redefinition bare emits the SAME token twice for + /// two different elements: they stay distinct only for a reader that applies the §8.2.3.5.1 exception. + /// Qualifying the redefinition is correct under either reading, and is what the pilot writes. + /// + /// The feature owning the redefinition. + /// The redefined feature being named. + /// when the qualified form is required to keep the two distinct. + private static bool ReferencedFeatureSharesSimpleName(IFeature redefiningFeature, IElement target) + { + var referencedFeature = redefiningFeature.OwnedRelationship + .OfType() + .Select(referenceSubsetting => referenceSubsetting.ReferencedFeature) + .FirstOrDefault(referenced => referenced != null && !ReferenceEquals(referenced, target)); + + if (referencedFeature == null) + { + return false; + } + + var referencedNames = new[] { referencedFeature.name, referencedFeature.shortName } + .Where(candidate => !string.IsNullOrWhiteSpace(candidate)); + + return referencedNames.Any(candidate => + string.Equals(candidate, target.name, StringComparison.Ordinal) + || string.Equals(candidate, target.shortName, StringComparison.Ordinal)); + } + + /// + /// Returns the scope in which a 's redefinedFeature is resolved per + /// KerML §8.2.3.5.1: the general Type of each ownedSpecialization of the owning feature's + /// owningType, tried in turn until one binds the name. Falls back to the first such general type + /// so the qualified form is still anchored correctly. + /// + /// The redefinition at the reference site. + /// The redefined feature being named. + /// The scope, or when the exception does not apply. + private INamespace QueryRedefinedFeatureScope(IRedefinition redefinition, IElement target) + { + var owningType = redefinition.RedefiningFeature?.owningType; + + if (owningType == null) + { + return null; + } + + List generalScopes; + + try + { + generalScopes = [..owningType.ownedSpecialization + .Select(specialization => specialization.General) + .OfType() + .Where(general => !ReferenceEquals(general, owningType))]; + } + catch (NotSupportedException) + { + return null; + } + + if (generalScopes.Count == 0) + { + return null; + } + + var rawName = QueryPreferredRawName(target); + + var bindingScope = string.IsNullOrWhiteSpace(rawName) + ? null + : generalScopes.FirstOrDefault(scope => + this.ResolveSimpleNameInScope(scope, target, rawName, localRedefiner: null, selfBindingScope: null) == SimpleNameResolution.Matched); + + return bindingScope ?? generalScopes[0]; + } + + /// + /// Determines the local from the KIND of context relationship, per + /// KerML §8.2.3.5.2. Only the kinds whose local scope is NOT simply the nearest enclosing namespace + /// are handled here; everything else falls back to the containment climb. + /// For a the spec anchors resolution at the + /// owningNamespace of the owningType — one level OUT from the owning feature — so the + /// owning feature's own and inherited members are NOT in scope. + /// NOT implemented: the clause also anchors a whose + /// referencingFeature is an end feature of a at the CONNECTOR's owning + /// namespace. Applying that emits Actions::Action::start where 3a-1 needs the short start + /// the pilot writes; the cause is NOT diagnosed, since that namespace inherits start and ought + /// to resolve it. Meanwhile the climb anchors deeper than the spec allows — at the end feature, so the + /// end's and the connector's own members are wrongly in scope — which may be masking an indexing gap. + /// On odd resolution around connector ends, check first whether the connector's owning namespace binds + /// the name at all. + /// + /// The context relationship at the reference site. + /// The local scope, or when the generic climb applies. + private static INamespace QueryContextRelationshipLocalScope(IElement sourcePoco) + { + return sourcePoco switch + { + // Connector ends keep the containment climb — see the remark above. This case must precede + // ISpecialization: a ReferenceSubsetting IS a Specialization and would otherwise be + // re-anchored by the general rule below. + IReferenceSubsetting { referencingFeature: { IsEnd: true, owningType: IConnector } } => null, + ISpecialization specialization => specialization.owningType != null ? QueryOwningContainer(specialization.owningType) : QueryOwningContainer(specialization), + IConjugation conjugation => conjugation.owningType != null ? QueryOwningContainer(conjugation.owningType) : QueryOwningContainer(conjugation), + _ => null + }; + } + /// /// Tri-state result of probing one scope for one lexical form. /// @@ -1411,11 +1547,15 @@ private static void BuildInheritedEntries(IType type, Dictionary IsVisibleWhenGlobal(ownedMember, isGlobal))) + foreach (var ownedMember in supertype.ownedMembership + .Where(ownedMember => IsVisibleWhenGlobal(ownedMember, isGlobal)) + .Where(ownedMember => !IsRedefinedAway(ownedMember, featuresRedefinedByOwned))) { AddMembershipEntry(index, ownedMember, pending, isGlobal); } @@ -1427,6 +1567,58 @@ private static void BuildInheritedEntries(IType type, Dictionary + /// Collects the features directly redefined by 's owned features — the + /// ownedFeature.redefinition.redefinedFeature set of removeRedefinedFeatures. + /// + /// The type whose owned redefinitions are collected. + /// The redefined features; empty when unavailable. + private static HashSet QueryFeaturesRedefinedByOwnedFeatures(IType type) + { + try + { + return [..type.ownedFeature + .SelectMany(ownedFeature => ownedFeature.OwnedRelationship.OfType()) + .Select(redefinition => (IElement)redefinition.RedefinedFeature) + .Where(redefined => redefined != null)]; + } + catch (NotSupportedException) + { + return []; + } + } + + /// + /// Applies condition 2 of Type::removeRedefinedFeatures: an inherited membership drops out of + /// the local scope when its member element — or anything that element redefines — is redefined by an + /// owned feature of the inheriting type. The redefinition's own target is still reachable through the + /// §8.2.3.5.1 supertype scope (see ). + /// + /// The candidate inherited membership. + /// Features redefined by the inheriting type's owned features. + /// when the membership must not be indexed. + private static bool IsRedefinedAway(IMembership membership, HashSet featuresRedefinedByOwned) + { + if (featuresRedefinedByOwned.Count == 0 || membership.MemberElement is not IFeature memberFeature) + { + return false; + } + + if (featuresRedefinedByOwned.Contains(memberFeature)) + { + return true; + } + + try + { + return memberFeature.AllRedefinedFeatures().Any(featuresRedefinedByOwned.Contains); + } + catch (NotSupportedException) + { + return false; + } + } + /// /// Indexes 's member element under both lexical forms — the /// membership's explicit name overrides when present, else the element's own names — and enqueues diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/ReferenceUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/ReferenceUsageTextualNotationBuilder.cs index 607ae755..386c3b03 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/ReferenceUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/ReferenceUsageTextualNotationBuilder.cs @@ -25,6 +25,7 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.FeatureValues; + using SysML2.NET.Core.POCO.Systems.Actions; using SysML2.NET.Core.POCO.Systems.DefinitionAndUsage; /// @@ -43,15 +44,21 @@ public static partial class ReferenceUsageTextualNotationBuilder /// PayloadFeature /// | Identification PayloadFeatureSpecializationPart? TriggerValuePart /// - /// Alt 2 applies when the reference usage has identification AND a trigger-style - /// feature value. Otherwise, delegate to PayloadFeature (Alt 1). + /// Alt 2 applies when the reference usage carries a TriggerValuePart. `Identification` matches EMPTY + /// (( '<' NAME '>' )? ( NAME )?) so it is structurally always present and cannot discriminate. + /// Otherwise, delegate to PayloadFeature (Alt 1). /// private static void BuildPayloadParameterHandCoded(IReferenceUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { - var hasIdentification = !string.IsNullOrWhiteSpace(poco.DeclaredShortName) || !string.IsNullOrWhiteSpace(poco.DeclaredName); - var hasTriggerValue = poco.OwnedRelationship.OfType().Any(); - - if (hasIdentification && hasTriggerValue) + // TriggerFeatureValue and ValuePart's plain FeatureValue share the SAME target metaclass, so the + // trigger must be identified by its nested TriggerInvocationExpression. Testing for any + // IFeatureValue also matches a plain payload default (`accept x: Foo = default`) and routes it + // into BuildTriggerValuePart, which emits nothing for a non-trigger expression — silent data loss. + var hasTriggerValue = poco.OwnedRelationship + .OfType() + .Any(featureValue => featureValue.OwnedRelatedElement.OfType().Any()); + + if (hasTriggerValue) { // Alt 2: Identification PayloadFeatureSpecializationPart? TriggerValuePart ElementTextualNotationBuilder.BuildIdentification(poco, writerContext, stringBuilder); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/SendActionUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/SendActionUsageTextualNotationBuilder.cs index 8342a176..a75e612a 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/SendActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/SendActionUsageTextualNotationBuilder.cs @@ -47,7 +47,8 @@ private static void BuildSendNodeHandCoded(ISendActionUsage poco, TextualNotatio { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); - if (ownedRelationshipCursor.Current is IParameterMembership { OwnedRelatedElement.Count: 0 } emptyMembership) + // An EmptyParameterMember owns an EmptyUsage (a ReferenceUsage with no binding), not nothing. + if (ownedRelationshipCursor.Current is IParameterMembership emptyMembership && emptyMembership.IsEmptyParameterMember()) { ParameterMembershipTextualNotationBuilder.BuildEmptyParameterMember(emptyMembership, writerContext, stringBuilder); ownedRelationshipCursor.Move(); @@ -83,7 +84,8 @@ private static void BuildSenderReceiverPartHandCoded(ISendActionUsage poco, Text { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); - if (ownedRelationshipCursor.Current is IParameterMembership { OwnedRelatedElement.Count: 0 } emptyMembership) + // An EmptyParameterMember owns an EmptyUsage (a ReferenceUsage with no binding), not nothing. + if (ownedRelationshipCursor.Current is IParameterMembership emptyMembership && emptyMembership.IsEmptyParameterMember()) { // Alt 2: EmptyParameterMember 'to' NodeParameterMember ParameterMembershipTextualNotationBuilder.BuildEmptyParameterMember(emptyMembership, writerContext, stringBuilder); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/SharedTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/SharedTextualNotationBuilder.cs index dc520709..67395865 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/SharedTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/SharedTextualNotationBuilder.cs @@ -614,9 +614,16 @@ internal static void AppendRegularComment(IndentedStringBuilder stringBuilder, s stringBuilder.AppendLine("/*"); - foreach (var rawLine in lines.Where(l => !string.IsNullOrWhiteSpace(l))) + // Only the leading/trailing blank lines are dropped (the body of a block comment always + // ends with one). Interior blank lines are CONTENT and must survive — filtering every + // blank line collapses deliberate paragraph breaks in the comment. + var firstContentIndex = Array.FindIndex(lines, line => !string.IsNullOrWhiteSpace(line)); + var lastContentIndex = Array.FindLastIndex(lines, line => !string.IsNullOrWhiteSpace(line)); + + foreach (var rawLine in lines[firstContentIndex..(lastContentIndex + 1)]) { - stringBuilder.AppendIndentedLiteral(" * " + rawLine.TrimEnd()); + var trimmedLine = rawLine.TrimEnd(); + stringBuilder.AppendIndentedLiteral(trimmedLine.Length == 0 ? " *" : " * " + trimmedLine); stringBuilder.AppendLine(); } diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/TextualNotationValidationExtensions.cs b/SysML2.NET.Serializer.TextualNotation/Writers/TextualNotationValidationExtensions.cs index 75b06b26..18b3f020 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/TextualNotationValidationExtensions.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/TextualNotationValidationExtensions.cs @@ -936,7 +936,17 @@ internal static bool IsValidForEntryActionMember(this IFeatureMembership feature /// True if the membership owns a succession or transition usage internal static bool IsValidForEntryTransitionMemberRule(this IFeatureMembership featureMembership, TextualNotationWriterContext writerContext) { - return featureMembership?.OwnedRelatedElement.Any(element => element is ITransitionUsage or ISuccessionAsUsage) == true; + return featureMembership?.OwnedRelatedElement.Any(element => element switch + { + // GuardedTargetSuccession REQUIRES a GuardExpressionMember. A guardless TransitionUsage is a + // TransitionUsageMember (`transition initial then off;`); consuming it here emitted a bare + // `then;` because neither EntryTransitionMember alternative can express it. + ITransitionUsage transitionUsage => transitionUsage.OwnedRelationship + .OfType() + .Any(transitionFeature => transitionFeature.Kind == SysML2.NET.Core.Systems.States.TransitionFeatureKind.Guard), + ISuccessionAsUsage => true, + _ => false, + }) == true; } /// @@ -1143,5 +1153,50 @@ internal static bool IsValidForInterfaceBodyItem(this IRelationship relationship { return relationship.IsValidForDefinitionBodyItem(writerContext); } + + /// + /// Asserts that the currently positioned by the cursor is writable as an + /// ActionBodyItem. Everything is admitted except a content-free anonymous + /// : the pilot's model transform attaches one such feature to every + /// TransitionUsage / action node, and it has no notation — emitting it produces a bare + /// ref; that the grammar never writes. + /// + /// The positioned by the cursor. + /// The for the current write. + /// when the relationship has notation as an action body item. + internal static bool IsValidForActionBodyItem(this IRelationship relationship, TextualNotationWriterContext writerContext) + => relationship is not IFeatureMembership featureMembership || !IsContentFreeAnonymousReferenceUsage(featureMembership); + + /// + /// Asserts that is an EmptyParameterMember — a + /// owning an EmptyUsage (EmptyUsage : ReferenceUsage = {}): + /// an anonymous with no binding, typing or name. The grammar uses such a + /// member as the PLACEHOLDER for an omitted slot — e.g. the skipped via of send … to … — + /// so it must never be written as a parameter in its own right. + /// + /// The candidate . + /// when the membership is an omitted-slot placeholder. + internal static bool IsEmptyParameterMember(this IParameterMembership parameterMembership) + => parameterMembership.OwnedRelatedElement.Count == 1 + && parameterMembership.OwnedRelatedElement.OfType().Any(referenceUsage => + referenceUsage.OwnedRelationship.Count == 0 + && string.IsNullOrWhiteSpace(referenceUsage.DeclaredName) + && string.IsNullOrWhiteSpace(referenceUsage.DeclaredShortName)); + + /// + /// Determines whether owns nothing but a completely + /// information-free anonymous — no name, no specialization, + /// no direction, no end flag. + /// + /// The candidate . + /// when the membership carries no writable content. + private static bool IsContentFreeAnonymousReferenceUsage(IFeatureMembership featureMembership) + => featureMembership.OwnedRelatedElement.Count == 1 + && featureMembership.OwnedRelatedElement.OfType().Any(referenceUsage => + string.IsNullOrWhiteSpace(referenceUsage.DeclaredName) + && string.IsNullOrWhiteSpace(referenceUsage.DeclaredShortName) + && referenceUsage.OwnedRelationship.Count == 0 + && !referenceUsage.Direction.HasValue + && !referenceUsage.IsEnd); } } diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/TypeTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/TypeTextualNotationBuilder.cs index 9b9e1a96..a51ddf86 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/TypeTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/TypeTextualNotationBuilder.cs @@ -42,7 +42,8 @@ private static void BuildActionBodyItemHandCoded(IType poco, TextualNotationWrit { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); - while (ownedRelationshipCursor.Current != null) + while (ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Root.Elements.IRelationship actionBodyItem + && actionBodyItem.IsValidForActionBodyItem(writerContext)) { switch (ownedRelationshipCursor.Current) { From 89b03dba078ffa0e2c9e05ab0d306dd67b39ead1 Mon Sep 17 00:00:00 2001 From: atheate Date: Tue, 11 Aug 2026 08:24:07 +0200 Subject: [PATCH 2/5] xmi files generation --- ...ET.Serializer.TextualNotation.Tests.csproj | 88 +- .../01-Parts Tree/1a-Parts Tree.sysmlx | 478 +++---- .../1c-Parts Tree Redefinition.sysmlx | 416 +++--- .../1d-Parts Tree with Reference.sysmlx | 178 +-- .../2a-Parts Interconnection.sysmlx | 1200 ++++++++-------- ...rconnection-Multiple Decompositions.sysmlx | 618 ++++---- .../3a-Function-based Behavior-1.sysmlx | 730 +++++----- .../3a-Function-based Behavior-2.sysmlx | 590 ++++---- .../3a-Function-based Behavior-3.sysmlx | 394 ++--- ...tion-based Behavior-structure mod-1.sysmlx | 332 ++--- ...tion-based Behavior-structure mod-2.sysmlx | 232 +-- ...tion-based Behavior-structure mod-3.sysmlx | 236 +-- .../3d-Function-based Behavior-item.sysmlx | 480 +++---- .../3e-Function-based Behavior-item.sysmlx | 328 ++--- .../4a-Functional Allocation.sysmlx | 672 ++++----- .../5-State-based Behavior-1.sysmlx | 1033 ++++++++++++++ .../5-State-based Behavior-1a.sysmlx | 1262 ++++++++--------- .../5-State-based Behavior-2.sysmlx | 961 +++++++++++++ .../6-Individual and Snapshots.sysmlx | 736 ++++++++++ ...ant Configuration - General Concept.sysmlx | 270 ++++ ...t Configuration - General Concept-a.sysmlx | 468 ++++++ .../7b-Variant Configurations.sysmlx | 1057 ++++++++++++++ .../08-Requirements/8-Requirements.sysmlx | 870 ++++++++++++ .../9-Verification-simplified.sysmlx | 657 +++++++++ .../10a-Analysis.sysmlx | 390 +++++ ...ff Among Alternative Configurations.sysmlx | 588 ++++++++ .../10c-Fuel Economy Analysis.sysmlx | 1011 +++++++++++++ .../10d-Dynamics Analysis.sysmlx | 982 +++++++++++++ .../11a-View-Viewpoint.sysmlx | 345 +++++ ...b-Safety and Security Feature Views.sysmlx | 515 +++++++ .../12a-Dependency.sysmlx | 34 + .../12b-Allocation-1.sysmlx | 302 ++++ .../12b-Allocation.sysmlx | 110 ++ .../13a-Model Containment.sysmlx | 73 + ...d Security Features Element Group-1.sysmlx | 429 ++++++ ...d Security Features Element Group-2.sysmlx | 445 ++++++ ...and Security Features Element Group.sysmlx | 110 ++ .../14a-Language Extensions.sysmlx | 95 ++ .../14b-Language Extensions.sysmlx | 194 +++ .../14c-Language Extensions.sysmlx | 1208 ++++++++++++++++ .../15_01-Constants.sysmlx | 379 +++++ .../15_02-Basic Value Properties.sysmlx | 81 ++ .../15_03-Value Expression.sysmlx | 438 ++++++ .../15_04-Logical Expressions.sysmlx | 326 +++++ ...xpression and Constraint Definition.sysmlx | 504 +++++++ .../15_06-System of Quantities.sysmlx | 16 + .../15_07-System of Units and Scales.sysmlx | 19 + .../15_08-Range Restriction.sysmlx | 178 +++ .../15_10-Primitive Data Types.sysmlx | 305 ++++ ...11-Variable Length Collection Types.sysmlx | 138 ++ .../15_12-Compound Value Type.sysmlx | 170 +++ ...3-Discretely Sampled Function Value.sysmlx | 1085 ++++++++++++++ .../15_19-Materials with Properties.sysmlx | 763 ++++++++++ .../15_19a-Materials with Properties.sysmlx | 846 +++++++++++ .../17a-Sequence-Modeling.sysmlx | 277 ++++ .../17b-Sequence-Modeling.sysmlx | 271 ++++ .../Validation/18-Use Case/18-Use Case.sysmlx | 379 +++++ 57 files changed, 23133 insertions(+), 4159 deletions(-) create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Validation/05-State-based Behavior/5-State-based Behavior-1.sysmlx create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Validation/05-State-based Behavior/5-State-based Behavior-2.sysmlx create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Validation/06-Individual and Snapshots/6-Individual and Snapshots.sysmlx create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Validation/07-Variant Configuration/7a-Variant Configuration - General Concept.sysmlx create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Validation/07-Variant Configuration/7a1-Variant Configuration - General Concept-a.sysmlx create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Validation/07-Variant Configuration/7b-Variant Configurations.sysmlx create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Validation/08-Requirements/8-Requirements.sysmlx create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Validation/09-Verification/9-Verification-simplified.sysmlx create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Validation/10-Analysis and Trades/10a-Analysis.sysmlx create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Validation/10-Analysis and Trades/10b-Trade-off Among Alternative Configurations.sysmlx create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Validation/10-Analysis and Trades/10c-Fuel Economy Analysis.sysmlx create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Validation/10-Analysis and Trades/10d-Dynamics Analysis.sysmlx create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Validation/11-View and Viewpoint/11a-View-Viewpoint.sysmlx create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Validation/11-View and Viewpoint/11b-Safety and Security Feature Views.sysmlx create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Validation/12-Dependency Relationships/12a-Dependency.sysmlx create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Validation/12-Dependency Relationships/12b-Allocation-1.sysmlx create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Validation/12-Dependency Relationships/12b-Allocation.sysmlx create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Validation/13-Model Containment/13a-Model Containment.sysmlx create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Validation/13-Model Containment/13b-Safety and Security Features Element Group-1.sysmlx create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Validation/13-Model Containment/13b-Safety and Security Features Element Group-2.sysmlx create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Validation/13-Model Containment/13b-Safety and Security Features Element Group.sysmlx create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Validation/14-Language Extensions/14a-Language Extensions.sysmlx create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Validation/14-Language Extensions/14b-Language Extensions.sysmlx create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Validation/14-Language Extensions/14c-Language Extensions.sysmlx create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_01-Constants.sysmlx create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_02-Basic Value Properties.sysmlx create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_03-Value Expression.sysmlx create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_04-Logical Expressions.sysmlx create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_05-Unification of Expression and Constraint Definition.sysmlx create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_06-System of Quantities.sysmlx create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_07-System of Units and Scales.sysmlx create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_08-Range Restriction.sysmlx create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_10-Primitive Data Types.sysmlx create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_11-Variable Length Collection Types.sysmlx create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_12-Compound Value Type.sysmlx create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_13-Discretely Sampled Function Value.sysmlx create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_19-Materials with Properties.sysmlx create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_19a-Materials with Properties.sysmlx create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Validation/17-Sequence Modeling/17a-Sequence-Modeling.sysmlx create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Validation/17-Sequence Modeling/17b-Sequence-Modeling.sysmlx create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Validation/18-Use Case/18-Use Case.sysmlx diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/SysML2.NET.Serializer.TextualNotation.Tests.csproj b/SysML2.NET.Serializer.TextualNotation.Tests/SysML2.NET.Serializer.TextualNotation.Tests.csproj index 7d22851e..8007df35 100644 --- a/SysML2.NET.Serializer.TextualNotation.Tests/SysML2.NET.Serializer.TextualNotation.Tests.csproj +++ b/SysML2.NET.Serializer.TextualNotation.Tests/SysML2.NET.Serializer.TextualNotation.Tests.csproj @@ -52,94 +52,10 @@ - + Always - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - + Always diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/01-Parts Tree/1a-Parts Tree.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/01-Parts Tree/1a-Parts Tree.sysmlx index 4ac4c4a7..618de027 100644 --- a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/01-Parts Tree/1a-Parts Tree.sysmlx +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/01-Parts Tree/1a-Parts Tree.sysmlx @@ -1,407 +1,407 @@ - - - - + + + + - - - - - - - + + + + + + + - - + + - - + + - - + + - - - - - + + + + + - - + + - - - - - - + + + + + + - - + + - - + + - - - - - + + + + + - - - - - + + + + + - - - - - - - - - + + + + + + + + + - - - - - + + + + + - - + + - - + + - - + + - - - - - + + + + + - - - - - + + + + + - - - - - - - + + + + + + + - - + + - - + + - - - - - - - - + + + + + + + + - - - - - - - + + + + + + + - - + + - - - - - + + + + + - - - - - - - - - + + + + + + + + + - - - - - + + + + + - - + + - - + + - - + + - - - - - - - - + + + + + + + + - - + + - - - - - - - + + + + + + + - - + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - + + + + - - + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - + + + + - - + + - - + + - - - - - + + + + + - - - - - + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - + + + + - - + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - + + + + - - + + - - + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/01-Parts Tree/1c-Parts Tree Redefinition.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/01-Parts Tree/1c-Parts Tree Redefinition.sysmlx index 4e7e596d..94965a90 100644 --- a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/01-Parts Tree/1c-Parts Tree Redefinition.sysmlx +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/01-Parts Tree/1c-Parts Tree Redefinition.sysmlx @@ -1,277 +1,277 @@ - - - - + + + + - - - - - - - + + + + + + + - - + + - - + + - - - - - + + + + + - - + + - - - - - - + + + + + + - - + + - - + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - + + + + + - - + + - - + + - - + + - - - - - - - - + + + + + + + + - - - - - - - + + + + + + + - - + + - - - - - - - - + + + + + + + + - - - - - - - + + + + + + + - - + + - - - - - + + + + + - - - - - - - - - + + + + + + + + + - - - - - + + + + + - - + + - - + + - - + + - - - - - - - - - + + + + + + + + + - - + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - + + + + - - + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - + + + + - - + + @@ -279,74 +279,74 @@ - - - - - - - - + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - + + + + - - + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - + + + + - - + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/01-Parts Tree/1d-Parts Tree with Reference.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/01-Parts Tree/1d-Parts Tree with Reference.sysmlx index 898555b5..559d30a9 100644 --- a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/01-Parts Tree/1d-Parts Tree with Reference.sysmlx +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/01-Parts Tree/1d-Parts Tree with Reference.sysmlx @@ -1,140 +1,140 @@ - - - - - - - + + + + + + + - - + + - - + + - - + + - - + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - + + - - - - - - - - + + + + + + + + - - + + - - - - - - + + + + + + - - + + - - + + - - - - - - - - + + + + + + + + - - - - - + + + + + - - + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - + + - - - + + + - - + + - - + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/02-Parts Interconnection/2a-Parts Interconnection.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/02-Parts Interconnection/2a-Parts Interconnection.sysmlx index 42188965..b315b2a8 100644 --- a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/02-Parts Interconnection/2a-Parts Interconnection.sysmlx +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/02-Parts Interconnection/2a-Parts Interconnection.sysmlx @@ -1,374 +1,374 @@ - - - - - - - - - - - - + + + + + + + + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - + + + - - - - - - - + + + + + + + - - - - - + + + + + - - + + - - - - - - - - + + + + + + + + - - + + - - - + + + - - - - - - - + + + + + + + - - - - - + + + + + - - - - - - - + + + + + + + - - - - - + + + + + - - - - - - - + + + + + + + - - - - - + + + + + - - - - - - - + + + + + + + - - - - - + + + + + - - - - + + + + - - + + - - - - + + + + - - - - - + + + + + - - - - - + + + + + - - - - - - - + + + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - - - + + + + + + + - - - - - - + + + + + + - - + + - - + + - - - - - - - - + + + + + + + + - - + + - - - - - + + + + + @@ -378,609 +378,609 @@ - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - + + + + + + - - + + - - - - - + + + + + - - - - - - - - - + + + + + + + + + - - + + - - - - - - + + + + + + - - + + - - + + - - - - - + + + + + - - - - - + + + + + - - + + - - - - - - - - - + + + + + + + + + - - + + - - - - - - + + + + + + - - + + - - - - - - - - - - - - + + + + + + + + + + + + - - + + - - - + + + - - + + - - - - - - - - - - + + + + + + + + + + - - - - - - + + + + + + - - + + - - - - - - - - + + + + + + + + - - + + - - - - - + + + + + - - - - - + + + + + - - + + - - - - - - - - + + + + + + + + - - + + - - - - - - - + + + + + + + - - + + - - + + - - - - - - - - + + + + + + + + - - + + - - - - - - - + + + + + + + - - + + - - - - - - - - + + + + + + + + - - - - - + + + + + - - + + - - - - - - - - - + + + + + + + + + - - + + - - - - - - + + + + + + - - + + - - - - - - - - - + + + + + + + + + - - + + - - - - - - + + + + + + - - + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - + + + + - - + + - - - - - + + + + + - - - - - + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - + + + + - - + + - - - - - + + + + + - - - - - + + + + + - - + + - - - - - - - - - + + + + + + + + + - - + + - - - - - - + + + + + + - - + + - - - - - - - - - + + + + + + + + + - - + + - - - - - - + + + + + + - - + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - + + + + - - + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - + + + + - - + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/02-Parts Interconnection/2c-Parts Interconnection-Multiple Decompositions.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/02-Parts Interconnection/2c-Parts Interconnection-Multiple Decompositions.sysmlx index 5ae0dd74..dfd63ef8 100644 --- a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/02-Parts Interconnection/2c-Parts Interconnection-Multiple Decompositions.sysmlx +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/02-Parts Interconnection/2c-Parts Interconnection-Multiple Decompositions.sysmlx @@ -1,265 +1,265 @@ - - - - - + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - + + - - - - - + + + + + - - - - - - - - + + + + + + + + - - - - - + + + + + - - - - - - - - + + + + + + + + - - + + - - - - - - + + + + + + - - + + - - - - - - - - - - - - + + + + + + + + + + + + - - + + - - - + + + - - + + - - + + - - - - - - - - + + + + + + + + - - - - - + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - + + - - - + + + - - + + - - - - - - - - + + + + + + + + - - + + - - - - - - + + + + + + - - + + @@ -267,246 +267,246 @@ - - - - - + + + + + - - - - - + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - + + - - - - + + + + - - + + - - - - - - - - - - - - + + + + + + + + + + + + - - + + - - - - + + + + - - + + - - - - - - - - + + + + + + + + - - + + - - - - - - + + + + + + - - + + - - - - - - - - - - - - + + + + + + + + + + + + - - + + - - - + + + - - + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - + + - - - - + + + + - - + + - - - - - - - - - - - - + + + + + + + + + + + + - - + + - - - - + + + + - - + + - - - - - - - - - - - - + + + + + + + + + + + + - - + + - - - + + + - - + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/03-Function-based Behavior/3a-Function-based Behavior-1.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/03-Function-based Behavior/3a-Function-based Behavior-1.sysmlx index bf3fd4d9..3e1bf17e 100644 --- a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/03-Function-based Behavior/3a-Function-based Behavior-1.sysmlx +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/03-Function-based Behavior/3a-Function-based Behavior-1.sysmlx @@ -1,127 +1,127 @@ - - - - - - - - - - + + + + + + + + + + - + - - + + - - + + - - + + - - + + - - + + - - - - - + + + + + - - - - + + + + - - - - - - + + + + + + - - - - + + + + - - - - - - + + + + + + - - - - + + + + - - - - - - + + + + + + - - - - + + + + - - - - + + + + - - - - - + + + + + - - - - + + + + - - - - + + + + @@ -129,480 +129,480 @@ - - - - - - - - + + + + + + + + - - - - + + + + - - - - + + + + - - - - - - - - + + + + + + + + - - + + - - - - - + + + + + - - + + - - - - - + + + + + - - - - - - - - + + + + + + + + - - - - - - + + + + + + - - + + - - - + + + - - - - - - - - + + + + + + + + - - - - - - + + + + + + - - - + + + - - - - - - - - + + + + + + + + - - - - - - + + + + + + - - - + + + - - - - - - - + + + + + + + - - - - - - + + + + + + - - + + - - - - - - - + + + + + + + - - - - - - + + + + + + - - + + - - - - - - + + + + + + - - + + - - - - - + + + + + - - + + - - - - + + + + - - - - - - - + + + + + + + - - - - - + + + + + - - - - - + + + + + - - + + - - - - - - - + + + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - - - + + + + + + + - - - - - + + + + + - - + + - - - - - - - + + + + + + + - - - - - + + + + + - - - - - - - + + + + + + + - - - - - + + + + + - - - - - - - + + + + + + + - - - - - + + + + + - - - - - - - + + + + + + + - - - - - + + + + + - - + + - - - - - - - + + + + + + + - - - - - + + + + + - - - - - - - + + + + + + + - - - - - + + + + + - - - - - - - + + + + + + + - - - - - + + + + + - - - - - - - + + + + + + + - - - - - + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/03-Function-based Behavior/3a-Function-based Behavior-2.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/03-Function-based Behavior/3a-Function-based Behavior-2.sysmlx index 36abe3c9..e818ec39 100644 --- a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/03-Function-based Behavior/3a-Function-based Behavior-2.sysmlx +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/03-Function-based Behavior/3a-Function-based Behavior-2.sysmlx @@ -1,117 +1,117 @@ - - - - - - - - + + + + + + + + - - + + - - + + - - + + - - - - - + + + + + - - - + + + - - - - - + + + + + - - - + + + - - - - - + + + + + - - - + + + - - - - - + + + + + - - - + + + - - - + + + - - - - - + + + + + - - - + + + - - - + + + @@ -120,43 +120,43 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + - - - + + + - - - - - + + + + + - - - - - - - + + + + + + + @@ -164,354 +164,354 @@ - - - - - - - - + + + + + + + + - - - - - - + + + + + + - - - + + + - - - - - - - - + + + + + + + + - - - - - - + + + + + + - - - + + + - - - - - - - - + + + + + + + + - - - - - - + + + + + + - - - + + + - - + + - + - - - - - - + + + + + + - - - - + + + + - - + + - - - - - - + + + + + + - - - - + + + + - - - - - + + + + + - - - - - - + + + + + + - - - - + + + + - - - - - + + + + + - - - - - - + + + + + + - - - - - + + + + + - - + + - - - - - - - + + + + + + + - - - - - + + + + + - - - - - - - + + + + + + + - - - - - + + + + + - - - - - - - + + + + + + + - - - - - + + + + + - - - - - - - + + + + + + + - - - - - + + + + + - - + + - - - - - - - + + + + + + + - - - - - + + + + + - - - - - - - + + + + + + + - - - - - + + + + + - - - - - - - + + + + + + + - - - - - + + + + + - - - - - - - + + + + + + + - - - - - + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/03-Function-based Behavior/3a-Function-based Behavior-3.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/03-Function-based Behavior/3a-Function-based Behavior-3.sysmlx index 3b3ea2fa..48b33e8d 100644 --- a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/03-Function-based Behavior/3a-Function-based Behavior-3.sysmlx +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/03-Function-based Behavior/3a-Function-based Behavior-3.sysmlx @@ -1,117 +1,117 @@ - - - - - - - - + + + + + + + + - - + + - - + + - - + + - - - - - + + + + + - - - + + + - - - - - + + + + + - - - + + + - - - - - + + + + + - - - + + + - - - - - + + + + + - - - + + + - - - + + + - - - - - + + + + + - - - + + + - - - + + + @@ -120,220 +120,220 @@ - - - - - - - - + + + + + + + + - - - + + + - - - + + + - - - - + + + + - - - - - - - + + + + + + + - - - - - - + + + + + + - - - - + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - + + + - - - - - - - - + + + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - + + + - - - - - - - - + + + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - + + + - - - - - - - - + + + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - + + + - - - + + + @@ -342,29 +342,29 @@ - - - - - - + + + + + + - - - - + + + + - - - - - + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/03-Function-based Behavior/3c-Function-based Behavior-structure mod-1.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/03-Function-based Behavior/3c-Function-based Behavior-structure mod-1.sysmlx index b2e5c9f0..7cdc402b 100644 --- a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/03-Function-based Behavior/3c-Function-based Behavior-structure mod-1.sysmlx +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/03-Function-based Behavior/3c-Function-based Behavior-structure mod-1.sysmlx @@ -1,169 +1,169 @@ - - - - - + + + + + - - + + - - + + - - + + - - + + - - + + - - - - - - - + + + + + + + - - - - - + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - + + - - + + - - - - - - - + + + + + + + - - + + - - - - - - - + + + + + + + - - + + - - - - - - - + + + + + + + - - + + - - - - - - - - - - - + + + + + + + + + + + - - + + - - + + - - - - - - - - - - - + + + + + + + + + + + - - - - + + + + - - - - - - - - + + + + + + + + @@ -171,51 +171,51 @@ - - - - - - + + + + + + - - - - + + + + - - - + + + - - - - - - - - - - - + + + + + + + + + + + - - + + - - - + + + @@ -223,50 +223,50 @@ - - - - - - + + + + + + - - - - + + + + - - - - - - - - - + + + + + + + + + - - - - + + + + - - - - - + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/03-Function-based Behavior/3c-Function-based Behavior-structure mod-2.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/03-Function-based Behavior/3c-Function-based Behavior-structure mod-2.sysmlx index bbe0d504..e3f16143 100644 --- a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/03-Function-based Behavior/3c-Function-based Behavior-structure mod-2.sysmlx +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/03-Function-based Behavior/3c-Function-based Behavior-structure mod-2.sysmlx @@ -1,149 +1,149 @@ - - - - - + + + + + - - + + - - + + - - + + - - + + - - + + - - - - - - - + + + + + + + - - - - - + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - + + - - + + - - - - - - - + + + + + + + - - + + - - - - - - - + + + + + + + - - + + - - - - - - - + + + + + + + - - + + - - - - - - - - - - - + + + + + + + + + + + - - + + - - + + - - - - - - - - - - - + + + + + + + + + + + @@ -151,33 +151,33 @@ - - - - - - + + + + + + - - - - + + + + - - - - - - - - - + + + + + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/03-Function-based Behavior/3c-Function-based Behavior-structure mod-3.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/03-Function-based Behavior/3c-Function-based Behavior-structure mod-3.sysmlx index e518d5ba..5118926f 100644 --- a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/03-Function-based Behavior/3c-Function-based Behavior-structure mod-3.sysmlx +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/03-Function-based Behavior/3c-Function-based Behavior-structure mod-3.sysmlx @@ -1,132 +1,132 @@ - - - - - - + + + + + + - - + + - - + + - - + + - - + + - - + + - - - - - - - - - - - + + + + + + + + + + + - - + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - + + - - + + - - - - - - - - - - - + + + + + + + + + + + - - - - + + + + - - - - - + + + + + - - - - - - - - - - - + + + + + + + + + + + - - + + - - - - + + + + - - + + @@ -134,56 +134,56 @@ - - - - - - + + + + + + - - - - + + + + - - - - - - - - - + + + + + + + + + - - - - + + + + - - - - - + + + + + - - - - + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/03-Function-based Behavior/3d-Function-based Behavior-item.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/03-Function-based Behavior/3d-Function-based Behavior-item.sysmlx index af7d822e..016d1b8b 100644 --- a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/03-Function-based Behavior/3d-Function-based Behavior-item.sysmlx +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/03-Function-based Behavior/3d-Function-based Behavior-item.sysmlx @@ -1,218 +1,218 @@ - - - - - + + + + + - - - - - - + + + + + + - - - - - - - + + + + + + + - - - + + + - - - - - - - + + + + + + + - - - - - + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - + + + + + - - - + + + - - - - - - + + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - - + + + + + + - - - + + + - - - - - - + + + + + + - - - + + + - - + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - + + - - - + + + - - - - - - - - - - - + + + + + + + + + + + - - + + - - - + + + @@ -220,183 +220,183 @@ - - + + - - - - - + + + + + - - - - - - + + + + + + - - - + + + - - - - - - + + + + + + - - - + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - + + + + + + - - + + - - + + - - - - - - + + + + + + - - + + - - - + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - + + - - - + + + - - - - - - - + + + + + + + - - + + - - + + - - + + - - - - - - + + + + + + - - + + - - + + - - + + - - + + - - + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/03-Function-based Behavior/3e-Function-based Behavior-item.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/03-Function-based Behavior/3e-Function-based Behavior-item.sysmlx index 940b7f41..e0349d3c 100644 --- a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/03-Function-based Behavior/3e-Function-based Behavior-item.sysmlx +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/03-Function-based Behavior/3e-Function-based Behavior-item.sysmlx @@ -1,204 +1,204 @@ - - - - - - - - + + + + + + + + - - - + + + - - - + + + - - + + - - + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - + + + + + - - + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - + + - - - + + + - - + + - - + + - - + + - - - - - - - - + + + + + + + + - - - - - - + + + + + + - - - - - - - - - - + + + + + + + + + + - - + + - - - - - + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - + + - - - + + + - - + + - - + + @@ -206,59 +206,59 @@ - - - - - - - - - + + + + + + + + + - - + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - + + - - + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/04-Functional Allocation/4a-Functional Allocation.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/04-Functional Allocation/4a-Functional Allocation.sysmlx index 9c092956..ea2658ef 100644 --- a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/04-Functional Allocation/4a-Functional Allocation.sysmlx +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/04-Functional Allocation/4a-Functional Allocation.sysmlx @@ -1,65 +1,65 @@ - - - - - + + + + + - - + + - - + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - + + - - - - - - - - - - - + + + + + + + + + + + - - + + - - - + + + @@ -67,87 +67,87 @@ - - - - + + + + - - - - - - - - - + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - + + - - - + + + - - - - - - - - - - - + + + + + + + + + + + - - + + - - - + + + @@ -155,15 +155,15 @@ - - - - - - - - - + + + + + + + + + @@ -171,87 +171,87 @@ - - - - + + + + - - - - - - - - - + + + + + + + + + - - + + - - - - - - - + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - + + - - - + + + - - - - - - - - - - - + + + + + + + + + + + - - + + - - - + + + @@ -259,15 +259,15 @@ - - - - - - - - - + + + + + + + + + @@ -275,84 +275,84 @@ - - - - + + + + - - - - - - - - - + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - + + - - - + + + - - - - - - - - - - - + + + + + + + + + + + - - + + - - - + + + @@ -360,15 +360,15 @@ - - - - - - - - - + + + + + + + + + @@ -376,123 +376,123 @@ - - - - + + + + - - - - - - - - - + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - + + - - - + + + - - - - - - - - - - - + + + + + + + + + + + - - + + - - - - - + + + + + - - + + - - - - - - - - - - - + + + + + + + + + + + - - + + - - - - - + + + + + - - + + @@ -500,25 +500,25 @@ - - - - - - - - - + + + + + + + + + - - - - + + + + - - - - + + + + @@ -526,20 +526,20 @@ - - - - + + + + - - - - + + + + - - - - + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/05-State-based Behavior/5-State-based Behavior-1.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/05-State-based Behavior/5-State-based Behavior-1.sysmlx new file mode 100644 index 00000000..8ce4dd0c --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/05-State-based Behavior/5-State-based Behavior-1.sysmlx @@ -0,0 +1,1033 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/05-State-based Behavior/5-State-based Behavior-1a.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/05-State-based Behavior/5-State-based Behavior-1a.sysmlx index 84ba72d7..9d135d30 100644 --- a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/05-State-based Behavior/5-State-based Behavior-1a.sysmlx +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/05-State-based Behavior/5-State-based Behavior-1a.sysmlx @@ -1,253 +1,253 @@ - - - - + + + + - + - - - - - - + + + + + + - - - + + + - - - + + + - - - - - + + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - - - - + + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - - - + + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - - + + + + + - - - - + + + + - - - - + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - + + + + + - - + + - - + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + - - + + - - - + + + - - - - - - - - - + + + + + + + + + - - + + - - - - - - - - - - - + + + + + + + + + + + - - + + - - - + + + @@ -255,240 +255,240 @@ - - - - - - + + + + + + - - - - - + + + + + - - + + - - + + - - + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - + + + + + + - - - - - + + + + + - - + + - - - - - - - - + + + + + + + + - - - + + + - - - + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - + + + + + + - - - - - + + + + + - - + + - - - - + + + + - - + + - - - - - + + + + + - - + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - + + + + + - - + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - - + + + - - + + @@ -496,119 +496,119 @@ - - - - - - + + + + + + - - - - - + + + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - - + + + - - - - - - - - - - - + + + + + + + + + + + - - + + - - - + + + - - + + - - + + - - + + @@ -616,45 +616,45 @@ - - - - - - - - - + + + + + + + + + - - + + - - - - - - - - - - - + + + + + + + + + + + - - + + - - - + + + @@ -662,117 +662,117 @@ - - - - - - + + + + + + - - - - - + + + + + - - + + - - + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - + + + + + + - - - - - + + + + + - - + + - - + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - + + + + + + - - - - - + + + + + - - + + @@ -780,131 +780,131 @@ - - - - - - - + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - + + + + + - - + + - - + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - + + + + + + - - - - - + + + + + - - + + - - + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - + + + + + + - - - - - + + + + + - - + + @@ -912,83 +912,83 @@ - - - - - - - - + + + + + + + + - - + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - - - - + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - + + - - - + + + @@ -996,26 +996,26 @@ - - - - - - + + + + + + - - - - - - - + + + + + + + - - + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/05-State-based Behavior/5-State-based Behavior-2.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/05-State-based Behavior/5-State-based Behavior-2.sysmlx new file mode 100644 index 00000000..4ee6adfe --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/05-State-based Behavior/5-State-based Behavior-2.sysmlx @@ -0,0 +1,961 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/06-Individual and Snapshots/6-Individual and Snapshots.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/06-Individual and Snapshots/6-Individual and Snapshots.sysmlx new file mode 100644 index 00000000..e91cbe87 --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/06-Individual and Snapshots/6-Individual and Snapshots.sysmlx @@ -0,0 +1,736 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/07-Variant Configuration/7a-Variant Configuration - General Concept.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/07-Variant Configuration/7a-Variant Configuration - General Concept.sysmlx new file mode 100644 index 00000000..6b61c46e --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/07-Variant Configuration/7a-Variant Configuration - General Concept.sysmlx @@ -0,0 +1,270 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/07-Variant Configuration/7a1-Variant Configuration - General Concept-a.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/07-Variant Configuration/7a1-Variant Configuration - General Concept-a.sysmlx new file mode 100644 index 00000000..4facfb4f --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/07-Variant Configuration/7a1-Variant Configuration - General Concept-a.sysmlx @@ -0,0 +1,468 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/07-Variant Configuration/7b-Variant Configurations.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/07-Variant Configuration/7b-Variant Configurations.sysmlx new file mode 100644 index 00000000..e5189707 --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/07-Variant Configuration/7b-Variant Configurations.sysmlx @@ -0,0 +1,1057 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/08-Requirements/8-Requirements.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/08-Requirements/8-Requirements.sysmlx new file mode 100644 index 00000000..8ae0b33f --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/08-Requirements/8-Requirements.sysmlx @@ -0,0 +1,870 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/09-Verification/9-Verification-simplified.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/09-Verification/9-Verification-simplified.sysmlx new file mode 100644 index 00000000..30eab4a7 --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/09-Verification/9-Verification-simplified.sysmlx @@ -0,0 +1,657 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/10-Analysis and Trades/10a-Analysis.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/10-Analysis and Trades/10a-Analysis.sysmlx new file mode 100644 index 00000000..87e90eee --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/10-Analysis and Trades/10a-Analysis.sysmlx @@ -0,0 +1,390 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/10-Analysis and Trades/10b-Trade-off Among Alternative Configurations.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/10-Analysis and Trades/10b-Trade-off Among Alternative Configurations.sysmlx new file mode 100644 index 00000000..048ce5e3 --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/10-Analysis and Trades/10b-Trade-off Among Alternative Configurations.sysmlx @@ -0,0 +1,588 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/10-Analysis and Trades/10c-Fuel Economy Analysis.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/10-Analysis and Trades/10c-Fuel Economy Analysis.sysmlx new file mode 100644 index 00000000..858fe5b0 --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/10-Analysis and Trades/10c-Fuel Economy Analysis.sysmlx @@ -0,0 +1,1011 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/10-Analysis and Trades/10d-Dynamics Analysis.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/10-Analysis and Trades/10d-Dynamics Analysis.sysmlx new file mode 100644 index 00000000..de37b392 --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/10-Analysis and Trades/10d-Dynamics Analysis.sysmlx @@ -0,0 +1,982 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/11-View and Viewpoint/11a-View-Viewpoint.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/11-View and Viewpoint/11a-View-Viewpoint.sysmlx new file mode 100644 index 00000000..2ba3a99b --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/11-View and Viewpoint/11a-View-Viewpoint.sysmlx @@ -0,0 +1,345 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/11-View and Viewpoint/11b-Safety and Security Feature Views.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/11-View and Viewpoint/11b-Safety and Security Feature Views.sysmlx new file mode 100644 index 00000000..868d1a41 --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/11-View and Viewpoint/11b-Safety and Security Feature Views.sysmlx @@ -0,0 +1,515 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/12-Dependency Relationships/12a-Dependency.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/12-Dependency Relationships/12a-Dependency.sysmlx new file mode 100644 index 00000000..fc0e2857 --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/12-Dependency Relationships/12a-Dependency.sysmlx @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/12-Dependency Relationships/12b-Allocation-1.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/12-Dependency Relationships/12b-Allocation-1.sysmlx new file mode 100644 index 00000000..b73d0957 --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/12-Dependency Relationships/12b-Allocation-1.sysmlx @@ -0,0 +1,302 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/12-Dependency Relationships/12b-Allocation.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/12-Dependency Relationships/12b-Allocation.sysmlx new file mode 100644 index 00000000..e623c8ea --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/12-Dependency Relationships/12b-Allocation.sysmlx @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/13-Model Containment/13a-Model Containment.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/13-Model Containment/13a-Model Containment.sysmlx new file mode 100644 index 00000000..a7e7fbe2 --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/13-Model Containment/13a-Model Containment.sysmlx @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/13-Model Containment/13b-Safety and Security Features Element Group-1.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/13-Model Containment/13b-Safety and Security Features Element Group-1.sysmlx new file mode 100644 index 00000000..81eb1bd4 --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/13-Model Containment/13b-Safety and Security Features Element Group-1.sysmlx @@ -0,0 +1,429 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/13-Model Containment/13b-Safety and Security Features Element Group-2.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/13-Model Containment/13b-Safety and Security Features Element Group-2.sysmlx new file mode 100644 index 00000000..3b5f72de --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/13-Model Containment/13b-Safety and Security Features Element Group-2.sysmlx @@ -0,0 +1,445 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/13-Model Containment/13b-Safety and Security Features Element Group.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/13-Model Containment/13b-Safety and Security Features Element Group.sysmlx new file mode 100644 index 00000000..4fc64efe --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/13-Model Containment/13b-Safety and Security Features Element Group.sysmlx @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/14-Language Extensions/14a-Language Extensions.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/14-Language Extensions/14a-Language Extensions.sysmlx new file mode 100644 index 00000000..ccb85447 --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/14-Language Extensions/14a-Language Extensions.sysmlx @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/14-Language Extensions/14b-Language Extensions.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/14-Language Extensions/14b-Language Extensions.sysmlx new file mode 100644 index 00000000..92c6315e --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/14-Language Extensions/14b-Language Extensions.sysmlx @@ -0,0 +1,194 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/14-Language Extensions/14c-Language Extensions.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/14-Language Extensions/14c-Language Extensions.sysmlx new file mode 100644 index 00000000..db7ac352 --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/14-Language Extensions/14c-Language Extensions.sysmlx @@ -0,0 +1,1208 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_01-Constants.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_01-Constants.sysmlx new file mode 100644 index 00000000..bc9b00ef --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_01-Constants.sysmlx @@ -0,0 +1,379 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_02-Basic Value Properties.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_02-Basic Value Properties.sysmlx new file mode 100644 index 00000000..06236feb --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_02-Basic Value Properties.sysmlx @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_03-Value Expression.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_03-Value Expression.sysmlx new file mode 100644 index 00000000..7f3a617a --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_03-Value Expression.sysmlx @@ -0,0 +1,438 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_04-Logical Expressions.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_04-Logical Expressions.sysmlx new file mode 100644 index 00000000..093c996d --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_04-Logical Expressions.sysmlx @@ -0,0 +1,326 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_05-Unification of Expression and Constraint Definition.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_05-Unification of Expression and Constraint Definition.sysmlx new file mode 100644 index 00000000..80a3a537 --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_05-Unification of Expression and Constraint Definition.sysmlx @@ -0,0 +1,504 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_06-System of Quantities.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_06-System of Quantities.sysmlx new file mode 100644 index 00000000..12d92a5e --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_06-System of Quantities.sysmlx @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_07-System of Units and Scales.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_07-System of Units and Scales.sysmlx new file mode 100644 index 00000000..bee18722 --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_07-System of Units and Scales.sysmlx @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_08-Range Restriction.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_08-Range Restriction.sysmlx new file mode 100644 index 00000000..6a6080b6 --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_08-Range Restriction.sysmlx @@ -0,0 +1,178 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_10-Primitive Data Types.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_10-Primitive Data Types.sysmlx new file mode 100644 index 00000000..a48c070b --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_10-Primitive Data Types.sysmlx @@ -0,0 +1,305 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_11-Variable Length Collection Types.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_11-Variable Length Collection Types.sysmlx new file mode 100644 index 00000000..a9c31711 --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_11-Variable Length Collection Types.sysmlx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_12-Compound Value Type.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_12-Compound Value Type.sysmlx new file mode 100644 index 00000000..aa65e791 --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_12-Compound Value Type.sysmlx @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_13-Discretely Sampled Function Value.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_13-Discretely Sampled Function Value.sysmlx new file mode 100644 index 00000000..617793de --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_13-Discretely Sampled Function Value.sysmlx @@ -0,0 +1,1085 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_19-Materials with Properties.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_19-Materials with Properties.sysmlx new file mode 100644 index 00000000..af5768dc --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_19-Materials with Properties.sysmlx @@ -0,0 +1,763 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_19a-Materials with Properties.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_19a-Materials with Properties.sysmlx new file mode 100644 index 00000000..7983828e --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/15-Properties-Values-Expressions/15_19a-Materials with Properties.sysmlx @@ -0,0 +1,846 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/17-Sequence Modeling/17a-Sequence-Modeling.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/17-Sequence Modeling/17a-Sequence-Modeling.sysmlx new file mode 100644 index 00000000..32c28c57 --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/17-Sequence Modeling/17a-Sequence-Modeling.sysmlx @@ -0,0 +1,277 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/17-Sequence Modeling/17b-Sequence-Modeling.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/17-Sequence Modeling/17b-Sequence-Modeling.sysmlx new file mode 100644 index 00000000..33c40a97 --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/17-Sequence Modeling/17b-Sequence-Modeling.sysmlx @@ -0,0 +1,271 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Validation/18-Use Case/18-Use Case.sysmlx b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/18-Use Case/18-Use Case.sysmlx new file mode 100644 index 00000000..a83de247 --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Validation/18-Use Case/18-Use Case.sysmlx @@ -0,0 +1,379 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From ca4a4bfae9fccbca3139715391a6bc2e27b21caf Mon Sep 17 00:00:00 2001 From: atheate Date: Tue, 11 Aug 2026 10:14:37 +0200 Subject: [PATCH 3/5] Validation of State-based-behavior files --- SysML2.NET.CodeGenerator/GRAMMAR.md | 93 +++++++++++ .../5-State-based Behavior-1.sysml | 155 ++++++++++++++++++ .../5-State-based Behavior-2.sysml | 97 +++++++++++ .../TextualNotationValidationTestFixture.cs | 2 + ...FeatureMembershipTextualNotationBuilder.cs | 5 +- .../Writers/NameResolutionCache.cs | 77 ++++++++- .../TextualNotationValidationExtensions.cs | 22 ++- .../Writers/TypeTextualNotationBuilder.cs | 71 ++++++-- 8 files changed, 493 insertions(+), 29 deletions(-) create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Expected/05-State-based Behavior/5-State-based Behavior-1.sysml create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Expected/05-State-based Behavior/5-State-based Behavior-2.sysml diff --git a/SysML2.NET.CodeGenerator/GRAMMAR.md b/SysML2.NET.CodeGenerator/GRAMMAR.md index e75ca2cf..dbaf9e07 100644 --- a/SysML2.NET.CodeGenerator/GRAMMAR.md +++ b/SysML2.NET.CodeGenerator/GRAMMAR.md @@ -176,3 +176,96 @@ dotnet test SysML2.NET.sln ```bash grep -r "HandCoded" SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/*.cs | wc -l ``` + +## Known KEBNF / specification divergences + +The `.kebnf` files are OMG-owned and **never edited**. Where a production cannot describe the +notation the pilot implementation actually reads and writes, the writer deviates and the deviation is +recorded here. All of these are reported upstream in +[SysML-v2-Release issue #124](https://github.com/Systems-Modeling/SysML-v2-Release/issues/124) +("Several textual KEBNF productions appear unreachable or inconsistent with release examples"). + +Do **not** "fix" the writer back to the literal production without checking this table first. + +### #124 item 8 — `EntryTransitionMember` emits a duplicated `then` (deviation implemented) + +``` +EntryTransitionMember : FeatureMembership = + MemberPrefix ( ownedRelatedElement += GuardedTargetSuccession + | 'then' ownedRelatedElement += TargetSuccession ) ';' + +TargetSuccession : SuccessionAsUsage = + ownedRelationship += SourceEndMember 'then' ownedRelationship += ConnectorEndMember +``` + +`TargetSuccession` supplies its own `'then'`, so the literal reading of the second alternative is +`then then S1;`. The corpus writes `entry; then off;` +(`Validation/05-State-based Behavior/5-State-based Behavior-2.sysml`), and the pilot's Xtext uses +`TransitionSuccession` (`EmptySourceEndMember ConnectorEndMember`, no `'then'`) at +`org.omg.sysml.xtext/src/org/omg/sysml/xtext/SysML.xtext:1798`. + +Confirmed against both independent sources of the grammar — the `.kebnf` and the OMG specification +(SysML 2.0 §8.2.2.18.1 State Definitions, §8.2.2.17.8 Action Successions) — so this is a genuine +specification defect, not a transcription slip. + +The model cannot discriminate the two productions: both are a `SuccessionAsUsage` with two +`EndFeatureMembership`s, and the multiplicity present on the source end is added by the pilot's +transform to *both* ends. **Deviation:** `BuildEntryTransitionMemberHandCoded` suppresses the rule's +own `'then'` and lets `TargetSuccession` supply it. The structure the KEBNF specifies is still +honoured; only the redundant keyword is dropped. + +### #124 item 7 — `end` prefix on non-reference usages (deviation accepted, not implemented) + +`DefaultReferenceUsage` has no `EndUsagePrefix`, so `end ref hitch` / `end port p1: P;` are +unreachable, yet appear in the corpus (`03-Function-based Behavior/3c-…-1`, `3c-…-2`). The writer +emits the pilot's form; the difference is recorded as an accepted deviation for those files. + +### Items expected to affect folders not yet validated + +Not yet investigated — listed so the cause is recognised on first encounter rather than +re-diagnosed: + +| item | production | folder likely affected | +|---|---|---| +| #1 | `AllocationDefinition` missing from `DefinitionElement` | 12-Dependency Relationships | +| #3 | `MetadataUsage` not wired into any dispatch point | 14-Language Extensions | +| #9 | `SatisfyRequirementUsage` requires `assert` | 08-Requirements | +| #10 | `CaseBodyItem` admits no `ReturnParameterMember` | 10-Analysis and Trades | +| #11 | `EnumeratedValue` cannot carry prefix metadata (`#Security enum secret`) | 13-Model Containment, 14-Language Extensions | + +Items #2, #4, #5, #6 concern productions with no corpus coverage. + +## Model ↔ notation reconciliations (NOT divergences) + +Cases where the grammar offers two conformant productions for one model, so the writer must choose. +Nothing here deviates from the specification — unlike the divergences above. + +### `TargetTransitionUsage` — the implied transition source + +``` +StateBodyItem : Type = … + | ( ownedRelationship += SourceSuccessionMember )? + ownedRelationship += BehaviorUsageMember + ( ownedRelationship += TargetTransitionUsageMember )* ← shorthand + | ownedRelationship += TransitionUsageMember ← explicit +``` + +`state off; accept X then Y;` and `transition off accept X then Y;` are **both normative** and produce +the *same* model: the pilot resolves the shorthand at parse time and stores the source explicitly as a +`FeatureChainMember` (a non-owning `Membership` cross-referencing the state). The shorthand-ness is +therefore not recoverable, and `TargetTransitionUsage` has **no notation for the source at all**. + +The writer prefers the shorthand (matching the corpus) only when all three hold, each required for +correctness rather than style: + +- the transition is **anonymous** — `TargetTransitionUsage` has no `UsageDeclaration` slot, so a named + transition would silently lose its name (this is what keeps `5-…-1` / `5-…-1a` on the explicit form); +- its source **is** the anchor feature of the preceding `BehaviorUsageMember` — otherwise the shorthand + re-parses against that state and denotes a different element; +- it is positioned in the `( … )*` run following that member. + +Consequence, in `TypeTextualNotationBuilder.EmitTargetTransitionRun`: the transition's own +`ownedRelationship` cursor is advanced once **past the source with no emission**. That is a deliberate +exception to the `Move()` ↔ `+=` Golden Rule, valid because the elected production has no notation for +that element. It is conditional — it only runs after `QueryImpliedSourceTransition` has confirmed +position 0 is the source membership — so it cannot consume a real element. diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Expected/05-State-based Behavior/5-State-based Behavior-1.sysml b/SysML2.NET.Serializer.TextualNotation.Tests/Expected/05-State-based Behavior/5-State-based Behavior-1.sysml new file mode 100644 index 00000000..9b649bd0 --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Expected/05-State-based Behavior/5-State-based Behavior-1.sysml @@ -0,0 +1,155 @@ +package '5-State-based Behavior-1' { + private import ScalarValues::*; + private import ISQ::*; + private import '3a-Function-based Behavior-1'::*; + package Definitions { + part def VehicleA { + /* + * The following declare that 'VehicleA' performs a + * 'provide power' action and exhibits some 'vehicle states', + * without giving details about these behaviors. + */ + perform action 'provide power': 'Provide Power'; + exhibit state 'vehicle states': 'Vehicle States'; + } + part def VehicleController { + exhibit state 'controller states': 'Controller States'; + } + /* + * Black box specifications for state definitions may also have + * input and output parameters, like activities, though none + * are used here. + */ + state def 'Vehicle States'; + state def 'Controller States'; + action def 'Perform Self Test'; + action def 'Apply Parking Brake'; + action def 'Sense Temperature' { + out temp: ThermodynamicTemperatureValue; + } + attribute def 'Vehicle Start Signal'; + attribute def 'Vehicle On Signal'; + attribute def 'Vehicle Off Signal'; + attribute def 'Start Signal'; + attribute def 'Off Signal'; + attribute def 'Over Temp'; + attribute def 'Return to Normal'; + } + package Usages { + private import Definitions::*; + /* + * These actions are used enabled in the state usage + * 'vehicle states', in addition to 'provide power'. + */ + action 'perform self test': 'Perform Self Test'; + action 'apply parking brake': 'Apply Parking Brake'; + action 'sense temperature': 'Sense Temperature'; + state 'vehicle states': 'Vehicle States' parallel { + /* + * This is a usage of the state definition 'Vehicle States'. + * Note that it depends specifically on on the part 'vehicle1_c1'. + */ + ref vehicle: VehicleA; + state 'operational states' { + doc + /* + * The state definition for this usage is implicit. + */ + + entry action initial { + doc + /* + * This empty entry action acts like a start pseudo state. + */ + + } + transition initial then off; + state off; + transition 'off-starting' first off accept 'Vehicle Start Signal' if vehicle1_c1.'brake pedal depressed' do send new 'Start Signal'() to vehicle1_c1.vehicleController then starting { + /* + * The transition definition for a transition usage is always implicit. + * "accept" marks the trigger, "if" the guard and "do" the effect. + * + * The notation "new 'Start Signal'()" constructs a specific instance of the + * 'Start Signal' attribute def to be sent to the 'vehicleController'. If the + * attribute def had properties, their values would be given as arguments + * inside the parentheses. + */ + } + state starting; + transition 'starting-on' first starting accept 'Vehicle On Signal' then on; + state on { + /* + * A state may have a "entry" action that is performed on entry into + * the state, a "do" action that is performed while in the state + * and an "exit" action that is performed on exit from the state. + */ + entry 'perform self test'; + do 'provide power'; + exit 'apply parking brake'; + } + transition 'on-off' first on accept 'Vehicle Off Signal' then off; + } + state 'health states' { + /* + * 'health states' is concurrent with 'operational states', because the + * containing state usage is "parallel". + */ + entry action initial; + do 'sense temperature' { + out temp; + /* + * State-behavior actions may have input and output parameters. + */ + } + transition initial then normal; + state normal; + transition 'normal-maintenance' first normal accept at vehicle1_c1.maintenanceTime then maintenance; + transition 'normal-degraded' first normal accept when 'sense temperature'.temp > vehicle1_c1.Tmax do send new 'Over Temp'() to vehicle1_c1.vehicleController then degraded; + state maintenance; + transition 'maintenance-normal' first maintenance accept 'Return to Normal' then normal; + state degraded; + transition 'degraded-normal' first degraded accept 'Return to Normal' then normal; + } + } + state 'controller states': 'Controller States' parallel { + state 'operational controller states' { + entry action initial; + transition initial then off; + state off; + transition 'off-on' first off accept 'Start Signal' then on; + state on; + transition 'on-off' first on accept 'Off Signal' then off; + } + } + part vehicle1_c1: VehicleA { + port fuelCmdPort { + in fuelCmd: FuelCmd; + } + /* + * These attribute properties are used in the specification for + * 'vehicle states'. + */ + attribute 'brake pedal depressed': Boolean; + attribute maintenanceTime: Time::DateTime; + attribute Tmax: ThermodynamicTemperatureValue; + perform 'provide power' :>> VehicleA::'provide power' { + /* + * In the context of the 'vehicle1_c1' part, the 'provide power' action + * that is enabled in 'vehicle states' gets its input from the 'fuelCmdPort'. + */ + in fuelCmd = fuelCmdPort.fuelCmd; + } + exhibit 'vehicle states' :>> VehicleA::'vehicle states' { + /* + * This allocates the state usage 'vehicle states' as the detailed + * state-based behavior for 'vehicle1_c1' that fills in the generic + * declaration in 'VehicleA'. + */ + } + part vehicleController: VehicleController { + exhibit 'controller states' :>> VehicleController::'controller states'; + } + } + } +} diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Expected/05-State-based Behavior/5-State-based Behavior-2.sysml b/SysML2.NET.Serializer.TextualNotation.Tests/Expected/05-State-based Behavior/5-State-based Behavior-2.sysml new file mode 100644 index 00000000..2e7a7f0d --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Expected/05-State-based Behavior/5-State-based Behavior-2.sysml @@ -0,0 +1,97 @@ +package '5-State-based Behavior-2' { + private import ScalarValues::*; + private import ISQ::*; + private import '3a-Function-based Behavior-1'::*; + package Definitions { + part def VehicleA { + perform action 'provide power': 'Provide Power'; + exhibit state 'vehicle states': 'Vehicle States'; + } + part def VehicleController { + exhibit state 'controller states': 'Controller States'; + } + state def 'Vehicle States'; + state def 'Controller States'; + action def 'Perform Self Test'; + action def 'Apply Parking Brake'; + action def 'Sense Temperature' { + out temp: ThermodynamicTemperatureValue; + } + attribute def 'Vehicle Start Signal'; + attribute def 'Vehicle On Signal'; + attribute def 'Vehicle Off Signal'; + attribute def 'Start Signal'; + attribute def 'Off Signal'; + attribute def 'Over Temp'; + attribute def 'Return to Normal'; + } + package Usages { + private import Definitions::*; + action 'perform self test': 'Perform Self Test'; + action 'apply parking brake': 'Apply Parking Brake'; + action 'sense temperature': 'Sense Temperature'; + state 'vehicle states': 'Vehicle States' parallel { + state 'operational states' { + entry; + then off; + /* + * The following uses a shorthand for a transition whose source + * is the immediately preceding state. + */ + state off; + accept 'Vehicle Start Signal' if vehicle1_c1.'brake pedal depressed' do send new 'Start Signal'() to vehicle1_c1.vehicleController then starting; + state starting; + accept 'Vehicle On Signal' then on; + state on { + entry 'perform self test'; + do 'provide power'; + exit 'apply parking brake'; + } + accept 'Vehicle Off Signal' then off; + } + state 'health states' { + entry; + then normal; + do 'sense temperature' { + out temp; + } + /* + * The shorthand can be used for multiple transitions after + * a single state. + */ + state normal; + accept at vehicle1_c1.maintenanceTime then maintenance; + accept when 'sense temperature'.temp > vehicle1_c1.Tmax do send new 'Over Temp'() to vehicle1_c1.vehicleController then degraded; + state maintenance; + accept 'Return to Normal' then normal; + state degraded; + accept 'Return to Normal' then normal; + } + } + state 'controller states': 'Controller States' parallel { + state 'operational controller states' { + entry; + then off; + state off; + accept 'Start Signal' then on; + state on; + accept 'Off Signal' then off; + } + } + part vehicle1_c1: VehicleA { + port fuelCmdPort { + in fuelCmd: FuelCmd; + } + attribute 'brake pedal depressed': Boolean; + attribute maintenanceTime: Time::DateTime; + attribute Tmax: ThermodynamicTemperatureValue; + perform 'provide power' :>> VehicleA::'provide power' { + in fuelCmd = fuelCmdPort.fuelCmd; + } + exhibit 'vehicle states' :>> VehicleA::'vehicle states'; + part vehicleController: VehicleController { + exhibit 'controller states' :>> VehicleController::'controller states'; + } + } + } +} diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Writers/TextualNotationValidationTestFixture.cs b/SysML2.NET.Serializer.TextualNotation.Tests/Writers/TextualNotationValidationTestFixture.cs index d9a014d3..dd3ed5aa 100644 --- a/SysML2.NET.Serializer.TextualNotation.Tests/Writers/TextualNotationValidationTestFixture.cs +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Writers/TextualNotationValidationTestFixture.cs @@ -51,6 +51,8 @@ public class TextualNotationValidationTestFixture [TestCase("03-Function-based Behavior", "3e-Function-based Behavior-item.sysmlx")] [TestCase("04-Functional Allocation", "4a-Functional Allocation.sysmlx")] [TestCase("05-State-based Behavior", "5-State-based Behavior-1a.sysmlx")] + [TestCase("05-State-based Behavior", "5-State-based Behavior-1.sysmlx")] + [TestCase("05-State-based Behavior", "5-State-based Behavior-2.sysmlx")] public async Task VerifyValidationTextualNotationXmi(string folderName, string fileName) { var loggerFactory = LoggerFactory.Create(builder => diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/FeatureMembershipTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/FeatureMembershipTextualNotationBuilder.cs index cdf92458..90c99fa3 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/FeatureMembershipTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/FeatureMembershipTextualNotationBuilder.cs @@ -95,7 +95,10 @@ private static void BuildEntryTransitionMemberHandCoded(IFeatureMembership poco, } else if (ownedRelatedElementCursor.Current is SysML2.NET.Core.POCO.Systems.Connections.ISuccessionAsUsage targetSuccession) { - stringBuilder.Append("then "); + // The rule's own 'then' is deliberately NOT emitted: TargetSuccession already supplies one + // ('SourceEndMember 'then' ConnectorEndMember'), so following the KEBNF literally yields + // `then then off;`, which no parser accepts. See SysML-v2-Release issue #124 item 8 and the + // "Known KEBNF divergences" section of SysML2.NET.CodeGenerator/GRAMMAR.md. SuccessionAsUsageTextualNotationBuilder.BuildTargetSuccession(targetSuccession, writerContext, stringBuilder); ownedRelatedElementCursor.Move(); } diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/NameResolutionCache.cs b/SysML2.NET.Serializer.TextualNotation/Writers/NameResolutionCache.cs index c03f9b96..665b5bb1 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/NameResolutionCache.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/NameResolutionCache.cs @@ -1261,12 +1261,15 @@ private Dictionary>> B /// Whether the scope is reached through the global namespace. private void BuildOwnedAndImportedEntries(INamespace scope, Dictionary> index, Queue<(INamespace Scope, bool IsGlobal)> pending, bool isGlobal) { + var ownedMemberships = new List(); + try { foreach (var ownedMember in scope.ownedMembership.Where(ownedMember => IsVisibleWhenGlobal(ownedMember, isGlobal))) { AddMembershipEntry(index, ownedMember, pending, isGlobal); this.RecordAliasIfDeclared(scope, ownedMember); + ownedMemberships.Add(ownedMember); } } catch (NotSupportedException) @@ -1274,13 +1277,20 @@ private void BuildOwnedAndImportedEntries(INamespace scope, Dictionary(index.Keys, StringComparer.Ordinal); + try { foreach (var ownedImport in scope.ownedImport.Where(ownedImport => IsVisibleWhenGlobal(ownedImport, isGlobal))) { switch (ownedImport) { - case IMembershipImport { ImportedMembership: { } importedMembership }: + case IMembershipImport { ImportedMembership: { } importedMembership } + when !CollidesWithOwnedMembership(importedMembership, ownedNames, ownedMemberships): + AddMembershipEntry(index, importedMembership, pending, isGlobal); this.RecordAliasIfDeclared(scope, importedMembership); @@ -1301,7 +1311,8 @@ private void BuildOwnedAndImportedEntries(INamespace scope, Dictionary !CollidesWithOwnedMembership(importedMember, ownedNames, ownedMemberships))) { AddMembershipEntry(index, importedMember, pending, isGlobal); @@ -1635,13 +1646,7 @@ private static void AddMembershipEntry(Dictionary> ind return; } - var shortName = !string.IsNullOrWhiteSpace(membership.MemberShortName) - ? membership.MemberShortName - : target.shortName; - - var longName = !string.IsNullOrWhiteSpace(membership.MemberName) - ? membership.MemberName - : target.name; + var (shortName, longName) = QueryMembershipNames(membership, target); AddIndexEntry(index, shortName, target); AddIndexEntry(index, longName, target); @@ -1652,6 +1657,60 @@ private static void AddMembershipEntry(Dictionary> ind } } + /// + /// Returns the two lexical forms a membership binds: the membership's explicit name overrides when + /// present, else the member element's own names. + /// + /// The membership doing the binding. + /// The membership's member element. + /// The short and long lexical forms; either may be . + private static (string ShortName, string LongName) QueryMembershipNames(IMembership membership, IElement target) + { + return (!string.IsNullOrWhiteSpace(membership.MemberShortName) ? membership.MemberShortName : target.shortName, + !string.IsNullOrWhiteSpace(membership.MemberName) ? membership.MemberName : target.name); + } + + /// + /// Determines whether an IMPORTED membership has a distinguishability collision with an owned + /// membership of the importing scope, which Namespace::importedMemberships excludes. Without + /// this the homonym competes with the owned member and forces a needlessly qualified reference + /// ('Model'::Definitions instead of Definitions). + /// Delegates to : a shared name is NOT + /// sufficient, since two memberships remain distinguishable when neither member element's metaclass + /// conforms to the other's. The name check is only a cheap pre-filter — differing names always imply + /// distinguishable, so it can never reject a genuine collision. + /// + /// The candidate imported membership. + /// Names bound by the scope's owned memberships, used to pre-filter. + /// The scope's owned memberships, tested on a name hit. + /// when the imported membership must be excluded. + private static bool CollidesWithOwnedMembership(IMembership membership, HashSet ownedNames, List ownedMemberships) + { + if (ownedNames.Count == 0 || membership is not { MemberElement: { } target }) + { + return false; + } + + var (shortName, longName) = QueryMembershipNames(membership, target); + + var sharesName = (!string.IsNullOrWhiteSpace(shortName) && ownedNames.Contains(shortName)) + || (!string.IsNullOrWhiteSpace(longName) && ownedNames.Contains(longName)); + + if (!sharesName) + { + return false; + } + + try + { + return ownedMemberships.Any(owned => !membership.IsDistinguishableFrom(owned)); + } + catch (NotSupportedException) + { + return false; + } + } + /// /// Adds to under /// when the name is non-blank. diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/TextualNotationValidationExtensions.cs b/SysML2.NET.Serializer.TextualNotation/Writers/TextualNotationValidationExtensions.cs index 18b3f020..caba14a0 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/TextualNotationValidationExtensions.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/TextualNotationValidationExtensions.cs @@ -897,20 +897,26 @@ internal static bool IsValidForTransitionUsageMember(this IFeatureMembership fea /// Asserts that the is valid for the TargetTransitionUsageMember rule (StateBodyItem). /// TargetTransitionUsageMember : FeatureMembership = MemberPrefix ownedRelatedElement += TargetTransitionUsage /// TargetTransitionUsage : TransitionUsage = ownedRelationship += EmptyParameterMember … - /// Limitation: TargetTransitionUsage shares the - /// metaclass with plain TransitionUsage. Heuristic distinguisher: the first owned - /// relationship is an whose parameter carries no owned - /// related element (the "empty parameter" marker). This is pattern-based and may not - /// perfectly capture the parse context. + /// TargetTransitionUsage shares the metaclass with plain + /// TransitionUsage, so two SHAPE conditions separate them here. The transition must be + /// ANONYMOUS — TargetTransitionUsage has no UsageDeclaration slot, so a named + /// transition cannot round-trip through it — and it must carry an EmptyParameterMember. + /// Note the emptiness test: an EmptyParameterMember owns an EmptyUsage + /// (EmptyUsage : ReferenceUsage = {}), so it has ONE owned related element, not zero. + /// The remaining condition — that the transition's source is the nearest preceding + /// BehaviorUsageMember — needs sibling context this signature does not carry, so it lives in + /// BuildStateBodyItemHandCoded. /// /// The /// The active (unused for this guard) - /// True if the membership owns a transition usage whose first parameter is empty + /// True if the membership owns an anonymous transition usage with an empty parameter. internal static bool IsValidForTargetTransitionUsageMember(this IFeatureMembership featureMembership, TextualNotationWriterContext writerContext) { return featureMembership?.OwnedRelatedElement.OfType().Any(transition => - transition.OwnedRelationship.OfType().FirstOrDefault() is IParameterMembership parameterMembership - && parameterMembership.OwnedRelatedElement.Count == 0) == true; + string.IsNullOrWhiteSpace(transition.DeclaredName) + && string.IsNullOrWhiteSpace(transition.DeclaredShortName) + && transition.OwnedRelationship.OfType().FirstOrDefault() is { } parameterMembership + && parameterMembership.IsEmptyParameterMember()) == true; } /// diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/TypeTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/TypeTextualNotationBuilder.cs index a51ddf86..40b1835b 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/TypeTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/TypeTextualNotationBuilder.cs @@ -22,7 +22,9 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; + using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; + using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; using SysML2.NET.Core.POCO.Systems.States; @@ -294,14 +296,11 @@ private static void BuildStateBodyItemHandCoded(IType poco, TextualNotationWrite { FeatureMembershipTextualNotationBuilder.BuildSourceSuccessionMember(featureMembershipForSuccession, writerContext, stringBuilder); ownedRelationshipCursor.Move(); - FeatureMembershipTextualNotationBuilder.BuildBehaviorUsageMember((IFeatureMembership)ownedRelationshipCursor.Current, writerContext, stringBuilder); + var anchoredBehaviorMember = (IFeatureMembership)ownedRelationshipCursor.Current; + FeatureMembershipTextualNotationBuilder.BuildBehaviorUsageMember(anchoredBehaviorMember, writerContext, stringBuilder); ownedRelationshipCursor.Move(); - while (ownedRelationshipCursor.Current is IFeatureMembership targetTransition && targetTransition.IsValidForTargetTransitionUsageMember(writerContext)) - { - FeatureMembershipTextualNotationBuilder.BuildTargetTransitionUsageMember(targetTransition, writerContext, stringBuilder); - ownedRelationshipCursor.Move(); - } + EmitTargetTransitionRun(anchoredBehaviorMember, ownedRelationshipCursor, writerContext, stringBuilder); } else if (nextElement is IFeatureMembership nextForStructure && nextForStructure.IsValidForStructureUsageMember(writerContext)) { @@ -324,11 +323,7 @@ private static void BuildStateBodyItemHandCoded(IType poco, TextualNotationWrite FeatureMembershipTextualNotationBuilder.BuildBehaviorUsageMember(featureMembershipForBehavior, writerContext, stringBuilder); ownedRelationshipCursor.Move(); - while (ownedRelationshipCursor.Current is IFeatureMembership targetTransition && targetTransition.IsValidForTargetTransitionUsageMember(writerContext)) - { - FeatureMembershipTextualNotationBuilder.BuildTargetTransitionUsageMember(targetTransition, writerContext, stringBuilder); - ownedRelationshipCursor.Move(); - } + EmitTargetTransitionRun(featureMembershipForBehavior, ownedRelationshipCursor, writerContext, stringBuilder); break; } @@ -347,5 +342,59 @@ private static void BuildStateBodyItemHandCoded(IType poco, TextualNotationWrite } } + /// + /// Emits the ( ownedRelationship += TargetTransitionUsageMember )* run that may follow a + /// BehaviorUsageMember, using the shorthand form (accept X then Y;) whose source is + /// implied by . + /// + /// The just emitted as the BehaviorUsageMember. + /// The body cursor, positioned after . + /// The for the current write. + /// The accumulating the notation. + private static void EmitTargetTransitionRun(IFeatureMembership anchorMember, CollectionCursor ownedRelationshipCursor, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) + { + var anchorFeature = anchorMember.OwnedRelatedElement.OfType().FirstOrDefault(); + + while (ownedRelationshipCursor.Current is IFeatureMembership targetTransition + && targetTransition.IsValidForTargetTransitionUsageMember(writerContext) + && QueryImpliedSourceTransition(targetTransition, anchorFeature) is { } transitionUsage) + { + // TargetTransitionUsage has NO notation for the source, but the model records it (the pilot + // resolves the shorthand at parse time), so the cursor must step past it unemitted before + // the generated builder reads the EmptyParameterMember. + writerContext.CursorCache + .GetOrCreateCursor(transitionUsage.Id, "ownedRelationship", transitionUsage.OwnedRelationship) + .Move(); + + FeatureMembershipTextualNotationBuilder.BuildTargetTransitionUsageMember(targetTransition, writerContext, stringBuilder); + ownedRelationshipCursor.Move(); + } + } + + /// + /// Returns the transition owned by when its source is exactly + /// — the condition under which the source may be left implicit. + /// A source naming anything else must keep the explicit transition <source> form, or the + /// shorthand would re-parse against the preceding state and denote a different element. + /// + /// The candidate . + /// The feature whose name the shorthand implies; may be . + /// The transition eligible for the shorthand, or . + private static ITransitionUsage QueryImpliedSourceTransition(IFeatureMembership candidate, IFeature anchorFeature) + { + if (anchorFeature == null) + { + return null; + } + + var transitionUsage = candidate.OwnedRelatedElement.OfType().FirstOrDefault(); + + // The source is the FeatureChainMember: a non-owning Membership cross-referencing the state. + return transitionUsage?.OwnedRelationship.FirstOrDefault() is IMembership sourceMembership + && sourceMembership is not IOwningMembership + && ReferenceEquals(sourceMembership.MemberElement, anchorFeature) + ? transitionUsage + : null; + } } } From ea4aeff23c11e6e461a4ce751262fd6c3983ac68 Mon Sep 17 00:00:00 2001 From: atheate Date: Tue, 11 Aug 2026 10:57:10 +0200 Subject: [PATCH 4/5] Excluding integration from cicd --- .github/workflows/CodeQuality.yml | 2 +- SySML2.NET.REST.Tests/RestClientTestFixture.cs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CodeQuality.yml b/.github/workflows/CodeQuality.yml index 20adafe3..7096aded 100644 --- a/.github/workflows/CodeQuality.yml +++ b/.github/workflows/CodeQuality.yml @@ -46,7 +46,7 @@ jobs: run: dotnet build --no-restore --no-incremental /p:ContinuousIntegrationBuild=true - name: Run Tests and Compute Coverage - run: dotnet-coverage collect "dotnet test SysML2.NET.sln --no-restore --no-build --verbosity normal" -f xml -o "coverage.xml" + run: dotnet-coverage collect "dotnet test SysML2.NET.sln --no-restore --no-build --verbosity normal --filter TestCategory!=Integration" -f xml -o "coverage.xml" - name: Sonarqube end env: diff --git a/SySML2.NET.REST.Tests/RestClientTestFixture.cs b/SySML2.NET.REST.Tests/RestClientTestFixture.cs index 59b80937..6f912d9a 100644 --- a/SySML2.NET.REST.Tests/RestClientTestFixture.cs +++ b/SySML2.NET.REST.Tests/RestClientTestFixture.cs @@ -30,9 +30,10 @@ namespace SySML2.NET.REST.Tests using NUnit.Framework; /// - /// Suite of tests for the class + /// Suite of tests for the class. /// [TestFixture] + [Category("Integration")] public class RestClientTestFixture { private string baseUri; From 24874b9ef7d6046a4b244b81dc2eea9f4390ec9e Mon Sep 17 00:00:00 2001 From: atheate Date: Tue, 11 Aug 2026 11:12:25 +0200 Subject: [PATCH 5/5] SQ fix --- .../Writers/TypeTextualNotationBuilder.cs | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/TypeTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/TypeTextualNotationBuilder.cs index 40b1835b..29bc58ab 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/TypeTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/TypeTextualNotationBuilder.cs @@ -33,6 +33,11 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers /// public static partial class TypeTextualNotationBuilder { + /// + /// Name of the ownedRelationship collection, used as the cursor cache key. + /// + private const string OwnedRelationshipCollection = "ownedRelationship"; + /// /// Builds the Textual Notation string for the rule ActionBodyItem /// ActionBodyItem:Type=NonBehaviorBodyItem|ownedRelationship+=InitialNodeMember(ownedRelationship+=ActionTargetSuccessionMember)*|(ownedRelationship+=SourceSuccessionMember)?ownedRelationship+=ActionBehaviorMember(ownedRelationship+=ActionTargetSuccessionMember)*|ownedRelationship+=GuardedSuccessionMember @@ -42,7 +47,7 @@ public static partial class TypeTextualNotationBuilder /// The that contains the entire textual notation private static void BuildActionBodyItemHandCoded(IType poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { - var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); + var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, OwnedRelationshipCollection, poco.OwnedRelationship); while (ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Root.Elements.IRelationship actionBodyItem && actionBodyItem.IsValidForActionBodyItem(writerContext)) @@ -162,7 +167,7 @@ private static void BuildTypeDeclarationHandCoded(IType poco, TextualNotationWri ElementTextualNotationBuilder.BuildIdentification(poco, writerContext, stringBuilder); - var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); + var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, OwnedRelationshipCollection, poco.OwnedRelationship); // Optional OwnedMultiplicity: single += consumption if the current ownedRelationship element // is an OwningMembership containing an IMultiplicity (OwnedMultiplicity:OwningMembership). @@ -256,7 +261,7 @@ private static void BuildInterfaceBodyItemHandCoded(IType poco, TextualNotationW /// private static void BuildStateBodyItemHandCoded(IType poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { - var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); + var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, OwnedRelationshipCollection, poco.OwnedRelationship); while (ownedRelationshipCursor.Current != null) { @@ -363,7 +368,7 @@ private static void EmitTargetTransitionRun(IFeatureMembership anchorMember, Col // resolves the shorthand at parse time), so the cursor must step past it unemitted before // the generated builder reads the EmptyParameterMember. writerContext.CursorCache - .GetOrCreateCursor(transitionUsage.Id, "ownedRelationship", transitionUsage.OwnedRelationship) + .GetOrCreateCursor(transitionUsage.Id, OwnedRelationshipCollection, transitionUsage.OwnedRelationship) .Move(); FeatureMembershipTextualNotationBuilder.BuildTargetTransitionUsageMember(targetTransition, writerContext, stringBuilder); @@ -389,8 +394,13 @@ private static ITransitionUsage QueryImpliedSourceTransition(IFeatureMembership var transitionUsage = candidate.OwnedRelatedElement.OfType().FirstOrDefault(); + if (transitionUsage == null || transitionUsage.OwnedRelationship.Count == 0) + { + return null; + } + // The source is the FeatureChainMember: a non-owning Membership cross-referencing the state. - return transitionUsage?.OwnedRelationship.FirstOrDefault() is IMembership sourceMembership + return transitionUsage.OwnedRelationship[0] is IMembership sourceMembership && sourceMembership is not IOwningMembership && ReferenceEquals(sourceMembership.MemberElement, anchorFeature) ? transitionUsage